Paste #59577: Untitled Paste

Date: 2019/11/04 11:43:06 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


DeadRinger:
    debug: false
    type: world
    events:
        on player damaged:
        - if <context.entity.has_flag[ringer2]>:
            - determine cancelled
        - if "<context.entity.item_in_hand.display.contains_text[dead ringer]>":
            - narrate "<&e>Ringer triggered!"
            - determine <context.entity.health.mul[10000]>
            - flag <context.entity> deathlocation:<context.entity.location.simple>
            - flag <context.entity> deathgamemode:<context.entity.gamemode>
            - flag <context.entity> deathhealth:<context.entity.health.sub[<context.final_damage>]>


DeadRingerDeath:
    debug: false
    type: world
    events:
        on player death:
        - if "<context.entity.item_in_hand.display.contains_text[dead ringer]>":
            - determine KEEP_INV passively
            - determine KEEP_LEVEL passively
            - narrate target:<context.entity> "<&e>Dead ringer activated"
            - flag <context.entity> ringer
            - wait 20t
            - adjust <context.entity> respawn:true
            - adjust <context.entity> respawn:false
            - wait 1t
            - teleport <context.entity> <context.entity.flag[deathlocation]>
            - adjust <context.entity> gamemode:<context.entity.flag[deathgamemode]>
            - adjust <context.entity> health:<context.entity.flag[deathhealth]>
            - cast speed d:13 p:2
            - cast invisibility d:13 p:2
            - disguise misc target:<context.entity> type:falling_block id:54
            - wait 13s
            - if <context.entity.has_flag[ringer]>:
                - flag <context.entity> ringer:!
                - disguise remove <context.entity>
                - cast speed remove <context.entity>
                - cast invisibility remove <context.entity>
                - playsound <context.entity.location.simple> sound:block_portal_travel pitch:1.65 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3

DeadRingerDeath2:
    debug: false
    type: world
    events:
        on player death:
        - if "<context.entity.item_in_hand.display.contains_text[dead ringer]>":
            - wait 1t
            - take slot:hand <context.entity>
            - flag <context.entity> ringer2
            - wait 6s
            - flag <context.entity> ringer2:!
################################################################################################################################################################################################
DeadRingerOff:
    debug: false
    type: world
    events:
        on player damaged:
        - if <context.entity.has_flag[ringer2]>:
            - determine cancelled
        - if "<context.entity.item_in_offhand.display.contains_text[dead ringer]>":
            - narrate "<&e>Ringer triggered!"
            - determine <context.entity.health.mul[10000]>
            - flag <context.entity> deathlocation:<context.entity.location.simple>
            - flag <context.entity> deathgamemode:<context.entity.gamemode>
            - flag <context.entity> deathhealth:<context.entity.health.sub[<context.final_damage>]>


DeadRingerDeathOff:
    debug: false
    type: world
    events:
        on player death:
        - if "<context.entity.item_in_offhand.display.contains_text[dead ringer]>":
            - determine KEEP_INV passively
            - determine KEEP_LEVEL passively
            - narrate target:<context.entity> "<&e>Dead ringer activated"
            - flag <context.entity> ringer
            - wait 20t
            - adjust <context.entity> respawn:true
            - adjust <context.entity> respawn:false
            - wait 1t
            - teleport <context.entity> <context.entity.flag[deathlocation]>
            - adjust <context.entity> gamemode:<context.entity.flag[deathgamemode]>
            - adjust <context.entity> health:<context.entity.flag[deathhealth]>
            - cast speed d:13 p:2
            - cast invisibility d:13 p:2
            - disguise misc target:<context.entity> type:falling_block id:54
            - wait 13s
            - if <context.entity.has_flag[ringer]>:
                - flag <context.entity> ringer:!
                - disguise remove <context.entity>
                - cast speed remove <context.entity>
                - cast invisibility remove <context.entity>
                - playsound <context.entity.location.simple> sound:block_portal_travel pitch:1.65 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3
                - playsound <context.entity.location.simple> sound:entity_player_levelup pitch:0.5 volume:0.3

DeadRingerDeath2Off:
    debug: false
    type: world
    events:
        on player death:
        - if "<context.entity.item_in_offhand.display.contains_text[dead ringer]>":
            - wait 1t
            - take slot:offhand <context.entity>
            - flag <context.entity> ringer2
            - wait 6s
            - flag <context.entity> ringer2:!