Paste #36874: Untitled Paste

Date: 2016/10/12 10:26:23 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


QuickSandScript:
  # This script controls the quicksand feature within the Wasteland continent.
  type: world
  debug: true
  events:
    on entity stops gliding:
    - if <player.location.tc_biome.name> == TemperateWasteQuickSand {
      - if <player.has_flag[NoStopGliding]> {
        - determine CANCELLED
        }
      }
    on system time minutely:
    - foreach <server.list_online_players> {
      - if <%value%.location.tc_biome.name> == TemperateWasteQuickSand {
        - narrate "You are in the <%value%.location.tc_biome.name> Biome!" targets:%value%
        - run QuickSandGlide def:%value%
        }
      }
    on player jumps:
    - if <player.location.tc_biome.name> == TemperateWasteQuickSand {
      - if <player.has_flag[NoStopGliding]> {
        - narrate "You are trapped in quicksand!!! JUMPZ"
        - cast <player> jump p:400
        }
      }
    on player stops sneaking:
    - if <player.location.tc_biome.name> == TemperateWasteQuickSand {
      - if <player.has_flag[NoStopGliding]> {
        - flag <player> NoStopGliding:!
        - cast <player> remove
        }

QuickSandGlide:
  type: task
  debug: false
  script:
  - if <util.random.int[1].to[1]> == 1 {
    - narrate "You are trapped in quicksand!!!"
    - flag <def[1]> NoStopGliding
    - adjust <def[1]> gliding:true
    }