forked from Nix80/FFXI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAmunaptra_GEO.lua
376 lines (297 loc) · 17.9 KB
/
Amunaptra_GEO.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
-------------------------------------------------------------------------------------------------------------------
-- 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. state.Buff vars initialized here will automatically be tracked.
function job_setup()
indi_timer = ''
indi_duration = 180
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
state.MagicBurst = M(false, 'Magic Burst')
-- Additional local binds
send_command('bind ^` gs c toggle MagicBurst')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA.Bolster = {body="Bagua Tunic"}
sets.precast.JA['Life cycle'] = {body="Geomancy Tunic"}
sets.precast.JA['Full cycle'] = {head="Azimuth Hood +1"}
sets.precast.JA['Radial Arcana'] = {feet="Bagua sandals"}
-- Fast cast sets for spells
sets.precast.FC = {range="Dunna",
head="Merlinic hood", ear1="Etiolation Earring", ear2="Loquacious Earring",
body="Vrikodara Jupon", ring1="Lebeche Ring", ring2="Weatherspoon Ring", hands="Amalric gages",
back="Lifestream Cape",waist="Cetl Belt",legs="Geomancy Pants +1",feet="Merlinic Crackows"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Tamaxchi",sub="Sors Shield",back="Pahtli Cape"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {hands="Bagua mitaines"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Amar cluster",
head="Merlinic hood",neck="Fotia gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Hagondes Coat +1",hands="Amalric gages",ring1="Rajas Ring",ring2="Rufescent Ring",
back="Rancorous Mantle",waist="Fotia Belt",legs="Amalric slops",feet="Battlecast Gaiters"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Flash Nova'] = {ammo="Witchstone",
head="Merlinic hood",neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric doublet",hands="Amalric gages",ring1="Acumen Ring",ring2="Etana ring",
back="Toro Cape",waist="Fotia Belt", legs="Amalric slops", feet="Merlinic Crackows"}
sets.precast.WS['Starlight'] = {ear2="Moonshade Earring"}
sets.precast.WS['Moonlight'] = {ear2="Moonshade Earring"}
--------------------------------------
-- Midcast sets
--------------------------------------
-- Base fast recast for spells
sets.midcast.FastRecast = {
head="Merlinic hood",ear2="Loquacious Earring",
body="Vrikodara Jupon",hands="Geomancy Mitaines +1",ring1="Prolix Ring",
back="Lifestream Cape",waist="Witful Belt",legs="Geomancy Pants +1",feet="Merlinic Crackows"}
sets.midcast.Geomancy = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Azimuth Hood +1", body="Bagua Tunic", hands="Geomancy Mitaines +1", lear="Mendi. Earring", rear="Gifted earring",
neck="Incanter's torque", rring="Renaye Ring", feet="Medium's sabots", back="Lifestream Cape"}
sets.midcast.Geomancy.Indi = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Azimuth Hood +1", body="Bagua Tunic", lear="Mendi. Earring", rear="Gifted earring", neck="Incanter's torque",
legs="Bagua Pants", hands="Geomancy Mitaines +1", feet="Medium's sabots", back="Lifestream Cape"}
sets.midcast.Cure = {main="Tamaxchi",sub="Sors Shield", lear="Novia Earring", rear="Mendicant's Earring",
head="Merlinic hood", body="Vrikodara Jupon",hands="Telchine Gloves", lring="Sirona's ring", rring="Lebeche ring",
waist="Ovate Rope", back="Solemnity Cape", legs="Assiduity Pants +1",feet="Medium's sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Protectra = {ring1="Sheltered Ring"}
sets.midcast.Shellra = {ring1="Sheltered Ring"}
sets.midcast['Enhancing Magic'] = {
head="Befouled Crown", neck="Incanter's torque", ear1="Etiolation Earring", ear2="Loquacious Earring",
body="Telchine Chasuble",hands="Amalric gages", lring="Etana ring", rring="Leviathan ring",
back="Merciful Cape",waist="Refoccilation Stone",legs="Assiduity Pants +1", feet="Azimuth Gaiters +1"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash", neck="Stone gorget"})
sets.midcast['Enfeebling Magic'] = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Befouled Crown", neck="Sanctity Necklace", rear="Lifestorm Earring", lear="Psystorm Earring",
body="Vanya Robe", hands="Amalric gages", lring="Etana ring", rring="Weatherspoon Ring",
back="Lifestream Cape", waist="Ovate Rope", legs="Psycloth Lappas", feet="Bagua Sandals"}
sets.midcast['Elemental Magic'] = {main="Rubicundity", sub="Culminus", ammo="Witchstone",
head="Merlinic hood", neck="Sanctity Necklace", lear="Barkarole Earring", rear="Friomisi Earring",
body="Amalric doublet", hands="Amalric gages", lring="Acumen Ring", rring="Shiva Ring",
back="Toro Cape", waist="Refoccilation Stone", legs="Amalric slops", feet="Merlinic Crackows"}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Dark Magic'] = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Bagua Galero", neck="Incanter's torque", rear="Lifestorm Earring", lear="Psystorm Earring",
body="Geomancy Tunic", hands="Amalric gages", lring="Acumen Ring", rring="Etana ring",
back="Lifestream Cape", waist="Cetl Belt", legs="Amalric slops", feet="Merlinic Crackows"}
sets.magic_burst = {main="Rubicundity", sub="Culminus", ammo="Witchstone",
head="Merlinic hood", neck="Mizu. Kubikazari", lear="Barkarole Earring", rear="Friomisi Earring",
body="Amalric doublet", hands="Amalric gages", lring="Mujin Band", rring="Locus ring",
back="Seshaw cape", waist="Refoccilation Stone", legs="Amalric slops", feet="Merlinic Crackows"}
sets.obi = {
Fire = {waist="Karin Obi"},
Earth = {waist="Dorin Obi"},
Water = {waist="Suirin Obi"},
Wind = {waist="Furin Obi"},
Ice = {waist="Hyorin Obi"},
Lightning = {waist="Rairin Obi"},
Light = {waist="Korin Obi"},
Dark = {waist="Anrin Obi"},
}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
sets.resting = {main="Pluto's Staff", range="Dunna",
head="Azimuth Hood +1", neck="Sanctity Necklace", rear="Etiolation Earring", lear="Ethereal Earring",
body="Amalric doublet", hands="Bagua Mitaines", lring="Paguroidea Ring", rring="Renaye Ring",
back="Toro Cape", waist="Refoccilation Stone", legs="Assiduity Pants +1", feet="Azimuth Gaiters +1"}
-- Idle sets
sets.idle = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Befouled Crown", neck="Sanctity Necklace", rear="Etiolation Earring", lear="Ethereal Earring",
body="Vrikodara Jupon",hands="Bagua Mitaines", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Solemnity Cape",waist="Refoccilation Stone",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.idle.PDT = {main="Rubicundity", sub="Culminus",
head="Befouled Crown",neck="Sanctity Necklace",ear1="Etiolation Earring",ear2="Ethereal Earring",
body="Hagondes Coat +1",hands="Bagua Mitaines", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Solemnity Cape",waist="Goading Belt",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
-- .Pet sets are for when Luopan is present.
sets.idle.Pet = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Azimuth Hood +1",neck="Sanctity Necklace", rear="Handler's Earring +1", lear="Etiolation Earring",
body="Amalric doublet",hands="Geomancy Mitaines +1",ring1="Defending Ring", rring="Gelatinous Ring +1",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Azimuth Gaiters +1"}
sets.idle.PDT.Pet = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Azimuth Hood +1",neck="Loricate Torque",ear1="Handler's Earring +1",ear2="Etiolation Earring",
body="Hagondes Coat +1",hands="Geomancy Mitaines +1", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Lifestream Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Azimuth Gaiters +1"}
-- .Indi sets are for when an Indi-spell is active.
--sets.idle.Indi = set_combine(sets.idle, {legs="Bagua Pants"})
--sets.idle.Pet.Indi = set_combine(sets.idle.Pet, {legs="Bagua Pants"})
--sets.idle.PDT.Indi = set_combine(sets.idle.PDT, {legs="Bagua Pants"})
--sets.idle.PDT.Pet.Indi = set_combine(sets.idle.PDT.Pet, {legs="Bagua Pants"})
sets.idle.Town = {main="Rubicundity", sub="Culminus", range="Dunna",
head="Befouled Crown",neck="Sanctity Necklace",rear="Etiolation Earring", lear="Handler's Earring +1",
body="Amalric doublet",hands="Bagua Mitaines", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Lifestream Cape",waist="Refoccilation Stone",legs="Assiduity Pants +1",feet="Geomancy Sandals +1"}
sets.idle.Weak = {main="Rubicundity", sub="Culminus",
head="Befouled Crown",neck="Sanctity Necklace",rear="Etiolation Earring", lear="Barkarole Earring",
body="Amalric doublet",hands="Amalric gages", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Lifestream Cape",waist="Slipor sash",legs="Amalric slops",feet="Azimuth Gaiters +1"}
-- Defense sets
sets.defense.PDT = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Befouled Crown",neck="Loricate Torque",ear1="Handler's Earring +1", ear2="Etiolation Earring",
body="Hagondes Coat +1",hands="Geomancy Mitaines +1", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Solemnity Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Azimuth Gaiters +1"}
sets.defense.MDT = {main="Earth Staff", sub="Volos Strap", range="Dunna",
head="Befouled Crown",neck="Loricate Torque",ear1="Handler's Earring +1",ear2="Etiolation Earring",
body="Hagondes Coat +1",hands="Geomancy Mitaines +1", lring="Defending Ring", rring="Gelatinous Ring +1",
back="Solemnity Cape",waist="Slipor sash",legs="Assiduity Pants +1",feet="Azimuth Gaiters +1"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {main="Rubicundity", sub="Culminus", ammo="Amar cluster",
head="Merlinic hood",neck="Sanctity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
body="Hagondes Coat +1",hands="Amalric gages",ring1="Rajas Ring",ring2="Mars's Ring",
back="Kayapa Cape",waist="Windbuffet Belt +1",legs="Amalric slops",feet="Battlecast Gaiters"}
--------------------------------------
-- Custom buff sets
--------------------------------------
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english:startswith('Indi') then
if not classes.CustomIdleGroups:contains('Indi') then
classes.CustomIdleGroups:append('Indi')
end
send_command('@timers d "'..indi_timer..'"')
indi_timer = spell.english
send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
end
elseif not player.indi then
classes.CustomIdleGroups:clear()
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if player.indi and not classes.CustomIdleGroups:contains('Indi')then
classes.CustomIdleGroups:append('Indi')
handle_equipping_gear(player.status)
elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
classes.CustomIdleGroups:clear()
handle_equipping_gear(player.status)
end
end
function status_change(new,action)
send_command('input /lockstyle on')
end
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Geomancy' then
if spell.english:startswith('Indi') then
return 'Indi'
end
end
end
end
function precast(spell,action)
if (string.find(spell.type,'Magic') or spell.type == "Ninjutsu" or spell.type == "Geomancy") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
if spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
classes.CustomIdleGroups:clear()
if player.indi then
classes.CustomIdleGroups:append('Indi')
end
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
local msg = 'Offense'
msg = msg .. ': [' .. state.OffenseMode.value .. '], '
msg = msg .. 'Casting'
msg = msg .. ': [' .. state.CastingMode.value .. '], '
msg = msg .. 'Idle'
msg = msg .. ': [' .. state.IdleMode.value .. '], '
if state.MagicBurst.value == true then
msg = msg .. 'Magic Burst: [On]'
elseif state.MagicBurst.value == false then
msg = msg .. 'Magic Burst: [Off]'
end
add_to_chat(122, msg)
eventArgs.handled = true
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == "Magic" then
if spell.element == world.weather_element or spell.element == world.day_element then
equip(sets.obi[spell.element])
end
end
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.magic_burst)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 3)
end