how would i set a item in the shop to sell say 100 charcoal for 2 coins

GUI Shop
GUI Shop based on Economics. Supports NPC
Total Downloads: 11,482 - First Release: Aug 29, 2015 - Last Update: May 3, 2018
- 5/5, 38 likes
-
What does the
Code:"Shop - Balance": false,
The option is not explained anywhere in your post or in any of these comments. I suspect it attempts to make items unexploitable but I'm unsure how it does this. -
First, you'd create a kit using /kit add shop_100charcoal
Then, you'd make sure only 100 charcoal are in your inventory
Then, you'd do something like this /kit items authlevel 2 hide true
Finally, in your config file for GUIShop, you'd add a section like this to the item listing near the top:
Code:"100 Charcoal for 2 Coins": { "buy": "2", "item": "shop_100charcoal", "img": "path to image goes here", "sell": "1" }
Code:"buy": [ "100 Charcoal for 2 Coins" ]
Finally, you will need to include my update to allow kits in the shop correctly. It's on page 57-59, but I can't remember where. There is a little bug in the startup function that causes kits to be skipped because they are not found correctly with the default logic. -
It is kinda working on my server, but everytime someone sells or buys an item, i get this error in the console:
if someone sells stuff:
Code:Failed to call hook 'ccmdShopSell' on plugin 'GUIShop v1.4.2' (NullReferenceException: Object reference not set to an instance of an object)
Code:Failed to call hook 'ccmdShopBuy' on plugin 'GUIShop v1.4.2' (NullReferenceException: Object reference not set to an instance of an object)
I use the latest version of the Plugin. -
@Nogrod please - price per amount.. =] -
Player on my Server can buy items etc, as i configured it, but everytime someone sells or buys stuff, i get the following errors:
if someone sells stuff:
Code (Text):
Failed to call hook 'ccmdShopSell' on plugin 'GUIShop v1.4.2' (NullReferenceException: Object reference not set to an instance of an object)
if someone buys stuff:
Code (Text):
Failed to call hook 'ccmdShopBuy' on plugin 'GUIShop v1.4.2' (NullReferenceException: Object reference not set to an instance of an object)
How can i fix this?
I use the Plugin version 1.4.2
sincerely
Maik8 -
Thank you! -
If you buy water bottle or jugs they come empty now, can we fix this?
-
Is there a reason some of my shop values don't equal the amount I entered? Not all items are affected, but some items only show 25% of the number I entered, or 200%, or other numbers.
-
Does anyone know how to make commands work for this? I want to be able to sell the ability to call a helicopter...
Last time I tried to have the shop have a command in it, it didn't work. I'm pretty sure I set it up correctly.
Any help would be appreciated!!!
----
edit:
I tried it again, and it worked fine! Maybe I did something wrong the first time.
Thanks!Last edited by a moderator: Mar 29, 2017 -
So, we seem to have a small issue with selling items. My players will tell this program to sell 10 of an item, but it will immediately take and sell ALL of that item in their inventory without paying them for anything over that 10. Perhaps there's a logical reason for this? @Nogrod
Or perhaps I've done something by accident and futzed it all up, lol! -
I want to limit the player to buying 1 turret every 2 hours in order to gate the amount of turrets that get on to the server. Right now I have a cooldown going but the player can buy 1, 10, 100, 1000... essentially nullifying the purpose of a cooldown.
I noticed this line in the config:
"Message - Error - Cooldown Amount": "This item has a cooldown and amount is limited to 1.",
How do you get this to work? I looked in the cs and couldn't really figure it out. I thought maybe by using "fixed": true, but that doesn't appear to work. Any ideas? -
I'm having a problem when I try and sell commands that include $player.name... if there are multiple matching players with clan names, for instance, it will escape after the clan name, not select the player, and still charge money for the command...
is there any way to pass $player.name so it takes the whole name? I'd put quotation marks around it, but there already are when you put it in the shop list...
Any way around this? -
Cant anyone Tell mit how to format the Buy and Sell Price from
Code:83645623.1
Code:83,645,623.10
-
@Nogrod
I have taken your plugin to gather some experience with the coden and c #.
So far, I have no experience and no idea, so I assume that I have your code pretty fucked. But it does what it should and it looks pretty.
Unfortunately, I'm only able to adjust and modify existing but do not add new things.
So far I fail to replace the steps with a quantity value in the cofig. In addition, the right list is not yet variable but fixed in the code.
Well, currently looks the whole like this ...
PS: Translated with Google -
Is anyone else having trouble with the search light being put in? I keep getting the error that "searchlight" is an unknown item, but that's the shortname for it on Oxide API for Rust. Anyone know what it could be?
-
No problem!
"Search Light": {
"buy": "14200.00",
"img": "http://rustlabs.com/img/items40/searchlight.png",
"item": "Search Light",
"sell": "180.00"
}, -
Code:> reload GUIShop Unloaded plugin GUIShop v1.4.2 by Nogrod / Reneb Loaded plugin GUIShop v1.4.2 by Nogrod / Reneb [GUIShop] ShopCategory: Search Light Unknown item: searchlight
Code:> reload GUIShop Unloaded plugin GUIShop v1.4.2 by Nogrod / Reneb Loaded plugin GUIShop v1.4.2 by Nogrod / Reneb [GUIShop] ShopCategory: Search Light Unknown item: search light
-
its funny how are you guys getting stuff listed? i put like the example says and video say and nothing!
-
How can I have both chat shop and NPC shops? I'm sure it's been asked before, and I've seen it done elsewhere, just not sure how to configure it, I thought I had, but the NPC shop doesn't come up when I press E on it. Here's my config, added the NPC to the very bottom. Appreciate any help!
[DOUBLEPOST=1491509399][/DOUBLEPOST]ehh it didn't attach. Sorry here it is.Attached Files:
-