code_language.skript:
on player drop:
if lore of event-item contains "Soulbound":
cancel event
command /soulbind:
trigger:
if player doesn't have permission "soulbind.command"
# set the lore of the player's held item to "&6SoulBound"
set {_lore} to lore of player's held item
set lore of player's held item to "%{_lore}%||&6SoulBound"
on death:
set {_lore} to "&6SoulBound"
loop 40 times:
set {inv::%player%::%loop-number - 1%} to slot loop-number - 1 of player
if lore of {inv::%player%::%loop-number - 1%} does not contain {_lore}:
delete {inv::%player%::%loop-number - 1%}
loop drops:
if lore of loop-item contains {_lore}:
remove loop-item from drops
on respawn:
loop {inv::%player%::*}:
set slot "%loop-index%" parsed as integer of player to loop-value
clear {inv::%player%::*}
My ideas:
- That the soul is an object and when you click on the object that you want to protect is applied.
- That when applied the lore is "Protected 2/2"
- When I die put "Protected 1/2"
- And when I die again erase that lore
How could it be done?
Thanks for help!