Paste #69631: Untitled Paste

Date: 2020/05/25 21:03:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


ParkourWarps:
  type: world
  events:
    on player enters SetCheckpoint0:
    - if !<player.has_flag[DeathCounter]>:
      - flag player DeathCounter:0
      - narrate "Death Counter enabled. Have fun!"
      ## Sets Death Counter to zero for players without DeathCounter flag.
    on player enters SetCheckpoint0:
      - flag player checkpoint:0
      - define StartTime <util.time_now>
      - narrate "Timer started: <util.time_now.format[hh:mm]>"
      ## Resets checkpoint to zero
    on player enters SetCheckpoint1:
    - if <player.flag[Checkpoint]> < 1:
      - flag player checkpoint:1
      - mcmmo add xp skill:acrobatics quantity:5000
      ## Completes checkpoint one if player hasn't reached it yet, updates flag, and adds reward.
    on player enters SetCheckpoint2:
    - if <player.flag[Checkpoint]> < 2:
      - flag player checkpoint:2
      - mcmmo add xp skill:acrobatics quantity:6000
    on player enters SetCheckpoint3:
    - if <player.flag[Checkpoint]> < 3:
      - flag player checkpoint:3
      - mcmmo add xp skill:acrobatics quantity:7000
    on player enters SetCheckpoint4:
    - if <player.flag[Checkpoint]> < 4:
      - flag player checkpoint:4
      - mcmmo add xp skill:acrobatics quantity:8000
    on player enters SetCheckpoint5:
    - if <player.flag[Checkpoint]> < 5:
      - flag player checkpoint:5
      - mcmmo add xp skill:acrobatics quantity:9000
      - money give quantity:200
      - narrate +$200
      - narrate "Balance: <player.formatted_money>"
      ## Completes first course if player hasn't completed it yet, and adds rewards.
    on player enters SetCheckpoint6:
    - flag player checkpoint:6
    on player enters SetCheckpoint7:
    - if <player.flag[Checkpoint]> < 7:
      - flag player checkpoint:7
      - mcmmo add xp skill:acrobatics quantity:11000
    on player enters SetCheckpoint8:
    - if <player.flag[Checkpoint]> < 8:
      - flag player checkpoint:8
      - mcmmo add xp skill:acrobatics quantity:6000
    on player enters SetCheckpoint9:
    - if <player.flag[Checkpoint]> < 9:
      - flag player checkpoint:9
      - mcmmo add xp skill:acrobatics quantity:7000
    on player enters SetCheckpoint10:
    - if <player.flag[Checkpoint]> < 10:
      - flag player checkpoint:10
      - mcmmo add xp skill:acrobatics quantity:8000
    on player enters SetCheckpoint11:
    - if <player.flag[Checkpoint]> < 11:
      - flag player checkpoint:0
      - mcmmo add xp skill:acrobatics quantity:20000
      - money give quantity:1000
      - narrate +$1000
      - narrate "Balance: <player.formatted_money>"
      - teleport <player> Checkpoint0
      ## Completes second course if player hasn't completed it yet, adds rewards, and warps player back to checkpoint zero.
    on player enters ParkourFloor:
      - flag player DeathCounter:++
      - narrate "You have died <player.flag[DeathCounter]> times!"
      - teleport <player> checkpoint<player.flag[checkpoint]>
      - playsound <player.location> sound:ENTITY_LLAMA_DEATH
      - playsound <player.location> sound:ENTITY_PLAYER_HURT
      ## Increments death counter, narrates death count, teleports player to previous checkpoint, and plays death effects.