Paste #36878: Untitled Paste

Date: 2016/10/12 11:00:57 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 player jumps:
    - if <player.location.distance[<player.flag[freeze_location]>].is[MORE].than[1]> {
      - teleport <def[1]> <player.flag[freeze_location]>
      }
    on system time minutely:
    - foreach <server.list_online_players> {
      - if <%value%.location.tc_biome.name> == TemperateWasteQuickSand {
        - run QuickSandGlide def:%value%
        }
      }
    on player stops sneaking:
    - if <player.location.tc_biome.name> == TemperateWasteQuickSand {
      - if <player.has_flag[NoStopGliding]> {
        - flag <player> NoStopGliding:!
        - cast <player> jump remove
        }
      }

QuickSandGlide:
  type: task
  debug: false
  script:
  - if <util.random.int[1].to[1]> == 1 {
    - narrate "The ground below your feet started sinking away." target:<def[1]>
    - flag <def[1]> NoStopGliding
    - flag <def[1]> quicksand_location:<def[1].location>
    - adjust <def[1]> gliding:true
    - cast <def[1]> jump p:400
    }