Paste #17265: Untitled Paste

Date: 2015/07/02 01:30:03 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


AnchorAdmin:
  type: command
  name: anchoradmin
  usage: /anchoradmin
  description: Used to anchor your movecraft ships.
  script:
  - if <player.location.material.name.is[==].to[air]> {
    - modifyblock <player.location.block> m@lapis_block
    - flag <player> anchor:->:<player.location.block>
    - narrate "Your anchor has been saved."
  } else {
    - narrate "Anchor deployment location obstructed."
  }
DeployAnchor:
  type: command
  name: anchor
  usage: /anchor
  description: Used to anchor your movecraft ships.
  script:
  - if <player.location.material.name.is[==].to[air]> {
    - if <player.inventory.contains_any[i@lapis_block]> {
      - take i@lapis_block 1
      - modifyblock <player.location.block> m@lapis_block
      - flag <player> anchor:->:<player.location.block>
      - narrate "Your anchor has been saved."
    } else {
      - narrate "You don't have an anchor with you."
      - queue clear
    }
  } else {
    - narrate "Anchor deployment location obstructed."
  }
PullAnchor:
  type: world
  events:
    on player right clicks lapis_block:
      - if <player.flag[anchor].contains_any[<context.location.block>]> {
        - modifyblock <context.location.block> m@air
        - flag player anchor:<-:<context.location.block>
        - drop i@lapis_block <context.location.block> qty:1
        - narrate "You have pulled your anchor."
      }