Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
I dont think you can remove items on wich slot the cursor is, but you can remove if you click on itI tried numerous codes but still doesn't work.
code_language.skript:remove 1 from cursor slot of player
Is there any other code that allows me to remove a specific amount from the cursor
set {_item} to cursor slot of player
remove 1 of {_item} from player
yeah just read the docs thats possible:i think you can do something like
code_language.skript:set {_item} to cursor slot of player remove 1 of {_item} from player
Ahh sureCould you please give an example of your code? Just so we can see exactly how you are handling it, and try to help you make it work.
on mor.inventory click:
player's tool is any pickaxe or shovel or axe:
player's cursor slot is nether_star:
name of player's cursor slot is "&fDurability Fragment":
if event-item is player's tool:
cancel the event
set {_item} to cursor slot of player
remove 1 of {_item} from player
repair player's tool by 10
wait 2 ticks
else:
send "&fPlease hold the item you want to fix and drag the fragment to it."
remove 1 of player's cursor slot from player's cursor slot
on inventory click:
if clicked item is any pickaxe or shovel or axe:
player's cursor slot is nether_star:
name of player's cursor slot is "&fDurability Fragment":
if clicked item is player's tool:
cancel the event
remove 1 of player's cursor slot from player's cursor slot
repair player's tool by 10
wait 2 ticks
else:
send "&fPlease hold the item you want to fix and drag the fragment to it."
You're welcome... glad to helpThanks for helping! It works now.
I got 1 more thing to ask. How do you detect how much durability is there in your player tool? I triedYou're welcome... glad to help