Date: 2015/07/01 01:10:12 UTC-07:00
Type: Denizen Script
DeployAnchor:
type: command
name: anchor
usage: /anchor
description: adds the block you are looking at as an anchor
script:
- if <player.location.cursor_on.material.name.is[!=].to[air]> {
- modifyblock <player.location.cursor_on> m@lapis_block
- flag <player> anchor:+:<player.location.cursor_on>
- narrate "Your anchor has been saved."
}
PullAnchor:
type: world
events:
on player right clicks lapis_block with air:
- if <player.flag[anchor].contains[<context.location>]> {
- modifyblock <context.location> m@air
- flag player anchor:<-:<context.location>
- narrate "Your anchor has been removed."
}