|
Gearswap Support Thread
By Dsuza 2018-12-22 09:11:33
Hey guys, I hope you all have been well.
I have 2 issues going on right now
For my WAR, I want specific/different gear to equip for WS when Mighty Strikes is up.
And for my THF:
I want Frenzy Sallet to equip when I am engaged and asleep.
Thank you very much in advance for your time and help
WAR: Please look at line(s) 1-6 and 211-216
Code sets.MS_WS = {
ammo="Yetshila +1",
head={ name="Valorous Mask", augments={'Accuracy+29','Crit. hit damage +3%','DEX+15','Attack+13',}},
hands={ name="Valorous Mitts", augments={'Accuracy+20 Attack+20','Crit. hit damage +4%','VIT+2','Attack+13',}},
feet="Boii Calligae +1",
}
----------------------
-- Misc. Gearsets --
----------------------
sets.Reive = {
neck="Adoulin's Refuge +1"
}
sets.buff.Doom = {
ring2="Purity Ring"
}
sets.Reraise = {
head="Twilight helm",
body="Twilight mail"
}
sets.regen = {
head="Twilight helm",
body="Twilight mail",
neck="Sanctity Necklace",
ring1="Paguroidea Ring",
}
sets.PDT = {
ammo="Seeth. Bomblet +1",
head="Arke Zuchetto +1",
body="Arke Corazza +1",
hands="Souv. Handsch. +1",
legs="Arke Cosc. +1",
feet="Souveran Schuhs +1",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.defense.PDT = {
ammo="Seeth. Bomblet +1",
head="Arke Zuchetto +1",
body="Arke Corazza +1",
hands="Souv. Handsch. +1",
legs="Arke Cosc. +1",
feet="Souveran Schuhs +1",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
end
--------------------------
-- Custom Idle Gearset --
--------------------------
function customize_idle_set(idleSet)
--[[ if player.mpp < 50 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if player.mpp < 80 then
idleSet = set_combine(idleSet, sets.refresh)
end
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.regen)
end --]]
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
disable('head', 'body')
else
enable('head', 'body')
end --]]
if state.CapacityMode.value then
idleSet = set_combine(idleSet, sets.CapacityMantle)
end
if S{"Eastern Adoulin","Western Adoulin"}:contains(world.area) then
idleSet = set_combine(idleSet,{body="Councilor's Garb", head="Jumalik helm"})
end
return idleSet
end
------------------------------
-- Custom melee Gearset --
------------------------------
function customize_melee_set(meleeSet)
if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then
-- Equip Berserker's Torque When You Are Asleep
meleeSet = set_combine(meleeSet,{neck="Berserker's Torque"})
end
if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.defense.PDT)
add_to_chat(8, 'Low HP" Switching to PDT set')
end
--[[ if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.Reraise)
add_to_chat(8, 'Low HP" Switching to PDT set')
end--]]
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
if state.Buff['Souleater'] then
meleeSet = set_combine(meleeSet, sets.buff.Souleater)
end
--[[ if spell.type=='WeaponSkill' and state.Buff['Souleater'] then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end--]]
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
add_to_chat(8, '--ReRaise Set Engaged--')
else
enable('head', 'body')
end--]]
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
--[[ if buffactive['Arcane Circle'] then
meleeSet = set_combine(meleeSet, {body="Founder's Breastplate"})
end--]]
return meleeSet
end
----------------------------------------------
-- General hooks for setting combat state --
----------------------------------------------
------------------------------------------------------------------
-- 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_status_change(newStatus, oldStatus, eventArgs)
if newStatus == "Engaged" then
get_combat_weapon()
end
end
function job_update(cmdParams, eventArgs)
war_sj = player.sub_job == 'WAR' or false
get_combat_form()
get_combat_weapon()
update_melee_groups()
end
function get_combat_form()
-- if buffactive['Last Resort'] and buffactive.haste then
-- add_to_chat(8, '---Weapon Delay Capped---')
-- elseif (buffactive.haste and buffactive.hasso and buffactive.march == 2) then
-- add_to_chat(8, '---Weapon Delay is not Capped---')
-- end
------------------------------------------------------
-- Can add in more here this is just a placeholder --
------------------------------------------------------
end
function get_combat_weapon()
-- handle weapon sets
if player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif player.equipment.main == 'Montante +1' then
state.CombatWeapon:set('Montante')
elseif player.equipment.main == 'Raetic Algol +1' then
state.CombatWeapon:set('Raetic')
elseif player.equipment.main == 'Chango' then
state.CombatWeapon:set('Chango')
elseif player.equipment.main == 'Reikiko' then
state.CombatWeapon:set('Reikiko')
elseif player.equipment.main == 'Tanmogayi +1' then
state.CombatWeapon:set('Tanmogayi')
elseif player.equipment.main == 'Loxotic Mace +1' then
state.CombatWeapon:set('Loxotic')
else
--Neither Rag nor Montante equipped, use sets.engaged
state.CombatWeapon:reset()
end
end
function job_state_change(stateField, newValue, oldValue)
--nothing added in here
end
function update_melee_groups()
classes.CustomMeleeGroups:clear()
-- mythic AM
if player.equipment.main == 'Liberator' then
if buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
end
elseif buffactive['Aftermath'] then
classes.CustomMeleeGroups:append('AM')
end
if buffactive['Samurai Roll'] then
classes.CustomRangedGroups:append('SamRoll')
end
end
--------------------------------------------------
-- Creating a custom spellMap, --
-- since Mote capitalized absorbs incorrectly --
--------------------------------------------------
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Dark Magic' and absorbs:contains(spell.english) then
return 'Absorb'
end
end
----------------------
-- Precast section --
----------------------
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if buffactive['Mighty Strikes'] then
if sets.precast.WS[spell] then
equip(sets.MS_WS)
end
end
end
if spell.action_type=="Magic" and buffactive.Silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
if spell.type=='WeaponSkill' then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end
if spell.type == 'WeaponSkill' then
if state.Buff['Souleater'] then
equip(sets.buff.Souleater)
end
end
if spell.type == 'WeaponSkill' then
if spell.target.distance > 8 then
cancel_spell()
add_to_chat(8, 'Target to far away. Move closer')
return
end
end
end
----------------------
-- Midcast Section --
----------------------
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-no-Obi"})
end
end
--[[ if S{"Tachi: Jinpu","Tachi: Fudo","Catastrophe","Scourge","Cross Reaper"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({head="Gavialis Helm"})
end--]]
if S{"Drain","Drain II","Drain III", "Aspir", "Aspir II", "Aspir III"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({waist="Hachirin-no-obi"})
end
--[[ equip(sets.MAXDrain)
add_to_chat(100,'WARNING: Misanthropy is now equiped ** Manually Swap weapons ***')
end--]]
if buffactive['Dark Seal'] and S{"Drain III"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-STR"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-VIT"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
end
------------------------------------------------------------------
-- Called when a player gains or loses a buff. --
-- buff == buff gained or lost --
-- gain == true if the buff was gained, false if it was lost. --
------------------------------------------------------------------
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
end
if buff:lower()=='terror' or buff:lower()=='petrification' or buff:lower()=='sleep' or buff:lower()=='stun' then
if gain then
equip(sets.defense.PDT)
add_to_chat(8, 'PDT set is equiped')
elseif not gain then
handle_equipping_gear(player.status)
end
end
if buff:lower()=='sleep' then
if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque / frenzy When You Are Asleep
equip({neck="Berserker's Torque"})
elseif not gain then -- Take Berserker's off
handle_equipping_gear(player.status)
end
end
if buffactive['Reive Mark'] then
equip(sets.Reive)
disable('neck')
else
enable('neck')
end
if buffactive['Souleater'] then
equip({head="Ig. Burgonet +3"})
disable('Head')
add_to_chat(100,'WARNING: Souleater set equiped.')
else
enable('Head')
end
if buffactive['Blood Weapon'] and buffactive['Souleater'] and player.hp > 8000 then
equip({main="Dacnomania", head="Ig. Burgonet +3"})
disable('Head')
--add_to_chat(100,'WARNING: SOUL EATER HEAD ON AND &&&& Dacnomania.')
else
enable('Head')
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
--send_command('@input /p Doomed please cursna.')
send_command('@input /item "Holy Water" <me>')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
--[[ Checks if Last resort is active if so cancels Hasso, will put
hasso back on after Last Resort falls off. ]]
if buff == "Last Resort" and player.status == 'Engaged' then
if gain then
send_command('@wait 1.0;cancel hasso')
elseif not midaction() then
send_command('@wait 1.0;input /ja "Hasso" <me>')
end
end
--[[ Drain II HP Boost. Set SE to stay on. ]]
if buff == "Max HP Boost" and state.SouleaterMode.value then
if gain or buffactive['Max HP Boost'] then
state.SouleaterMode:set(false)
else
state.SouleaterMode:set(true)
end
end
--[[ Make sure SE stays on for BW ]]
if buff == 'Blood Weapon' and state.SouleaterMode.value then
if gain or buffactive['Blood Weapon'] then
state.SouleaterMode:set(false)
else
state.SouleaterMode:set(true)
end
end
--[[ AM custom groups ]]
--[[ if buff:startswith('Aftermath') then
if player.equipment.main == 'Liberator' then
classes.CustomMeleeGroups:clear()
if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
add_to_chat(8, '-------------AM3 UP-------------')
end
if not midaction() then
handle_equipping_gear(player.status)
end
else
classes.CustomMeleeGroups:clear()
if player.equipment.main == "Masamune" then
if buff == "Aftermath" and gain or buffactive.Aftermath then
classes.CustomMeleeGroups:append('AM')
add_to_chat(8, '--Masamune haste is active. Switching to AM set--')
end
end
if player.equipment.main == 'Amanomurakumo' then
if buff == 'Aftermath' and gain then
add_to_chat(8, '---Amanomurakumo AM active providing Crit---')
end
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
end--]]
end
----------------------------------
-- Sub job section for Ninja --
----------------------------------
ninjaTools = {
Utsusemi = S{"Shihei",},--"Shikanofuda"
Hojo = S{"Kaginawa",},--"Chonofuda"
Migawari = S{"Mokujin",},
Kakka = S{"Ryuno",},
Tonko = S{"Shinobi-tabi",},
Kurayami = S{"Sairui-Ran",},
Raiton = S{"Hiraishin",},
Hyoton = S{"Tsurara",},
Monomi = S{"Sanjaku-Tenugui",},
}
function job_precast(spell, action, spellMap, eventArgs)
if spell.type=="Ninjutsu" then check_tools(spell) end
end
function check_tools(spell)
for prefix,tools in pairs(ninjaTools) do
if spell.english:startswith(prefix) then
for tool in tools:it() do
if not player.inventory[tool] then
add_to_chat(100,'WARNING: You are out of '..tool..'.')
elseif player.inventory[tool].count < 10 then
add_to_chat(100,'WARNING: You are low on '..tool..'. '..player.inventory[tool].count..' remaining.')
end
end
end
end
end
--------------------------------------------------------------
-- Rune Fencer Sub Job section for displaying rune info --
--------------------------------------------------------------
function define_rune_info()
rune_info = {
["Ignis"] = {damage="Fire", resistance="Ice"},
["Gelus"] = {damage="Ice", resistance="Wind"},
["Flabra"] = {damage="Wind", resistance="Earth"},
["Tellus"] = {damage="Earth", resistance="Lightning"},
["Sulpor"] = {damage="Lightning", resistance="Water"},
["Unda"] = {damage="Water", resistance="Fire"},
["Lux"] = {damage="Light", resistance="Darkness"},
["Tenebrae"]= {damage="Darkness", resistance="Light"},
}
end
function display_rune_info(spell)
runeinfo = rune_info[spell.english]
if runeinfo then
add_to_chat(122, '*'..spell.english..' is '..runeinfo.damage..'-based dmg. and '..runeinfo.resistance..' resistance*')
end
end
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'rune' then
send_command('@input /ja '..state.Runes.value..' <me>')
end
end
------------------------------------------------------------------
-- Selecting and Setting the default Macro book and Lock style --
------------------------------------------------------------------
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DRK' then
set_macro_page(1, 2)
elseif player.sub_job == 'SAM' then
set_macro_page(1, 2)
elseif player.sub_job == 'RUN' --[[and player.equipment.main == '['Dojikiri Yasutsuna']'--]] then
set_macro_page(1, 2)
elseif player.sub_job == 'THF' then
set_macro_page(1, 2)
else
set_macro_page(1, 2)
end
end
function set_lockstyle()
send_command('wait 6;input /lockstyleset 060')
end
By Dsuza 2018-12-22 09:14:25
And for THF:
Code function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
end
if buff:lower()=='terror' or buff:lower()=='petrification' or buff:lower()=='sleep' or buff:lower()=='stun' then
if gain then
equip(sets.idle.DT)
add_to_chat(8, 'DT set is equiped')
elseif not gain then
handle_equipping_gear(player.status)
end
end
if buff:lower()=='sleep' then
if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque / frenzy When You Are Asleep
equip({head="Frenzy Sallet"})
elseif not gain then -- Take Berserker's off
handle_equipping_gear(player.status)
end
end
end
By Zyla 2018-12-27 02:49:31
Hello, I'm looking to see if someone could help me fix a few problems with my RUN lua.
1st problem: It seems that my idle set absolutely refuses to equip my Runist Coat +2. I have 2 different idle sets, a 'Normal' set and a 'DT' set. When I use either Valiance or Vallation, it will equip the body piece with no problems, but will not equip it when I switch my idle mode to 'Normal'.
2nd problem: none of my gear switches when I change either my 'Defense Mode' (PDT, Parry, HP) or 'Magical Defense Mode' (MDT, Status). The modes seem to cycle fine, but there are no gear changes when cycling, either while engaged or idle.
3rd problem: my CP cape will not equip when I switch it over to 'CP Mode' with the @+c keybind. I get the message that it has switched to 'CP Mode' but it does not equip the cape nor lock the back slot as far as I can tell.
Everything else seems to work fine, and I'd prefer to keep this lua due to the many keybinds I use. Any help is appreciated.
Here is a link to the pastebin file:
https://pastebin.com/i1M222jE
By aisukage 2018-12-27 05:50:05
Hello, I'm looking to see if someone could help me fix a few problems with my RUN lua.
1st problem: It seems that my idle set absolutely refuses to equip my Runist Coat +2. I have 2 different idle sets, a 'Normal' set and a 'DT' set. When I use either Valiance or Vallation, it will equip the body piece with no problems, but will not equip it when I switch my idle mode to 'Normal'.
https://pastebin.com/i1M222jE
You have +3 in the Valiance set but only +2 in the idle set.
So i take it since Valiance works but not your idle then you possess the +3 and will need to change the +2 in idle to +3.
By aisukage 2018-12-27 05:55:27
3rd problem: my CP cape will not equip when I switch it over to 'CP Mode' with the @+c keybind. I get the message that it has switched to 'CP Mode' but it does not equip the cape nor lock the back slot as far as I can tell.
the function to do all this for your CP cape is dashed out
Code --if state.CP.current == 'on' then
-- equip(sets.CP)
-- disable('back')
--else
-- enable('back')
--end like so
remove the "--" for each line and try again also make sure it has the right cape you want to use
Code sets.CP = {back="Aptitude Mantle +1"}
Atm it has Appitude Mantle +1 as your CP cape. Not sure if that is the correct cape or not for you.
By Zyla 2018-12-27 07:03:48
Hello, I'm looking to see if someone could help me fix a few problems with my RUN lua.
1st problem: It seems that my idle set absolutely refuses to equip my Runist Coat +2. I have 2 different idle sets, a 'Normal' set and a 'DT' set. When I use either Valiance or Vallation, it will equip the body piece with no problems, but will not equip it when I switch my idle mode to 'Normal'.
https://pastebin.com/i1M222jE
You have +3 in the Valiance set but only +2 in the idle set.
So i take it since Valiance works but not your idle then you possess the +3 and will need to change the +2 in idle to +3. Hmm, I don't actually have the +3 version of the coat, I have the +2 version. I'll have to double check that again and see if it's actually equipping the +2 coat when I use those abilities, cause if it is there's definitely something screwy going on. Either way it still doesn't equip it in the idle set. I'll have to double check it all later. Thnx though and I'll post again once I've confirmed things.
By Zyla 2018-12-27 08:04:35
@aisukage ok so I checked it out, and it's equipping my Runeist's Coat +2 even though it says +3 in the lua when I use either Valiance or Vallation, so that's super weird.
Beyond that, neither of my idle sets seems to switch gear when I hit the keybind to switch them. *update on this specific issue, whenever I'm outside of town it seems that I can switch my idle sets, however the Runeist's Coat +2 still won't equip. So basically when I'm in town I can't switch my idle set, but I don't have a town idle set so this is another issue that seems rather odd.
Also I tried the fix you suggested for the CP mode and it hasn't changed. The text showing that it has switched CP mode on shows up, but it doesn't actually equip the cape.
Other than that I'm still having the same issue with my defensive sets not working either.
Shiva.Hiep
Server: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-12-27 09:11:40
Are you checking that you're editing the correct lua? Sometimes when people send luas back and forth, the person asking for help ends up editing/saving the lua that's in the downloads folder. Make sure to check in the top left corner of Notepad++ (assuming you're using this) to see if you're editing the correct lua, Windower4\addons\Gearswap\data\Zyla\RUN
[+]
By Zyla 2018-12-27 10:08:32
Hmm, I'll check it.
update* ok so apparently I'm a retard that had the file I was editing in the wrong spot... seems every single issue is now fixed, sry for wasting your time ><
But ty for all the help lol
Asura.Lewyo
Server: Asura
Game: FFXI
Posts: 86
By Asura.Lewyo 2018-12-27 10:13:00
Recently i stared playing Dnc but i keep running into the same problem and it has to do with Climactic Flourish.
The issue i have is that when i use Climactic Flourish and follow it up with a WS the buffactive part of gearswap cannot read the buff is active and removes the head before the 1st WS is used.
I do not want to change from the lua that i currently use so i'm looking for some code that can solve this, ATM i have been using a switch to unlock the head after the buff Climactic Flourish goes but i would like gearswap to handle this with out the need for a switch to turn it off.
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10088
By Asura.Sechs 2018-12-27 14:40:32
I'd be curious to see what solution people use for this.
I had this issue with SCH and Perpetuance.
I think it's likely it applies to any other similar situation.
It takes some time for the buffactive to get to the client and be cycled/noticed by Gearswap. Meaning if you rely on Buffactive and have macros that use JAs in an incredibly rapid (fastest) sequence, chances are the second line of your macros will come before Gearswap can detect the buffactive from the first action.
The way I "solved" this on SCH is through the use of custom variables.
Whenever I use a certain JA which I know will grant me a certain buff, I initialize a custom variable to "True".
Whenever that JA wears off I initialize that variable to "False".
That way I can check "customvar == true" instead of checking for "buffactive[buffname]".
Another way to do that is to use //gs disable. Can bind it to a manual trigger or automatize it, but it's still the same logic.
Curious to hear how other people solved this "problem".
By Zyla 2018-12-27 15:31:17
Ok, so I was wrong again, it seems my defense modes aren't taking priority when I select them, whether I'm engaged or not. I was under the impression that when you select those it forces that gear until you hit the keybind for 'defense mode: none', at least that's how it seems to work in my other luas. any ideas?
*nevermind, again I'm an idiot, I figured it out lol
By Blackhalo714 2019-01-02 20:01:37
Hello, looking for some help on how to get this to work. Keeps giving me a nil value element day error.
sets.WSDayBonus = { head="Gavialis Helm" }
if is_sc_element_today(spell) then
if state.OffenseMode.current == 'Normal' and wsList:contains(spell.english) then
--do nothing
else
equip(sets.WSDayBonus)
end
end
end
end
(Taken from https://github.com/AlanWarren/gearswap/blob/master/DRG.lua)
Server: Asura
Game: FFXI
Posts: 496
By Asura.Elizabet 2019-01-02 20:28:35
You are asking what's the value of "state.OffenseMode.current" but it's never defined in the LUA, therefore it'll always be 'nil'
make state.OffenseMode.current to state.OffenseMode.value and see how it goes.
Server: Asura
Game: FFXI
Posts: 415
By Asura.Cambion 2019-01-03 03:33:01
Recently i stared playing Dnc but i keep running into the same problem and it has to do with Climactic Flourish.
The issue i have is that when i use Climactic Flourish and follow it up with a WS the buffactive part of gearswap cannot read the buff is active and removes the head before the 1st WS is used.
I do not want to change from the lua that i currently use so i'm looking for some code that can solve this, ATM i have been using a switch to unlock the head after the buff Climactic Flourish goes but i would like gearswap to handle this with out the need for a switch to turn it off.
Just curious, as I don't know what lua you're using.
Do you have these lines in yours:
Code 1:
function job_setup()
state.Buff['Climactic Flourish'] = buffactive['Climactic Flourish'] or false
end
2:
sets.buff['Climactic Flourish'] = {head="Maculele Tiara +1"}
3:
function job_precast(spell, action, spellMap, eventArgs)
-- Used to optimize Rudra's Storm when Climactic Flourish is active.
if spell.type == 'WeaponSkill' then
if spell.english == "Rudra's Storm" and buffactive['Climactic Flourish'] then
equip({head="Maculele Tiara +1", left_ear="Ishvara Earring"})
end
end
-- Forces Maculele Tiara +1 to override your WS Head slot if Climactic Flourish is active. Corresponds with sets.buff['Climactic Flourish'].
if spell.type == "WeaponSkill" then
if state.Buff['Climactic Flourish'] then
equip(sets.buff['Climactic Flourish'])
end
end
end
My lue is arguably the least fancy thing possible, but these are the lines I have in mine, and don't believe I've run into any issues thus far, but I might not be looking as hard as I should either, so no promises.
By Blackhalo714 2019-01-03 04:02:22
Still pulling up a nil value attempt to call global 'is_sc_element_today'
This one has is set up different but not sure how to define it this way. https://pastebin.com/THLpaa7D
if spell.english == 'Stardiver' and Stardiver_ind ~= 1 and (check_ws_day[world.day]:contains(spell.skillchain_a) -- Remove the and _ind ~=1 (not equal) for Gavialis if you don't have Ptero +2/3.
or check_ws_day[world.day]:contains(spell.skillchain_b)
or check_ws_day[world.day]:contains(spell.skillchain_c)) then
ChangeGear(sets.WSDayBonus)
end
--Tested, Aeonic AM Doesn't work with Gavialis, but I will keep the extra rule on ice for now below:
--or (check_ws_day[world.day]:contains("Darkness") and player.equipment.main == 'Trishula' and (buffactive['Aftermath: Lv.3'] or buffactive['Aftermath: Lv.2'] or buffactive['Aftermath: Lv.1']))) then
Server: Asura
Game: FFXI
Posts: 496
By Asura.Elizabet 2019-01-03 04:20:17
Still pulling up a nil value attempt to call global 'is_sc_element_today'
Ok I looked into mote and your files and looks like that function is not defined anywhere.
From the repository you linked your lua, I found the function.
Try copy pasting the below function into your lua under the file_unload() funtion, before the init_gear_sets() function.
Code
function is_sc_element_today(spell)
if spell.type ~= 'WeaponSkill' then
return
end
local weaponskill_elements = S{}:
union(skillchain_elements[spell.skillchain_a]):
union(skillchain_elements[spell.skillchain_b]):
union(skillchain_elements[spell.skillchain_c])
if weaponskill_elements:contains(world.day_element) then
return true
else
return false
end
end
By Blackhalo714 2019-01-03 04:49:11
Will try thank you.
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10088
By Asura.Sechs 2019-01-03 05:05:19
My lue is arguably the least fancy thing possible, but these are the lines I have in mine, and don't believe I've run into any issues thus far, but I might not be looking as hard as I should either, so no promises. The problem is in the "buffactive" function.
Or actually in how the game communication works.
It takes a bit of time for the client to be notified that a certain buff is up.
This means that you could use a JA and buffactive['janame'] could return "false" for like 1-2 seconds after you used that specific JA.
In such a situation a Lua like yours and Lewyo's won't equip the Maculele Tiara even if Climactic flourish is actually up.
It happens often if you have for instance an in-game macro like this
/ja "Climactic Flourish" <me>
/wait 1
/ws "Rudra's Storm" <t>.
This is very very fast and often a lua code relying on buffactive['Climactic Floruish'] will return "false" because of client<>server lag.
It depends on several factors, most of which are beyond your control and there's not much you can do about it, other than avoid using Buffactive and relying on other (more convoluted) methods to track wether or not Climactic is up.
As I mentioned before I think there are mostly three ways
1) Avoid using in-game macros like that above lol
2) Use a custom boolean variable. Initialize it to "true" the moment you use Climactic Flourish. This way you won't check for the "buff" that Climactic Flourish gives, you will check wether or not the JA got used and assume that, if it did, the related buff has to be up. Multiple concurrent ways to reset it back to False
3) Use the disable function, force equip maculele tiara in the head slot and concurrently disable the head slot. Multiple ways to re-enable the slot as well (status_change, buff_change, aftercast etc)
Each method has different pros and cons. The most reliable is the third I think, but it can get pretty annoying when strange sequence of things happen. If you wanna go this route I think you realistically need to bind a manual lock/unlock command somewhere on your keyboard to solve such situations.
Method 2 is not 100%, but more reliable than just buffactive. I currently use that one in most of my jobs that need it, and I never really had any big issues.
Method 1 is also very effective lol, but it's tipically a small dps loss. Depends on the job and/or the JA we're talking of.
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10088
By Asura.Sechs 2019-01-03 05:09:35
Speaking of update cycles and JAs I noticed that if you use a second JA that forces an update on the client or something like that.
We said that JA1 > WS in the same macro can often create the situation where the "buffactive['ja1buff']" command will return false, even if ja1buff from JA1 is already up. Problem with client<>server update, blahblah.
I noticed that if you change your sequence to JA1 > action > WS, the use of "action" and the consequent exchange of information through packets, will "force" the update and make so that by the time you get to the WS part of that sequence, "buffactive['ja1buff']" will always return the correct value of "true".
To my experience it never failed not even a single time. Maybe just a coincidence but we're talking about a pretty large sample here so I think it's at least moderately unlikely for it to be just a coincidence.
Server: Asura
Game: FFXI
Posts: 415
By Asura.Cambion 2019-01-03 12:48:10
In such a situation a Lua like yours and Lewyo's won't equip the Maculele Tiara even if Climactic flourish is actually up.
It happens often if you have for instance an in-game macro like this
/ja "Climactic Flourish" <me>
/wait 1
/ws "Rudra's Storm" <t>.
Interesting, Luckily I don't use any macro's like that, so I haven't had any issues thus far that I'm aware of.
By Pechvarry 2019-01-09 16:06:57
I noticed export.lua mentions overwrite_existing and has some filename stuff that I couldn't decipher -- Is there a way to name the file you'll export to, or overwrite an existing file you've already given a name?
Carbuncle.Kigensuro
Server: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2019-01-09 23:09:21
it should be something like
//gs export filename yourfilename
or
//gs export overwrite
gs exports current command set Code inventory/inv/i exports your current inventory
all exports all your items
xml exports as xml
sets/set/s exports your current sets table
mainjob names export file with current main job
mainsubjob names export file with current main and sub job
overwrite overwrites existing named export file if needed
filename/file/f <filename> names new export file <filename>
[+]
Server: Asura
Game: FFXI
Posts: 415
By Asura.Cambion 2019-01-10 04:09:57
Can someone help me figure out the correct code for Dancer's new split recasts?
The first part is probably simple.
Here is Mote's base code for Waltz: Code function refine_waltz(spell, action, spellMap, eventArgs)
if spell.type ~= 'Waltz' then
return
end
-- Don't modify anything for Healing Waltz or Divine Waltzes
if spell.english == "Healing Waltz" or spell.english == "Divine Waltz" or spell.english == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local waltzID
local missingHP
-- If curing ourself, get our exact missing HP
if spell.target.type == "SELF" then
missingHP = player.max_hp - player.hp
-- If curing someone in our alliance, we can estimate their missing HP
elseif spell.target.isallymember then
local target = find_player_in_alliance(spell.target.name)
local est_max_hp = target.hp / (target.hpp/100)
missingHP = math.floor(est_max_hp - target.hp)
end
-- If we have an estimated missing HP value, we can adjust the preferred tier used.
if missingHP ~= nil then
if player.main_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
-- Not worth curing yourself for so little.
-- Don't block when curing others to allow for waking them up.
add_to_chat(122,'Full HP!')
eventArgs.cancel = true
return
elseif missingHP < 300 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 700 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
elseif player.sub_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
-- Not worth curing yourself for so little.
-- Don't block when curing others to allow for waking them up.
add_to_chat(122,'Full HP!')
eventArgs.cancel = true
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
else
-- Not dnc main or sub; bail out
return
end
end
local tpCost = waltz_tp_cost[newWaltz]
local downgrade
-- Downgrade the spell to what we can afford
if player.tp < tpCost and not buffactive.trance then
--[[ Costs:
Curing Waltz: 200 TP
Curing Waltz II: 350 TP
Curing Waltz III: 500 TP
Curing Waltz IV: 650 TP
Curing Waltz V: 800 TP
Divine Waltz: 400 TP
Divine Waltz II: 800 TP
--]]
if player.tp < 200 then
add_to_chat(122, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
eventArgs.cancel = true
return
elseif player.tp < 350 then
newWaltz = 'Curing Waltz'
elseif player.tp < 500 then
newWaltz = 'Curing Waltz II'
elseif player.tp < 650 then
newWaltz = 'Curing Waltz III'
elseif player.tp < 800 then
newWaltz = 'Curing Waltz IV'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(122, downgrade)
end
eventArgs.cancel = true
return
end
if missingHP and missingHP > 0 then
add_to_chat(122,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
Somewhere in here, I want to add a simple rule.
If I use Divine Waltz II
and the cooldown is > 0
Then use Divine Waltz
I have tried numerous variations to the code, but have failed miserably. I know it's going to look something like the following:
Code if spell_recasts[spell.recast_id] > 0 then
if spell.english == 'Divine Waltz' then
add_to_chat(122,'All Divine Waltz on cooldown, cancelling Waltz.')
eventArgs.cancel = true
return
elseif spell.english == 'Divine Waltz II' then
newDivine = 'Divine Waltz'
end
end
if newDivine ~= spell.english then
send_command('@input /ja "'..newDivine..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
But as stated, I just can't get it to work. I've tried all of the logical ways I can think of to adjust the above, as well as tweaking the potentially conflicting rules of Mote's script just above these lines, but nothing has worked.
The less important, but still helpful code:
In Mote's original code above, the missing HP waltz refine works great, however now that we have separate recast timers, it can be refined even further. In my testing this evening, I am running into scenario's where due to my missing HP, Gearswap wants to use Waltz 3 back to back. Obviously the cooldown won't let this happen, but the code "should" now be updated, for an automatic downgrade of 'if Waltz 3 is on cooldown, use Waltz 2', if 3 and 2 are on cooldown use 1. In theory this should start at 5 and go down for all 5 tiers of Waltz, but in practice it'll never actually happen, so the 3 downgraded to a 2 is all that really matters.
If someone is smart enough to essentially rewrite this entire section to properly update for January's Dancer adjustments, I would be extremely appreciative.
Pretty Please!
By Karuma 2019-01-10 05:58:03
So I was poking at waltzes right after the patch. The issue is that all the waltzes are returning the same number with spell.recast_id.
Asura.Conor
Server: Asura
Game: FFXI
Posts: 12
By Asura.Conor 2019-01-10 09:00:18
How do I go about using more defined gear sets for specific spells?
On a Rdm lua, it already contains enhancing magic and stone skin, however I want to add in a phalanx set which differs from normal enhancing set. Also want to add in elemental sets specifically for tier 5 nukes instead of a broad elemental set. Hope this made sense and thanks!
P.S. I've tried this on my own and the result seems to be my gearswap freezes for 60 seconds or so.
I tried adding sets.midcast['Phalanx'] = {}
Also tried using combine sets. Lua still freezes frequently.
Server: Asura
Game: FFXI
Posts: 33
By Asura.Karumac 2019-01-10 13:08:53
Code if spell.name:contains('spell') then
equip(set.spell)
end
Like this.
By Pechvarry 2019-01-10 15:38:00
Carbuncle.Kigensuro said: »it should be something like
//gs export filename yourfilename
or
//gs export overwrite
gs exports current command set Code inventory/inv/i exports your current inventory
all exports all your items
xml exports as xml
sets/set/s exports your current sets table
mainjob names export file with current main job
mainsubjob names export file with current main and sub job
overwrite overwrites existing named export file if needed
filename/file/f <filename> names new export file <filename>
I don't know where you found all of that (I checked the Variables spreadsheet and didn't see it in there), but bless you.
Bless you.
Carbuncle.Kigensuro
Server: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2019-01-11 05:38:16
Carbuncle.Kigensuro said: »it should be something like
//gs export filename yourfilename
or
//gs export overwrite
gs exports current command set Code inventory/inv/i exports your current inventory
all exports all your items
xml exports as xml
sets/set/s exports your current sets table
mainjob names export file with current main job
mainsubjob names export file with current main and sub job
overwrite overwrites existing named export file if needed
filename/file/f <filename> names new export file <filename>
I don't know where you found all of that (I checked the Variables spreadsheet and didn't see it in there), but bless you.
Bless you. i looked at the export code
By Zyla 2019-01-11 19:21:14
Hello again, it's ffxi's resident GS idiot lol.
Was having a problem with my cor lua where the gun cycling keybind doesn't seem to work. I can't particularly see anything wrong with the code and the lua loads fine.
https://pastebin.com/tNgJkDWx
The rules for the gun cycling start at line 839 and end at line 845 as far as I can tell. And there doesn't seem to be anything wrong with the keybind itself at the top of the lua. Any ideas as to what the issue is or how to fix it?
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.
|
|