Solved Code 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.

Kontanaro

Member
Feb 21, 2021
4
0
1
25
Hey! i made this code and the wither drops the stuff i want to but the chestplate abilities are not working and abilities of the leggings are not working i don't know why

Code:
on death:
    if victim is wither:
        chance of 50%:
            set {_idem} to leather tunic named "&0Wither Chestplate"
            dye {_idem} black
            drop {_idem} at victim's location
            stop
        chance of 50%:
            set {_ilem} to leather leggings named "&0Wither Leggings" with lore "&f&lRight click: fly" and "&a&lLeft click: stop flying"
            dye {_ilem} black
            drop {_ilem} at victim's location
            

on damage:
    if attacker's chestplate is {_idem}:
        apply poison to the victim for 3 seconds
        add 5 to the damage
        

on right click:
    if player is wearing leather leggings named "&0Wither Leggings":
        set player's flight mode to true

on left click:   
    if player is wearing leather leggings named "&0Wither Leggings":
        set player's flight mode to false
 
the underscore makes it a local variable (read a tutorial about it)
try removing them
 
Status
Not open for further replies.