Skript breaks inventory

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

Lylac_

New Member
Mar 28, 2021
5
0
1
On first join:
set {Race.%player%} to "Ophidian" or "Procyon" or "Trawl" or "Hound" or "Faun" or "Grimor" or "Scuttlian" or "Slugger"


Every tick:
loop all players:
if {Race.%loop-player%} is "Ophidian":
remove poison from loop-player
remove wither from loop-player

if {Race.%loop-player%} is "Procyon":
apply dolphins grace 2 to loop-player for 10 minutes

if {Race.%loop-player%} is "Grimor":
if loop-player is sneaking:
apply invisibility without particles to loop-player for 10 minutes
else:
remove invisibility from loop-player

On damage:
if {Race.%victim%} is "Grimor":
if damage cause is not fall:
set damage to (damage*1.2)
else if damage cause is fall:
set damage to (damage*0.5)
else if damage cause is drown:
set damage to (damage*2)
if {Race.%uuid of victim%} is "Scuttlian":
{ArmorPassive.%victim%} is above 0
set damage to (damage*0.95)

Command /setrace <Text>:
permission: race.set
trigger:
set {Race.%player%} to arg-1


This skript doesn't let me use the inventory. Whenever I try to select something it removes it. Help would be appreciated.
 
That's because the inventory is updated so often, you should rather check for potion effects before removing them like this:
Code:
every tick:
    loop all players:
        if loop-player has wither:
            remove wither from loop-player
        if loop-player has poison:
            remove poison from loop-player
 
Status
Not open for further replies.