Solved Amount of player's tool

  • 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.

Digszin

Member
Jan 26, 2017
28
0
1
32
If I have 2 bottle o' enchanting in player's tool this only count one.
Obs.: I already tried to change player's tool to event-item but don't work
code_language.skript:
on rightclick holding bottle o' Enchanting:
    if name of player's tool is "&9&lPOTE DE &a&lXP":
        cancel event
        set {_XpLore} to line 2 of lore of player's tool
        replace "&7Quantidade: &r" in {_XpLore} with ""
        set {_AdicionarXp} to {_XpLore} parsed as number
        add {_AdicionarXp} to xp of player
        remove player's tool from player's inventory
 
You can check the item amount with %item amount of player's tool% if you have bensku dev 24 or higher(You really should include version info per the help post format) With that you can set the xp to the xp for one bottle times the amount of the tool the player is holding.
 
Status
Not open for further replies.