-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTristamgreen_MNK.lua
449 lines (398 loc) · 14.2 KB
/
Tristamgreen_MNK.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
--[[ *************************************************************
TG's MNK lua - 2019
************************************************************* --]]
require("common_gs_functions")
--[[ ******************************************************
Gearsets - define the various sets of gear we'll wear.
****************************************************** --]]
function get_sets()
-- idle set is worn when we're standing around doing
-- nothing. we want evasion, damage reduction and movement speed+.
sets.idle = {
main = "Spharai",
ammo = "White Tathlum",
head = "Gnole Crown",
body = "Melee Cyclas +1",
hands = "Denali Wristbands",
legs = "Denali Kecks",
feet = "Herald's Gaiters",
neck = "Orochi Nodowa +1",
waist = "Scouter's Rope",
left_ear = "Novia Earring",
right_ear = "Triton Earring",
left_ring = "Shadow Ring",
right_ring = "Patronus Ring",
back = "Shadow Mantle"
}
-- daylight idle set with lycopodium sash and feronia's bangles for super regen
sets.dayregen = {
hands = "Feronia's Bangles",
waist = "Lycopodium Sash"
}
-- engaged sets
-- maximize haste and prioritize accuracy and attack second
sets.haste = {
ammo = "White Tathlum",
head = "Walahra Turban",
body = "Hachiryu Haramaki",
hands = "Bandomusha Kote",
legs = "Byakko's Haidate",
feet = "Fuma Sune-Ate",
neck = "Faith Torque",
waist = "Black Belt",
left_ear = "Brutal Earring",
right_ear = "Merman's Earring",
left_ring = "Rajas Ring",
right_ring = "Mars's Ring",
back = "Cerb. Mantle +1"
}
-- full accuracy set
sets.accuracy = {
ammo = "Black Tathlum",
head = "Optical Hat",
body = "Hachiryu Haramaki",
hands = "Enkidu's Mittens",
legs = "Cobra Subligar",
feet = "Denali Gamashes",
neck = "Peacock Amulet",
waist = "Virtuoso Belt",
left_ear = "Pixie Earring",
right_ear = "Brutal Earring",
left_ring = "Toreador's Ring",
right_ring = "Mars's Ring",
back = "Cuchulain's Mantle"
}
-- full evasion
sets.eva = {
ammo = "White Tathlum",
head = "Gnole Crown",
body = "Scp. Harness +1",
hands = "Denali Wristbands",
legs = "Denali Kecks",
feet = "Herald's Gaiters",
neck = "Evasion Torque",
waist = "Scouter's Rope",
left_ear = "Triton Earring",
right_ear = "Triton Earring",
left_ring = "Wivre Ring +1",
right_ring = "Wivre Ring +1",
back = "Boxer's Mantle"
}
-- specialized TP sets
sets.footwork = {
legs = "",
feet = "Kyoshu Kyahan"
}
-- our resting set is for hMP.
sets.rest = {
body = "Melee Cyclas +1",
neck = "",
left_ear = "Sanative Earring",
right_ear = "",
hands = "",
left_ring = "",
right_ring = "",
waist = "",
feet = "",
back = "Melee Cape"
}
-- stacking strength for Final Heaven
sets.finalheaven = {
ammo = "Black Tathlum",
head = "Maat's Cap",
body = "Kirin's Osode",
hands = "Alkyoneus's Bracelets",
legs = "Hachiryu Haidate",
feet = "Agrona's Leggings",
neck = "Fotia Gorget",
waist = "Black Belt",
left_ear = "Brutal Earring",
right_ear = "Harmonius Earring",
left_ring = "Rajas Ring",
right_ring = "Mars's Ring",
back = "Cerb. Mantle +1"
}
-- Dragon Kick: STR50% DEX50%
sets.dragonkick = {
ammo = "Black Tathlum",
head = "Maat's Cap",
body = "Hachiryu Haramaki",
hands = "Alkyoneus's Bracelets",
legs = "Hachiryu Haidate",
feet = "Denali Gamashes",
neck = "Fotia Gorget",
waist = "Black Belt",
left_ear = "Brutal Earring",
right_ear = "Harmonius Earring",
left_ring = "Rajas Ring",
right_ring = "Mars's Ring",
back = "Cerb. Mantle +1",
}
-- stacking more str for other WSs
sets.ws = {
ammo = "Black Tathlum",
head = "Maat's Cap",
body = "Kirin's Osode",
hands = "Alkyoneus's Bracelets",
legs = "Hachiryu Haidate",
feet = "Denali Gamashes",
neck = "Fotia Gorget",
waist = "Black Belt",
left_ear = "Harmonius Earring",
right_ear = "Harmonius Earring",
left_ring = "Harmonius Ring",
right_ring = "Mars's Ring",
back = "Cerb. Mantle +1"
}
-- chakra set with +VIT
sets.chakra={
ammo = "Bibiki Seashell",
head = "Genbu's Kabuto",
body = "Temple Cyclas +1",
hands = "Melee Gloves +1",
legs = "Kensei Sitabaki",
feet = "Creek M Clomps",
neck = "Fortitude Torque",
waist = "Warwolf Belt",
left_ear = "Robust Earring",
right_ear = "Cassie Earring",
left_ring = "Corneus Ring",
right_ring = "Mercenary's Ring",
back = "Melee Cape",
}
-- chi blast set with +MND
sets.chiblast = {
ammo = "Black Tathlum",
head = "Temple Crown",
body = "Kirin's Osode",
hands = "Denali Wristbands",
legs = "Prince's Slops",
feet = "Suzaku's sune-ate",
neck = "Faith Torque",
waist = "Pythia Sash +1",
left_ear = "Celestial Earring",
right_ear = "Celestial Earring",
left_ring = "Celestial Ring",
right_ring = "Celestial Ring",
back = "Melee Cape"
}
-- counterstance set - max out guarding/counter
sets.counter = {
head = "Gnole Crown",
body = "Cobra Harness",
hands = "",
legs = "Temple Hose +1",
feet = "Melee Gaiters +1",
back = "Boxer's Mantle",
ring1 = "",
ring2 = "",
ear1 = "",
ear2 = ""
}
-- Utsusemi casting set - maximize ninjutsu skill and haste.
sets.utsu = {
neck = "Ninjutsu Torque",
left_ear = "Ninjutsu Earring",
back = "Astute Cape"
}
sets.fc = {
ammo = "White Tathlum",
head = "Gnole Crown",
body = "Scp. Harness +1",
hands = "Denali Wristbands",
legs = "Byakko's Haidate",
feet = "Enkidu's Leggings",
neck = "Tiercel Necklace",
waist = "Black Belt",
left_ear = "Triton Earring",
right_ear = "Loquac. Earring",
left_ring = "Shadow Ring",
right_ring = "Patronus Ring",
back = "Boxer's Mantle"
}
end
--[[ ******************************************************
Equip functions - put on the sets we defined above, and
echo a note to our chat log so we know it worked.
****************************************************** --]]
-- equip our idle set for standing around
function equip_idle()
common_idle_equip()
end
-- equip our engaged set. if footwork is not active, reset footwork flag and unequip that set.
function equip_engaged()
if ev == true then
windower.add_to_chat(8,'[Evasion]')
equip(sets.haste,sets.eva)
elseif acc == true then
windower.add_to_chat(8,'[Accuracy]')
equip(sets.haste,sets.accuracy)
else
equip(sets.idle,sets.haste)
end
end
-- equip our WS set
function equip_ws(spell)
if spell.name == 'Final Heaven' then
equip(sets.finalheaven)
elseif spell.name == 'Dragon Kick' then
equip(sets.dragonkick)
if (buffactive['footwork']) then
equip(sets.footwork)
end
else
equip(sets.ws)
end
if world.time <= 1080 and world.time >= 360 then
windower.add_to_chat(8,"[Daylight Bonus - Fenrir Earring]")
equip({right_ear="Fenrir's Earring"})
end
end
-- equip our hMP set
function equip_rest()
windower.add_to_chat(8,'[Resting]')
equip(sets.rest)
end
-- pick between our idle set and engaged set, depending on
-- whether we're currently engaged with a mob.
function choose_set()
if player.status == 'Engaged' then
windower.add_to_chat(8,'[Engaged Mode Active]')
equip_engaged()
-- Extra Attack, Fenrir's Earring
if world.time <= 1080 and world.time >= 360 then
windower.add_to_chat(8,"[Engaged - Daylight Bonus]")
equip({right_ear="Fenrir's Earring"})
end
if (buffactive['counterstance']) then
equip(sets.counter)
end
if (buffactive['footwork']) then
equip(sets.footwork)
end
elseif player.status == 'Resting' then
equip_rest()
else
equip_idle()
end
end
--[[ ******************************************************
Casting functions - these functions run automatically when
we cast a spell, use a job ability, rest for MP, and so on
****************************************************** --]]
-- the precast function runs automatically BEFORE we
-- begin casting a spell or job ability.
function precast(spell, spellMap, action)
if spell.type == 'WeaponSkill' then
equip_ws(spell)
elseif spell.name == 'Boost' then
equip({hands="Temple Gloves"})
elseif spell.name == 'Focus' then
equip({head="Temple Crown"})
elseif spell.name == 'Chakra' then
windower.add_to_chat(8,'[Chakra]')
if world.day_element == 'Darksday' then
windower.add_to_chat(8,'[Chakra on Darksday - +Shadow Mantle]')
equip(sets.chakra,{back="Shadow Mantle"})
else
equip(sets.chakra)
end
elseif spell.name == 'Chi Blast' then
windower.add_to_chat(8,'[Chi Blast]')
equip(sets.engaged,sets.chiblast)
elseif spell.type:contains('Magic') or spell.type == 'Ninjutsu' then
equip(sets.fc)
else
choose_set()
end
end
-- most of our abilities are either insta-cast or require
-- gearswaps at the start, so we don't do much mid-cast.
function midcast(spell)
if spell.name == 'Utsusemi: Ni' or spell.name == 'Utsusemi: Ichi' then
windower.add_to_chat(8,'[Utsusemi]')
equip(sets.utsu)
elseif spell.name == 'Chakra' then
windower.add_to_chat(8,'[Chakra]')
if world.day == 'Darksday' then
windower.add_to_chat(8,'[Darksday - Shadow Mantle]')
equip(sets.chakra,{back="Shadow Mantle"})
else
equip(sets.chakra)
end
elseif spell.name == 'Chi Blast' then
windower.add_to_chat(8,'[Chi Blast]')
equip(sets.engaged,sets.chiblast)
else
choose_set()
end
end
-- when we're done with our spell or ability, return to either
-- our idle or engaged gear.
function aftercast(spell)
choose_set()
end
-- swap into hMP gear when we /heal, and return to idle gear
-- when we stand up.
function status_change(new,old)
if new == 'Resting' then
equip_rest()
else
choose_set()
end
end
function buff_change(name,gain)
-- footwork gone > do another choose_set
if buffactive['Footwork'] then
footwork = true
choose_set()
else
footwork = false
choose_set()
end
debuff_items()
end
function self_command(m)
-- mode selectors are run by the macro command /console gs c [modename]
-- modes included here are:
-- EVA - equips Evasion Gearsets
-- acc - Accuracy Mode
if m == "EVA" then
if ev == false then
ev = true
windower.add_to_chat(8,'[Evasion during combat: ON]')
choose_set()
else
ev = false
windower.add_to_chat(8,'[Evasion during combat: OFF]')
choose_set()
end
elseif m == "acc" then
if acc == false then
acc = true
windower.add_to_chat(8,'[Accuracy: ON]')
choose_set()
else
acc = false
windower.add_to_chat(8,'[Accuracy: OFF]')
choose_set()
end
end
end
--[[ ******************************************************
Code that runs once, when we first swap to MNK job
****************************************************** --]]
-- ev determines whether we should wear our evasion gear in combat
ev = false
-- acc determines whether we should wear our Accuracy gear in combat
acc = false
-- footwork determines whether or not footwork is active in combat
footwork = false
-- Puts on our fashion set, lockstyle it, then switch
-- to our idle set.
send_command('gs equip idle;wait 1;input /lockstyleset 2')
send_command('input /macro book 2; wait 0.1; input /macro set 1')
windower.add_to_chat(8,'[Evasion Mode: Deactivated]')
windower.add_to_chat(8,'[Accuracy Mode: Deactivated]')
windower.add_to_chat(8,'[Footwork: Deactivated]')
send_command('input //dp height')