When somebody clicks on an item in a TuSKe GUI I want that item to be deleted and I would like for somebody to point me in the right direction! I want the player to drag an item into an anvil and that item that was dragged into the anvil to vanish while it gives you a new, better item.
My code so far:
This code does perform the function, but it doesn't delete the item I want.
I would be glad if anyone helped!
My code so far:
Code:
function reforgeRustyHoe(p: player):
send "yes" to {_p}
remove wooden hoe named "&7Rusty Hoe" from {_p}'s inventory
on right click on anvil:
cancel event
open virtual hopper inventory named "&aReforge Station" to player
format gui slot 0 and 1 and 3 and 4 of player with dark gray stained glass pane named "&f"
format gui slot 2 of player with anvil named "&aReforge" with lore "&7Requires 1 Reforge Token" and "&7Drag and drop tools here to reforge them." to run function reforgeRustyHoe(player) with cursor wooden hoe named "&7Rusty Hoe"
This code does perform the function, but it doesn't delete the item I want.
I would be glad if anyone helped!