#thing

1 messages · Page 1 of 1 (latest)

peak wolf
#

did you debug if the loop-item gets detected?

desert stump
peak wolf
#

to debug, you could for example broadcast something after the if statement

desert stump
#

ok

peak wolf
#

Alr wait

#

i think your problem has to do something with the loot being dropped

desert stump
glacial tree
#

It applies to all coding

peak wolf
desert stump
peak wolf
#
set {_items::*} to all items in inventory of victim
loop {_items::*}:
  drop loop-value at location of victim
#

I guess

#

and cancel the victims drops, so you dont get duplicate items

#

also loop this list, instead of the players inventory for the midas sword

#
on death of player:
    attacker is a player
    victim is a player
    set {sharpness::%victim%} to 0
    set {_items::*} to all items in inventory of victim
    loop {_items::*}:
        if loop-value is netherite sword named "&6&lMidas &6&lSword":
            disenchant loop-value
        drop loop-value at location of victim
desert stump
peak wolf
#

loop-item?

#

oh

desert stump
peak wolf
#
on death of player:
    attacker is a player
    victim is a player
    cancel drops
    set {sharpness::%victim%} to 0
    set {_items::*} to all items in inventory of victim
    loop {_items::*}:
        if loop-value is netherite sword named "&6&lMidas &6&lSword":
            set {_item} to loop-value
            disenchant {_item}
            drop {_item} at location of victim
        else:
            drop loop-value at location of victim
#

wait i am stupid

#

now

#

Tbh this is pretty complex for just wanting to drop an disenchanted item, and there might be an easier way to do it, but not sure how to achieve that

desert stump
peak wolf
#

you saw the updated code?

#

you need to have the cancel drops thing in your code to disable the original drops

desert stump
peak wolf
#

is it working intended now?

desert stump