Hello , I recently created a virtual currency on my server in the form of an item (gold nugget) with a custom name in color and a lore also personalized, I am looking for a way to make an order /selln which allows to sell this personalized item (and not the gold nuggets not modified) when the user in it is inventory and type the command
The script works, but my concern is that even if there are several golden pepites in the inventory it only gives me the value of a nugget
The script works, but my concern is that even if there are several golden pepites in the inventory it only gives me the value of a nugget
Code:
command /selln:
trigger:
if player is holding a gold nugget: # Ou : if player's tool is gold nugget:
if name of tool of player is "Nom de ton item":
if lore of tool of player contain "Une partie de ton lore":
remove player's tool from player's inventory
send "Vous avez vendu cet objet" to player
add 10 to {Money::%player%}
stop
else:
send "Erreur: L'objet n'a pas la description requise" to player
stop
else:
send "Erreur: L'objet n'a pas le nom requis !" to player
stop
else:
send "Erreur: L'objet n'est pas le bon !" to player
stop