-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAndromida_SAM.lua
532 lines (469 loc) · 14.2 KB
/
Andromida_SAM.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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
local engaged_mode = "Normal"
local incapacitated_states = T {"stun", "petrification", "terror", "sleep", "defense down"}
-- kegero puk clusters
-- jinpu bats marid qutrub ziz
local tutle_mobs = T {
-- Ody NMs
"Asena",
"Bygul",
"Chaos Steward",
"Dabbat al-Ard",
"Kurmajara",
"Lotanu",
"Wayra Tata",
-- Ody Holo
"Agon Heretic",
"Agon Marquess",
"Agon Monarch",
"Agon Viscount",
"Agon Vizier",
-- Ody Mobs
"Nostos Apkallu",
"Nostos Bhoot",
"Nostos Black Pudding",
"Nostos Clot",
"Nostos Ghoul",
"Nostos Imp",
"Nostos Korrigan",
"Nostos Rarab",
"Nostos Sapling",
"Nostos Scorpion",
"Nostos Spider",
"Nostos Wasp",
-- Dyna Sandy
"Halphas",
"Ravager Leader",
"Ravager Commander",
"Mendicant Leader",
"Mendicant Commander",
"Cutpurse Leader",
"Cutpurse Commander",
"Invoker Leader",
"Invoker Commander",
"Warlock Leader",
"Warlock Commander",
"Stalwart Leader",
"Stalwart Commander",
"Hunter Leader",
"Hunter Commander",
"Priest Leader",
"Priest Commander",
"Minstrel Leader",
"Minstrel Commander",
"Kagemusha Leader",
"Kagemusha Commander",
"Canoneer Leader",
"Canoneer Commander",
"Squadron Pugilist",
"Regiment Pugilist",
"Squadron Tamer",
"Regiment Tamer",
"Squadron Shinobi",
"Regiment Shinobi",
}
-- https://www.ffxiah.com/forum/topic/54555/the-odyssey-strategy-and-discussion/152/#3590215
local mob_weapon_damage_type = T {
-- Ody Lamia
["Agon Adjudicator"] = "Piercing",
["Agon Dignitary"] = "Piercing",
["Agon Marksman"] = "Piercing",
["Agon Rabblerouser"] = "Piercing",
["Agon Scallywag"] = "Piercing",
["Agon Vizier"] = "Piercing",
["Agon Yojimbo"] = "Piercing",
["Agon Monarch"] = "Piercing",
-- Ody Trolls
["Agon Clearmind"] = "Slashing",
["Agon Defender"] = "Slashing",
["Agon Footsoldier"] = "Slashing",
["Agon Infidel"] = "Slashing",
["Agon Ritualist"] = "Slashing",
["Agon Sharpshooter"] = "Slashing",
["Agon Shieldsaint"] = "Slashing",
["Agon Viscount"] = "Slashing",
-- Ody Mamool
["Agon Cleric"] = "Slashing",
["Agon Heretic"] = "Slashing",
["Agon Initiate"] = "Slashing",
["Agon Instigator"] = "Slashing",
["Agon Marquess"] = "Slashing",
["Agon Phalanx"] = "Slashing",
["Agon Pilferer"] = "Slashing",
["Agon Praetor"] = "Slashing",
-- Ody NMs
["Asena"] = "Slashing",
["Bygul"] = "Slashing",
["Chaos Steward"] = "Slashing",
["Dabbat al-Ard"] = "Slashing",
["Kurmajara"] = "Piercing",
["Lotanu"] = "Slashing",
["Wayra Tata"] = "Slashing",
-- Ody Mobs
["Nostos Ameretat"] = "Slashing",
["Nostos Apkallu"] = "Slashing",
["Nostos Bat"] = "Slashing",
["Nostos Bats"] = "Slashing",
["Nostos Bhoot"] = "Piercing",
["Nostos Bigbird"] = "Slashing",
["Nostos Black Pudding"] = "Slashing",
["Nostos Bugard"] = "Slashing",
["Nostos Chigoe"] = "Slashing",
["Nostos Clot"] = "Slashing",
["Nostos Cluster"] = "Slashing",
["Nostos Colibri"] = "Slashing",
["Nostos Crab"] = "Piercing",
["Nostos Dahak"] = "Slashing",
["Nostos Defoliator"] = "Slashing",
["Nostos Diremite"] = "Slashing",
["Nostos Draugar"] = "Slashing",
["Nostos Flytrap"] = "Slashing",
["Nostos Funguar"] = "Slashing",
["Nostos Gaganabo"] = "Slashing",
["Nostos Goobbue"] = "Slashing",
["Nostos Imp"] = "Slashing",
["Nostos Jagil"] = "Piercing",
["Nostos Karakul"] = "Slashing",
["Nostos Korrigan"] = "Slashing",
["Nostos Leech"] = "Slashing",
["Nostos Leopard"] = "Slashing",
["Nostos Manticore"] = "Slashing",
["Nostos Marid"] = "Slashing",
["Nostos Puk"] = "Slashing",
["Nostos Qutrub"] = "Slashing",
["Nostos Ram"] = "Slashing",
["Nostos Raptor"] = "Slashing",
["Nostos Rarab"] = "Slashing",
["Nostos Sapling"] = "Slashing",
["Nostos Scorpion"] = "Slashing",
["Nostos Soulflayer"] = "Slashing",
["Nostos Spider"] = "Slashing",
["Nostos Tiger"] = "Slashing",
["Nostos Treant"] = "Slashing",
["Nostos Vulture"] = "Slashing",
["Nostos Wamoura"] = "Slashing",
["Nostos Wamouracampa"] = "Slashing",
["Nostos Wasp"] = "Slashing",
["Nostos Weapon"] = "Slashing",
["Nostos Worm"] = "Slashing",
["Nostos Wyvern"] = "Slashing",
["Nostos Ziz"] = "Slashing",
}
local mob_ws = T {
["Nostos Cluster"] = "Tachi: Kagero",
["Nostos Puk"] = "Tachi: Kagero",
["Nostos Draugar"] = "Tachi: Kagero",
["Nostos Bat"] = "Tachi: Jinpu",
["Nostos Bats"] = "Tachi: Jinpu",
["Nostos Wyvern"] = "Tachi: Jinpu",
["Nostos Karakul"] = "Tachi: Jinpu",
["Nostos Rarab"] = "Tachi: Jinpu",
["Nostos Bugard"] = "Tachi: Jinpu",
["Nostos Ziz"] = "Tachi: Jinpu",
["Nostos Leopard"] = "Tachi: Jinpu",
["Nostos Ram"] = "Tachi: Jinpu",
}
function get_sets()
sets.Weapons = {
Piercing = {
main = "Shining One",
sub = "Utu Grip",
},
Slashing = {
main = "Dojikiri Yasutsuna",
sub = "Utu Grip",
},
}
sets.Idle = {
ammo = "Aurgelmir Orb +1",
head = "Nyame Helm",
body = "Nyame Mail",
hands = "Nyame Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Sam. Nodowa +2",
waist = "Ioskeha Belt +1",
left_ear = "Dedition Earring",
right_ear = "Telos Earring",
left_ring = "Chirich Ring +1",
right_ring = "Niqmaddu Ring",
back = {
name = "Smertrios's Mantle",
augments = {"DEX+20", "Accuracy+20 Attack+20", "DEX+10", '"Dbl.Atk."+10', "Phys. dmg. taken-10%"}
}
}
sets.Engaged = {}
sets.Engaged.Normal = {
main = "Dojikiri Yasutsuna",
sub = "Utu Grip",
ammo = "Aurgelmir Orb +1",
head = "Flam. Zucchetto +2",
body = "Kasuga Domaru +3",
hands = "Wakido Kote +2",
legs = "Kasuga Haidate +3",
feet = "Kas. Sune-Ate +3",
neck = "Sam. Nodowa +2",
waist = "Sailfi Belt +1",
left_ear = "Dedition Earring",
right_ear = "Telos Earring",
left_ring = "Chirich Ring +1",
right_ring = "Niqmaddu Ring"
}
sets.Engaged.Hybrid = {
ammo = "Aurgelmir Orb +1",
head = "Mpaca's Cap",
body = "Mpaca's Doublet",
hands = "Mpaca's Gloves",
legs = "Mpaca's Hose",
feet = "Mpaca's Boots",
neck = "Sam. Nodowa +2",
waist = "Ioskeha Belt +1",
left_ear = "Cessance Earring",
right_ear = "Telos Earring",
left_ring = "Ilabrat Ring",
right_ring = "Niqmaddu Ring",
back = {
name = "Smertrios's Mantle",
augments = {'DEX+20', 'Accuracy+20 Attack+20', 'DEX+10', '"Dbl.Atk."+10', 'Phys. dmg. taken-10%'}
}
}
sets.Engaged.Turtle = {
ammo = "Aurgelmir Orb +1",
head = "Nyame Helm",
body = "Nyame Mail",
hands = "Wakido Kote +2",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Sam. Nodowa +2",
waist = "Sailfi Belt +1",
left_ear = "Dedition Earring",
right_ear = "Telos Earring",
left_ring = "Defending Ring",
right_ring = "Niqmaddu Ring",
back = {
name = "Smertrios's Mantle",
augments = {
'DEX+20',
'Accuracy+20 Attack+20',
'DEX+10',
'"Dbl.Atk."+10',
'Phys. dmg. taken-10%'
}
}
}
-- JA Sets --
sets.JobAbility = {}
sets.JobAbility.Meditate = {
head = "Wakido Kabuto +1",
hands = "Sakonji Kote +1",
back = "Smertrios's Mantle"
}
-- WS Sets --
sets.WeaponSkill = {
equipable = true,
ammo = "Knobkierrie",
head = "Mpaca's Cap",
body = "Nyame Mail",
hands = "Nyame Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Sam. Nodowa +2",
waist = "Sailfi Belt +1",
left_ear = "Thrud Earring",
right_ear = "Moonshade Earring",
left_ring = "Karieyh Ring",
right_ring = "Epaminondas's Ring",
back = {
name = "Smertrios's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Phys. dmg. taken-10%'}
}
}
sets.WeaponSkill["Tachi: Shoha"] = {
ammo = "Knobkierrie",
head = "Nyame Helm",
body = "Nyame Mail",
hands = "Nyame Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Sam. Nodowa +2",
waist = "Sailfi Belt +1",
left_ear = "Thrud Earring",
right_ear = "Moonshade Earring",
left_ring = "Epaminondas's Ring",
right_ring = "Niqmaddu Ring",
back = {
name = "Smertrios's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Phys. dmg. taken-10%'}
}
}
sets.WeaponSkill["Tachi: Rana"] = set_combine(
{ right_ear = "Lugra Earring" },
sets.WeaponSkill["Tachi: Shoha"]
)
sets.WeaponSkill["Tachi: Jinpu"] = {
ammo = "Knobkierrie",
head = "Nyame Helm",
body = "Nyame Mail",
hands = "Nyame Gauntlets",
legs = "Nyame Flanchard",
feet = "Nyame Sollerets",
neck = "Sam. Nodowa +2",
waist = "Orpheus's Sash",
left_ear = "Moonshade Earring",
right_ear = "Friomisi Earring",
left_ring = "Acumen Ring",
right_ring = "Epaminondas's Ring"
}
sets.WeaponSkill["Tachi: Kagero"] = set_combine({}, sets.WeaponSkill["Tachi: Jinpu"])
sets.WeaponSkill["Tachi: Koki"] = set_combine({}, sets.WeaponSkill["Tachi: Jinpu"])
sets.WeaponSkill.Stardiver = {
main = "Shining One",
sub = "Utu Grip",
ammo = "Knobkierrie",
head = "Mpaca's Cap",
body = "Mpaca's Doublet",
hands = "Ryuo Tekko +1",
legs = "Mpaca's Hose",
feet = "Mpaca's Boots",
neck = "Sam. Nodowa +2",
waist = "Sailfi Belt +1",
left_ear = "Schere Earring",
right_ear = "Moonshade Earring",
left_ring = "Regal Ring",
right_ring = "Niqmaddu Ring",
back = {
name = "Smertrios's Mantle",
augments = {'STR+20', 'Accuracy+20 Attack+20', 'STR+10', 'Weapon skill damage +10%', 'Phys. dmg. taken-10%'}
}
}
-- Magic Sets --
sets.FastCast = {}
sets.Midcast = {}
end
function precast(spell, action)
if incapacitated() then
return
end
if (spell.english == "Spectral Jig" or spell.english == "Sneak") and buffactive.Sneak then
cast_delay(0.2)
send_command("cancel Sneak")
end
if override_weaponskill(spell) then
return
end
if sets[spell.type] and sets[spell.type][spell.english] then
equip(sets[spell.type][spell.english])
return
end
if sets[spell.type] and sets[spell.type].equipable then
equip(sets[spell.type])
return
end
if is_magic(spell) then
equip(sets.FastCast)
return
end
debug("No set for " .. spell.type .. "." .. spell.english)
end
function override_weaponskill(spell)
if spell.type ~= "WeaponSkill" then return end
if player.equipment.main ~= sets.Weapons.Slashing.main then return end
local newWS = mob_ws[player.target.name]
if not newWS then return end
if newWS == spell.english then return end
cancel_spell()
send_command('@input /ws "' .. newWS .. '" ' .. tostring(spell.target.raw))
return true
end
function midcast(spell, action)
if incapacitated() then
return
end
if not is_magic(spell) then
return
end
if sets["Midcast"][spell.skill] and sets["Midcast"][spell.skill][spell.english] then
equip(sets["Midcast"][spell.skill][spell.english])
return
end
if sets["Midcast"][spell.skill] and sets["Midcast"][spell.skill].equipable then
equip(sets["Midcast"][spell.skill])
return
end
debug("No set for Midcast." .. spell.skill .. "." .. spell.english)
end
function status_change(new, old)
if incapacitated() then
return
end
if _G["status_change_" .. new:lower()] and not _G["status_change_" .. new:lower()]() then
return
end
if (sets[new]) then
equip(sets[new])
end
end
function status_change_engaged()
if mob_weapon_damage_type[player.target.name] then
equip(sets.Weapons[mob_weapon_damage_type[player.target.name]])
end
if tutle_mobs:contains(player.target.name) then
equip(sets.Engaged.Turtle)
return
end
equip(sets.Engaged[engaged_mode])
end
function aftercast(spell, action)
status_change(player.status)
end
function buff_change(name, gain, buff_details)
if incapacitated_states:contains(name) then
status_change(player.status)
end
end
function incapacitated()
if incapacitated_states:find(function(value)
return buffactive[value] or false
end) then
equip(sets.Engaged.Turtle)
return true
end
end
function self_command(argsString)
print(T(player).status)
args = argsString:lower():split(" ")
if _G["self_command_" .. args[1]] then
_G["self_command_" .. args[1]](args:slice(2))
end
status_change(player.status)
end
function self_command_e(args)
return self_command_engaged(args)
end
function self_command_engaged(args)
if not args[1] then
error("Error: No Engaged Mode Specified")
return
end
local mode = args[1]:ucfirst()
if not sets.Engaged[mode] then
error("Error: Invalid Engaged Mode: " .. mode)
return
end
engaged_mode = mode
status_change(player.status)
notice("Engaged Mode Set: " .. mode)
end
function is_magic(spell)
return spell.type:endswith("Magic") or spell.type == "BardSong" or spell.type == "Ninjutsu" or spell.type == "Trust"
end
function notice(s)
add_to_chat(121, s)
end
function error(s)
add_to_chat(4, s)
end
function debug(s)
if debugMode then
notice(s)
end
end