• Derp RP Buyers - DarkRP Entity buyers
    67 replies, posted
  • Avatar of jakegadget
  • [release] [b]What is this?[/b] 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). [i]This was created at a request.[/i] [b]How do I use them?[/b] Just pick up a valid entity and touch it to them with the grav gun. [b]Why...?[/b] This is definitely a niche addon. It is best used with things that produce entities over time, such as this [url=http://www.facepunch.com/showthread.php?t=945597]plant[/url]. I recommend [b]not using this with any entities purchasable from the f4 menu[/b]. That would result in money farming. [b]Features?[/b] -Definable item database for purchasing -Invincible "npcs" -Seprate names and models per "npc" -Saving and loading on map start -DarkRP Themed 3D2D labels -[b]Miniature supply demand on npcs[/b] (As you buy from them their buy amount goes down, and increases slowly over time.) [b]Setup[/b] Look where you want an npc and type in console: [code] drp_makebuyer <index from buyer table (see below)> <model> <name (shown on label)> [/code] 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 [/code] 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 [/code] Now your npc will spawn on map start! To remove him, just hit him with your remove tool and run the save command again. [b]No picky, no clicky[/b] [img_thumb]http://s3-llnw-screenshots.wegame.com/10-8556641542873645/8556641542873645.jpg[/img_thumb] [img_thumb]http://s3-llnw-screenshots.wegame.com/10-5820968202638994/5820968202638994.jpg[/img_thumb] [b]How does I added moar items![/b] Adding more items is easy! Just open up [i]drpnpcshared.lua[/i] 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): [lua] 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" } } [/lua] [b]What next?[/b] 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. [b]Download[/b] [i]v1.0[/i] [url=http://www.garrysmod.org/downloads/?a=view&id=101997][img]http://www.garrysmod.org/img/?t=dll&id=101997[/img][/url] [/release]
  • Avatar of CryoShocked
  • 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
  • Avatar of redx475
  • Goddammit... I was thinking of something like this for my shopmod... STOP STEALING MY IDEAS, even if we do work together on stuff :)
  • Avatar of jakegadget
  • [QUOTE=redx475;22809360]Goddammit... I was thinking of something like this for my shopmod... STOP STEALING MY IDEAS, even if we do work together on stuff :)[/QUOTE] 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.
  • Avatar of redx475
  • 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.
  • Avatar of FunnyGamer
  • 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.
  • Avatar of MHGooseMH
  • 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.
  • Avatar of cap5555
  • 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 )
  • Avatar of jakegadget
  • [QUOTE=FunnyGamer;22816808]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.[/QUOTE] 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.
  • Avatar of Kurtis AxL
  • If you made a full shop system with buying + selling, this would be an amazing add on to dark rp.
  • Avatar of redx475
  • If you want selling, look in the addons section for ShopMod, though it doesn't support NPCs that buy currently.
  • 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
  • I just realized none of the shops work and I did a clean install I am still tampering with this though
  • Avatar of Drogoth
  • So uh, how would i add the akbuyer? im confused can you plz give me an example?
  • Avatar of Lua Noob
  • drp_labpos Does not seem to work for me. I tried like 20 times and couldn't get it to work. [editline]08:28PM[/editline] Nevermind I got it to work
  • Avatar of Lua Noob
  • 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
  • Avatar of robby
  • [QUOTE=Errolight;22976828]dos it works in sandbox..???[/QUOTE] No... sandbox doesn't even have money. What would be the point?
  • Avatar of MICKMAC
  • 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?
  • [QUOTE=MICKMAC;23079288]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?[/QUOTE] drp_makebuyer melonbuyer models/player/Eli.mdl MelonBuyer and maybe you could look at something else..?
  • 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)
  • 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)
  • Avatar of Inkie
  • 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.
  • Avatar of Carocrazy
  • [QUOTE=Inkie;23617978]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.[/QUOTE] [url]http://www.facepunch.com/showthread.php?t=955742[/url] I'm getting the error drpnpc.lua:42 tried to use a null entity, halp? :3
  • 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