Black Mage Gear Swap Questions

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » Jobs » Black Mage » Black Mage Gear Swap questions
Black Mage Gear Swap questions
First Page 2
Offline
Posts: 8
By Rvajedi1 2014-04-30 11:51:30
Link | Quote | Reply
 
So I recently returned and started using gear swap and everything seems to be working minus putting on my nuking gear midcast before my elemental magic goes off. It seems to work for spells like frost and rasp but not for actual nukes. Any help would be appreciated

this is my .xml

-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------

-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.

-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end


-- Setup vars that are user-independent.
function job_setup()

end


-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.CastingModes = {'Normal', 'Resistant', 'Proc'}
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}

state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'None'

-- Default macro set/book
set_macro_page(1, 15)
end


-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
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['Mana Wall'] = {feet="Goetia Sabots +2"}

sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}

-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}


-- Fast cast sets for spells

sets.precast.FC = {
head="Kaabanax Hat",neck="Jeweled Collar",ear2="Loquacious Earring",
body="Anhur Robe",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Wayfarer Slops",feet="Chelona Boots"}

sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {waist="Siegel Sash"})

sets.precast.FC.ElementalMagic = set_combine(sets.precast.FC, {head="Goetia Petasos +2"})

sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Anhur Robe", back="Pahtli Cape"})

sets.precast.FC.Curaga = sets.precast.FC.Cure

-- 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.
sets.precast.WS['Vidohunir'] = {}


---- Midcast Sets ----

sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

sets.midcast.Cure = {main="Chatoyant Staff",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist=gear.ElementalObi,legs="Nares Trews",feet="Hagondes Sabots"}

sets.midcast.Curaga = sets.midcast.Cure

sets.midcast.EnhancingMagic = {
head="Umuthi Hat",neck="Colossus's Torque",
body="Anhur Robe",hands="Ayao's Gages",
waist="Siegal Sash",legs="Portent Pants"}

sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingMagic, {waist="Siegel Sash"})

sets.midcast.EnfeeblingMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

sets.midcast.ElementalEnfeeble = sets.midcast.EnfeeblingMagic

sets.midcast.DarkMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Goetia Sabots +2"}

sets.midcast.Drain = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Excelsis Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Goetia Sabots +2"}

sets.midcast.Aspir = sets.midcast.Drain

sets.midcast.Stun = {main="Atinian Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Witful Belt",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

sets.midcast.BardSong = {main="Atinian Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",legs="Bokwus Slops",feet="Bokwus Boots"}


-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast.ElementalMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

sets.midcast.ElementalMagic.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

-- Idle set when doing procs. Fast cast gear, minimal nuke gear. Won't change out of this for nukes.
sets.midcast.ElementalMagic.Proc = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

-- Custom classes for high-tier nukes.
sets.midcast.HighTierNuke = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

sets.midcast.HighTierNuke.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

-- Custom classes for high-tier nukes in Adoulin areas (need more general magic accuracy).
sets.midcast.AdoulinHighTierNuke = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

sets.midcast.AdoulinHighTierNuke.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}

-- Sets to return to when not performing an action.

