On right click 3 times

  • Welcome to skUnity!

    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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SrirachaMC

Member
Feb 26, 2021
3
0
1
23
Is there a way for me to remove a compass from the inventory when it has been used (or right clicked) 3 times? I don't have any starter code since I can't find anything in the Skript documentation about this. Thx!
 
Is there a way for me to remove a compass from the inventory when it has been used (or right clicked) 3 times? I don't have any starter code since I can't find anything in the Skript documentation about this. Thx!
This worked for me:
code_language.skript:
on right click:
    if player's held item is a compass:
        add 1 to {n.%player%}
        if {n.%player%} >= 3:
            remove a compass from player's inventory
            delete {n.%player%}
 
Status
Not open for further replies.