Date: 2014/04/09 14:54: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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
'MatterFX Handler':
Type: world
events:
on weather rains:
- determine cancelled
on entity Shoots i@bow:
- if "<context.bow.lore.Contains[<Gray>Type<&co><Yellow>Blast]>" {
- If <context.Bow.Display.Starts_with[<Green>]> Define Quality 1
else if <context.Bow.display.Starts_with[<Blue>]> Define Quality 2
else if <context.Bow.display.Starts_with[<Dark_Purple>]> Define Quality 3
else if <context.Bow.display.Starts_with[<Gold>]> Define Quality 4
else if <context.Bow.display.Starts_with[<Yellow>]> Define Quality 5
else if <context.Bow.display.Starts_with[<Red>]> Define Quality 6
Else Define Quality 0
- Flag global "Bowlore_e@<context.projectile.eid>:<Context.Bow.Lore.as_List>"
- Run ISCBlast Def:%Quality%|e@<context.projectile.eid>
- Run BlastFuse Def:e@<context.projectile.eid>|<context.entity> ID:Blast_e@<Context.Projectile.eid>
}
Else If <Context.bow.Lore.Contains[<Grey>Type<&co><Yellow>Normal]> {
- Annnounce "Normal Arrow Flying"
- If <context.Bow.Display.Starts_with[<Green>]> Define Quality 1
else if <context.Bow.display.Starts_with[<Blue>]> Define Quality 2
else if <context.Bow.display.Starts_with[<Dark_Purple>]> Define Quality 3
else if <context.Bow.display.Starts_with[<Gold>]> Define Quality 4
else if <context.Bow.display.Starts_with[<Yellow>]> Define Quality 5
else if <context.Bow.display.Starts_with[<Red>]> Define Quality 6
Else Define Quality 0
- Flag global Bowlore_e@<context.projectile.eid>:<Context.Bow.Lore>
- Run ISCNormal Def:%Quality%|e@<context.projectile.eid>
}
#- Announce "Blast Arrow Flying <context.projectile.eid>"
#To Cancel Blast Timers on entity pickup,
on player picks up arrow:
- Announce "<Context.entity.Eid>"
- If <Global.flag[e@<Context.entity.Eid>_BlastTax]> {
- flag Global e@<Context.entity.Eid>_BlastTax:!
- Queue Queue:Blast_e@<context.entity.Eid> Clear
- Narrate "<Gold>++<RED>You Have Diffuesed a Blast Type Arrow<Gold>++" targets:<Context.player> }
on Projectile Hits Block:
#filler
#<yaml[<id>].read[<path>]>
#For this event: Explosion Triggers flags , And Effect stored on flags is applied.
on entity Damaged By Block_Explosion:
- Announce "Explosion Damage event <Global.Flag[<Context.Entity>_Tagged]>"
- if <Global.Flag[<Context.Entity>_Tagged]> == True {
- Determine 0 Passively
- Announce "It got to the if Tree Broken Flag:<server.flag[<Context.Entity>_BlastTag].as_list> <global.flag[<context.Entity>_BlastTag].get_sub_items[Ice].split_by[_]> "
- If <el@val[<global.flag[<Context.Entity>_BlastTag].as_list>].before[_].contains[fire]> {
- Burn <Context.Entity> Durration:<Global.Flag[<context.entity>_BlastTag].get[1].After[_Durration_].Before[_Power_].as_int>
- Announce "IT reached the Burn command"
}
- If <el@val[<server.flag[<Context.Entity>_BlastTag].Before[_]>].contains[Ice]> {
- Potion slow <global.flag[<context.Entity>_BlastTag].get_sub_items[ice].split_by[_]>
- Announce "You should be slowed"
}
- If <Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Poison]>
- If <Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Power]>
- If <Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Wither]>
- If <Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Weak]>
- If <Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Cure]>
- Flag Global <context.entity>_Tagged:!
- Flag Global <context.entity>_Tag:! }
on entity Damaged By Projectile:
- Define Projectile <Context.Projectile>
- If <el@val[<server.flag[Bowlore_%Projectile%]>].contains[<gray>Type<&co><Yellow>Blast]> {
- ^Define Range <util.random.int[<Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeLow_].Before[_RangeHigh_].as_int>].to[<Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeHigh_].Before[_Fuse_].as_int>]>
- ^if <%Projectile%.Location.find.living_entities.within[<M:%Range%*1.5>]> != Null {
- Foreach <%Projectile%.Location.find.living_entities.within[<M:%Range%*.5>]> {
- Flag Global %Value%_Tagged Duration:2
- Flag Global %value%_BlastTag:|:<global.flag[%Projectile%_BlastTag].as_list> Duration:2
} }
- ^if <Global.flag[%Projectile%_BlastTax]> Flag Global BlastOccuredAt_%Projectile%:<%Projectile%.location> Duration:2
- ^if <Global.flag[%Projectile%_BlastTax]> && '<el@val[<server.flag[Bowlore_%Projectile%]>].contains[<Red>Fire Augment]>' Explode Power:<M:%Range%*1> <%Projectile%.location>
Else if <Global.flag[%Projectile%_BlastTax]> Explode Power:%Range% <%Projectile%.location>
}
else If <Global.flag[%Projectile%_Normal]> {
}
- Queue Queue:Blast_%Projectile% Clear
on entity damaged by Entity_Attack:
- If <context.Damager.Item_in_hand.lore.Contains[<Gray>Type<&co><Yellow>Normal]> {
- Define Damage <Proc[EAC].context[<Context.damage>|<context.damager>|<context.entity>]>
- Define Defense <Proc[EDC].context[%Damage%|<context.damager>|<context.entity>]>
- Determine <math:<context.damage>-1>
}
else If <context.Damager.Item_in_hand.lore.Contains[<Gray>Type<&co><Yellow>Blast]> {
- Determine <math:<Context.damage>+1>
}
##################
#Debug Notes
#- Announce "<Context.Entity> Damaged by Explosion Is tagged? = <Global.Flag[<Context.Entity>_Tagged]>"
#- Announce "<Global.Flag[<Context.Entity>_BlastTag].Before[_].Contains[Fire]> <Global.Flag[<Context.Entity>_BlastTag]>"
#- Announce "Damaged by Projectile Start"
#- Announce "<blue>Debug info <red>Projectile = <Context.Projectile> <Gold>Type = <Global.flag[<Context.Projectile>_Type]> <Global.Flag[%Projectile%_BlastTag]>"
#- Announce "<Entity> Damaged By Blast Arrow .. <Global.Flag[%Projectile%_BlastTag]>"
#- Announce "<M:%Range%*1.5> <Global.Flag[%Projectile%_BlastTag]> <Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeLow_].Before[_RangeHigh_]> <Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeHigh_].Before[_Fuse_]>"
#- Announce "<%Projectile%.Location.find.living_entities.within[<M:%Range%*1.5>]> %range%"
#- Announce "<Entity> Damaged By Normal arrow"
#- Announce "<Context.Entity> Hit by Fire Blast"
#----------#----------# Tasks #----------#----------#
#---# Blast Arrow#---#
# Handles After Bow is fired, Charges 1 Tnt if no tnt then the bow is fired
BlastInstant:
Type: Task
definitions: Projectile|Entity
Script:
BlastFuse:
Type: Task
definitions: Projectile|Entity
Script:
- ^If <%Entity%.inventory.Contains[Tnt]> {
- ^Flag Global %Projectile%_BlastTax
- ^Take Tnt Qty:1 }
Else {
- ^Narrate "You don't have Enough Tnt for a Blast Arrow"
- Queue Clear
}
- ^Wait 2
- ^Playsound Location:<%Projectile%.location> Sound:Fuse Volume:1.4 Pitch:1
- ^Wait 2
- ^Define Range <util.random.int[<Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeLow_].Before[_RangeHigh_].as_int>].to[<Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeHigh_].Before[_Fuse_].as_int>]>
- ^if <%Projectile%.Location.find.living_entities.within[<M:%Range%*1.5>]> != Null {
- Foreach <%Projectile%.Location.find.living_entities.within[<M:%Range%*1.5>]> {
- Flag Global %Value%_Tagged Duration:2
- Flag Global %value%_BlastTag:|:<global.flag[%Projectile%_BlastTag].as_list> duration:2
} }
- ^if <Global.flag[%Projectile%_BlastTax]> Flag Global BlastOccuredAt_%Projectile%:<%Projectile%.location> Duration:2
- ^if <Global.flag[%Projectile%_BlastTax]> && '<el@val[<server.flag[Bowlore_%Projectile%]>].contains[<Red>Fire Augment]>' Explode Power:%Range% <%Projectile%.location> fire
Else if <Global.flag[%Projectile%_BlastTax]> Explode Power:%Range% <%Projectile%.location>
- ^Flag Global %Projectile%_BlastTax:!
- ^Flag Global %projectile%_BowLore:!
- ^Flag Global %Projectile%_BlastTag:!
- ^remove %Projectile%
#---# Blast Arrow#---#
# Handles After Bow is fired, Charges 1 Tnt if no tnt then the bow is fired
#- Announce "<M:%Range%*1.5> <Global.flag[%Projectile%_BlastTax]> '<el@val[<server.flag[Bowlore_%Projectile%]>].contains[<Red>Fire Augment]>' <Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeLow_].Before[_RangeHigh_]> <Global.Flag[%Projectile%_BlastTag].get[1].After[_RangeHigh_].Before[_Fuse_]>"
#- Announce "<%Projectile%.Location.find.living_entities.within[<M:%Range%*1.5>]> %Range%"
#---# Aura Effect Tasks#---#
# Handles Aura Initialization Continuation and Cancellation
AuraInitialize:
Type: Task
Script:
- Flag Player AuraOn:True
- Runtask BurnauraTick
BurnAuraTick:
Type: Task
Script:
- ^Narrate "<player.Location.find.entities.within[6].exclude[<player>]>"
- ^if <player.Location.find.entities.within[6].exclude[<player>].size> > 0 {
- ^Burn <player.Location.find.entities.within[6].exclude[<player>]> duration:3
- ^PlayEffect <player.Location> Effect:Flame Visibility:150 Qty:150
- ^Playsound Location:<player.Location> Sound:Blaze_Breath Volume:1 Pitch:1
}
- Wait 1
- ^If <player.Flag[Burnon]> == True && <Player.Item_in_Hand.Lore.get[1]> == "Burning Aura" Runtask BurnAuraTick
Else Runtask BurnAuraClear
AuraClear:
Type: Task
Script:
- Flag Player Auraon:False
#--------------------------#
#---# Procedure Scripts#---#
#--------------------------#
ISCBlast:
Type: Task
Definitions: Quality|Projectile
Script:
#- Announce "<server.flag[Bowlore_%Projectile%]>"
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Fire Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Fire_Duration_<Yaml[ItemFX].Read[Blast.Fire.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Fire.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Fire.Pow.Quality]>*1>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Fire.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Fire.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Fire.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Fire.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Fire.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Ice Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Ice_Duration_<Yaml[ItemFX].Read[Blast.Ice.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Ice.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Ice.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Ice.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Ice.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Ice.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Ice.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Ice.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Poison Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Posion_Duration_<Yaml[ItemFX].Read[Blast.Poison.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Poison.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Poison.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Poison.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Poison.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Poison.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Poison.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Poison.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Power Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Power_Duration_<Yaml[ItemFX].Read[Blast.Power.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Power.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Power.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Power.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Power.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Power.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Power.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Power.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Wither Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Wither_Duration_<Yaml[ItemFX].Read[Blast.Wither.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Wither.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Wither.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Wither.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Wither.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Wither.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Wither.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Wither.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Weak Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Weak_Duration_<Yaml[ItemFX].Read[Blast.Weak.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Weak.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Weak.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Weak.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Weak.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Weak.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Weak.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Weak.Fuse]>
}
- ^if "<server.flag[Bowlore_%Projectile%].get[1].Contains[<Red>Cure Augment]>" {
- Flag Global %Projectile%_BlastTag:->:Cure_Duration_<Yaml[ItemFX].Read[Blast.Cure.Dur.Duration]>_Power_<Yaml[ItemFX].Read[Blast.Cure.Pow.Power].add[<M:<Yaml[ItemFX].Read[Blast.Cure.Pow.Quality]>*%Quality%>]>_RangeLow_<Yaml[ItemFX].Read[Blast.Cure.Range.On_Fuse.Low].add[<M:<Yaml[ItemFX].Read[Blast.Cure.Range.On_Fuse.Quality]>*%Quality%>]>_RangeHigh_<Yaml[ItemFX].Read[Blast.Cure.Range.On_Fuse.High].add[<M:<Yaml[ItemFX].Read[Blast.Cure.Range.On_Fuse.Quality]>*%Quality%>]>_Fuse_<Yaml[ItemFX].Read[Blast.Cure.Fuse]>
}
#Entity Attack Calculation
EAC:
Type: Procedure
Definitions: Damage|Attacker|Defender
Script:
-
#EntityDefenseCalculation
EDC:
Type: Procedure
Definitions: Damage|Attacker|Defender
Script: