Date: 2014/06/06 22:50:29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"Keys":
type: world
events:
on player right clicks with i@Iron Key:
- if <global.flag[switchable.<player.location.cursor_on>]> queue clear
- if <player.location.cursor_on.below.material> == m@iron_block {
- flag global switchable.<player.location.cursor_on> duration:19t
- switch <player.location.cursor_on> state:on
- run switchbackoff def:<player.location.cursor_on> delay:2s
- take "i@Iron Key"
}
on player right clicks with i@Gold Key:
- if <player.location.cursor_on.below.material> == m@gold_block {
- switch <player.location.cursor_on> state:on
- run switchbackoff def:<player.location.cursor_on> delay:20s
- take "i@Iron Key"
}
on player right clicks with i@Dime Key:
- if <player.location.cursor_on.below.material> == m@diamond_block {
- switch <player.location.cursor_on> state:on
- run switchbackoff def:<player.location.cursor_on> delay:20s
- take "i@Dime Key"
}
"switchbackoff":
type: task
script:
- if <%1%.below.material> == m@iron_block {
switch <%1%> state:on
}
- if <%1%.below.material> == m@gold_block {
switch <%1%> state:on
}
- if <%1%.below.material> == m@diamond_block {
switch <%1%> state:on
}
"Iron Key":
type: item
material: 265
display name: "Iron Key"
lore:
- Diamond Key, one time use.
"Gold Key":
type: item
material: 266
display name: "Gold Key"
lore:
- Diamond Key, one time use.
"Dime Key":
type: item
material: 264
display name: "Diamond Key"
lore:
- Diamond Key, one time use.