Solved "On consume" event 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.

TBBanan

New Member
Feb 9, 2022
6
0
1
25
hi. any help.
Code:
on consume a raw fish:
    if {@raw.fish.online} is true:
        if {@raw.fish.bad} is true:
            if {@raw.fish.effect} is greater than 0:
                if {@raw.fish.effect} is 1:
                    apply {@raw.fish.effect.1} to player for {@raw.fish.effect.1.time} seconds
                    loop {@raw.fish.time} times:
                        wait {@raw.fish.stoptime} seconds
                        set player's health to player's health + {@raw.fish.heal}
                        stop
                if {@raw.fish.effect} is 2:
                    apply {@raw.fish.effect.1} to player for {@raw.fish.effect.1.time} seconds
                    apply {@raw.fish.effect.2} to player for {@raw.fish.effect.2.time} seconds
                    loop {@raw.fish.time} times:
                        wait {@raw.fish.stoptime} seconds
                        set player's health to player's health + {@raw.fish.heal}
                        stop
                if {@raw.fish.effect} is 3:
                    apply {@raw.fish.effect.1} to player for {@raw.fish.effect.1.time} seconds
                    apply {@raw.fish.effect.2} to player for {@raw.fish.effect.2.time} seconds
                    apply {@raw.fish.effect.3} to player for {@raw.fish.effect.3.time} seconds
                    loop {@raw.fish.time} times:
                        wait {@raw.fish.stoptime} seconds
                        set player's health to player's health + {@raw.fish.heal}
                        stop
            else:
                loop {@raw.fish.time} times:
                    wait {@raw.fish.stoptime} seconds
                    set player's health to player's health + {@raw.fish.heal}
                    stop
        else:
            loop {@raw.fish.time} times:
                wait {@raw.fish.stoptime} seconds
                set player's health to player's health + {@raw.fish.heal}
    else:
        send "&cJedzenie tego produktu jest zablokowane"


Code:
[14:35:32 ERROR]: Line 280: (jedzenie.sk)
 Can't understand this event: 'on consume a raw fish'
 Line: on consume a raw fish:
 
[14:35:32 ERROR]: Line 317: (jedzenie.sk)
 Can't understand this event: 'on consume a cooked fish'
 Line: on consume a cooked fish:



Code:
on consume a cooked fish:
    if {@cooked.fish.online} is true:
        loop {@cooked.fish.time} times:
            wait {@cooked.fish.stoptime} seconds
            set player's health to player's health + {@cooked.fish.heal}
    else:
 
Code:
on consume of a cooked salmon or cooked cod:
on consume of a salmon or cod or tropical fish or pufferfish:
Maybe you just need to list all the fish item like this
 
Status
Not open for further replies.