#Help with removing effects

1 messages · Page 1 of 1 (latest)

worthy moat
#

I just recently started learning skript and decided to make some code where you can sort of "worship" gods to gain abilities. But i have a problem as my code is currently setup in a way as to where if im in water when i remove my poseidon thingy my positive effect stays after ive changed and so does the glowing on enemies. What would be the best way to fix this issue?

Script 1:

command /posiedon:
    trigger:
        if {god::%player%} is not "poseidon":
            set {god::%player%} to "poseidon"
            send "Posiedon took intrest in you."
        else:
            send "This god already has a liking in you"

command /nogod:
    trigger:
        delete {god::%player%}
        send "All gods decided to stop paying attention to you"


#

Script 2:

every 2 ticks:
    loop all players:
        if {god::%loop-player%} is "poseidon":
            if loop-player is in water: 
                apply infinite conduit power to loop-player 
                apply infinite Dolphin's grace 2 to loop-player
            else:
                remove conduit power from loop-player
                remove Dolphin's Grace from loop-player

on damage of entity:
    attacker is a player
    if {god::%attacker%} is "poseidon":
        if attacker is holding a trident:
            cancel event
            set {_newdamage} to damage + 3
            damage victim by {_newdamage}
on damage of entity:
    attacker is a player
    if {god::%attacker%} is "poseidon":
        if attacker is in water:
            cancel event
            set {_newdamage} to damage + 1
            damage victim by {_newdamage}


every 2 ticks:
    loop all players:
        if {god::%loop-player%} is "poseidon":
            loop all entities in radius 100 around loop-player:
                if loop-player is in water:
                    #if loop-entity is not the same entity as loop-player:
                    apply infinite glowing to loop-entity-2
                    remove glowing from loop-player
                else:
                    remove glowing from loop-entity-2
thin quest
#

what u could do is: apply infinite dolphin and conduit power

#

cuz why remove it after player leaves water?

#

its literally same stuff

#

and in damage of entity

#

do:
set damage to {_newdamage}

#

cuz if u do damage victim by {_newdamage}

#

you deal somewhat of true dmg

#

that ignores armor

#

apply glow potion effect to loop players

#

for 1s for example, replacing existing effect

#

@worthy moat

#

and make it 1 periodical event

#

cuz you loop players in both

#

that just lags your server

worthy moat
#

Ah okay, Thanks for the support!

worthy moat
thin quest
#

apply [ambient] [potion of] %potioneffecttypes% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %livingentities% [for %timespan%] [replacing [the] existing effect]

#

apply potion of glowing without any particles whilst hiding potion icon to loop-player-2 for 1 second replacing existing effect

molten ermine
#

I dont wanna be mean

#

But how does one manage to misspell so many words so wrong

#

Multiple times