Paste #703: soulbound

Date: 2013/12/29 12:24:49 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14


on player death:
    - ^announce "<&b><context.entity.name> <&6>has died at <context.entity.location.simple>."
    - ^announce <context.inventory.list_contents>
    - ^foreach <player.inventory.list_contents.aslist> {
       - ^if <%value%.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' {
          - ^flag player "soulbound:->:%value% qty<&co><player.inventory.qty[%value%]>" }
       }
    - ^narrate <player.flag[soulbound].aslist>

    on player respawns:
    - ^if <player.has_flag[soulbound]> {
       - ^foreach <player.flag[soulbound].aslist] {
       - ^give %value% to:<player.inventory> }
       }