|
Gearswap Support Thread
By Clement 2016-02-08 18:57:56
Hello everyone,
I am using Beaztmaster's .lua for BST ( http://pastebin.com/SaGtwiJ0 ). Don't know much about lua, and haven't really edited it beyond my own personal gear. When I have a pet out, the sub weapon defined as part of the engaged.DW set doesn't swap the subweapon defined in pet.idle (Astolfo). I tried a couple of different axes, one not augmented, but the subweapon just stays the same (Charmer's Merlin comes in for readyprecast, and skirmish axes for ready midcast, but the melee weapon I want isn't swapping in). Thanks for any consideration!
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-02-09 15:54:58
How would I make it possible to show the current debuffs on the mob just like in this video? YouTube Video Placeholder I sent him a message but hasn't responded yet. Thanks~
Edit: Nvm got it
By dustinfoley 2016-02-12 17:41:10
Do i have to do anything special with pet ws sets for pup?
sets.midcast.Pet.WeaponSkill = {head="Karagoz Capello", hands="Cirque Guanti +2", legs="Karagoz Pantaloni", feet="Naga Kyahan", back="Dispersa mantle"}
doesnt swap in any gear. I have it set to offense mode (normal).
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-02-13 08:51:34
Is there any way to use a precast set based on a subjob? As in I wanna use different sets for /rdm or /thf so I can always cap FC.
By Miang 2016-02-13 09:13:34
Is there any way to use a precast set based on a subjob? As in I wanna use different sets for /rdm or /thf so I can always cap FC. Code
if player.sub_job == 'THF' then
equip(sets.precast['THF'])
elseif player.sub_job == 'RDM' then
equip(sets.precast['RDM'])
else
equip(sets.precast.general)
end
Or I think a cleaner way to do it is Code
if sets.precast[player.sub_job] then
equip(sets.precast[player.sub_job])
else
equip(sets.precast.general)
end
[+]
サーバ: Sylph
Game: FFXI
Posts: 51
By Sylph.Parshias 2016-02-18 09:50:24
I'm trying to edit my precast settings, but getting an error a just cannot resolve:
Code function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Death' then
equip(sets.precast.Death)
end
elseif spell.skill == 'Elemental Magic' or spell.skill == 'Dark Magic' then
if state.MagicBurst.value then
equip(sets.precast.FCB)
end
else equip(sets.precast.FC)
end
I get an error when loading my lua that I'm missing an end to close the function, but when I look at the file in notepad++ the final end is linked to the function, and adding an extra end and the... end doesn't do anything to resolve the error when I re-load my lua.
I'm not really sure what's giving gearswap fits here, especially since I have a similar type of set-up for magic bursting in another function and that piece has no issues whatsoever.
サーバ: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-02-18 10:04:04
Code
function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Death' then
equip(sets.precast.Death)
elseif spell.skill == 'Elemental Magic' or spell.skill == 'Dark Magic' then
if state.MagicBurst.value then
equip(sets.precast.FCB)
else
equip(sets.precast.FC)
end
Try the above. I think you had too many end statements and your LUA code was ending after pre-cast death and not able to work out where the else's fit in.
サーバ: Bahamut
Game: FFXI
Posts: 665
By Bahamut.Vinedrius 2016-02-18 10:05:40
How would I make it possible to show the current debuffs on the mob just like in this video? YouTube Video Placeholder I sent him a message but hasn't responded yet. Thanks~
Edit: Nvm got it
Mind sharing the info?
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-02-19 06:08:26
I'm trying to edit my precast settings, but getting an error a just cannot resolve:
Code function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Death' then
equip(sets.precast.Death)
end
elseif spell.skill == 'Elemental Magic' or spell.skill == 'Dark Magic' then
if state.MagicBurst.value then
equip(sets.precast.FCB)
end
else equip(sets.precast.FC)
end
I get an error when loading my lua that I'm missing an end to close the function, but when I look at the file in notepad++ the final end is linked to the function, and adding an extra end and the... end doesn't do anything to resolve the error when I re-load my lua.
I'm not really sure what's giving gearswap fits here, especially since I have a similar type of set-up for magic bursting in another function and that piece has no issues whatsoever.
'end' only comes at the very end of a logic tree, not before 'elseif' and 'else' (which belong to the same logic tree as the original 'if').
Code function job_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Death' then
equip(sets.precast.Death)
elseif spell.skill == 'Elemental Magic' or spell.skill == 'Dark Magic' then
if state.MagicBurst.value then
equip(sets.precast.FCB)
else
equip(sets.precast.FC)
end
end
end
Bismarck.Mitchel
サーバ: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-02-21 15:53:45
New to gearswap, anyone know how i swap into Twilight Cape and Hachirin-No-Obi whilst under weather in this lua? Also, how do i toggle into Heralds Gaiters? Thanks
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Scholar's Pants"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +66%, Quick Magic +10% (cap)
sets.precast.FC = {main="Keraunos",ammo="Impatiens",
head="Helios Band",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Helios Gloves",ring1="",ring2="Prolix Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
-- Total MP: 2221 (Outside Escha), ???? (Inside Escha)
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="Tamaxchi ",sub="Genbu's Shield",ammo="Aqua Sachet",
head="Marduk's Tiara +1",neck="Fylgja Torque +1",ear1="Lifestorm Earring",ear2="Novia Earring",
body="Pedagogy Robe",hands="Telchine Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {back="Twilight Cape",waist="Korin Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",body="Telchine Chasuble",hands="Telchine Gloves",
back="Bookworm's Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Arbatel bracers",legs="Academic's Pants",feet="Telchine Pigaches",
neck="Enhancing Torque",waist="Cascade Belt",back="Merciful Cape"}
sets.midcast.Cursna = {neck="Malison Medallion",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Keraunos",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Kaabnax Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Helios Jacket",hands="Otomi gloves",ring1="Arvina Ringlet +1",ring2="Perception Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Pyscloth Lappas",feet="Telchine pigaches"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis grip",ammo="Savant's Treatise",
head="Helios Band",neck="Incanter's Torque",ear1="Dark Earring",
body="Helios Jacket",ring1="Archon Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Helios boots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
ear2="Loquacious Earring",hands="Helios Gloves",waist="Fucho-no-obi"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Argute Mortarboard",ear2="Loquac. Earring",
body="Helios Jacket",hands="Helios Gloves",ring2="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Giuoco Grip",ammo="Witchstone",
head="Helios Band",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Twilight Cloak",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Owleyes",sub="Genbu's Shield",
neck="Wiglen Gorget",body="Hagondes Coat +1",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Cheviot Cape",waist="Witful Belt",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Gendewitha Gages +1",
back="Cheviot Cape"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
head="Befouled Crown",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Dark Ring",ring2="Paguroidea Ring",
back="Cheviot Cape"}
sets.defense.MDT = {neck="Twilight Torque",
body="Pedagogy Gown +1",ring1="Minerva's Ring",ring2="Dark Ring",ear1="Merman's Earring",ear2="Merman's Earring",
back="Umbra Cape"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Argute Loafers"}
sets.buff['Alacrity'] = {feet="Argute Loafers"}
sets.buff['Stormsurge'] = {feet="Argute Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Main="Siriti",Sub="Genbu's Shield",head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari",
ring1="Mujin Band",ear1="Static Earring"}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Seshaw: 5%, Merlinic Boots: 11% = 40%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
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.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
サーバ: Odin
Game: FFXI
Posts: 27
By Odin.Zadora 2016-02-21 17:32:40
How would I make it possible to show the current debuffs on the mob just like in this video? YouTube Video Placeholder I sent him a message but hasn't responded yet. Thanks~
Edit: Nvm got it
I would like to know how to do this.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-02-21 19:26:00
New to gearswap, anyone know how i swap into Twilight Cape and Hachirin-No-Obi whilst under weather in this lua? Also, how do i toggle into Heralds Gaiters? Thanks
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Scholar's Pants"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +66%, Quick Magic +10% (cap)
sets.precast.FC = {main="Keraunos",ammo="Impatiens",
head="Helios Band",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Helios Gloves",ring1="",ring2="Prolix Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
-- Total MP: 2221 (Outside Escha), ???? (Inside Escha)
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="Tamaxchi ",sub="Genbu's Shield",ammo="Aqua Sachet",
head="Marduk's Tiara +1",neck="Fylgja Torque +1",ear1="Lifestorm Earring",ear2="Novia Earring",
body="Pedagogy Robe",hands="Telchine Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {back="Twilight Cape",waist="Korin Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",body="Telchine Chasuble",hands="Telchine Gloves",
back="Bookworm's Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Arbatel bracers",legs="Academic's Pants",feet="Telchine Pigaches",
neck="Enhancing Torque",waist="Cascade Belt",back="Merciful Cape"}
sets.midcast.Cursna = {neck="Malison Medallion",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Keraunos",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Kaabnax Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Helios Jacket",hands="Otomi gloves",ring1="Arvina Ringlet +1",ring2="Perception Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Pyscloth Lappas",feet="Telchine pigaches"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis grip",ammo="Savant's Treatise",
head="Helios Band",neck="Incanter's Torque",ear1="Dark Earring",
body="Helios Jacket",ring1="Archon Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Helios boots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
ear2="Loquacious Earring",hands="Helios Gloves",waist="Fucho-no-obi"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Argute Mortarboard",ear2="Loquac. Earring",
body="Helios Jacket",hands="Helios Gloves",ring2="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Giuoco Grip",ammo="Witchstone",
head="Helios Band",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Twilight Cloak",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Owleyes",sub="Genbu's Shield",
neck="Wiglen Gorget",body="Hagondes Coat +1",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Cheviot Cape",waist="Witful Belt",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Gendewitha Gages +1",
back="Cheviot Cape"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
head="Befouled Crown",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Dark Ring",ring2="Paguroidea Ring",
back="Cheviot Cape"}
sets.defense.MDT = {neck="Twilight Torque",
body="Pedagogy Gown +1",ring1="Minerva's Ring",ring2="Dark Ring",ear1="Merman's Earring",ear2="Merman's Earring",
back="Umbra Cape"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Argute Loafers"}
sets.buff['Alacrity'] = {feet="Argute Loafers"}
sets.buff['Stormsurge'] = {feet="Argute Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Main="Siriti",Sub="Genbu's Shield",head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari",
ring1="Mujin Band",ear1="Static Earring"}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Seshaw: 5%, Merlinic Boots: 11% = 40%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
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.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
I don't use Twilight Cape for nukes, only cures. I believe it was said in the SCH forum that Toro/Bookworm was better nowadays. I also don't have Hachirin-no-Obi, hence why it doesn't swap to it.
This should work under the job_post_midcast section: Code if spell.element == world.day_element or spell.element == world.weather_element then
equip ({back="Twilight Cape",waist="Hachirin-no-Obi"})
end
CTRL+F11 is kiting toggle.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-02-21 19:46:27
Bahamut.Vinedrius said: »How would I make it possible to show the current debuffs on the mob just like in this video? YouTube Video Placeholder I sent him a message but hasn't responded yet. Thanks~
Edit: Nvm got it
Mind sharing the info? ^
Bismarck.Mitchel
サーバ: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-02-22 17:03:42
Bismarck.Speedyjim said: »New to gearswap, anyone know how i swap into Twilight Cape and Hachirin-No-Obi whilst under weather in this lua? Also, how do i toggle into Heralds Gaiters? Thanks
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Scholar's Pants"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +66%, Quick Magic +10% (cap)
sets.precast.FC = {main="Keraunos",ammo="Impatiens",
head="Helios Band",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Helios Gloves",ring1="",ring2="Prolix Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
-- Total MP: 2221 (Outside Escha), ???? (Inside Escha)
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="Tamaxchi ",sub="Genbu's Shield",ammo="Aqua Sachet",
head="Marduk's Tiara +1",neck="Fylgja Torque +1",ear1="Lifestorm Earring",ear2="Novia Earring",
body="Pedagogy Robe",hands="Telchine Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {back="Twilight Cape",waist="Korin Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",body="Telchine Chasuble",hands="Telchine Gloves",
back="Bookworm's Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Arbatel bracers",legs="Academic's Pants",feet="Telchine Pigaches",
neck="Enhancing Torque",waist="Cascade Belt",back="Merciful Cape"}
sets.midcast.Cursna = {neck="Malison Medallion",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Keraunos",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Kaabnax Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Helios Jacket",hands="Otomi gloves",ring1="Arvina Ringlet +1",ring2="Perception Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Pyscloth Lappas",feet="Telchine pigaches"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis grip",ammo="Savant's Treatise",
head="Helios Band",neck="Incanter's Torque",ear1="Dark Earring",
body="Helios Jacket",ring1="Archon Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Helios boots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
ear2="Loquacious Earring",hands="Helios Gloves",waist="Fucho-no-obi"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Argute Mortarboard",ear2="Loquac. Earring",
body="Helios Jacket",hands="Helios Gloves",ring2="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Giuoco Grip",ammo="Witchstone",
head="Helios Band",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Twilight Cloak",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Owleyes",sub="Genbu's Shield",
neck="Wiglen Gorget",body="Hagondes Coat +1",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Cheviot Cape",waist="Witful Belt",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Gendewitha Gages +1",
back="Cheviot Cape"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
head="Befouled Crown",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Dark Ring",ring2="Paguroidea Ring",
back="Cheviot Cape"}
sets.defense.MDT = {neck="Twilight Torque",
body="Pedagogy Gown +1",ring1="Minerva's Ring",ring2="Dark Ring",ear1="Merman's Earring",ear2="Merman's Earring",
back="Umbra Cape"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Argute Loafers"}
sets.buff['Alacrity'] = {feet="Argute Loafers"}
sets.buff['Stormsurge'] = {feet="Argute Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Main="Siriti",Sub="Genbu's Shield",head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari",
ring1="Mujin Band",ear1="Static Earring"}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Seshaw: 5%, Merlinic Boots: 11% = 40%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
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.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
I don't use Twilight Cape for nukes, only cures. I believe it was said in the SCH forum that Toro/Bookworm was better nowadays. I also don't have Hachirin-no-Obi, hence why it doesn't swap to it.
This should work under the job_post_midcast section: Code if spell.element == world.day_element or spell.element == world.weather_element then
equip ({back="Twilight Cape",waist="Hachirin-no-Obi"})
end
CTRL+F11 is kiting toggle.
Perfect, thanks!
Could anyone also explain how i can get it to differentiate between different augmented pieces?
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-02-22 18:15:32
Bismarck.Speedyjim said: »New to gearswap, anyone know how i swap into Twilight Cape and Hachirin-No-Obi whilst under weather in this lua? Also, how do i toggle into Heralds Gaiters? Thanks
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Scholar's Pants"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +66%, Quick Magic +10% (cap)
sets.precast.FC = {main="Keraunos",ammo="Impatiens",
head="Helios Band",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Helios Gloves",ring1="",ring2="Prolix Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
-- Total MP: 2221 (Outside Escha), ???? (Inside Escha)
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="Tamaxchi ",sub="Genbu's Shield",ammo="Aqua Sachet",
head="Marduk's Tiara +1",neck="Fylgja Torque +1",ear1="Lifestorm Earring",ear2="Novia Earring",
body="Pedagogy Robe",hands="Telchine Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {back="Twilight Cape",waist="Korin Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",body="Telchine Chasuble",hands="Telchine Gloves",
back="Bookworm's Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Arbatel bracers",legs="Academic's Pants",feet="Telchine Pigaches",
neck="Enhancing Torque",waist="Cascade Belt",back="Merciful Cape"}
sets.midcast.Cursna = {neck="Malison Medallion",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Keraunos",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Kaabnax Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Helios Jacket",hands="Otomi gloves",ring1="Arvina Ringlet +1",ring2="Perception Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Pyscloth Lappas",feet="Telchine pigaches"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis grip",ammo="Savant's Treatise",
head="Helios Band",neck="Incanter's Torque",ear1="Dark Earring",
body="Helios Jacket",ring1="Archon Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Helios boots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
ear2="Loquacious Earring",hands="Helios Gloves",waist="Fucho-no-obi"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Argute Mortarboard",ear2="Loquac. Earring",
body="Helios Jacket",hands="Helios Gloves",ring2="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Giuoco Grip",ammo="Witchstone",
head="Helios Band",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Twilight Cloak",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Owleyes",sub="Genbu's Shield",
neck="Wiglen Gorget",body="Hagondes Coat +1",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Cheviot Cape",waist="Witful Belt",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Gendewitha Gages +1",
back="Cheviot Cape"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
head="Befouled Crown",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Dark Ring",ring2="Paguroidea Ring",
back="Cheviot Cape"}
sets.defense.MDT = {neck="Twilight Torque",
body="Pedagogy Gown +1",ring1="Minerva's Ring",ring2="Dark Ring",ear1="Merman's Earring",ear2="Merman's Earring",
back="Umbra Cape"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Argute Loafers"}
sets.buff['Alacrity'] = {feet="Argute Loafers"}
sets.buff['Stormsurge'] = {feet="Argute Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Main="Siriti",Sub="Genbu's Shield",head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari",
ring1="Mujin Band",ear1="Static Earring"}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Seshaw: 5%, Merlinic Boots: 11% = 40%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
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.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
I don't use Twilight Cape for nukes, only cures. I believe it was said in the SCH forum that Toro/Bookworm was better nowadays. I also don't have Hachirin-no-Obi, hence why it doesn't swap to it.
This should work under the job_post_midcast section: Code if spell.element == world.day_element or spell.element == world.weather_element then
equip ({back="Twilight Cape",waist="Hachirin-no-Obi"})
end
CTRL+F11 is kiting toggle.
Perfect, thanks!
Could anyone also explain how i can get it to differentiate between different augmented pieces? Add the pieces in your inventory. Type "//gs export inv lua" in chatlog. Navigate to Windower4/addons/gearswap/data/export folder.
Open the newly created lua file.
I prefer pasting the next steps in the Mote-Globals file found in the libs folder. Copy the augmented piece in the export file and paste, while naming it, in the globals file under the function define_global_sets()
Example: Code merl_head_MB = {name="Merlinic Hood", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','Magic burst mdg.+4%','"Mag.Atk.Bns."+15'}}
merl_head_FC = {name="Merlinic Hood", augments={'Mag. Acc.+9','"Fast Cast"+5','MND+8','"Mag.Atk.Bns."+3'}}
merl_feet_MB = {name="Merlinic Crackows", augments={'Mag. Acc.+23','Magic burst mdg.+11%'}}
merl_feet_MAB = {name="Merlinic Crackows", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','"Fast Cast"+1','INT+8','Mag. Acc.+4','"Mag.Atk.Bns."+13'}}
Lastly, edit your job.lua file to reflect the aliased gear as such: head=merl_head_FC,feet=merl_feet_MAB
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-02-22 21:10:38
Is there a way to have a certain magic burst set equipped based on your weapon? I want to make 2 different sets but I'm unfamiliar on how to format it since the person who helped me on my GS uses this MB format sets.magic_burst =
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-02-22 22:05:40
Sounds possible if the weapons are 2 different ones. If they're the same, not certain.
Shiva.Hiep
サーバ: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-02-22 22:08:04
Yes I'm planning on using Tupsimati and Akademos. I wanted to make a 2nd set using Static Earring and Locus Ring to make up for the MBD lost using Tupsimati.
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2016-02-22 22:19:55
http://wiki.windower.net/doku.php?id=addons:gearswap:documentation:global_variables:start
player.equipment.main should be your currently equipped staff (or whatever you equipped in precast, I think). If you are interested in knowing what staff you're currently attempting to equip within a given function call, it might be possible but would be more complicated.
Carbuncle.Akivatoo
サーバ: Carbuncle
Game: FFXI
Posts: 263
By Carbuncle.Akivatoo 2016-02-23 09:22:04
How would I make it possible to show the current debuffs on the mob just like in this video? YouTube Video Placeholder I sent him a message but hasn't responded yet. Thanks~
Edit: Nvm got it
I would like to know how to do this. yes please, plugin for display monster info can i have it ?
[Debuffed???]
Bismarck.Mitchel
サーバ: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-02-23 11:50:55
Bismarck.Speedyjim said: »Bismarck.Speedyjim said: »New to gearswap, anyone know how i swap into Twilight Cape and Hachirin-No-Obi whilst under weather in this lua? Also, how do i toggle into Heralds Gaiters? Thanks
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Scholar's Pants"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +66%, Quick Magic +10% (cap)
sets.precast.FC = {main="Keraunos",ammo="Impatiens",
head="Helios Band",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Helios Gloves",ring1="",ring2="Prolix Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
-- Total MP: 2221 (Outside Escha), ???? (Inside Escha)
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="Tamaxchi ",sub="Genbu's Shield",ammo="Aqua Sachet",
head="Marduk's Tiara +1",neck="Fylgja Torque +1",ear1="Lifestorm Earring",ear2="Novia Earring",
body="Pedagogy Robe",hands="Telchine Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {back="Twilight Cape",waist="Korin Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",body="Telchine Chasuble",hands="Telchine Gloves",
back="Bookworm's Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Arbatel bracers",legs="Academic's Pants",feet="Telchine Pigaches",
neck="Enhancing Torque",waist="Cascade Belt",back="Merciful Cape"}
sets.midcast.Cursna = {neck="Malison Medallion",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Keraunos",sub="Mephitis Grip",ammo="Savant's Treatise",
head="Kaabnax Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Helios Jacket",hands="Otomi gloves",ring1="Arvina Ringlet +1",ring2="Perception Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Pyscloth Lappas",feet="Telchine pigaches"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis grip",ammo="Savant's Treatise",
head="Helios Band",neck="Incanter's Torque",ear1="Dark Earring",
body="Helios Jacket",ring1="Archon Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Helios boots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
ear2="Loquacious Earring",hands="Helios Gloves",waist="Fucho-no-obi"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Argute Mortarboard",ear2="Loquac. Earring",
body="Helios Jacket",hands="Helios Gloves",ring2="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Psycloth Lappas",feet="Scholar's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Giuoco Grip",ammo="Witchstone",
head="Helios Band",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Sanctity Necklace",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Twilight Cloak",hands="Otomi Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
back="Bookworm's Cape",waist="Cognition Belt",legs="Telchine Braconi",feet="Helios Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Owleyes",sub="Genbu's Shield",
neck="Wiglen Gorget",body="Hagondes Coat +1",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Savant's treatise",
head="Wivre hairpin",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Cheviot Cape",waist="Witful Belt",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Gendewitha Gages +1",
back="Cheviot Cape"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Giuoco grip",ammo="Incantor Stone",
head="Befouled Crown",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Dark Ring",ring2="Paguroidea Ring",
back="Cheviot Cape"}
sets.defense.MDT = {neck="Twilight Torque",
body="Pedagogy Gown +1",ring1="Minerva's Ring",ring2="Dark Ring",ear1="Merman's Earring",ear2="Merman's Earring",
back="Umbra Cape"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Argute Loafers"}
sets.buff['Alacrity'] = {feet="Argute Loafers"}
sets.buff['Stormsurge'] = {feet="Argute Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Main="Siriti",Sub="Genbu's Shield",head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Scholar's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari",
ring1="Mujin Band",ear1="Static Earring"}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Seshaw: 5%, Merlinic Boots: 11% = 40%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
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.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
I don't use Twilight Cape for nukes, only cures. I believe it was said in the SCH forum that Toro/Bookworm was better nowadays. I also don't have Hachirin-no-Obi, hence why it doesn't swap to it.
This should work under the job_post_midcast section: Code if spell.element == world.day_element or spell.element == world.weather_element then
equip ({back="Twilight Cape",waist="Hachirin-no-Obi"})
end
CTRL+F11 is kiting toggle.
Perfect, thanks!
Could anyone also explain how i can get it to differentiate between different augmented pieces? Add the pieces in your inventory. Type "//gs export inv lua" in chatlog. Navigate to Windower4/addons/gearswap/data/export folder.
Open the newly created lua file.
I prefer pasting the next steps in the Mote-Globals file found in the libs folder. Copy the augmented piece in the export file and paste, while naming it, in the globals file under the function define_global_sets()
Example: Code merl_head_MB = {name="Merlinic Hood", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','Magic burst mdg.+4%','"Mag.Atk.Bns."+15'}}
merl_head_FC = {name="Merlinic Hood", augments={'Mag. Acc.+9','"Fast Cast"+5','MND+8','"Mag.Atk.Bns."+3'}}
merl_feet_MB = {name="Merlinic Crackows", augments={'Mag. Acc.+23','Magic burst mdg.+11%'}}
merl_feet_MAB = {name="Merlinic Crackows", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','"Fast Cast"+1','INT+8','Mag. Acc.+4','"Mag.Atk.Bns."+13'}}
Lastly, edit your job.lua file to reflect the aliased gear as such: head=merl_head_FC,feet=merl_feet_MAB
No joy.
Have this in Mote-Globals Code Dark_Ring_Physical = {name="Dark Ring", augments={'Magic dmg. taken -4%','Phys. dmg. taken -3%'}}
Dark_Ring_Magic = {name="Dark Ring", augments={'Enemy crit. hit rate -2','Magic dmg. taken -5%','Spell interruption rate down -3%'}}
and have the following included in SCH.lua:
ring1=Dark_Ring_Physical
ring2=Dark_Ring_Magic
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-02-23 13:26:17
That's where it goes, right below the dark_ring stuff. Use my example as a template once you've followed my instructions.
By dustinfoley 2016-03-03 16:28:55
2 questions:
1) Can someone make code, where if you have the 'reive' buff on (lair, colonization, wildkeepers) it equips the adoulin reive necks (i have refugee but you any would work)
2) I have setup an offense state (f9 toggle) called pethybrid. Is there a way to make it so if offense = pet hybrid, and pet tp >900, it equips a set "pet_ws", then goes back to pethybrid after pet tp goes back down.
Sylph.Mozhat
サーバ: Sylph
Game: FFXI
Posts: 58
By Sylph.Mozhat 2016-03-04 10:45:18
I have a question about smn "sets.midcast.Pet."
On the function user_setup(),
what state."NAME"Mode:options('None', 'PhyAcc', 'MagAcc')
would you use to toggle the sets.midcast.Pet.?
This lua uses mote_include_version = 2.
There's no miscast.set in the event section.
-- Custom spell mapping.
function job_get_spell_map(spell)
if spell.type == 'BloodPactRage' then
if magicalRagePacts:contains(spell.english) then
return 'MagicalBloodPactRage'
else
return 'PhysicalBloodPactRage'
end
elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
return 'DebuffBloodPactWard'
end
end
By Sidiov 2016-03-04 11:48:13
Quote: 1) Can someone make code, where if you have the 'reive' buff on (lair, colonization, wildkeepers) it equips the adoulin reive necks (i have refugee but you any would work)
(Assuming you want it locked) Put in your buff_change event Code
--Auto put RR neck on in Reives
if buff == "Reive Mark" then
if gain then
equip({neck="Adoulin's Refuge +1"})
disable('neck')
else
enable('neck')
end
end
Otherwise make a buff condition for "Reive Mark" and create a set and choose the functions where it applies, similar to an obi or hybrid set.
By dustinfoley 2016-03-04 12:10:09
That should work perfect, i try it out when i get home.
Thank you
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-03-04 13:14:47
Hello all,
I am having issues with this dnc lua file. The climactic flourish isn't equipping when the buff is active. I am at a loss as to where the problem lies. Any help is much appreciated. TY in advance. Are you sure it's not equipping? Assuming you've validated it with //gs showswaps?
By dustinfoley 2016-03-04 16:30:42
2 questions:
1) Can someone make code, where if you have the 'reive' buff on (lair, colonization, wildkeepers) it equips the adoulin reive necks (i have refugee but you any would work)
2) I have setup an offense state (f9 toggle) called pethybrid. Is there a way to make it so if offense = pet hybrid, and pet tp >900, it equips a set "pet_ws", then goes back to pethybrid after pet tp goes back down.
Onto part 2:
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Pethybrid' then
if pet.tp >=200 then
equip(sets.midcast.Pet.WeaponSkill)
end
end
tried something like this and 200 variants and cant get it to equip my pet ws set ><
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|