#Not working on main server

1 messages · Page 1 of 1 (latest)

normal plover
#

Hi! So basicly this skript works on my test server but doesn't on main server. The part that doesn't work is
on death:
clear drops
and the reward part

How can i fix it?

#

i put "." to 2 lines to disable them for now

#

but even so it works on my test server

#
    if victim is {boss}:
        clear drops```
#
    if victim is {boss}:
        clear drops
        set {_maxdamage} to -1
        set {_topplayer} to none
        loop all players:
            if {dmg::%loop-player%} is set:
                if {dmg::%loop-player%} > {_maxdamage}:
                    set {_maxdamage} to {dmg::%loop-player%}
                    set {_topplayer} to loop-player
        if {_topplayer} is not none:
            give diamond to {_topplayer}
            broadcast "&aᴛᴏᴘ ᴅᴀᴍᴀɢᴇʀ: %{_topplayer}% ᴡɪᴛʜ %{_maxdamage}% ᴅᴀᴍᴀɢᴇ!"

        loop all players:
            if {dmg::%loop-player%} is set:
                send "&4ʏᴏᴜʀ ᴅᴀᴍᴀɢᴇ: %{dmg::%loop-player%}%" to loop-player

        delete {dmg::*}```
#

these to don't worj

tough violet
#

Can you explainpls

normal plover
#
    if victim is a player:
        if attacker is iron golem:
                # Save inventory items in a list
            clear {saved.inventory::%victim%::*}
            loop items in victim's inventory:
                add loop-value to {saved.inventory::%victim%::*}
                # Save armor separately
            set {saved.helmet::%victim%} to victim's helmet
            set {saved.chestplate::%victim%} to victim's chestplate
            set {saved.leggings::%victim%} to victim's leggings
            set {saved.boots::%victim%} to victim's boots
                # Prevent item drops
            clear victim's inventory
            send "&cʏᴏᴜ ᴡᴇʀᴇ sʟᴀɪɴ ʙʏ ᴛʜᴇ &4ᴡᴏʀʟᴅ ᴅᴇᴍᴏʟɪsʜᴇʀ&c, ʙᴜᴛ ʏᴏᴜʀ ɪᴛᴇᴍs ᴡᴇʀᴇ ᴋᴇᴘᴛ!" to victim
#

the clear victim's inventory doesnt work

#

this was a code of a friend but i improved it

#

sso basicly

#

it gives back the loot to player

#

and drops the loot

#

which dupes the items

tough violet
#

just delete the drops. Also this code looks like AI lol

normal plover
#

It prob was lol i added like half of it

normal plover
#

Sry had exams just saw it

normal plover
#

Nvm fixed it ty

robust wind
#

on death:
if victim is a player:
if attacker is iron golem:
# Save inventory items in a list
clear {saved.inventory::%victim%::}
loop items in victim's inventory:
add loop-value to {saved.inventory::%victim%::
}
# Save armor separately
set {saved.helmet::%victim%} to victim's helmet
set {saved.chestplate::%victim%} to victim's chestplate
set {saved.leggings::%victim%} to victim's leggings
set {saved.boots::%victim%} to victim's boots
# Prevent item drops
clear victim's inventory
send "&cʏᴏᴜ ᴡᴇʀᴇ sʟᴀɪɴ ʙʏ ᴛʜᴇ &4ᴡᴏʀʟᴅ ᴅᴇᴍᴏʟɪsʜᴇʀ&c, ʙᴜᴛ ʏᴏᴜʀ ɪᴛᴇᴍs ᴡᴇʀᴇ ᴋᴇᴘᴛ!" to victim

on respawn:
wait 1 tick # Prevents inventory conflicts
# Restore inventory items
if {saved.inventory::%player%::} is set:
loop {saved.inventory::%player%::
}:
give player loop-value
clear {saved.inventory::%player%::}
# Restore armor correctly without duplication
if {saved.armor::%player%::
} is set:
set player's armor to {saved.armor::%player%::}
clear {saved.armor::%player%::
}

command /setbosswarp:
permission: spawn.set
permission message: "&cYou don't have permission to set the boss warp."
trigger:
set {bosswarp} to location of player
send "&aBoss Warp location set to your current position."

options:
teleportTime: 100

.command /warp boss:
usage: &cIncorrect usage: /warp boss
cooldown: 5 seconds
cooldown message: &cʏᴏᴜ ᴀʀᴇ ᴏɴ ᴄᴏᴏʟᴅᴏᴡɴ.
trigger:
message "&6Teleporting in &e%{@teleportTime}/20% &6seconds!"
set {_preloc} to player's location
set {_i} to 0
loop {@teleportTime} times:
wait 1 tick

        if distance between player's location and {_preloc} > 0.5:
            message "&cYour will no longer be teleported because you moved!"
            send action bar "&cᴛᴇʟᴇᴘᴏʀᴛ ᴄᴀɴᴄᴇʟʟᴇᴅ" to player
            stop trigger

        set {_remaining ticks} to {@teleportTime} - {_i}
        send action bar "&e%floor({_remaining ticks} / 20) + 1% &6seconds until teleport" to player
        add 1 to {_i}

    teleport player to  {bosswarp}
    message "&6ʏᴏᴜ ʜᴀᴠᴇ ʙᴇᴇɴ ᴛᴇʟᴇᴘᴏʀᴛᴇᴅ!"