-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTokala_WHM.lua
197 lines (159 loc) · 5.25 KB
/
Tokala_WHM.lua
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
function get_sets()
sets.Idle = {
main = "Queller Rod",
sub = "Sors Shield",
ammo = "Homiliary",
head = "Bunzi's Hat",
body = "Annoint. Kalasiris",
hands = "Bunzi's Gloves",
legs = "Bunzi's Pants",
feet = "Bunzi's Sabots",
neck = "Twilight Torque",
waist = "Witful Belt",
left_ear = "Moonshade earring",
right_ear = "Gifted Earring",
left_ring = "Sirona's Ring",
right_ring = "Defending Ring",
back = {
name = "Alaunus's Cape",
augments = {'Phys. dmg. taken-10%'}
}
}
sets.JobAbility = {}
sets.JobAbility.Benediction = {}
sets.Precast = {}
sets.Precast.FastCast = {
ammo = "Incantor Stone",
head = "Bunzi's Hat",
legs = "Aya. Cosciales +2",
feet = "Regal Pumps +1",
waist = "Embla sash",
back = {
name = "Alaunus's Cape",
augments = {'"Fast Cast"+10'}
}
}
sets.Precast.Cure = set_combine(sets.Precast.FastCast, {})
sets.Midcast = {}
sets.Midcast.Cure = {
main = "Bunzi's Rod",
sub = "Sors Shield",
head = "Bunzi's Hat",
body = "Bunzi's Robe",
hands = "Bunzi's Gloves",
legs = "Clr. Pantaln. +2",
feet = "Regal Pumps +1",
neck = "Cleric's Torque",
right_ear = "Gifted Earring",
left_ring = "Sirona's Ring",
right_ring = "Rufescent Ring",
back = {
name = "Alaunus's Cape",
augments = {
'MND+20',
'MND+10'
}
}
}
sets.Midcast["Divine Veil"] = {}
sets.Midcast.Erase = set_combine(sets.Midcast["Divine Veil"], {
neck = "Cleric's Torque"
})
sets.Midcast.Cursna = set_combine(sets.Midcast["Divine Veil"], {
waist = "Alaunus's Cape"
})
sets.Midcast["Enhancing Magic"] = {
head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +8',}},
body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +8',}},
hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +7',}},
feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
waist = "Embla sash",
}
sets.Midcast["Shellra V"] = set_combine(sets.Midcast["Enhancing Magic"], {
--legs = "Piety pantaloons +2"
})
sets.Midcast.Regen = set_combine(sets.Midcast["Enhancing Magic"], {
--body = "Piety Briault +2",
hands = "Ebers Mitts",
--legs = "Th. Pantaloons +2"
})
sets.Midcast.Bar = set_combine(sets.Midcast["Enhancing Magic"], {
--legs = "Piety pantaloons +2"
})
sets.Midcast.Auspice = set_combine(sets.Midcast["Enhancing Magic"], {
feet = "Ebers Duckbills"
})
end
function is_magic(spell)
return spell.type:endswith("Magic") or spell.type == "BardSong" or spell.type == "Ninjutsu" or spell.type == "Trust"
end
function precast(spell, action)
if is_magic(spell) then
if buffactive.silence then
cancel_spell()
send_command('@input /item "Echo Drops" <me>')
debug(spell.name .. " Canceled: [Silence has fallen]")
return
end
equip(sets.Precast.FastCast)
if spell.english:startswith("Cur") and spell.english ~= "Cursna" then
equip(sets.Precast.Cure)
debug("Precast: Cure")
return
end
end
if sets[spell.type] and sets[spell.type][spell.english] then
equip(sets[spell.type][spell.english])
debug("Precast: " .. spell.type .. " " .. spell.english)
return
end
end
function midcast(spell, action)
if "Trust" == spell.type then
return
end
if is_magic(spell) then
if sets.Midcast[spell.english] then
equip(sets.Midcast[spell.english])
debug("Midcast: " .. spell.english)
return
end
if spell.english:endswith("na") then
equip(sets.Midcast["Divine Veil"])
debug("Midcast: Devine Veil")
return
end
if spell.english:startswith("Cura") then
equip(sets.Midcast.Curaga)
debug("Midcast: Curaga")
return
end
if spell.english:startswith("Cure") then
equip(sets.Midcast.Cure)
debug("Midcast: Cure")
return
end
if spell.english:startswith("Regen") then
equip(sets.Midcast.Regen)
debug("Midcast: Regen")
return
end
if spell.english:startswith("Bar") then
equip(sets.Midcast.Bar)
debug("Midcast: Bar")
return
end
if sets.Midcast[spell.skill] then
equip(sets.Midcast[spell.skill])
debug("Midcast Skill: " .. spell.skill)
end
end
end
function aftercast(spell, action)
debug("Idle")
equip(sets.Idle)
end
function debug(s)
-- windower.add_to_chat(123, s)
end