Date: 2014/05/15 17:54:11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
##################################
# VintageBeef's ABBA Caving Game #
##################################
# WORK IN PROGRESS #
##################################
ABBACaveGame:
type: world
events:
#################
# ABBA Commands #
#################
on Abba command:
- if <player.is_op> {
- narrate "AbbaAdd playername - adds player to abbalist"
- narrate "AbbaRemove playername - removes player from abbalist"
- narrate "AbbaList - shows all the players in the abbalist"
- narrate "AbbaStart - Starts Abba (2mins)"
- narrate "AbbaStop - Stops Abba (before 2min flag)"
}
- determine fulfilled
on AbbaAdd command:
- if <player.is_op> {
- flag server AbbaPlayers:->:<context.raw_args>
- narrate "<context.raw_args> now added to ABBA Player List"
- narrate "You have been added in to ABBA by <player.name>" target:<context.raw_args>
}
- determine fulfilled
on AbbaList command:
- if <player.is_op> {
- narrate "Players in the AbbaPlayers list<&co>"
- foreach <server.flag[AbbaPlayers].as_list> {
- narrate %value%
}
}
- determine fulfilled
on AbbaRemove command:
- if <player.is_op> {
- flag server AbbaPlayers:<-:<context.raw_args>
- narrate "You have been removed from ABBA by <player.name>" target:<context.raw_args>
}
- determine fulfilled
on AbbaStart command:
- if <player.is_op> {
- if <server.flag[AbbaPlayers].size> >= 2 {
- foreach <server.flag[AbbaPlayers].as_list> {
- narrate "You are an ABBA Player, %value%. You have 2 mins to mine!" target:%value%
}
- ^flag server AbbaInProgress duration:2m
- run AbbaGameOn
} else {
- narrate "Not enough players!"
}
}
- determine fulfilled
on AbbaStop command:
- if <player.is_op> {
- flag server AbbaInProgress:!
}
- determine fulfilled
on AbbaFlag command:
- if <player.is_op> {
- if <server.flag[AbbaInProgress]> {
- flag server AbbaInProgress:!
- narrate "AbbaInProgress flag De-Activated"
} else {
- flag server AbbaInProgress
- narrate "AbbaInProgress flag Activated"
}
}
- determine fulfilled
######################
# Block Break Events #
######################
on player breaks m@emerald_ore:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "The block is magically transported to the chest!!"
- inventory add d:<in@location[holder=l@48,65,146,IslandWorld]> o:<i@emerald_ore>
- determine nothing
}
}
on player breaks m@diamond_ore:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "The block is magically transported to the chest!!"
- inventory add d:<in@location[holder=l@48,65,146,IslandWorld]> o:<i@diamond_ore>
- determine nothing
}
}
on player breaks m@gold_ore:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "The block is magically transported to the chest!!"
- inventory add d:<in@location[holder=l@48,65,146,IslandWorld]> o:<i@gold_ore>
- determine nothing
}
}
on player breaks <m@redstone_ore>:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "The block is magically transported to the chest!!"
- inventory add d:<in@location[holder=l@48,65,146,IslandWorld]> o:<i@redstone_ore>
- determine nothing
}
}
on player breaks m@lapis_ore:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "The block is magically transported to the chest!!"
- inventory add d:<in@location[holder=l@48,65,146,IslandWorld]> o:<i@lapis_ore>
- determine nothing
}
}
on player breaks m@stone:
- if <server.flag[AbbaInProgress]> {
- if <flag.g:AbbaPlayers.aslist> contains <player.name> {
- narrate "You are not allowed to break Stone!!"
- determine cancelled
}
}
###################
# Abba Game Timer #
###################
AbbaGameOn:
type: task
script:
- wait 60
- foreach <server.flag[AbbaPlayers].as_list> {
- narrate "ABBA<&co> You have 1 mins remaining!" target:%value%
}
- wait 60
- foreach <server.flag[AbbaPlayers].as_list> {
- narrate "ABBA<&co> Tools down, game over!" target:%value%
}