Paste #67222: This script is neat

Date: 2020/04/09 18:28:03 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


whatsDeath:
    debug: true
    type: world
    events:
        on player death:
        - if <player.has_permission[Juggernaut]>:
            - determine passively cancelled
            - wait 1t
            - hurt 40 <player>
            - wait 1t
            - flag player nodeath
            - repeat 10:
                - teleport <player> <player.location.add[0,-0.5,0]>
                - wait 4t
            - wait 40t
            - cast regeneration d:920 p:2
nodeathDamage:
    debug: true
    type: world
    events:
        on player damaged:
        - if <player.has_flag[nodeath]>:
            - determine cancelled


nodeathDamagePVP:
    debug: true
    type: world
    events:
        on player damages player:
            - if <context.entity.has_flag[nodeath]>:
                - determine cancelled

nodeathMine:
    debug: true
    type: world
    events:
        on player breaks block:
        - if <player.has_flag[nodeath]>:
            - determine cancelled

nodeathRevive:
    debug: true
    type: world
    events:
        on player heals:
        - if <player.has_flag[nodeath]>:
            - if <player.health> == <player.health_max>:
                - cast regeneration remove <player>
                - flag player nodeath:!
                - narrate "Removed flag nodeath" player:<context.entity>
                - flag player rise duration:10s
                - wait 10s
                - narrate "removed flag rise" player:<context.entity>

nodeathRise:
    type: world
    events:
        on player damaged by suffocation:
        - if <context.entity.has_flag[rise]>:
            - teleport <player.location.add[0,0.5,0]>
            - determine passively cancelled