Bug of skript (%event-item%)

  • 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 community!

    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.

MeHow

Active Member
Feb 6, 2017
140
13
18
Lithuania
Hello guys! I have a problem with this code:
code_language.skript:
every second in "world":
    loop all players:
        apply potion of jump boost of tier 1 to loop-player for a second
        if loop-player isn't wearing iron helmet:
            damage loop-player by 0.5 heart
            
every second:
    loop all players:
        if loop-player is wearing iron helmet:
            loop all items in loop-player's inventory:
                if loop-item is iron helmet:
                    set {_wearhelmet.%loop-player%} to loop-item
                    if {oxygen.%{_wearhelmet.%loop-player%}%} is not set:
                        set {oxygen.%{_wearhelmet.%loop-player%}%} to 0
                    if {oxygen.%{_wearhelmet.%loop-player%}%} = 0:
                        damage loop-player by 0.5 heart   
                    if {oxygen.%{_wearhelmet.%loop-player%}%} > 0:
                        remove 1 from {oxygen.%{_wearhelmet.%loop-player%}%}   
                    set action bar of loop-player to "&7Oxygen: &8%{oxygen.%{_wearhelmet.%loop-player%}%}%"         

                    
command /refilloxy:
    trigger:
        if player is op:
            loop all items in player's inventory:
                if loop-item is iron helmet:   
                    set {_wearhelmet.refill.%player%} to loop-item
                    add 20 to {oxygen.%{_wearhelmet.refill.%player%}%}   
        
on rightclick on furnace:
    if the ore slot of the clicked block is iron helmet:
        set {_furnace.refill.%player%} to the block's ore slot
        if the fuel slot of the clicked block is 1 of coal:
            clear the fuel slot of the block
            clear the ore slot of the block
            set the result slot of the clicked block to iron helmet named "&8&lOxygen Mask"
            add 100 to {oxygen.%{_furnace.refill.%player%}%}
If this is my fault fix it please :emoji_stuck_out_tongue:.
MC ver: 1.8
Skript ver: Skript 2.2 Fixes V8b
 
Hello guys! I have a problem with this code:
code_language.skript:
every second in "world":
    loop all players:
        apply potion of jump boost of tier 1 to loop-player for a second
        if loop-player isn't wearing iron helmet:
            damage loop-player by 0.5 heart
           
every second:
    loop all players:
        if loop-player is wearing iron helmet:
            loop all items in loop-player's inventory:
                if loop-item is iron helmet:
                    set {_wearhelmet.%loop-player%} to loop-item
                    if {oxygen.%{_wearhelmet.%loop-player%}%} is not set:
                        set {oxygen.%{_wearhelmet.%loop-player%}%} to 0
                    if {oxygen.%{_wearhelmet.%loop-player%}%} = 0:
                        damage loop-player by 0.5 heart  
                    if {oxygen.%{_wearhelmet.%loop-player%}%} > 0:
                        remove 1 from {oxygen.%{_wearhelmet.%loop-player%}%}  
                    set action bar of loop-player to "&7Oxygen: &8%{oxygen.%{_wearhelmet.%loop-player%}%}%"        

                   
command /refilloxy:
    trigger:
        if player is op:
            loop all items in player's inventory:
                if loop-item is iron helmet:  
                    set {_wearhelmet.refill.%player%} to loop-item
                    add 20 to {oxygen.%{_wearhelmet.refill.%player%}%}  
       
on rightclick on furnace:
    if the ore slot of the clicked block is iron helmet:
        set {_furnace.refill.%player%} to the block's ore slot
        if the fuel slot of the clicked block is 1 of coal:
            clear the fuel slot of the block
            clear the ore slot of the block
            set the result slot of the clicked block to iron helmet named "&8&lOxygen Mask"
            add 100 to {oxygen.%{_furnace.refill.%player%}%}
If this is my fault fix it please :emoji_stuck_out_tongue:.
MC ver: 1.8
Skript ver: Skript 2.2 Fixes V8b
What line gives errors?
 
I don't know what's wrong so i asked help, no i didn't
 
It doesn't work after i deleted one iron helmet from my inventory
 
Status
Not open for further replies.