|
Gearswap Support Thread
Valefor.Ophannus
Server: Valefor
Game: FFXI
Posts: 241
By Valefor.Ophannus 2015-01-09 19:51:13
Still doesnt work.
I tried an even simpler route:
Code function job_get_spell_map(spell, default_spell_map)
if spell.english:startswith('Cur') then
if world.weather_element == light then
equip({main="Chatoyant Staff",waist=gear.ElementalObi})
end
Even this won't work...
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-01-09 19:56:18
Still doesnt work.
I tried an even simpler route:
Code function job_get_spell_map(spell, default_spell_map)
if spell.english:startswith('Cur') then
if world.weather_element == light then
equip({main="Chatoyant Staff",waist=gear.ElementalObi})
end
Even this won't work...
Just need a GS for WHM?
This has most stuff in. just turn the curaga ***off.
Code function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
AccIndex = 1
AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
Armor = 'None'
AutoAga = 1
Curaga_benchmark = 30
Emnity = 1
Safe_benchmark = 70
Sublimation_benchmark = 30
Sublimation = 1
sets.TP = {}
sets.TP.Low = {head="Gendewitha Caubeen",neck="Asperity Necklace",ear1="Brutal Earring",
ear2="Suppanomi",body="Theophany briault +1",hands="Dynasty Mitts",ring1="Rajas ring",
ring2="Patricius Ring",back="Cheviot Cape",waist="Goading Belt",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.TP.Mid = {}
sets.TP.High = {}
sets.engaged = {}
sets.engaged.healing = {}
sets.engaged.healing.Curaga = {}
sets.engaged.healing.Cure = {}
sets.engaged.healing.Weather = {}
sets.ws = {}
sets.ws['Realmrazer'] = {head="Artsieq Hat",belt="Thunder Belt",necl="Nuna Gorget +1",
body="Theophany briault +1",hands="Dynasty Mitts",ring1="Levia. Ring",ring2="Aquasoul Ring",back="Refraction Cape",
belt="Thunder Belt",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.ws['Flash Nova'] = {head="Nahtirah Hat",neck="Eddy Necklace",ear1="Friomisi Earring",
ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.aftercast = {}
sets.aftercast.night = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Dark ring",ring2="Woltaris Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Theo. Duckbills +1"}
sets.aftercast.defense = {main="Terra's Staff",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Theophany briault +1",hands="Gendewitha Gages",ring1="Dark ring",ring2="Patricius Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.aftercast.day = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Heka's Kalasiris",hands="Lurid Mitts",ring1="Dark ring",ring2="Woltaris Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Serpentes Sabots"}
sets.aftercast.move = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Dark ring",ring2="Woltaris Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Desert Boots"}
sets.aftercast.resting = {main="Chatoyant Staff",feet="Chelona Boots"}
sets.precast = {}
sets.precast.fastcast = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",neck="Orunmila's Torque",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Witful Belt",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.enhancing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.stoneskin = {ammo="Imaptiens",head="Umuthi Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.cure = {ammo="Impatiens",head="Nahtirah Hat",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages",ring1="Prolix Ring",legs="Orsn. Pantaln. +2",
feet="Cure Clogs",waist="Witful Belt",ring2="Lebeche Ring",back="Pahtli Cape"}
sets.precast.healing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Ogapepo Cape +1",ring1="Veneficium Ring",legs="Orsn. Pantaln. +2",
feet="Chelona Boots",waist="Witful Belt",ring2="lebeche Ring"}
sets.midcast = {}
sets.midcast.healing = {}
sets.midcast.healing.lyna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Orison Pantaloons +2",feet="Gende. Galosh. +1"}
sets.midcast.healing.caress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galosh. +1"}
sets.midcast.healing.cursna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.cursnacaress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.curaga = {ammo="Incantor Stone",
main="Tamaxchi",sub="Genbu's Shield",head="Gende. Caubeen",body="Theo. Briault +1",hands="Theo. Mitts +1",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Nuna Gorget +1",waist="Cascade Belt",ear2="Cmn. Earring",ear1="Lifestorm Earring",left_ring="Sirona's Ring",
right_ring="Aquasoul Ring",back="Pahtli Cape",}
sets.midcast.healing.cure = {main="Ababinili",head="Gendewitha caubeen",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Theo. Mitts +1",back="Mending Cape",legs="Orsn. Pantaln. +2",
ring1="Sirona's Ring", ring2="Ephedra Ring", feet="Regal Pumps", waist="Bishop's Sash",
ear2="Beatific Earring", ear1="Roundel Earring"}
sets.midcast.healing.cureemnity = {main="Tamaxchi",head="Gendewitha caubeen",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Theo. Mitts +1",back="Mending Cape",legs="Orsn. Pantaln. +2",
ring1="Sirona's Ring", ring2="Ephedra Ring", feet="Piety Duckbills +1", waist="Bishop's Sash",
ear2="Beatific Earring", ear1="Roundel Earring"}
sets.midcast.healing.weather = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",head="Gende. Caubeen",body="Orison Bliaud +2",hands="Bokwus Gloves",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Colossus's Torque",waist="Korin Obi",left_ear="Roundel Earring",right_ear="Beatific Earring",left_ring="Sirona's Ring",
right_ring="Ephedra Ring",back="Twilight Cape"}
sets.midcast.healing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing = {}
sets.midcast.enhancing.raw = {main="Beneficus",ammo="Incantor Stone",
head="Umuthi Hat",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Hyksos Robe",hands="Dynasty Mitts",
back="Swith Cape",waist="Olympus sash",legs="Piety Pantaloons",feet="Orsn. Duckbills +2"}
sets.midcast.enhancing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing.barspell = {main="Beneficus",sub="Genbu's Shield",ammo="Incantor Stone",
head="Orison Cap +2",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Orison Bliaud +2",hands="Orison Mitts +2",
back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.enhancing.regen = {main="Bolelabunga", legs="Theophany pantaloons",feet="Gendewitha galoshes",
hands="Orison Mitts +2",body="Piety Briault"}
sets.midcast.enhancing.turtle = {legs="Piety Pantaloons",feet="Piety Duckbills +1"}
sets.midcast.enhancing.stoneskin = {neck="Stone Gorget",waist="Siegel Sash",legs="Haven Hose",Ear1="Earthcry Earring"}
sets.midcast.divine = {}
sets.midcast.divine.holy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.banish = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.repose = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Nuna Gorget +1",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.divine.flash = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling = {}
sets.midcast.enfeebling.accuracy = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling.potency = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Aquasoul Ring",right_ring="Sangoma Ring",
back="Refraction Cape",}
sets.midcast.elemental = {}
sets.midcast.elemental.accuracy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Gendewitha Spats",feet="Weath. Souliers +1"}
sets.JA = {}
sets.JA["Benediction"] = {Head="Piety Briault"}
sets.JA["Devotion"] = {Head="Piety Cap +1"}
end
function party_index_lookup(name)
for i=1,party.count do
if party[i].name == name then
return i
end
end
return nil
end
function pretarget(spell)
if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
if not party_index_lookup(spell.target.name) then
return
end
local target_count = 0
local total_hpp_deficit = 0
for i=1,party.count do
if party[i].hpp<75 and party[i].status_id ~= 2 and party[i].status_id ~= 3 then
target_count = target_count + 1
total_hpp_deficit = total_hpp_deficit + (100 - party[i].hpp)
end
end
if target_count > 1 then
cancel_spell()
if total_hpp_deficit / target_count > Curaga_benchmark then
send_command(';input /ma "Curaga IV" '..spell.target.name..';')
else
send_command(';input /ma "Curaga III" '..spell.target.name..';')
end
end
end
end
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
Curagas = S{'Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cura','Cura II','Cura III'}
Lyna = S{'Paralyna','Silena','Viruna','Erase','Cursna','Stona','Blindna','Poisona'}
Barspells = S{'Barfira','Barfire','Barwater','Barwatera','Barstone','Barstonra','Baraero','Baraera','Barblizzara','Barblizzard','Barthunder','Barthundra'}
Turtle = S{'Protectra V','Shellra V'}
Cursna = S{'Cursna'}
Regens = S{'Regen','Regen II','Regen III','Regen IV','Regen V'}
Enhanced = S{'Flurry','Haste','Refresh'}
Banished = S{'Banish','Banish II','Banish III','Banishga','Banishga II'}
Smited = S{'Holy','Holy II'}
Reposed = S{'Repose','Flash'}
Potency = S{'Slow','Paralyze'}
Defense = S{'Stoneskin'}
function precast(spell,action)
if spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(8,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.ws
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
cancel_spell()
return
end
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.skill=='Healing Magic' then
if Cures:contains(spell.name) then
equip(sets.precast.cure)
elseif Curagas:contains(spell.name) then
equip(sets.precast.cure)
elseif Lyna:contains(spell.name) then
equip(sets.precast.healing)
else
equip(sets.precast.fastcast)
end
elseif spell.skill =='Enhancing Magic' then
equip(sets.precast.enhancing)
else
equip(sets.precast.fastcast)
end
end
function midcast(spell,action)
if spell.skill =='Healing Magic' then
if Cures:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.cure)
add_to_chat(8,'TP Sets Engaged')
elseif Emnity == 1 then
equip(sets.midcast.healing.cureemnity)
else
equip(sets.midcast.healing.cure)
end
end
elseif Curagas:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.curaga)
else
equip(sets.midcast.healing.curaga)
end
end
elseif Lyna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.caress)
else
equip(sets.midcast.healing.lyna)
end
elseif Cursna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.cursnacaress)
else
equip(sets.midcast.healing.cursna)
end
else
equip(sets.midcast.healing.recast)
end
elseif spell.skill =='Enhancing Magic' then
if Regens:contains(spell.name) then
equip(sets.midcast.enhancing.regen)
elseif Barspells:contains(spell.name) then
equip(sets.midcast.enhancing.barspell)
elseif Turtle:contains(spell.name) then
equip(sets.midcast.enhancing.turtle)
elseif Enhanced:contains(spell.name) then
equip(sets.midcast.enhancing.recast)
elseif Defense:contains(spell.name) then
equip(sets.midcast.enhancing.stoneskin)
else
equip(sets.midcast.enhancing.raw)
end
elseif spell.skill =='Divine Magic' then
if Banished:contains(spell.name) then
equip(sets.midcast.divine.banish)
elseif Smited:contains(spell.name) then
equip(sets.midcast.divine.holy)
elseif Reposed:contains(spell.name) then
equip(sets.midcast.divine.repose)
elseif Flashed:contains(spell.name) then
equip(sets.midcast.divine.flash)
else
equip(sets.midcast.divine.flash)
end
elseif spell.skill =='Enfeebling Magic' then
if Potency:contains(spell.name) then
equip(sets.midcast.enfeebling.potency)
else
equip(sets.midcast.enfeebling.accuracy)
end
elseif spell.skill =='Elemental Magic' then
equip(sets.midcast.elemental.accuracy)
end
end
function aftercast(spell,action)
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
end
AutoSublimation()
end
function AutoSublimation()
if buffactive['Sublimation: Complete'] then
if player.mpp < Sublimation_benchmark then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
add_to_chat(039,'Sublimation Completed: MP Danger Zone')
end
elseif player.mpp < 75 then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
add_to_chat(159,'Sublimation Completed: MP Mid Range')
end
end
elseif not buffactive['Sublimation: Complete'] and not buffactive['Sublimation: Activated'] then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
end
end
end
function status_change(new,action)
if new == 'Idle' then
enable('main','sub')
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
AutoSublimation()
end
elseif new == 'Resting' then
equip(sets.aftercast.resting)
elseif new == 'Engaged' then
disable('main','sub')
equipSet = sets.TP
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
end
end
function buff_change(buff,gain_or_loss)
if buff == "Sandstorm" then
Idle()
end
end
function Idle()
if buffactive['Sandstorm'] then
equip(sets.aftercast.move)
elseif world.time >= (17*60) or world.time <= (7*60) then
equip(sets.aftercast.night)
else
equip(sets.aftercast.day)
end
end
function pet_midcast(spell,action)
end
function pet_aftercast(spell,action)
end
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == '119' then
Armor = 'None'
add_to_chat(8,'119 Set: [Unlocked]')
else
Armor = '119'
add_to_chat(158,'119 Set: [Locked]')
end
status_change(player.status)
elseif command == 'A10' then -- Aga Toggle --
if AutoAga == 1 then
AutoAga = 0
add_to_chat(8,'Curaga 3 Mode: [Off]')
else
AutoAga = 1
add_to_chat(158,'Curaga 3 Mode: [ON]')
end
status_change(player.status)
elseif command == 'Z10' then -- Emnity Toggle --
if Emnity == 1 then
Emnity = 0
add_to_chat(8,'Emnity - Mode: [Off]')
else
Emnity = 1
add_to_chat(158,'Emnity - Mode: [ON]')
end
status_change(player.status)
elseif command == 'B10' then -- Sublimation Toggle --
if Sublimation == 1 then
Sublimation = 0
add_to_chat(8,'Auto Sublimation: [Off]')
else
Sublimation = 1
add_to_chat(158,'Auto Sublimation: [ON]')
end
status_change(player.status)
elseif command == 'SUPERCURE' then
if (windower.ffxi.get_spell_recasts()[215] > 0) then
send_command('input /ma "Cure V" <t>')
else
send_command('input /ja "Penury" <me>;wait 1.2;input /ma "Cure V" <me>')
end
elseif command == 'SUPERGEN' then
if (windower.ffxi.get_spell_recasts()[215] > 0) then
send_command('input /ma "Regen IV" <t>')
else
send_command('input /ja "Penury" <me>;wait 1.2;input /ma "Regen IV" <t>')
end
elseif command == 'SESUNA' then
if (windower.ffxi.get_spell_recasts()[246] > 0) then
send_command('input /ma "Esuna" <t>')
else
send_command('input /ja "Afflatus Misery" <me>;wait 1.2;input /ma "Esuna" <me>')
end
end
end
Ragnarok.Martel
Server: Ragnarok
Game: FFXI
Posts: 2954
By Ragnarok.Martel 2015-01-09 19:59:14
Still doesnt work.
I tried an even simpler route:
Code function job_get_spell_map(spell, default_spell_map)
if spell.english:startswith('Cur') then
if world.weather_element == light then
equip({main="Chatoyant Staff",waist=gear.ElementalObi})
end
Even this won't work... I think you're gonna need quotes or ' around the light in
if world.weather_element == light then
or else it's gonna try to read it as a variable not a string.
also, capitalize it. Element names are capitalized in the elements.lua in the resources. Give it a try after that and see.
Valefor.Ophannus
Server: Valefor
Game: FFXI
Posts: 241
By Valefor.Ophannus 2015-01-09 20:08:55
So I have my 2 sets:
midcast.Cure
midcast.Cure.LightWeather
Then I have this code:
Code 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 'LightWeather'
end
Still won't work ~_~
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-01-09 20:12:30
So I have my 2 sets:
midcast.Cure
midcast.Cure.LightWeather
Then I have this code:
Code 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 'LightWeather'
end
Still won't work ~_~
Replace the part for light weather with this
Code if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
Valefor.Ophannus
Server: Valefor
Game: FFXI
Posts: 241
By Valefor.Ophannus 2015-01-09 20:16:28
I was messing around and got it to work with this:
Changed set names to:
midcast.['Healing Magic']
midcast.['Healing Magic'].LightWeather
Code if spell.skill == 'Healing Magic' then
if world.weather_element == 'Light' then
return 'LightWeather'
I don't have a cursna set(just Oretania Cape+1 due to inventory constraints, so having it midcast in cure potency gear won't really screw with me too much even for Cursna)
Valefor.Ophannus
Server: Valefor
Game: FFXI
Posts: 241
By Valefor.Ophannus 2015-01-09 20:24:35
Lastly I'm testing stun in town with /ma "Stun" <me> just to check gearswaps with gearswaps turned on. Weirdly, every time I aftercast, all my idle pieces are put back on except Apamajas II and Sangoma Ring remain on. This happens every single time I cast stun, and only stun. If I cast stun again while apamajas II and Sangoma ring are already on, i will aftercast in my bolebunga genbu shield and defending ring. Is this a result of trying to cast an impossible spell on myself in a city?
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-01-09 22:36:54
Anyone know how to add a 0.4 second delay into actions that can't be sent using send_command?
I was trying to do
Code socket.timer(0.4) then send this
but I can't seem to get it to work.
Leviathan.Arcon
VIP
Server: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2015-01-09 23:26:26
Can you give an example of what action you mean? I don't understand what you're trying to do.
Either way, you can sleep your currently running program using "coroutine.sleep(0.4)", but that will delay the currently processing function entirely. Instead it may be smarter to write a new function to send the command and delay that with "f:schedule(0.4)", where "f" is the function you defined.
Example usage: Code require('functions')
send_action = function()
-- Code that sends an action
end
send_action:schedule(0.4)
If you want "send_action" to always be delayed by that amount you can even build it into the function using functions.delay:
Code require('functions')
send_action = (function()
-- Code that sends an action
end):delay(0.4)
send_action()
By Selindrile 2015-01-10 10:57:40
Example code of automatic ws using Mote v2.
Code windower.register_event('action', function(act)
if state.Automatic.value == 'Fudo' and player.in_combat and player.tp > 999 then
windower.send_command('input /ws "Tachi: Fudo" <t>')
elseif state.Automatic.value == 'Dancer' and player.hpp < 70 and player.tp > 499 then
windower.send_command('input /ja "Curing Waltz III" <me>')
elseif state.Automatic.value == 'Dancer' and player.in_combat and player.tp > 999 then
windower.send_command('input /ws "Tachi: Fudo" <t>')
end
end)
And in user_setup() add the following:
state.Automatic = M{['description']='Automatic Mode', 'off','Fudo', 'Dancer'}
send_command('bind @f12 gs c cycle Automatic')
[+]
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-01-10 12:19:45
Can you give an example of what action you mean? I don't understand what you're trying to do.
Either way, you can sleep your currently running program using "coroutine.sleep(0.4)", but that will delay the currently processing function entirely. Instead it may be smarter to write a new function to send the command and delay that with "f:schedule(0.4)", where "f" is the function you defined.
Example usage: Code require('functions')
send_action = function()
-- Code that sends an action
end
send_action:schedule(0.4)
If you want "send_action" to always be delayed by that amount you can even build it into the function using functions.delay:
Code require('functions')
send_action = (function()
-- Code that sends an action
end):delay(0.4)
send_action()
I was creating my own addon and just needed it to pause the programme for a set amount of time after a trigger occured.
I used sockets and timeit to make it work, thanks though
Server: Ragnarok
Game: FFXI
Posts: 82
By Ragnarok.Worldslost 2015-01-13 14:08:38
I cant get this to work, can someone please tell me where im going wrong. Code function register_event('zone change')
if ('zone change') then
windower.send_command('wait 8; gs equip idle_set; input /lockstyle on')
add_to_chat(123,'*---Lockstyle Engaged---*')
end
end
Edit: i change zone change after function to (new,old) and it loads up but it still wont work, meant to change back before I posted sorry.
Leviathan.Arcon
VIP
Server: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2015-01-13 15:30:35
The syntax is wrong: Code windower.register_event('zone change', function()
windower.send_command('wait 8; gs equip idle_set; input /lockstyle on')
windower.add_to_chat(123, '*---Lockstyle Engaged---*')
end)
Quetzalcoatl.Valli
Server: Quetzalcoatl
Game: FFXI
Posts: 1420
By Quetzalcoatl.Valli 2015-01-13 15:45:32
That code is to lockstyle into the idle set any time you zone, right.
But, this is the thing I don't get, do you just put it where ever you feel like in the code?
Leviathan.Arcon
VIP
Server: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2015-01-13 15:52:24
Yes. Doesn't even need to be GearSwap, can be its own addon. In fact, it should not be GearSwap, since you have to put it in every file or put it into a library and include that in every file. People abuse GearSwap way too much and make life harder for themselves with it.
By Selindrile 2015-01-14 03:03:05
Just due to clutter when editing? Or does including so much more within your gearswap luas tax something more? Because I can't imagine much being easier than just slapping that into Selindrile-Globals.lua since that's already called in every job, there could be something I'm not aware of, or did you just mean the trouble of creating such a thing if you didn't already have one? (Though Motenten gives us a pretty great base for such a thing.)
Leviathan.Arcon
VIP
Server: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2015-01-14 08:49:23
Yes, if you already have a file that all your jobs include, then it doesn't make much of a difference. There are a few minor disadvantages that most people won't care about, but I'll list them just fyi:
1. It's slightly slower due to having to go through GS's environment first before being passed to LuaCore.
2. Since GS is a complex addon chances are higher for it to break and when that happens all these miscellaneous code snippets will also cease to work, which wouldn't be the case if they were separate.
3. Since GS makes a few changes to the regular Windower environment (not to mention GS libraries themselves that introduce even more changes, like Mote's libraries) it makes it less portable for people who use different libraries or who don't use GearSwap. As an example take the add_to_chat function. That doesn't normally exist in Windower's Lua API, it's windower.add_to_chat. Hence people trying to use that code outside of GearSwap won't get it to work without manually adjusting it.
4. It makes debugging the code harder because it's a) more to read/understand and b) increase the addon's surface area for bugs. The more code you have, the more can go wrong.
Sounds like a lot, but those are really minor issues normally, so most people won't care for it. But that's still why it shouldn't go into GearSwap unless you have some weird desire for it to be there of all places.
By Selindrile 2015-01-14 11:26:08
Ah, thanks for the information, I have no interest in the above code, but I do have some modes that go in every job, that do things like locking my capacity mantle etc, in aftercast, wasn't sure if those would be better elsewhere than globals, but since I rely on some motenten includes anyway I felt it best to put them there anyway, and it's the place I'm most comfortable adding code of this nature
Server: Shiva
Game: FFXI
Posts: 54
By Shiva.Nokturnall 2015-01-14 20:53:48
Hi folks,
I downloaded Mote's THF file, and it won't equip any Rudra's Storm WS sets. It either defaults back to the basic WS set, or gives the message "GearSwap: Equip command cannot be completed. That set does not exist." This is even trying directly from Mote's THF file and making no adjustments to it.
Has anyone else run into this issue? I apologize if this has been noted before. I couldn't find any info on it.
Thanks!
Edit: I have also tried changing the Rudra's set to sets.precast.WS['Rudra\'s Storm'], but it defaults back to the original WS set, not the Rudra's set.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-01-14 21:17:00
Hi folks,
I downloaded Mote's THF file, and it won't equip any Rudra's Storm WS sets. It either defaults back to the basic WS set, or gives the message "GearSwap: Equip command cannot be completed. That set does not exist." This is even trying directly from Mote's THF file and making no adjustments to it.
Has anyone else run into this issue? I apologize if this has been noted before. I couldn't find any info on it.
Thanks!
Edit: I have also tried changing the Rudra's set to sets.precast.WS['Rudra\'s Storm'], but it defaults back to the original WS set, not the Rudra's set.
Mine worked fine just trying now.
Server: Shiva
Game: FFXI
Posts: 54
By Shiva.Nokturnall 2015-01-14 21:33:42
Hi folks,
I downloaded Mote's THF file, and it won't equip any Rudra's Storm WS sets. It either defaults back to the basic WS set, or gives the message "GearSwap: Equip command cannot be completed. That set does not exist." This is even trying directly from Mote's THF file and making no adjustments to it.
Has anyone else run into this issue? I apologize if this has been noted before. I couldn't find any info on it.
Thanks!
Edit: I have also tried changing the Rudra's set to sets.precast.WS['Rudra\'s Storm'], but it defaults back to the original WS set, not the Rudra's set.
Mine worked fine just trying now.
Mind showing me what the rudra's portion of your ws sets look like? I just downloaded the entire mote's file as-is, and it still gives me the error. Perhaps its an update thing? I have no clue.
By Selindrile 2015-01-14 22:44:32
I use a Lua based on Motenten's Thf, and I never had an issue with that set in particular, though mine are currently a bit changed from his original, in my Selindrile_Thf_Gear.lua they look like the following:
Code sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {})
sets.precast.WS["Rudra's Storm"].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS.Acc, {})
sets.precast.WS["Rudra's Storm"].Fodder = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Thew Bomblet",head="Felistris Mask",feet="Vanir Boots"})
sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
sets.precast.WS["Rudra's Storm"].SATA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
And I use the fodder set very frequently for dynamis, and they're not in my generic WS set, so, is working properly for me at least.
Server: Shiva
Game: FFXI
Posts: 54
By Shiva.Nokturnall 2015-01-15 05:30:21
I use a Lua based on Motenten's Thf, and I never had an issue with that set in particular, though mine are currently a bit changed from his original, in my Selindrile_Thf_Gear.lua they look like the following:
Code sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {})
sets.precast.WS["Rudra's Storm"].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS.Acc, {})
sets.precast.WS["Rudra's Storm"].Fodder = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Thew Bomblet",head="Felistris Mask",feet="Vanir Boots"})
sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
sets.precast.WS["Rudra's Storm"].SATA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {ammo="Qirmiz Tathlum"})
And I use the fodder set very frequently for dynamis, and they're not in my generic WS set, so, is working properly for me at least.
Interesting. Not sure what I'm doing wrong then. The wording in my sets is exactly the same.
Asura.Taidis
Server: Asura
Game: FFXI
Posts: 251
By Asura.Taidis 2015-01-16 18:32:06
So I'm finally trying to set up a WAR lua, can't think of how to set it up so I TP in certain gear based on when Mighty Strikes is up or when Restraint is up.
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')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Berserk = buffactive.Berserk or false
state.Buff.Aggressor = buffactive.Aggressor or false
state.Buff.Restraint = buffactive.Restraint or false
state.Buff['Brazen Rush'] = buffactive['Brazen Rush'] or false
state.Buff['Mighty Strikes'] = buffactive['Mighty Strikes'] or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.
function user_setup()
state.OffenseMode:options('Normal', 'Acc')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
update_combat_form()
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.Berserk = {body="Pummeler's Lorica",feet="Agoge Calligae"}
sets.precast.Aggressor = {head="Pummeler's Mask +1",body="Agoge Lorica"}
sets.precast.Warcry = {head="Agoge Mask"}
sets.precast['Blood Rage'] = {body="Ravager's Lorica +2"}
sets.precast['Mighty Strikes'] = {hands="Agoge Muffler's"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Yetshila",
head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
body="Phorcys Korazin",hands="Pummeler's Mufflers +1",ring1="Strigoi Ring",ring2="Karieyh Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Pummeler's Cuisses +1",feet="Cizin Greaves +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS.Upheaval= {}
sets.precast.WS.Upheaval.Acc = {}
sets.precast.WS["Ukko's Fury"] = {}
sets.precast.WS["Ukko's Fury"].Acc = {}
sets.precast.WS['Fell Cleave'] = {}
sets.precast.WS['Fell Cleave'].Acc = {}
-- Midcast Sets
sets.midcast.FastRecast = sets_combine(sets.engaged,(head="Cizin Helm +1"))
-- Sets to return to when not performing an action.
-- Resting sets
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Minos", sub="Claymore Grip",ammo="Yetshila",
head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Hermes' Sandals"}
sets.idle.Field = {
head="Cizin Helm +1",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Dark Ring",
back="Repulse Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Hermes' Sandals"}
sets.idle.Weak = sets_combine(sets.idle.Field,(head="Twilight Helm",body="Twilight Mail"))
-- Defense sets
sets.defense.PDT = {head="Cizin Helm +1",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Dark Ring",
back="Repulse Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Cizin Greaves +1"}}
sets.defense.Reraise = sets_combine(sets.idle.Field,(head="Twilight Helm",body="Twilight Mail"))
sets.defense.MDT = {ammo="Demonry Stone",
head="Ogier's Helm",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="Shadow Ring",
back="Mauler's Mantle",waist="Zoran's Belt",legs="Cizin Breeches +1",feet="Cizin Greaves +1"}
sets.Kiting = {feet="Hermes' Sandals"}
sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
-- 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
-- Delay 450 GK, 25 Save TP => 65 Store TP for a 5-hit (25 Store TP in gear)
sets.engaged = {ammo="Yetshila",
head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Pummeler's Calligae"}
sets.engaged.Acc = {ammo="Yetshila",
head="Yaoyotl Helm",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Oneiros Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Pummeler's Cuisses +1",feet="Agoge Calligae"}
sets.engaged.PDT = {}
sets.engaged.Acc.PDT = {}
sets.engaged.Reraise = {}
sets.engaged.Acc.Reraise = {}
sets.buff.Restraint = {hands="Ravager's Mufflers +2"}
sets.buff['Mighty Strikes'] = {ammo="Yetshila",feet="Ravager's Calligae +2",back="Cavaros Mantle"}
sets.buff["Warrior's Charge"] = {legs="Agoge Cuisses"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
-- Run after the default precast() is done.
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type:lower() == 'weaponskill' then
if state.Buff["Warrior's Charge"] then
equip(sets.buff["Warrior's Charge"])
end
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Effectively lock these items in place.
if state.HybridMode.value == 'Reraise' or
(state.DefenseMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
equip(sets.Reraise)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
if areas.Adoulin:contains(world.area) and buffactive.ionis then
state.CombatForm:set('Adoulin')
else
state.CombatForm:reset()
end
end
Now I haven't finished editing stuff here, so for all I know it might be broken when I load it!
Quetzalcoatl.Orestes
Server: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2015-01-16 19:11:59
So I'm finally trying to set up a WAR lua, can't think of how to set it up so I TP in certain gear based on when Mighty Strikes is up or when Restraint is up.
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')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Berserk = buffactive.Berserk or false
state.Buff.Aggressor = buffactive.Aggressor or false
state.Buff.Restraint = buffactive.Restraint or false
state.Buff['Brazen Rush'] = buffactive['Brazen Rush'] or false
state.Buff['Mighty Strikes'] = buffactive['Mighty Strikes'] or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.
function user_setup()
state.OffenseMode:options('Normal', 'Acc')
state.HybridMode:options('Normal', 'PDT', 'Reraise')
state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
update_combat_form()
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.Berserk = {body="Pummeler's Lorica",feet="Agoge Calligae"}
sets.precast.Aggressor = {head="Pummeler's Mask +1",body="Agoge Lorica"}
sets.precast.Warcry = {head="Agoge Mask"}
sets.precast['Blood Rage'] = {body="Ravager's Lorica +2"}
sets.precast['Mighty Strikes'] = {hands="Agoge Muffler's"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Yetshila",
head="Yaoyotl Helm",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
body="Phorcys Korazin",hands="Pummeler's Mufflers +1",ring1="Strigoi Ring",ring2="Karieyh Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Pummeler's Cuisses +1",feet="Cizin Greaves +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS.Upheaval= {}
sets.precast.WS.Upheaval.Acc = {}
sets.precast.WS["Ukko's Fury"] = {}
sets.precast.WS["Ukko's Fury"].Acc = {}
sets.precast.WS['Fell Cleave'] = {}
sets.precast.WS['Fell Cleave'].Acc = {}
-- Midcast Sets
sets.midcast.FastRecast = sets_combine(sets.engaged,(head="Cizin Helm +1"))
-- Sets to return to when not performing an action.
-- Resting sets
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Minos", sub="Claymore Grip",ammo="Yetshila",
head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Hermes' Sandals"}
sets.idle.Field = {
head="Cizin Helm +1",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Dark Ring",
back="Repulse Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Hermes' Sandals"}
sets.idle.Weak = sets_combine(sets.idle.Field,(head="Twilight Helm",body="Twilight Mail"))
-- Defense sets
sets.defense.PDT = {head="Cizin Helm +1",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Patricius Ring",ring2="Dark Ring",
back="Repulse Mantle",waist="Flume Belt",legs="Cizin Breeches +1",feet="Cizin Greaves +1"}}
sets.defense.Reraise = sets_combine(sets.idle.Field,(head="Twilight Helm",body="Twilight Mail"))
sets.defense.MDT = {ammo="Demonry Stone",
head="Ogier's Helm",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Mekira Meikogai",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="Shadow Ring",
back="Mauler's Mantle",waist="Zoran's Belt",legs="Cizin Breeches +1",feet="Cizin Greaves +1"}
sets.Kiting = {feet="Hermes' Sandals"}
sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
-- 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
-- Delay 450 GK, 25 Save TP => 65 Store TP for a 5-hit (25 Store TP in gear)
sets.engaged = {ammo="Yetshila",
head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Cizin Mufflers +1",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Cizin Breeches +1",feet="Pummeler's Calligae"}
sets.engaged.Acc = {ammo="Yetshila",
head="Yaoyotl Helm",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Xaddi Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Oneiros Ring",
back="Mauler's Mantle",waist="Windbuffet Belt +1",legs="Pummeler's Cuisses +1",feet="Agoge Calligae"}
sets.engaged.PDT = {}
sets.engaged.Acc.PDT = {}
sets.engaged.Reraise = {}
sets.engaged.Acc.Reraise = {}
sets.buff.Restraint = {hands="Ravager's Mufflers +2"}
sets.buff['Mighty Strikes'] = {ammo="Yetshila",feet="Ravager's Calligae +2",back="Cavaros Mantle"}
sets.buff["Warrior's Charge"] = {legs="Agoge Cuisses"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
-- Run after the default precast() is done.
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type:lower() == 'weaponskill' then
if state.Buff["Warrior's Charge"] then
equip(sets.buff["Warrior's Charge"])
end
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Effectively lock these items in place.
if state.HybridMode.value == 'Reraise' or
(state.DefenseMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
equip(sets.Reraise)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
if areas.Adoulin:contains(world.area) and buffactive.ionis then
state.CombatForm:set('Adoulin')
else
state.CombatForm:reset()
end
end
Now I haven't finished editing stuff here, so for all I know it might be broken when I load it!
state.buff['ability name here'] will keep track of Mighty Strikes status for you. In order to use it, just create a sets.buff.Mighty with whatever gear you want to wear when it's up. I'd recommend you only include a few key pieces, since the method I'm outlining will combine it with your current set. If that isn't desirable let me know. There are other more detailed methods for achieving this.
To make it work, put this function somewhere in your file, or add the code inside it if it already exists.
Code
function customize_melee_set(meleeSet)
if state.Buff['Mighty Strikes'] then
meleeSet = set_combine(meleeSet, sets.buff.Mighty)
end
return meleeSet
end
Also, you have an error on line 70 of the lua you posted.
This is wrong.
Code sets.midcast.FastRecast = sets_combine(sets.engaged,(head="Cizin Helm +1"))
Should be like this
Code sets.midcast.FastRecast = sets_combine(sets.engaged,{head="Cizin Helm +1"})
Asura.Taidis
Server: Asura
Game: FFXI
Posts: 251
By Asura.Taidis 2015-01-16 19:26:32
Yeah there were a lot of errors, already fixed them though, thanks anyway!
As for Mighty Strikes stuff, thanks for that, I'm probably just gonna have it for WS stuff.
Quetzalcoatl.Orestes
Server: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2015-01-16 20:29:21
Yeah there were a lot of errors, already fixed them though, thanks anyway!
As for Mighty Strikes stuff, thanks for that, I'm probably just gonna have it for WS stuff.
If that is the case, then you'll need to use this function. Code
function get_custom_wsmode(spell, spellMap, default_wsmode)
if buffactive['Mighty Strikes'] then
return 'Mighty'
end
end
Then append it to your WS sets like this.
sets.precast.WS["Ukko's Fury"].Mighty
Just keep in mind, this only works if you use Motes.
Server: Ragnarok
Game: FFXI
Posts: 82
By Ragnarok.Worldslost 2015-01-17 20:28:09
I trying to get this to work am i missing something? I doesnt do the cure upgrade and i dont see it being called when i use debugmode.
Code function job_pretarget(spell)
if T{"Pollen","Wild Carrot","Magic Fruit","Plenilune Embrace","Restoral"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
if not party_index_lookup(spell.target.name) then
return
end
local target_count = 0
local total_hpp_deficit = 0
for i=1,party.count do
if party[i].hpp<75 and party[i].status_id ~= 2 and party[i].status_id ~= 3 then
target_count = target_count + 1
total_hpp_deficit = total_hpp_deficit + (100 - party[i].hpp)
end
end
if target_count > 1 then
cancel_spell()
if total_hpp_deficit / target_count > Curaga_benchmark then
windower.send_command(';input /ma "White Wind" '..spell.target.name..';')
else
windower.send_command(';input /ma "Healing Breeze" '..spell.target.name..';')
end
end
end
end
Cures = S{'Pollen','Wild Carrot','Magic Fruit','Plenilune Embrace','Restoral'}
Curagas = S{'Healing Breeze','White Wind',}
AutoAga = 1
Curaga_benchmark = 40
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.
|
|