Hello! So I'm looking for a simple /sell skript let me describe it a bit.
So the user does /sell:
- It will then check if the item in the player's hand is in a list of sellable items (maybe make this a text document I can edit or just like a /sell additem <item> or something cause I basically want to just be able to sell crops etc sugarcane, melons, etc.
- Ok so if the item is sellable it will tell me the value of the item and the amount of $ I would get from selling my whole inventory worth and then I just left click with the item to confirm the sale and sell all of that item in the players inventory and award them money (I have vault and EssentialsEconomy).
- The kicker here is then I want it to add the amount sold to a variable so like the variables will look like this. This will be the amount of each item sold for each player.
Mightor:
itemname : # sold
sugarcane: 1200
melon: 100
wheat: 240
total sold of all items: 1540
and then when they go to /sell next time I want the price to be adjusted so if they've sold a lot of that item and very little of other items it will reward very little money. Formula for prices would be like this:
Price = 1 - (# of that item / # of total items)
so like the value of sugarcane now is
Price = 1 - 1200/1540
or
Price = .22
so next time I go to /sell I only get $.22 / sugarcane. This will force me to not just farm and sell 1 item but make a new farm every once and a while because the value of that new item will now be worth a lot more so its worth my time to make a new farm for that item.
Please let me know if you could skript this for me. In 1.13.2! Thanks!
So the user does /sell:
- It will then check if the item in the player's hand is in a list of sellable items (maybe make this a text document I can edit or just like a /sell additem <item> or something cause I basically want to just be able to sell crops etc sugarcane, melons, etc.
- Ok so if the item is sellable it will tell me the value of the item and the amount of $ I would get from selling my whole inventory worth and then I just left click with the item to confirm the sale and sell all of that item in the players inventory and award them money (I have vault and EssentialsEconomy).
- The kicker here is then I want it to add the amount sold to a variable so like the variables will look like this. This will be the amount of each item sold for each player.
Mightor:
itemname : # sold
sugarcane: 1200
melon: 100
wheat: 240
total sold of all items: 1540
and then when they go to /sell next time I want the price to be adjusted so if they've sold a lot of that item and very little of other items it will reward very little money. Formula for prices would be like this:
Price = 1 - (# of that item / # of total items)
so like the value of sugarcane now is
Price = 1 - 1200/1540
or
Price = .22
so next time I go to /sell I only get $.22 / sugarcane. This will force me to not just farm and sell 1 item but make a new farm every once and a while because the value of that new item will now be worth a lot more so its worth my time to make a new farm for that item.
Please let me know if you could skript this for me. In 1.13.2! Thanks!