-
Notifications
You must be signed in to change notification settings - Fork 65
/
Arislan-MNK.lua
394 lines (320 loc) · 14.5 KB
/
Arislan-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
-- Original: Motenten / Modified: Arislan
-------------------------------------------------------------------------------------------------------------------
-- Keybinds
-------------------------------------------------------------------------------------------------------------------
-- Modes: [ F9 ] Cycle Offense Modes
-- [ CTRL+F9 ] Cycle Hybrid Modes
-- [ WIN+F9 ] Cycle Weapon Skill Modes
-- [ F10 ] Emergency -PDT Mode
-- [ ALT+F10 ] Toggle Kiting Mode
-- [ F11 ] Emergency -MDT Mode
-- [ F12 ] Update Current Gear / Report Current Status
-- [ CTRL+F12 ] Cycle Idle Modes
-- [ ALT+F12 ] Cancel Emergency -PDT/-MDT Mode
-- [ WIN+C ] Toggle Capacity Points Mode
--
--
-- (Global-Binds.lua contains additional non-job-related keybinds)
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
include('Mote-TreasureHunter')
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
lockstyleset = 1
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
function user_setup()
state.OffenseMode:options('Normal')
state.WeaponskillMode:options('Normal')
state.HybridMode:options('Normal', 'DT')
state.IdleMode:options('Normal', 'DT')
state.CP = M(false, "Capacity Points Mode")
-- Additional local binds
include('Global-Binds.lua') -- OK to remove this line
include('Global-GEO-Binds.lua') -- OK to remove this line
send_command('bind ^` gs c cycle treasuremode')
send_command('bind @c gs c toggle CP')
send_command('bind @c gs c toggle CP')
if player.sub_job == 'WAR' then
send_command('bind ^numpad/ input /ja "Berserk" <me>')
send_command('bind ^numpad* input /ja "Warcry" <me>')
send_command('bind ^numpad- input /ja "Aggressor" <me>')
end
send_command('bind ^numpad7 input /ws "Victory Smite" <t>')
send_command('bind ^numpad8 input /ws "Ascetic\'s Fury" <t>')
send_command('bind ^numpad4 input /ws "Asuran Fists" <t>')
send_command('bind ^numpad1 input /ws "Spinning Attack" <t>')
send_command('bind ^numpad2 input /ws "Shoulder Tackle" <t>')
send_command('bind ^numpad0 input /ja "Boost" <t>')
select_default_macro_book()
set_lockstyle()
end
function user_unload()
send_command('unbind ^`')
send_command('unbind @c')
send_command('unbind ^numpad/')
send_command('unbind ^numpad*')
send_command('unbind ^numpad-')
send_command('unbind ^numpad7')
send_command('unbind ^numpad8')
send_command('unbind ^numpad5')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
send_command('unbind ^numpad0')
send_command('unbind ^numpad.')
send_command('unbind #`')
send_command('unbind #1')
send_command('unbind #2')
send_command('unbind #3')
send_command('unbind #4')
send_command('unbind #5')
send_command('unbind #6')
send_command('unbind #7')
send_command('unbind #8')
send_command('unbind #9')
send_command('unbind #0')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
------------------------------------------------------------------------------------------------
---------------------------------------- Precast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Sapience Orb", --2
head=gear.Herc_MAB_head, --7
body=gear.Taeon_FC_body, --9
hands="Leyline Gloves", --8
legs="Rawhide Trousers", --5
feet=gear.Herc_MAB_feet, --2
neck="Orunmila's Torque", --5
ear1="Loquacious Earring", --2
ear2="Enchntr. Earring +1", --2
ring1="Weather. Ring +1", --6(4)
ring2="Kishar Ring", --4
}
------------------------------------------------------------------------------------------------
------------------------------------- Weapon Skill Sets ----------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.WS = {
ammo="Aurgelmir Orb +1",
head=gear.Adhemar_B_head,
body=gear.Herc_WS_body,
hands=gear.Adhemar_B_hands,
legs="Samnuha Tights",
feet=gear.Herc_TA_feet,
neck="Fotia Gorget",
ear1="Moonshade Earring",
ear2="Ishvara Earring",
ring1="Gere Ring",
ring2="Epaminondas's Ring",
back="Relucent Cape",
waist="Fotia Belt",
} -- default set
------------------------------------------------------------------------------------------------
---------------------------------------- Midcast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
----------------------------------------- Idle Sets --------------------------------------------
------------------------------------------------------------------------------------------------
sets.idle = {
ammo="Seki Shuriken",
head="Volte Cap",
body="Hiza. Haramaki +2",
hands=gear.Herc_DT_hands,
legs="Samnuha Tights",
feet="Herald's Gaiters",
neck="Bathy Choker +1",
ear1="Eabani Earring",
ear2="Sanare Earring",
ring1={name="Chirich Ring +1", bag="wardrobe3"},
ring2={name="Chirich Ring +1", bag="wardrobe4"},
back="Moonlight Cape",
waist="Flume Belt +1",
}
sets.idle.Town = sets.idle
sets.idle.Weak = sets.idle.DT
------------------------------------------------------------------------------------------------
---------------------------------------- Defense Sets ------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
---------------------------------------- Engaged Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged = {
ammo="Aurgelmir Orb +1",
head=gear.Herc_STP_head,
body=gear.Adhemar_B_body,
hands=gear.Adhemar_B_hands,
legs="Samnuha Tights",
feet=gear.Herc_TA_feet,
neck="Anu Torque",
ear1="Mache Earring +1",
ear2="Brutal Earring",
ring1="Niqmaddu Ring",
ring2="Epona's Ring",
back="Relucent Cape",
waist="Windbuffet Belt +1",
}
------------------------------------------------------------------------------------------------
---------------------------------------- Hybrid Sets -------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
---------------------------------------- Special Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.buff.Doom = {
neck="Nicander's Necklace", --20
ring1={name="Eshmun's Ring", bag="wardrobe3"}, --20
ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
sets.CP = {back="Mecisto. Mantle"}
sets.TreasureHunter = {head="Volte Cap", waist="Chaac Belt"}
--sets.Reive = {neck="Ygnas's Resolve +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff,gain)
-- If we gain or lose any haste buffs, adjust which gear set we target.
-- if buffactive['Reive Mark'] then
-- if gain then
-- equip(sets.Reive)
-- disable('neck')
-- else
-- enable('neck')
-- end
-- end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
send_command('@input /p Doomed.')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
end
function get_custom_wsmode(spell, action, spellMap)
local wsmode
if state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
wsmode = 'Acc'
end
return wsmode
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
return idleSet
end
-- Function to display the current relevant user state when doing an update.
-- Set eventArgs.handled to true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local cf_msg = ''
if state.CombatForm.has_value then
cf_msg = ' (' ..state.CombatForm.value.. ')'
end
local m_msg = state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
m_msg = m_msg .. '/' ..state.HybridMode.value
end
local ws_msg = state.WeaponskillMode.value
local d_msg = 'None'
if state.DefenseMode.value ~= 'None' then
d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
end
local i_msg = state.IdleMode.value
local msg = ''
if state.Kiting.value then
msg = msg .. ' Kiting: On |'
end
add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002).. ' |'
..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002).. ' |'
..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002).. ' |'
..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002).. ' |'
..string.char(31,002)..msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
th_update(cmdParams, eventArgs)
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
return meleeSet
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function check_gear()
if no_swap_gear:contains(player.equipment.left_ring) then
disable("ring1")
else
enable("ring1")
end
if no_swap_gear:contains(player.equipment.right_ring) then
disable("ring2")
else
enable("ring2")
end
end
windower.register_event('zone change',
function()
if no_swap_gear:contains(player.equipment.left_ring) then
enable("ring1")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.right_ring) then
enable("ring2")
equip(sets.idle)
end
end
)
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book: (set, book)
--if player.sub_job == 'SAM' then
set_macro_page(1, 8)
--else
set_macro_page(2, 8)
--end
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end