Date: 2015/07/02 01:30:03 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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."
}