Paste #68460: Untitled Paste

Date: 2020/05/02 16:13:15 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


on server fightend:
        - announce "<&c>The fight is over!"
        - wait 2s
        - if <player.has_flag[lostarenafight]>:
            - adjust <player> respawn
            - flag player infight:!
            - teleport <player> <location[ArenaRespawn]>
            - wait 1t
            - flag player lostarenafight:!
        - if <player.has_flag[wonarenafight]>:
            - announce "<&c><player.name> <&f>won the fight!"
            - wait 3s
            - flag player infight:!
            - teleport <player> <location[ArenaRespawn]>
            - wait 1t
            - flag player wonarenafight:!

DeathHandler:
  type: world
  debug: true
  events:
    on player death:
      - if <player.has_flag[infight]>:
          - if <player.is_spawned> == false:
            - wait 1t
            - flag player infight:!
            - flag player lostarenafight
            - event "server fightend"
    on player kills player:
      - if <player.has_flag[infight]>:
          - if <player.is_spawned>:
            - wait 1t
            - flag player infight:!
            - flag player wonarenafight
      - else:
        - stop