1. Post #1
    jakegadget's Avatar
    June 2009
    167 Posts
    [release]
    What is this?
    DerpRP Buyers are npc's that purchase entities from you in DarkRP. This is very similar to the pawnshop npc in OC. As you sell and buy the buy price changes (see below).

    This was created at a request.

    How do I use them?
    Just pick up a valid entity and touch it to them with the grav gun.

    Why...?
    This is definitely a niche addon. It is best used with things that produce entities over time, such as this plant. I recommend not using this with any entities purchasable from the f4 menu. That would result in money farming.

    Features?
    -Definable item database for purchasing
    -Invincible "npcs"
    -Seprate names and models per "npc"
    -Saving and loading on map start
    -DarkRP Themed 3D2D labels
    -Miniature supply demand on npcs (As you buy from them their buy amount goes down, and increases slowly over time.)

    Setup
    Look where you want an npc and type in console:
    Code:
    drp_makebuyer <index from buyer table (see below)> <model> <name (shown on label)>
    And if all went right you npc is created! Before you can save him, you need to place his label somewhere. Look where you want it and type:
    Code:
    drp_labpos
    If you missplace, just run it again until you have it right.

    Now that your npc and label are placed, finish up by typing:
    Code:
    drp_savenpcs
    Now your npc will spawn on map start! To remove him, just hit him with your remove tool and run the save command again.

    No picky, no clicky



    How does I added moar items!
    Adding more items is easy!

    Just open up drpnpcshared.lua and add your item in following the previous entries as an example. Here is an addition of an npc that buys money printers (read warning above):
    buyers = {
    	foodbuyer = { --name used in concommand
    		entclass = "food", --entity name
    		buyamt = 10, --base amount to buy for
    		flux = 1, --how much it changes up/down (0 to disable changing)
    		max = 15, --if flux =/= 0 then minimun and maximun buy amounts
    		min = 5, -- ^^
    		nicename = "Chinese Food" -- nice name show, shows as "Buying xxx"
    	},
    	akbuyer = {
    		entclass = "spawned_weapon",
    		buyamt = 250,
    		flux = 5,
    		max = 300,
    		min = 225,
    		requiredvars = {weaponclass = "weapon_ak472"}, --ADVANCED: If your entity has extra variables, this will check them (server side)
    		nicename = "Ak-47's"
    	},
    	melonbuyer = {
    		entclass = "spawned_food",
    		buyamt = 5,
    		flux = 0, --disable changin of price so we dont need min/max
    		requiredmodel = "models/props_junk/watermelon01.mdl", --ADVANCED: only buy entites with the correct model
    		nicename = "Melons"
    	},
    	printerbuyer = {
    		entclass = "money_printer",
    		buyamt = 500,
    		flux = 25,
    		max = 800,
    		min = 200,
    		nicename = "Money Printers"
    	}
    }
    

    What next?
    I would like to make a list of purchasable items and allow them to be sold to a single npc, however I don't see any non bug fixing updates unless people show an interest in this.


    Also, if anyone finds any bugs, please report them here.

    Download
    v1.0


    [/release]
    Reply With Quote Edit / Delete Reply United States Show Events Useful x 8Dumb x 3Lua King x 1Bad Spelling x 1Informative x 1 (list)

  2. Post #2
    CryoShocked's Avatar
    March 2010
    18 Posts
    This is a pretty sweet addon. Too bad not many people know about this addon. I'm sure it would be used on lots of servers! :D
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 2Winner Winner x 1 (list)

  3. Post #3
    redx475's Avatar
    February 2009
    546 Posts
    Goddammit... I was thinking of something like this for my shopmod... STOP STEALING MY IDEAS, even if we do work together on stuff :)
    Reply With Quote Edit / Delete Reply United States Show Events Funny Funny x 2Dumb Dumb x 1 (list)

  4. Post #4
    Gold Member
    BurningPride's Avatar
    August 2008
    1,646 Posts
    Awesome!

  5. Post #5
    jakegadget's Avatar
    June 2009
    167 Posts
    Goddammit... I was thinking of something like this for my shopmod... STOP STEALING MY IDEAS, even if we do work together on stuff :)
    Haha sorry. I was hoping I wasn't infringing on your territory too much. I just had the guy that asked for it riding me pretty hard.

  6. Post #6
    redx475's Avatar
    February 2009
    546 Posts
    Lol I was kidding... It would be hard to make something that could easily work with any inventory though, so I have other things to do first.

  7. Post #7
    Gold Member
    FunnyGamer's Avatar
    January 2008
    2,537 Posts
    Wouldn't the cost of an item go UP as people buy more of it, as opposed to down?

    Inversely, wouldn't it also slowly move back down over time?

    The OP's hard to understand.

  8. Post #8
    MHGooseMH's Avatar
    February 2010
    75 Posts
    A suggestion: The price for the goods should gradually become lower as the "npc" receives more of the goods.
    Other then that,it seems like a nice idea. Added to my server.
    Reply With Quote Edit / Delete Reply Hong Kong Show Events Bad Reading Bad Reading x 1 (list)

  9. Post #9
    cap5555's Avatar
    February 2009
    153 Posts
    i was wondering if i could use this for my gamemode
    also i would need to code them as well will give credit (not credit on the server :P )

  10. Post #10
    Ssimoco's Avatar
    March 2010
    117 Posts
    jake ? can you also make a cardealer npc ?

  11. Post #11
    jakegadget's Avatar
    June 2009
    167 Posts
    Wouldn't the cost of an item go UP as people buy more of it, as opposed to down?

    Inversely, wouldn't it also slowly move back down over time?

    The OP's hard to understand.
    The npcs dont sell, they buy. hence, as you sell to them, the supply is increasing and demand is decreasing. over time, if people dont sell to them the price goes up. if you let them fester they can buy for alot more, but you risk someone selling to them and lowering the price again.

  12. Post #12
    AxlGaming
    Kurtis AxL's Avatar
    March 2010
    62 Posts
    If you made a full shop system with buying + selling, this would be an amazing add on to dark rp.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 3 (list)

  13. Post #13
    Ningaglio's Avatar
    February 2009
    938 Posts
    Yes, i quite aggree. If you need help coding, just ask me ;)

  14. Post #14
    redx475's Avatar
    February 2009
    546 Posts
    If you want selling, look in the addons section for ShopMod, though it doesn't support NPCs that buy currently.

  15. Post #15

    September 2009
    184 Posts
    I have a problem with this the code i used for it was

    Cokebuyer = {
    entclass = "durgz_cocaine",
    buyamt = 750,
    flux = 10,
    max = 850,
    min = 600,
    nicename = "Coke"
    }
    }

    It just doesn't accept the cocaine for some reason.

    Can anyone help

  16. Post #16

    September 2009
    184 Posts
    I just realized none of the shops work and I did a clean install I am still tampering with this though

  17. Post #17
    Gold Member
    BillyMays's Avatar
    February 2009
    342 Posts
    Thanks Cubie, I might use this too =P

  18. Post #18
    Drogoth's Avatar
    July 2009
    8 Posts
    So uh, how would i add the akbuyer? im confused can you plz give me an example?

  19. Post #19
    Lua Noob's Avatar
    February 2010
    74 Posts
    drp_labpos Does not seem to work for me. I tried like 20 times and couldn't get it to work.

    Edited:

    Nevermind I got it to work

  20. Post #20
    Gold Member

    June 2010
    215 Posts
    dos it works in sandbox..???
    Reply With Quote Edit / Delete Reply Denmark Show Events Dumb Dumb x 3 (list)

  21. Post #21
    Lua Noob's Avatar
    February 2010
    74 Posts
    I created a npc out in the middle of the map to see if i could get it to work. It works and saves. But i don't want it there anymore and I deleted it with my tool gun and typed drp_savenpcs and restart my server hes still there. If you can make a fix or tell me what to do I'd be grateful

  22. Post #22
    Gold Member
    T3h raps13r's Avatar
    January 2006
    539 Posts
    dos it works in sandbox..???
    No... sandbox doesn't even have money. What would be the point?
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  23. Post #23
    Vegas, baby.
    PeanutTHENINJA's Avatar
    June 2009
    5,241 Posts
    Now I can make RPs for myself in single player that are more complete..
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 1 (list)

  24. Post #24
    MICKMAC's Avatar
    April 2010
    76 Posts
    Broke for me.

    I make the command.

    drp_makebuyer melonbuyer models/Eli.mdl MelonBuyer

    This spawns a frozen ragdoll like figure, with fucked up eyes.

    Then I try drp_labpos and the label is flat. So you cant see it above them, as it is horizontal.



    ANY IDEAS?
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  25. Post #25

    July 2010
    3 Posts
    Broke for me.

    I make the command.

    drp_makebuyer melonbuyer models/Eli.mdl MelonBuyer

    This spawns a frozen ragdoll like figure, with fucked up eyes.

    Then I try drp_labpos and the label is flat. So you cant see it above them, as it is horizontal.



    ANY IDEAS?
    drp_makebuyer melonbuyer models/player/Eli.mdl MelonBuyer

    and maybe you could look at something else..?

  26. Post #26

    November 2008
    22 Posts
    Having a problem with this addon everytime i try
    drp_labpos

    I get an error
    addons\derprp buyers\lua\autorun\server\drpnpc.lua:54: attempt to call method 'IsSuperAdmin' (a nil value)

  27. Post #27

    January 2010
    8 Posts
    Im using the DRP inventory so im thinking its not working together since its pretty much a remake or something...

    but here is the error everytime i try to save

    Oh yeah the npc is standing in idle with arms out which looks retarded, and yes ive used same models as on the pictures too just to be sure

    ] RCOn drp_savenpcs
    addons\derprp buyers\lua\autorun\server\drpnpc.lua:38: attempt to call method 'IsSuperAdmin' (a nil value)

  28. Post #28
    Inkie's Avatar
    June 2010
    200 Posts
    Jakegadget, or in fact anyone reading this, is there any plugin or can you produce a plugin which is kinda the opposite of this plugin. Npc vendors which can sell items.
    A quick reply would be convenient.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  29. Post #29
    Carocrazy's Avatar
    June 2009
    109 Posts
    Jakegadget, or in fact anyone reading this, is there any plugin or can you produce a plugin which is kinda the opposite of this plugin. Npc vendors which can sell items.
    A quick reply would be convenient.
    http://www.facepunch.com/showthread.php?t=955742

    I'm getting the error drpnpc.lua:42 tried to use a null entity, halp? :3

  30. Post #30

    May 2010
    47 Posts
    Whenever I type "drp_makebuyer melonbuyer models/player/Eli.mdl MelonBuyer" into Rcon i get nothing. This could be me being daft. I'm guessing i installed it wrong so ill try that first

  31. Post #31
    bertilml's Avatar
    June 2010
    201 Posts
    i can't see em?

  32. Post #32
    ryanfilps's Avatar
    October 2007
    37 Posts
    When i use this on any model they all stand with their arms out, for example the hobo on darkrp player model.

    "models/player/corpse1.mdl" is that what i should be using?

  33. Post #33
    Dwatring's Avatar
    September 2009
    767 Posts
    When i use this on any model they all stand with their arms out, for example the hobo on darkrp player model.

    "models/player/corpse1.mdl" is that what i should be using?
    No, most of the actual player models will not work. Just use the regular models with no player directory. I also wanted to say I love this mod!

  34. Post #34
    Andriko1's Avatar
    November 2009
    559 Posts
    Stop bumping this
    Reply With Quote Edit / Delete Reply Canada Show Events Dumb Dumb x 2 (list)

  35. Post #35

    June 2010
    6 Posts
    "Whenever I type "drp_makebuyer melonbuyer models/player/Eli.mdl MelonBuyer" into Rcon i get nothing. This could be me being daft. I'm guessing i installed it wrong so ill try that first".

    This. I can't get this working. I just dragged it into my addons folder on my server.
    I also tried using it as a non-addon, nothing happens in-game, when I use the command.

  36. Post #36
    Gold Member
    .\\Shadow}'s Avatar
    November 2009
    886 Posts
    "Whenever I type "drp_makebuyer melonbuyer models/player/Eli.mdl MelonBuyer" into Rcon i get nothing. This could be me being daft. I'm guessing i installed it wrong so ill try that first".

    This. I can't get this working. I just dragged it into my addons folder on my server.
    I also tried using it as a non-addon, nothing happens in-game, when I use the command.
    Maybe you should use it in your own console and make sure you're at least super admin on the server?

  37. Post #37
    ppV
    ppV's Avatar
    March 2011
    126 Posts
    Stop bumping this shit.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Disagree Disagree x 1 (list)

  38. Post #38
    Buggzie's Avatar
    December 2009
    965 Posts
    I can see this extremely exploitable, please... do install it on your server.

  39. Post #39

    June 2010
    6 Posts
    Maybe you should use it in your own console and make sure you're at least super admin on the server?
    I am server owner and I do, obviously, use my own console.. The thing above above what I typed is a quote. Any help?

  40. Post #40
    Slicks's Avatar
    July 2009
    93 Posts
    This doesn't work anymore. :C