-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPositron_RDM.lua
314 lines (290 loc) · 8.79 KB
/
Positron_RDM.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
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
function get_sets()
sets = {}
sets.precast = {}
sets.midcast = {}
sets.aftercast = {}
include("common/job_change.lua")
include("all/dispelga.lua") -- sets.dispelga
include("all/impact.lua") -- sets.impact
include("all/midcast-aquaveil.lua") -- sets.midcast.aquaveil
include("all/obi.lua") -- sets.obi
include("all/orpheus.lua") -- sets.orpheus
include("all/quickmagic.lua") -- sets.quickmagic
include("all/th.lua") -- sets.th
include("all/precast-enhancing.lua") -- sets.precast.enhancing
include("all/precast-stoneskin.lua") -- sets.precast.stoneskin
include("all/precast-utsusemi.lua") -- sets.precast.utsusemi
include("all/midcast-stoneskin.lua") -- sets.midcast.stoneskin
include("rdm/enspell.lua") -- sets.enspell
include("rdm/fastcast.lua") -- sets.fastcast
include("rdm/idle.lua") -- sets.idle
include("rdm/level60.lua") -- sets.level60
include("rdm/naked.lua") -- sets.naked
include("rdm/tp.lua") -- sets.tp
include("rdm/weapon.lua") -- sets.weapon
include("rdm/weapon-aeolianedge.lua") -- sets.weapon.aeolianedge
include("rdm/weapon-blackhalo.lua") -- sets.weapon.blackhalo
include("rdm/weapon-caliburnus.lua") -- sets.weapon.caliburnus
include("rdm/weapon-cure.lua") -- sets.weapon.cure
include("rdm/weapon-enspell.lua") -- sets.weapon.enspell
include("rdm/weapon-evisceration.lua") -- sets.weapon.evisceration
include("rdm/weapon-mpugandring.lua") -- sets.weapon.mpugandring
include("rdm/weapon-sanguineblade.lua") -- sets.weapon.sanguineblade
include("rdm/weapon-savageblade.lua") -- sets.weapon.savageblade
include("rdm/weapon-seraphblade.lua") -- sets.weapon.seraphblade
include("rdm/ws.lua") -- sets.ws
include("rdm/ws-dark.lua") -- sets.ws.dark
include("rdm/ws-magical.lua") -- sets.ws.magical
include("rdm/ws-multihit.lua") -- sets.ws.multihit
include("rdm/precast-chainspell.lua") -- sets.precast.chainspell
include("rdm/precast-enfeebling.lua") -- sets.precast.enfeebling
include("rdm/precast-healing.lua") -- sets.precast.healing
include("rdm/precast-ra.lua") -- sets.precast.ra
include("rdm/midcast-barspell.lua") -- sets.midcast.barspell
include("rdm/midcast-barstatus.lua") -- sets.midcast.barstatus
include("rdm/midcast-curecheat.lua") -- sets.midcast.curecheat
include("rdm/midcast-cursna.lua") -- sets.midcast.cursna
include("rdm/midcast-darkmagic.lua") -- sets.midcast.darkmagic
include("rdm/midcast-elemental.lua") -- sets.midcast.elemental
include("rdm/midcast-enfeeblingaccuracy.lua") -- sets.midcast.enfeeblingaccuracy
include("rdm/midcast-enfeeblingpotency.lua") -- sets.midcast.enfeeblingpotency
include("rdm/midcast-enhancing.lua") -- sets.midcast.enhancing
include("rdm/midcast-enhancingself.lua") -- sets.midcast.enhancingself
include("rdm/midcast-enhancingskill.lua") -- sets.midcast.enhancingskill
include("rdm/midcast-gain.lua") -- sets.midcast.gain
include("rdm/midcast-healing.lua") -- sets.midcast.healing
include("rdm/midcast-phalanx.lua") -- sets.midcast.phalanx
include("rdm/midcast-ra.lua") -- sets.midcast.ra
include("rdm/midcast-refresh.lua") -- sets.midcast.refresh
include("rdm/midcast-regen.lua") -- sets.midcast.regen
include("func/buffactive_enspell.lua") -- buffactive_enspell()
include("func/haste_amount.lua") -- haste_amount()
include("func/obi_check.lua") -- obi_check()
_VARIABLE_POTENCY = T {
"Addle",
"Addle II",
"Blind",
"Blind II",
"Distract",
"Distract II",
"Distract III",
"Frazzle",
"Frazzle II",
"Frazzle III",
"Gravity",
"Gravity II",
"Paralyze",
"Paralyze II",
"Poison",
"Poison II",
"Poisonga",
"Slow",
"Slow II"
}
_DARK_WS = T {
"Sanguine Blade"
}
_MAGICAL_WS = T {
"Aeolian Edge",
"Red Lotus Blade",
"Seraph Blade"
}
_MULTI_HIT_WS = T {
"Chant du Cygne",
"Death Blossom",
"Evisceration",
"Requiescat",
"Vorpal Blade",
}
_BARSTATUS_SPELLS = T {
"Baramnesia",
"Baramnesra",
"Barvirus",
"Barvira",
"Barparalyze",
"Barparalyzra",
"Barsilence",
"Barsilencera",
"Barpetrify",
"Barpetra",
"Barpoison",
"Barpoisonra",
"Barblind",
"Barblindra",
"Barsleep",
"Barsleepra"
}
_AMINON = false
if _AMINON then
include("rdm/aminon/impact.lua") -- sets.impact
include("rdm/aminon/ws.lua") -- sets.ws
end
_ONGO = false
if _ONGO then
include("rdm/ongo/tp.lua") -- sets.tp
end
_SEALED_FATE = false
if _SEALED_FATE then
include("rdm/sealed-fate/tp.lua") -- sets.tp
-- sets.enspell = sets.tp
end
send_command(macrobook_cmd..porter_cmd..lockstyle_cmd)
end
function sub_job_change(new, old)
send_command("wait 10; \
input /lockstyleset 25; \
gs equip sets.idle")
end
function precast(spell, position)
-- WS Engaged Check
if spell.type == "WeaponSkill" and player.status ~= "Engaged" then
cancel_spell()
return
end
-- WS Distance Check
_RANGE_MULTIPLIER = 1.642276421172564
if spell.type == "WeaponSkill" and
spell.target.distance >
(spell.range * _RANGE_MULTIPLIER + spell.target.model_size)
then
add_to_chat(8, spell.name .. " aborted due to target out of range.")
cancel_spell()
return
end
if spell.type == "Scholar" then
return
elseif spell.type == "WeaponSkill" then
equip(sets.ws)
if _DARK_WS:contains(spell.name) then
equip(sets.ws.magical, sets.ws.dark)
obi_check(spell)
elseif _MAGICAL_WS:contains(spell.name) then
equip(sets.ws.magical)
equip(sets.orpheus)
-- obi_check(spell)
elseif _MULTI_HIT_WS:contains(spell.name) then
equip(sets.ws.multihit)
end
elseif spell.type == "JobAbility" then
if spell.english:contains("Chainspell") then
equip(sets.precast.chainspell)
end
elseif spell.action_type == "Ranged Attack" then
equip(sets.precast.ra)
else
equip(sets.quickmagic, sets.fastcast)
if spell.skill == "Enfeebling Magic" then
equip(sets.precast.enfeebling)
if spell.english:contains("Dispelga") then
_PREVIOUS_WEAPONS = T {
main = player.equipment.main
}
equip(sets.dispelga)
end
elseif spell.skill == "Enhancing Magic" then
equip(sets.precast.enhancing)
if spell.english:contains("Stoneskin") then
equip(sets.precast.stoneskin)
end
elseif spell.skill == "Elemental Magic" then
if spell.english:contains("Impact") then
equip(sets.impact)
end
elseif spell.skill == "Healing Magic" then
equip(sets.precast.healing)
end
end
end
function midcast(spell)
if spell.type == "Scholar" then
return
elseif spell.skill == "Enfeebling Magic" then
if spell.english:contains("Dia") or spell.english:contains("Inundation") then
equip(sets.th)
elseif _VARIABLE_POTENCY:contains(spell.name) then
equip(sets.midcast.enfeeblingpotency)
else
equip(sets.midcast.enfeeblingaccuracy)
end
elseif spell.skill == "Enhancing Magic" then
equip(sets.midcast.enhancing)
if spell.target.type == "SELF" then
equip(sets.midcast.enhancingself)
end
if spell.english:contains("Aquaveil") then
equip(sets.midcast.aquaveil)
elseif spell.english:contains("Bar") then
equip(sets.midcast.barspell)
if _BARSTATUS_SPELLS:contains(spell.english) then
equip(sets.midcast.barstatus)
end
elseif spell.english:contains("En") then
equip(sets.midcast.enhancingskill)
elseif spell.english:contains("Gain") then
equip(sets.midcast.gain)
elseif spell.english:contains("Phalanx") then
if spell.target.type == "SELF" then
equip(sets.midcast.phalanx)
end
elseif spell.english:contains("Refresh") then
equip(sets.midcast.refresh)
elseif spell.english:contains("Regen") then
equip(sets.midcast.regen)
elseif spell.english:contains("Stoneskin") then
equip(sets.midcast.stoneskin)
elseif spell.english:contains("Temper") then
equip(sets.midcast.enhancingskill)
end
elseif spell.skill == "Dark Magic" then
equip(sets.midcast.darkmagic)
if spell.english:contains("Bio") then
equip(sets.th)
end
obi_check(spell)
elseif spell.skill == "Healing Magic" then
equip(sets.midcast.healing)
obi_check(spell)
if spell.name:contains("Cursna") then
equip(sets.midcast.cursna)
end
elseif spell.skill == "Elemental Magic" then
equip(sets.midcast.elemental)
if spell.english:contains("Impact") then
equip(sets.impact)
end
obi_check(spell)
elseif spell.type == "Ninjutsu" then
if spell.english:contains("Utsusemi") then
equip(sets.precast.utsusemi)
end
elseif spell.action_type == "Ranged Attack" then
equip(sets.midcast.ra)
end
end
function aftercast(spell)
if spell.type == "Scholar" then
return
elseif spell.action_type == "Ranged Attack" then
equip(sets.idle, sets.precast.ra)
elseif player.status == "Idle" then
equip(sets.idle)
elseif player.status == "Engaged" then
equip(sets.tp)
if buffactive_enspell() then
equip(sets.enspell)
end
end
if spell.english:contains("Dispelga") then
equip(_PREVIOUS_WEAPONS)
end
end
function status_change(new, old)
if new == "Engaged" then
equip(sets.tp)
if buffactive_enspell() then
equip(sets.enspell)
end
elseif new == "Idle" then
equip(sets.idle)
end
end