Solved Variable not working

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

_Jeeper_Creeper_

New Member
Jun 24, 2019
6
0
0
23
My skript is not functioning the way it should be. It is meant for getting custom mob drops depending on the looting level of the player's sword. It only drops 1 pork chop, no matter which looting level is applied.
Code:
    if victim is pig:
        if colored name of victim is "&7Pig &8(&c1&8)":
            clear drops
            remove all xp from drops
            set {_looting} to level of looting of player's tool + 1
            drop {_looting} of raw porkchop named "&f&lRaw Pork" with lore "" and "&8Rarity:&7 Common" at victim's location
            chance of 22%:
                drop 1 exp at victim's location

The code also shows no errors when loading
[doublepost=1578453831,1578445474][/doublepost]closed but idk how to close it so.....

btw the error it should be attacker's tool not player's tool
 
Try debugging the code, like this part "set {_looting} to level of looting of player's tool + 1"
 
If the issue is resolved, please mark the post as solved. Thanks.
 
Status
Not open for further replies.