-- Resting sets
sets.resting = {main="Chatoyant Staff",ammo="Clarus Stone",
head="Kaabanax Hat",neck="Grandiose Chain",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Hierarchy Belt",legs="Nares Trews",feet="Serpentes Sabots"}


-- Idle sets

-- Normal refresh idle set
sets.idle = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

-- Town gear.
sets.idle.Town = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

-- Defense sets

sets.defense.PDT = {main="Earth Staff",sub="Wizzan Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

sets.defense.MDT = {ammo="Demonry Stone",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}

sets.Kiting = {feet="Herald's Gaiters"}


-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.

sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}


-- 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 = {
head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}



lowTierNukes = 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',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
end
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
-- Default base equipment layer is fast recast.
equip(sets.midcast.FastRecast)

if spell.skill == 'Elemental Magic' then
if state.CastingMode == 'Proc' then
add_to_chat(15,'Proc mode, no damage gear for midcast.')
eventArgs.handled = true
else
classes.CustomClass = get_nuke_class(spell, action, spellMap)
end
end
end
end


function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted and spell.english == 'Mana Wall' and player.equipment.feet == "Goetia Sabots +2" then
disable('feet')
end
end

-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end


-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Handle notifications of general user state change.
function job_state_change(stateField, newValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
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)
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end

local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end

defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end

add_to_chat(122,meleeString..'Casting ['..state.CastingMode..'], Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])

eventArgs.handled = true
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

-- Function to get the custom class to use for nukes.
function get_nuke_class(spell, action, spellMap)
if lowTierNukes[spell.english] then
-- low tier nukes use the default set
return nil
else
return 'HighTierNuke'
end
end
 Odin.Jassik
VIP
Offline
Server: Odin
Game: FFXI
user: Jassik
Posts: 9534
By Odin.Jassik 2014-04-30 14:22:10
Link | Quote | Reply
 
are you sure it's not swapping? gearswap is incredibly fast, faster than the game renders player models. try opening the equipment menu and casting a spell via the log commands, make sure it's not actually changing.
Offline
Posts: 8
By Rvajedi1 2014-04-30 15:22:59
Link | Quote | Reply
 
Odin.Jassik said: »
are you sure it's not swapping? gearswap is incredibly fast, faster than the game renders player models. try opening the equipment menu and casting a spell via the log commands, make sure it's not actually changing.

for t4 t5 aga3 AM and ja it works. but anything t2 and below it cast only in fast cast gear
 Fenrir.Heretic
Offline
Server: Fenrir
Game: FFXI
user: Venomfury
Posts: 6
By Fenrir.Heretic 2014-04-30 19:06:35
Link | Quote | Reply
 
You said that was your xml, surely you meant your lua.

There was an update to windower on Monday that changed a few things. Before you could reference your midcast elemental magic set as "midcast.ElementalMagic"

How it should be now:

sets.midcast['Elemental Magic']

sets.midcast['Dark Magic']

etc.

Might be better off starting over:

https://github.com/Kinematics/GearSwap-Jobs/blob/master/BLM.lua
necroskull Necro Bump Detected! [303 days between previous and next post]
Offline
Posts: 3
By sleven77 2015-02-27 08:19:43
Link | Quote | Reply
 
Or, you know, you could play the game as it is intended and stop cheating?
[+]
 Siren.Sieha
Offline
Server: Siren
Game: FFXI
user: Sieha1
Posts: 503
By Siren.Sieha 2015-02-27 08:37:23
Link | Quote | Reply
 
nice try but I dont think anyone is going to bite.

https://www/how-to-troll.com
Offline
Posts: 3
By sleven77 2015-02-27 09:09:55
Link | Quote | Reply
 
Not trying to "troll" anyone. I happen to be someone that started playing this game back in 2007. Sorry to say, I am not impressed with anyone who uses illegal macros and third party programs to play. These are the people that run around like they are the best thing since sliced bread when they aren't even really playing. They are letting the computer do everything for them.
But, to each his own I guess. Just saying...
[+]
 Bahamut.Phidruran
Offline
Server: Bahamut
Game: FFXI
user: phidruran
Posts: 62
By Bahamut.Phidruran 2015-02-27 09:29:29
Link | Quote | Reply
 
And this warranted at 303 day necro why????
 Siren.Sieha
Offline
Server: Siren
Game: FFXI
user: Sieha1
Posts: 503
By Siren.Sieha 2015-02-27 10:01:49
Link | Quote | Reply
 
its a bad attempt to get people talking about it by someone who either would think its funny to get people started or is bored.
 Shiva.Ladyofhonor
Offline
Server: Shiva
Game: FFXI
Posts: 74
By Shiva.Ladyofhonor 2015-03-06 22:47:32
Link | Quote | Reply
 
sleven77 said: »
Not trying to "troll" anyone. I happen to be someone that started playing this game back in 2007. Sorry to say, I am not impressed with anyone who uses illegal macros and third party programs to play. These are the people that run around like they are the best thing since sliced bread when they aren't even really playing. They are letting the computer do everything for them.
But, to each his own I guess. Just saying...


2007? Newbie.
[+]
necroskull Necro Bump Detected! [228 days between previous and next post]
 Asura.Baekxc
Offline
Server: Asura
Game: FFXI
Posts: 20
By Asura.Baekxc 2015-10-20 15:22:54
Link | Quote | Reply
 
I also have been working on my blm lua. I have copied and pasted the original lua from https://github.com/Kinematics/GearSwap-Jobs/blob/master/BLM.lua

I added my own gear into it but for some reason it is not registering the precast for elemental gear under fast cast. Also it might be a problem with the entire precast.FC code because nothing is working. Any help would be appreciated.


https://github.com/blizzardxc/FFXI/blob/master/BLM
 Asura.Keja
Offline
Server: Asura
Game: FFXI
user: Cleric
Posts: 50
By Asura.Keja 2015-10-30 15:11:55
Link | Quote | Reply
 
I started using mote's BLM lua as well. I cannot figure out how to get it to equip my Magic Burst set. I've even changed the bindings around for it as well. I don't have much Magic Burst+ Gear yet, but it would be nice if some of it would equip :(
 Shiva.Tilanna
Offline
Server: Shiva
Game: FFXI
user: Tilanna
Posts: 28
By Shiva.Tilanna 2015-10-30 15:32:06
Link | Quote | Reply
 
Asura.Keja said: »
I started using mote's BLM lua as well. I cannot figure out how to get it to equip my Magic Burst set. I've even changed the bindings around for it as well. I don't have much Magic Burst+ Gear yet, but it would be nice if some of it would equip :(

If you're using the one from here (https://github.com/Kinematics/GearSwap-Jobs) as a base, the command used to 'activate' Magic Burst mode actually needs to be a toggle. In the file it is this:
Code
gs c activate MagicBurst


It needs to be:
Code
gs c toggle MagicBurst


You can try it just manually typing in /console gs c toggle MagicBurst and it should put a message in your chat log saying "Magic Burst is now on."
 Phoenix.Keido
Offline
Server: Phoenix
Game: FFXI
user: Keido
Posts: 122
By Phoenix.Keido 2015-10-30 15:50:38
Link | Quote | Reply
 
I have modified it a bit if you want a working copy here is one you will need to fill in your gear sets though. Good luck!
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    
    -- Load and initialize the include file.
    include('Mote-Include.lua')
	-- Load organizer add on to grab all gear associated with lua.
	include('organizer-lib')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()

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', 'TP')
    state.IdleMode:options('Normal', 'PDT')
    state.MagicBurst = M(false, 'Magic Burst')
    
	lowTierNukes = 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',
					'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
					'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
    
    -- Additional local binds
    send_command('bind ^` input /ma Stun <t>;input /echo Target <t> Stunned')
    send_command('bind @` gs c toggle MagicBurst')

    select_default_macro_book()
end

-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind @`')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
-------------------------------------------------------------------------------------------------------------------
-- Start defining the sets
-------------------------------------------------------------------------------------------------------------------
																		
-- 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.
	-- Rock Crusher Modifiers: STR:20% INT:20% --		
	sets.precast.WS['Rock Crusher'] = 										set_combine(sets.precast.WS,{})
																			
	-- Spirit Taker Modifiers: INT:50% MND:50% --
	sets.precast.WS['Spirit Taker'] = 										set_combine(sets.precast.WS,{})
																			
	-- Cataclysm Modifiers: STR:30% INT:30% --
	sets.precast.WS['Cataclysm'] = 											set_combine(sets.precast.WS,{})
																			
	-- Retribution Modifiers: STR:30%; MND:50% --
	sets.precast.WS['Retribution'] = 										set_combine(sets.precast.WS,{})
																			
	-- Gate of Tartarus Modifiers: INT:80% --
	sets.precast.WS['Gate of Tartarus'] = 									set_combine(sets.precast.WS,{
																			})
																			
	-- Myrkr Modifiers: None --
	sets.precast.WS['Myrkr'] = 												set_combine(sets.precast.WS,{})
																			
	-- Shattersoul Modifiers: INT:20~100%, depending on merit points upgrades. --
	sets.precast.WS['Shattersoul'] = 										set_combine(sets.precast.WS,{})
																			
-- Precast sets
    -- Precast sets to enhance JAs
    sets.precast.JA['Mana Wall'] = 											{}
	
	sets.precast.JA['Manafont'] = 											{}
	

    -- Fast cast sets for spells
    sets.precast.FC = 														{}
																			
	-- Stoneskin
	sets.precast.Stoneskin = 												set_combine(sets.precast.FC,{})
	
	-- Cure Magic
	sets.precast.Cure = 													set_combine(sets.precast.FC,{})
	
	-- Elemental Magic
    sets.precast.FCElementalMagic = 										set_combine(sets.precast.FC,{})
	
	-- Ancient Magic
	sets.precast.AncientMagic = 											set_combine(sets.precast.FCElementalMagic,{})
													
-- Midcast Sets
	-- Day Weather Bonus
	sets.midcast.Bonus = 													{}
														
	-- Fastrecast
	sets.midcast.FastRecast = 												{}
	
	-- Cure
	sets.midcast.Cure =														{}

    sets.midcast.Curaga = 													sets.midcast.Cure
																			
    sets.midcast['Enhancing Magic'] = 										{}

	sets.midcast['Enhancing Magic'].Stoneskin = 							set_combine(sets.midcast['Enhancing Magic'],{})
																			
	sets.midcast['Enhancing Magic'].Aquaveil = 								set_combine(sets.midcast['Enhancing Magic'],{})																			


    sets.midcast['Enfeebling Magic'] = 										{}
																			
    sets.midcast['Enfeebling Magic'].Mnd = 									set_combine(sets.midcast['Enfeebling Magic'],{})
      
    sets.midcast.ElementalEnfeeble = 										sets.midcast['Enfeebling Magic']

    sets.midcast['Dark Magic'] = 											{}
																			
	sets.midcast['Dark Magic'].Drain =										set_combine(sets.midcast['Dark Magic'],{})
																			
	sets.midcast['Dark Magic'].Aspir =										sets.midcast['Dark Magic'].Drain										
																			

    sets.midcast['Dark Magic'].Stun = 										set_combine(sets.midcast['Dark Magic'],{})

    -- Elemental Magic sets
    sets.midcast.LowTierNuke =					 							{}

    sets.midcast.LowTierNuke.Resistant =					 				{}

	sets.midcast.TP =					 									{}																			
																			
    sets.midcast.HighTierNuke = 											set_combine(sets.midcast.LowTierNuke,{})
																			
    sets.midcast.HighTierNuke.Resistant = 									set_combine(sets.midcast.LowTierNuke.Resistant,{})
    
-- Sets to return to when not performing an action.
	-- Resting sets
	sets.resting = 															{}
    
	-- Idle sets
    
    -- Normal refresh idle set
    sets.idle = 															sets.resting

    -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
    sets.idle.PDT = 														set_combine(sets.resting,{})

    -- Idle mode when weak.
    sets.idle.Weak = 														sets.idle.PDT
    
    -- Town gear.
    sets.idle.Town = 														set_combine(sets.resting,{})
        
    -- Defense sets

	sets.defense.PDT =  		   											set_combine(sets.resting,{})

    sets.defense.MDT = 	    												set_combine(sets.resting,{})

	sets.Kiting = 															{}

    sets.latent_refresh = 													{}

    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    
    sets.buff['Mana Wall'] = 												{}

    sets.magic_burst = 														{}

    -- 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 = 															{}
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
	if player.tp > 1000 then
		disable('main','sub')
	elseif (spellMap == 'Cure' or spellMap == 'Curaga') then
		equip(sets.precast.Cure)
		if (world.weather_element == 'Light' or world.day_element == 'Light') then
			equip({waist="Hachirin-no-Obi"})
		end
	elseif spellMap == 'Freeze II' or spellMap == 'Tornado II' or spellMap == 'Quake II' or spellMap == 'Burst II' or spellMap == 'Flood II' or spellMap == 'Flare II' then
		equip(sets.precast.AncientMagic)
	elseif spellMap == 'Stoneskin' then
		equip(sets.precast.Stoneskin)
	elseif spell.skill == 'Elemental Magic' then
		equip(sets.precast.FCElementalMagic)
    end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and (spell.element == world.weather_element or spell.element == world.day_element) then
        equip(sets.midcast.Bonus)
	elseif spellMap == 'Slow' or spellMap == 'Silence' or spellMap == 'Paralyze' then
		equip(sets.midcast['Enfeebling Magic'].Mnd)
	end
end

function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
        equip(sets.magic_burst)
    end
end

function job_aftercast(spell, action, spellMap, eventArgs)
    if player.tp < 1000 then
        enable('main','sub')
	elseif not spell.interrupted then
        if spell.english == 'Mana Wall' then
            enable('feet')
            equip(sets.buff['Mana Wall'])
            disable('feet')
        elseif spell.skill == 'Elemental Magic' and state.MagicBurst.value then
            state.MagicBurst:reset()
		elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
			send_command('@wait 55;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
		elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
			send_command('@wait 85;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
		elseif spell.english == 'Break' or spell.english == 'Breakga' then
			send_command('@wait 25;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
		end
    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)
    -- Unlock feet when Mana Wall buff is lost.
    if buff == "Mana Wall" and not gain then
        enable('feet')
        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.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
        if lowTierNukes:contains(spell.english) then
            return 'LowTierNuke'
        else
            return 'HighTierNuke'
        end
	end
end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end

-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 15)
end
necroskull Necro Bump Detected! [85 days between previous and next post]
 Bahamut.Colonelace
Offline
Server: Bahamut
Game: FFXI
Posts: 253
By Bahamut.Colonelace 2016-01-23 23:54:09
Link | Quote | Reply
 
ok so i just got back to the game and was curious how this lua works. i dont see where i put my gear sets like in spellcast. do i need another lua to put my sets into?
 Bismarck.Speedyjim
Offline
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-01-24 01:19:59
Link | Quote | Reply
 
sets.precast.xx
sets.midcast.xx
sets.midcast['xx']
sets.precast.JA.xx
sets.precast.JA['xx']

These are your gear sets.
 Bahamut.Colonelace
Offline
Server: Bahamut
Game: FFXI
Posts: 253
By Bahamut.Colonelace 2016-01-27 12:41:01
Link | Quote | Reply
 
for example im reading this"
Quote:
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = set_combine(sets.resting,{})

-- Idle mode when weak.
sets.idle.Weak = sets.idle.PDT

-- Town gear.
sets.idle.Town = set_combine(sets.resting,{})

-- Defense sets

sets.defense.PDT = set_combine(sets.resting,{})

sets.defense.MDT = set_combine(sets.resting,{})

do i add it after the = or what and what about the set combine? like in spellcast you had sets that you knew ended by the /set etc
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2016-02-09 01:21:57
Link | Quote | Reply
 
Different subject question: Anyone else having Aspir I and II work perfectly, but Aspir III just doesn't seem to want to group? My precast and midcast work fine with the first two, but no gear change with Aspir III.
 Bismarck.Speedyjim
Offline
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-02-09 01:57:39
Link | Quote | Reply
 
Bismarck.Kyaaadaa said: »
Different subject question: Anyone else having Aspir I and II work perfectly, but Aspir III just doesn't seem to want to group? My precast and midcast work fine with the first two, but no gear change with Aspir III.
Aspir III is not defined in the Mote-Mappings.lua file.

2 things you could do:
Best option A) Add ['Aspir III']='Aspir' on line 190 in the addons/gearswap/libs/Mote-Mappings.lua file
B) Create an additional set for Aspir III in your BLM lua as sets.midcast['Aspir III']

If you have any other mage jobs, you could continue adding the newer spells in the Mappings file as well, such as Helixes 2 etc, negating any need to add sets for them in other job.lua files.
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2016-02-11 12:35:50
Link | Quote | Reply
 
Perfect, remapping sounds the easiest as multiple gear sets for the same thing is just tedious scripting.
 Bahamut.Colonelace
Offline
Server: Bahamut
Game: FFXI
Posts: 253
By Bahamut.Colonelace 2016-02-18 07:09:50
Link | Quote | Reply
 
so i took the lua keido made and added a capacity toggle
Code
 
-- 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', 'TP')
    state.IdleMode:options('Normal', 'PDT')
    state.MagicBurst = M(false, 'Magic Burst')
    state.Capacity = M(false, 'Capacity') 
	 
    lowTierNukes = 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',
                    'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
                    'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
     
    -- Additional local binds
    send_command('bind ^` input /ma Stun <t>;input /echo Target <t> Stunned')
    send_command('bind @` gs c toggle MagicBurst')
	send_command('bind !` gs c toggle Capacity')
 
    select_default_macro_book()
end
 
-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind @`')
	send_command('unbind !`')
end


now my question is how do i implement that toggle so that when its on it equips and locks the capacity mantle?
 Quetzalcoatl.Guthrie
Offline
Server: Quetzalcoatl
Game: FFXI
user: Lebeau
Posts: 80
By Quetzalcoatl.Guthrie 2016-02-18 07:40:32
Link | Quote | Reply
 
Why not just equip the back piece and in console just type gs disable back?

EDIT: Just scrolled up and saw you just returned and you were just learning LUA. You can disable specific slots by going into the windower console and typing "gs disable xxx" where "xxx" is your slot. So "back", "legs", "ring1", etc.
 Bahamut.Colonelace
Offline
Server: Bahamut
Game: FFXI
Posts: 253
By Bahamut.Colonelace 2016-02-18 18:51:10
Link | Quote | Reply
 
guess ill do that, i think for the gear i currently own my GS is working fine except for 1 thing and i cant figure it out. i used export so that augments were written the way it should be and all but for some reason when i cast a spell it will not equip my fast cast augmented merlinic hood, instead it keeps the MAB one one. This is the lua
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
 
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
     
    -- Load and initialize the include file.
    include('Mote-Include.lua')
    -- Load organizer add on to grab all gear associated with lua.
    include('organizer-lib')
end
 
 
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
 
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', 'TP')
    state.IdleMode:options('Normal', 'PDT')
    state.MagicBurst = M(false, 'Magic Burst')
    state.Capacity = M(false, 'Capacity') 
	 
    lowTierNukes = 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',
                    'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
                    'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
     
    -- Additional local binds
    send_command('bind ^` input /ma Stun <t>;input /echo Target <t> Stunned')
    send_command('bind @` gs c toggle MagicBurst')
	send_command('bind !` gs c toggle Capacity')
 
    select_default_macro_book()
end
 
-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind @`')
	send_command('unbind !`')
end
 
 
-- Define sets and vars used by this job file.
function init_gear_sets()
-------------------------------------------------------------------------------------------------------------------
-- Start defining the sets
-------------------------------------------------------------------------------------------------------------------
                                                                         
-- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS =                                                       {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    sub="Elder's Grip +1",
    ammo="Psilomene",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands="Nares Cuffs",
    legs={ name="Helios Spats", augments={'"Drain" and "Aspir" potency +6',}},
    feet="Chelona Boots",
    neck="Saevus Pendant +1",
    waist="Hierarch Belt",
    left_ear="Thureous Earring",
    right_ear="Loquac. Earring",
    left_ring="Mephitas's Ring",
    right_ring="Celestial Ring",
    back="Merciful Cape",}
                                                                             
-- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    -- Rock Crusher Modifiers: STR:20% INT:20% --       
    sets.precast.WS['Rock Crusher'] =                                       set_combine(sets.precast.WS,{})
                                                                             
    -- Spirit Taker Modifiers: INT:50% MND:50% --
    sets.precast.WS['Spirit Taker'] =                                       set_combine(sets.precast.WS,{})
                                                                             
    -- Cataclysm Modifiers: STR:30% INT:30% --
    sets.precast.WS['Cataclysm'] =                                          set_combine(sets.precast.WS,{})
                                                                             
    -- Retribution Modifiers: STR:30%; MND:50% --
    sets.precast.WS['Retribution'] =                                        set_combine(sets.precast.WS,{})
                                                                             
    -- Gate of Tartarus Modifiers: INT:80% --
    sets.precast.WS['Gate of Tartarus'] =                                   set_combine(sets.precast.WS,{
                                                                            })
                                                                             
    -- Myrkr Modifiers: None --
    sets.precast.WS['Myrkr'] =                                              set_combine(sets.precast.WS,{})
                                                                             
    -- Shattersoul Modifiers: INT:20~100%, depending on merit points upgrades. --
    sets.precast.WS['Shattersoul'] =                                        set_combine(sets.precast.WS,{})
                                                                             
-- Precast sets
    -- Precast sets to enhance JAs
    sets.precast.JA['Mana Wall'] =                                          {}
     
    sets.precast.JA['Manafont'] =                                           {}
     
 
    -- Fast cast sets for spells
    sets.precast.FC =                                                       {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    head={ name="Merlinic Hood", augments={'"Fast Cast"+4','Mag. Acc.+15',}},
    legs={ name="Lengo Pants", augments={'INT+8',}},
    feet="Chelona Boots",
    waist="Witful Belt",
    left_ear="Barkaro. Earring",
    right_ear="Loquac. Earring",
    back="Swith Cape",}
                                                                             
    -- Stoneskin
    sets.precast.Stoneskin =                                                set_combine(sets.precast.FC,{waist="Siegel Sash",neck="Stone Gorget"})
     
    -- Cure Magic
    sets.precast.Cure =                                                     set_combine(sets.precast.FC,{})
     
    -- Elemental Magic
    sets.precast.FCElementalMagic =                                         set_combine(sets.precast.FC,{head={ name="Merlinic Hood", augments={'"Fast Cast"+4','Mag. Acc.+15',}}})
     
    -- Ancient Magic
    sets.precast.AncientMagic =                                             set_combine(sets.precast.FCElementalMagic,{head={ name="Merlinic Hood", augments={'"Fast Cast"+4','Mag. Acc.+15',}}})
                                                     
-- Midcast Sets
    -- Day Weather Bonus
    sets.midcast.Bonus =                                                    {waist="Hachirin-no-Obi"}
                                                         
    -- Fastrecast
    sets.midcast.FastRecast =                                               {}
     
    -- Cure
    sets.midcast.Cure =                                                     {}
 
    sets.midcast.Curaga =                                                   sets.midcast.Cure
                                                                             
    sets.midcast['Enhancing Magic'] =                                       {back="Merciful Cape", neck="Enhancing Torque"}
 
    sets.midcast['Enhancing Magic'].Stoneskin =                             set_combine(sets.midcast['Enhancing Magic'],{neck="Stone Gorget", waist="Siegel Sash"})
                                                                             
    sets.midcast['Enhancing Magic'].Aquaveil =                              set_combine(sets.midcast['Enhancing Magic'],{})                                                                         
 
 
    sets.midcast['Enfeebling Magic'] =                                      {
	head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Lengo Pants", augments={'INT+8',}},
    feet="Wayfarer Clogs",
    neck="Twilight Torque",
    waist="Refoccilation Stone",
    left_ear="Barkaro. Earring",
    right_ear="Loquac. Earring",
    left_ring="Balrahn's Ring",
    right_ring="Angha Ring",
    back="Toro Cape"}
                                                                             
    sets.midcast['Enfeebling Magic'].Mnd =                                  set_combine(sets.midcast['Enfeebling Magic'],{})
       
    sets.midcast.ElementalEnfeeble =                                        sets.midcast['Enfeebling Magic']
 
    sets.midcast['Dark Magic'] =                                            {
	head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands={ name="Helios Gloves", augments={'Mag. Acc.+10','"Drain" and "Aspir" potency +4','INT+3 MND+3',}},
    legs={ name="Helios Spats", augments={'"Drain" and "Aspir" potency +6',}},
    feet="Wayfarer Clogs",
    neck="Twilight Torque",
    waist="Refoccilation Stone",
    left_ear="Barkaro. Earring",
    right_ear="Loquac. Earring",
    left_ring="Balrahn's Ring",
    right_ring="Angha Ring",
    back="Merciful Cape"}
                                                                             
    sets.midcast['Dark Magic'].Drain =                                      set_combine(sets.midcast['Dark Magic'],{})
                                                                             
    sets.midcast['Dark Magic'].Aspir =                                      sets.midcast['Dark Magic'].Drain                                        
                                                                             
 
    sets.midcast['Dark Magic'].Stun =                                       set_combine(sets.midcast['Dark Magic'],{})
 
    -- Elemental Magic sets
    sets.midcast.LowTierNuke =                                              {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    sub="Elder's Grip +1",
    ammo="Witchstone",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Lengo Pants", augments={'INT+8',}},
    feet="Wayfarer Clogs",
    neck="Saevus Pendant +1",
    waist="Refoccilation Stone",
    left_ear="Barkaro. Earring",
    right_ear="Friomisi Earring",
    left_ring="Shiva Ring",
    right_ring="Acumen Ring",
    back="Toro Cape",}
 
    sets.midcast.LowTierNuke.Resistant =                                    {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    sub="Elder's Grip +1",
    ammo="Witchstone",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Lengo Pants", augments={'INT+8',}},
    feet="Wayfarer Clogs",
    neck="Saevus Pendant +1",
    waist="Refoccilation Stone",
    left_ear="Barkaro. Earring",
    right_ear="Friomisi Earring",
    left_ring="Shiva Ring",
    right_ring="Acumen Ring",
    back="Toro Cape",}
 
    sets.midcast.TP =                                                       {}                                                                          
                                                                             
    sets.midcast.HighTierNuke =                                             set_combine(sets.midcast.LowTierNuke,{})
                                                                             
    sets.midcast.HighTierNuke.Resistant =                                   set_combine(sets.midcast.LowTierNuke.Resistant,{})
     
-- Sets to return to when not performing an action.
    -- Resting sets
    sets.resting =                                                          {
	main="Numen Staff",
    sub="Elder's Grip +1",
    ammo="Mana Ampulla",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands="Nares Cuffs",
    legs="Assid. Pants +1",
    feet="Chelona Boots",
    neck="Eidolon Pendant +1",
    waist="Hierarch Belt",
    left_ear="Barkaro. Earring",
    right_ear="Friomisi Earring",
    left_ring="Angha Ring",
    right_ring="Celestial Ring",
    back="Felicitas Cape",}
     
    -- Idle sets
     
    -- Normal refresh idle set
    sets.idle =                                                             {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    sub="Elder's Grip +1",
    ammo="Psilomene",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands="Serpentes Cuffs",
    legs="Assid. Pants +1",
    feet="Herald's Gaiters",
    neck="Twilight Torque",
    waist="Hierarch Belt",
    left_ear="Ethereal Earring",
    right_ear="Loquac. Earring",
    left_ring="Vocane Ring",
    right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Breath dmg. taken -3%',}},
    back="Umbra Cape",}
 
    -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
    sets.idle.PDT =                                                         {
	main={ name="Lathi", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
    sub="Elder's Grip +1",
    ammo="Psilomene",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic burst mdg.+3%','Mag. Acc.+6','"Mag.Atk.Bns."+15',}},
    body="Wayfarer Robe",
    hands="Serpentes Cuffs",
    legs="Assid. Pants +1",
    feet="Herald's Gaiters",
    neck="Twilight Torque",
    waist="Hierarch Belt",
    left_ear="Ethereal Earring",
    right_ear="Loquac. Earring",
    left_ring="Vocane Ring",
    right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Breath dmg. taken -3%',}},
    back="Umbra Cape",}
 
    -- Idle mode when weak.
    sets.idle.Weak =                                                        sets.idle.PDT
     
    -- Town gear.
    sets.idle.Town =                                                        set_combine(sets.idle,{})
         
    -- Defense sets
 
    sets.defense.PDT =                                                      set_combine(sets.resting,{})
 
    sets.defense.MDT =                                                      set_combine(sets.resting,{})
 
    sets.Kiting =                                                           {}
 
    sets.latent_refresh =                                                   {}
 
    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
     
    sets.buff['Mana Wall'] =                                                {}
 
    sets.magic_burst =                                                      {left_ring="Mujin Band",back="Seshaw Cape",}
 
    -- 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 =                                                          {}
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if player.tp > 1000 then
        disable('main','sub')
    elseif (spellMap == 'Cure' or spellMap == 'Curaga') then
        equip(sets.precast.Cure)
        if (world.weather_element == 'Light' or world.day_element == 'Light') then
            equip({waist="Hachirin-no-Obi"})
        end
    elseif spellMap == 'Freeze II' or spellMap == 'Tornado II' or spellMap == 'Quake II' or spellMap == 'Burst II' or spellMap == 'Flood II' or spellMap == 'Flare II' then
        equip(sets.precast.AncientMagic)
    elseif spellMap == 'Stoneskin' then
        equip(sets.precast.Stoneskin)
    elseif spell.skill == 'Elemental Magic' then
        equip(sets.precast.FCElementalMagic)
    end
end
 
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and (spell.element == world.weather_element or spell.element == world.day_element) then
        equip(sets.midcast.Bonus)
    elseif spellMap == 'Slow' or spellMap == 'Silence' or spellMap == 'Paralyze' then
        equip(sets.midcast['Enfeebling Magic'].Mnd)
    end
end
 
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
        equip(sets.magic_burst)
    end
end
 
function job_aftercast(spell, action, spellMap, eventArgs)
    if player.tp < 1000 then
        enable('main','sub')
    elseif not spell.interrupted then
        if spell.english == 'Mana Wall' then
            enable('feet')
            equip(sets.buff['Mana Wall'])
            disable('feet')
        elseif spell.skill == 'Elemental Magic' and state.MagicBurst.value then
            state.MagicBurst:reset()
        elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
            send_command('@wait 55;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
        elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
            send_command('@wait 85;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
        elseif spell.english == 'Break' or spell.english == 'Breakga' then
            send_command('@wait 25;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
        end
    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)
    -- Unlock feet when Mana Wall buff is lost.
    if buff == "Mana Wall" and not gain then
        enable('feet')
        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.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
        if lowTierNukes:contains(spell.english) then
            return 'LowTierNuke'
        else
            return 'HighTierNuke'
        end
    end
end
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
     
    return idleSet
end
 
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end
 
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
 
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 1)
end
Offline
Posts: 346
By Sidiov 2016-02-18 19:21:15
Link | Quote | Reply
 
or when you hit the toggle, just issue the console command from gearswap

send_command('gs disable back')
 Asura.Evildemon
Offline
Server: Asura
Game: FFXI
Posts: 134
By Asura.Evildemon 2016-03-01 09:55:03
Link | Quote | Reply
 
is there a simple way to add a Death set and toggle to that gearswap?
[+]
necroskull Necro Bump Detected! [30 days between previous and next post]
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2016-03-31 17:10:06
Link | Quote | Reply
 
Asura.Evildemon said: »
is there a simple way to add a Death set and toggle to that gearswap?
Going to bump this because I'm having a similar issue. Can't seem to figure out the sets terminology to equip my death set when i cast it.
Offline
Posts: 346
By Sidiov 2016-03-31 17:23:02
Link | Quote | Reply
 
Bismarck.Kyaaadaa said: »
Going to bump this because I'm having a similar issue. Can't seem to figure out the sets terminology to equip my death set when i cast it.
For casting sets, can be like any other specific spell:
sets.precast.Death
sets.midcast.Death

What you probably also want to do is create an idlemode that uses a specific Idle set with high MP.
if using motenten:
state.IdleMode:options('Normal', 'Death')

sets.idle.Death = {}
 Bismarck.Kyaaadaa
Offline
Server: Bismarck
Game: FFXI
user: Kyaaadaa
Posts: 585
By Bismarck.Kyaaadaa 2016-03-31 19:08:41
Link | Quote | Reply
 
Sidiov said: »
sets.precast.Death
sets.midcast.Death

What you probably also want to do is create an idlemode that uses a specific Idle set with high MP.
if using motenten:
state.IdleMode:options('Normal', 'Death')

sets.idle.Death = {}
I used the first two and got nothing back, didnt change a single piece of gear, which is why I questioned it.
There isn't any pre-gaming is there? I know I had to add Aspir III to the Motes, wasn't sure if death needed to be tossed in somewhere also.
 Leviathan.Celebrindal
Offline
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2016-03-31 20:12:14
Link | Quote | Reply
 
did you create your own sets for "sets.precast.Death" and "sets.midcast.Death"? Have to define them just like "sets.midcast.['Elemental Magic']", etc. are defined. I'd also suggest a "sets.Idle.Death", because if you are like me and usually idle in -PDT gear you won't be setting yourself up for your max MP pool. Having a this third set of max MP is really important, and spacing can keep you safe while you idle in more "fluffy" gear.
Offline
Server: Sylph
Game: FFXI
Posts: 61
By Sylph.Padisharcreel 2016-03-31 20:34:25
Link | Quote | Reply
 
sets.midcast['Death'] is the only way i was able to get it to work. I assume it's because i dont have it defined in my mappings... had a similar issue with a lot of the newer BLU spells. At any rate, that syntax should do it then just make sure you have idle and precast sets sorted for MP management as well.
First Page 2
Log in to post.