|
Gearswap Support Thread
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2015-12-31 02:07:40
Bismarck.Speedyjim said: »Seemed working at first. Once I used UL>Diffusion>Mighty Guard, it kept recognizing Diffusion still active (console red text).
Same occurs when I manually clicked MG off.
Waiting for Diffusion to cooldown completely and casted again, same.
Next, I used UL>Diffusion>Carcharian Verve. This time, it did NOT detect Diffusion active. Weird.
I will further troubleshoot tomorrow during Salvage, which is where I notice it the most.
Okay. I can't understand why. No matter how fast I use JAs with spells, they call buff_change correctly, and Mote's functions really don't do much else than just pick up the same variables, so unless there's something specific to these JA/spells (my BLU has nothing, so I'm testing on mage) or something in his files that I'm overlooking, I'm at a loss. Sorry.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2015-12-31 02:26:53
Ragnarok.Flippant said: »Bismarck.Speedyjim said: »Seemed working at first. Once I used UL>Diffusion>Mighty Guard, it kept recognizing Diffusion still active (console red text).
Same occurs when I manually clicked MG off.
Waiting for Diffusion to cooldown completely and casted again, same.
Next, I used UL>Diffusion>Carcharian Verve. This time, it did NOT detect Diffusion active. Weird.
I will further troubleshoot tomorrow during Salvage, which is where I notice it the most.
Okay. I can't understand why. No matter how fast I use JAs with spells, they call buff_change correctly, and Mote's functions really don't do much else than just pick up the same variables, so unless there's something specific to these JA/spells (my BLU has nothing, so I'm testing on mage) or something in his files that I'm overlooking, I'm at a loss. Sorry. Thanks for checking anyways. I can't always replicate it, don't understand why either. If I notice it's equipping stuff based on "active" buffs, I reload the lua and that seems to clear it. Annoying, but can live with it for now.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2015-12-31 04:44:32
Still happening. :3
SMFH whyyyyyyy
Edit: Could this be the cause?
Code function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
サーバ: Asura
Game: FFXI
Posts: 25
By Asura.Spearus 2015-12-31 11:40:12
Hello,
been having a runtime error, the msg is as follows:
"GearSwap: Lua runtime error: GearSwap/refresh.lua:234: attempt to index field '?' (a nil value)"
im not very GS savvy so any help is appreciated, Thank you in advance.
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2015-12-31 17:22:03
Bismarck.Speedyjim said: »Still happening. :3
SMFH whyyyyyyy
Edit: Could this be the cause?
Code function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
What this code is doing is maintaining the table that is used to track the buffs that you want to track. "gain" is a boolean: true when you gained it, false when you lose it. Somehow, it seems like it's not always getting called properly when you lose the buff, though. Getting rid of it will just remove the functionality altogether (equipping that type of gear during BLU spells while certain buffs are -supposedly- on).
Hello,
been having a runtime error, the msg is as follows:
"GearSwap: Lua runtime error: GearSwap/refresh.lua:234: attempt to index field '?' (a nil value)"
im not very GS savvy so any help is appreciated, Thank you in advance.
The error is within GearSwap's files itself, which will occasionally (but rarely) run into a runtime error. If it's a common issue for you, then you'll have to provide as much detail as possible to help us replicate the issue for ourselves. i.e. What are you doing when this happens?
By likard 2016-01-01 11:44:53
Hello all,
I am trying to use gearswap for blue mage and it is proving to be very frustrating. I used the sample lua from https://github.com/Kinematics/GearSwap-Jobs/blob/master/BLU.lua
and modified my gear into it and simplified some of the spellsets. Problem is, I have 2 issues not working.
Fastcast for blue spells does not equip any fast cast gear...just the midcast gear. I have the same issue with geo when I try to have a different set of fastcast gear for geo spells. What causes this to not work and how do I fix it?
Issue 2: diffusion state doesn't ever equip relic feet when diffusion is activated. I am only able to get them to work by putting the relic feet into the midcast for buffs. Reading back in the forum, Speedyjim, do you use battlemod? Im wondering if that somehow is affecting buff recognition.
Here is my lua.
https://github.com/williamfoley323/Luas/blob/master/bluemage
Any help would be appreciated.
By Dunigs 2016-01-01 11:51:27
Fastcast for blue spells does not equip any fast cast gear...just the midcast gear. I have the same issue with geo when I try to have a different set of fastcast gear for geo spells. What causes this to not work and how do I fix it?
Can you confirm this using //gs showswaps? Often times people new to GearSwap do not understand that you can not physically see precast equipment changes in the equipment window, unless there is no matching piece for that slot in the midcast (i.e. if you have Swith Cape in precast and no cape specified in midcast, you should see Swith Cape change happen). Generally they are happening, and //gs showswaps will print everything out to your chat window so you can confirm.
Unfortunately just going to leave the diffusion issue alone since it seems to be something more serious and I'm not too well versed in Mote's libraries. I will say battlemod should have nothing to do with it because it shouldn't be doing any kind of chat log parsing.
By likard 2016-01-01 12:21:28
Ah, the fastcast was equipping. I was able to see fastcast gear for other non blue spells because, as you said, I didn't have a midcat for them. Thank you for clarifying that.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-01-01 23:36:06
Issue 2: diffusion state doesn't ever equip relic feet when diffusion is activated. I am only able to get them to work by putting the relic feet into the midcast for buffs. Reading back in the forum, Speedyjim, do you use battlemod? Im wondering if that somehow is affecting buff recognition.
Here is my lua.
https://github.com/williamfoley323/Luas/blob/master/bluemage
Any help would be appreciated. I do use battlemod, though my problem isn't Relic feet not equipping with Diffusion, it's them equipping when gearswap believes Diffusion is active when it isn't.
Which spell are you trying to use Diffusion with, btw?
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-01-03 08:47:07
Is there any way for me to use Japanese through the Lua API? I know nothing about encoding, but basically...sending a string to the game does not work at all (translates to nonsense once it hits the game).
EDIT: Nevermind, found it~
Valefor.Omnys
サーバ: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-01-03 19:21:07
Is there no way to use /raw to bypass gearswap?
Trying to deal with this clunky thing SE implemented with geo-spells where you can cast bubbles off-target
Was thinking something like--
Code if spell.skill == "Geomancy" and string.find(spell.name,"Geo-") then
equip(sets.magics.fc.Geo)
cancel_spell()
send_command("input /raw '"..spell.name.."' <st>")
return
end
Typing /raw /ma cure Omnys in-game bypasses gearswap but send_command("input /raw /ma cure omnys") (just a test I was running) does not work.
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-01-03 19:41:38
Not sure about the raw stuff, but, why exactly do you want to cancel it (I've never played GEO, so not sure what the problem is)? I'm not understanding how you want it to work, because just from this clip it looks like you're just going to be tossing yourself in a loop. Every time you cast a GEO spell, you want it equip FC gear, cancel the spell, then reissue it with st? Why wouldn't you just allow it to equip your FC gear when you actually start casting the spell?
Valefor.Omnys
サーバ: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-01-03 20:06:17
You can cast Geo-spells offset of the current target, but Gearswap hasn't quite implemented that so if you try with Gearswap running, it just casts on the target.
It has its uses, and would be nice to use without unloading/reloading gearswap each time I want to offset a bubble.
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2016-01-03 20:18:46
You can cast Geo-spells offset of the current target, but Gearswap hasn't quite implemented that so if you try with Gearswap running, it just casts on the target.
It has its uses, and would be nice to use without unloading/reloading gearswap each time I want to offset a bubble.
The Raw command means nothing to gearswap, so it won't work on an Input level via Gearswap coding, it's something that is recognized by shortcuts and is not something Gearswap will recognise at this time.
Valefor.Omnys
サーバ: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-01-03 20:21:38
I was afraid of that. Is there anyway to cast a spell from menus without Gearswap intervening?
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2016-01-03 20:24:49
I was afraid of that. Is there anyway to cast a spell from menus without Gearswap intervening?
I can work on something but I don't have an immediate answer it is an unusual problem which I never encountered before, I would just use names of targets using shortcuts and it always fired where I needed.
Code if spell.target.raw:contains('<st') then
target='<lastst>'
end
I'm thinking something like this would be the basis of a work around, but I've not messed with raw:contains a great deal.
サーバ: Shiva
Game: FFXI
Posts: 127
By Shiva.Eboneezer 2016-01-04 09:07:43
i thought i read something earlier on it, but I can't find it now that i need it of course. I exported my equipment to a lua file which had:
legs = { name="Merlinic Shalwar", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','CHR+2','Mag.Acc.+12','"Mag.Atk.Bns."+15',}}
so in my blm lua, I tried to define gear.nuke_legs = { name="Merlinic Shalwar", augments={'Mag. Acc.+25 "mag.Atk.Bns."+25','CHR+2','Mag.Acc.+12','"Mag.Atk.Bns."+15',}}
in my gearset, i have legs=gear.nuke_legs but it won't load these legs. On my gear, it says it's Mag ACC + 37 and MAB +40. So i tried to delete the last 2 augments and just load the 37 and 40 under their respective traits...but it won't load that either.
What can I do to load this specific piece of gear? I have another Merlinic Shalwar that I use for magic bursting, so just naming the piece of gear won't work without distinguishing the augments. I hope all this makes sense? I'm definitely new to all of this
By Dunigs 2016-01-04 09:27:26
Are you getting an error when loading your file or is it just not working and file appears to be running fine otherwise? The syntax honestly looks fine to me, and I do the same thing for all my merlinic pieces. You may need to define a blank gear table before adding on the nuke_legs layer, which should throw a compile error is why I ask.
Additionally, I'd say leave them as export has. I think there are two slots for acc/att augments and the game visually condenses them to a single image for us (except for pet augments). While I haven't tried condensing them to a single augment in my gearswap, I'd imagine it would cause problems and it definitely works fine for me when separated.
[+]
サーバ: Shiva
Game: FFXI
Posts: 127
By Shiva.Eboneezer 2016-01-04 09:52:53
<edit> It is working now. I made a new blm lua that just worked with this piece and it subbed in and out just fine...so i copied and pasted everything over to my original. I must have had some kind of error in there but i triple checked everything before i came on here. Not sure what the deal was, but thanks for the help!
Valefor.Omnys
サーバ: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-01-04 14:08:41
I was afraid of that. Is there anyway to cast a spell from menus without Gearswap intervening?
I can work on something but I don't have an immediate answer it is an unusual problem which I never encountered before, I would just use names of targets using shortcuts and it always fired where I needed.
Code if spell.target.raw:contains('<st') then
target='<lastst>'
end
I'm thinking something like this would be the basis of a work around, but I've not messed with raw:contains a great deal.
I appreciate the effort but I don't think this works, because, even with gearswap unloaded, lastst after casting an offset Geo, just says the target's name.
Siren.Khary
サーバ: Siren
Game: FFXI
Posts: 9
By Siren.Khary 2016-01-05 09:24:30
Can someone please tell me if Gearswap will use/equip items that are in the Mog Wardrobe?
サーバ: Phoenix
Game: FFXI
Posts: 1245
By Phoenix.Gaiarorshack 2016-01-05 09:41:55
Ragnarok.Flippant said: »Sort of. By the time GS knows if your action was successful, it's obviously too late to equip precast gear, defeating the purpose. If you want to prevent this from happening based a condition that can be recognized before the WS attempts to go off (such as TP or recast timer), you'd have to write a rule for it in your precast rules.
Code if spell.type=="WeaponSkill" then
if player.tp < 1000 then
cancel_spell()
return
else
-- handle gear
end
elseif spell.type=="JobAbility" then
if windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
cancel_spell()
return
else
-- handle gear
end
end
I'm not sure why you find your macro worth mentioning though. Or why you would be executing a text file for something as simple as a weaponskill.
bottom to top
Id rather give to much info than to little. Didn't know if widowers macro function did something slightly different that would trigger this behavior.
Ty for the solution I'll implant it tonight
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-01-05 10:11:07
Can someone please tell me if Gearswap will use/equip items that are in the Mog Wardrobe? Yes.
Carbuncle.Calout
サーバ: Carbuncle
Game: FFXI
Posts: 14
By Carbuncle.Calout 2016-01-05 21:02:11
I'm fairly new to gearswap and having some trouble with my cor lua cannot get it to equip my DW sets. Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file to go with this.
--[[
gs c toggle luzaf -- Toggles use of Luzaf Ring on and off
Offense mode is melee or ranged. Used ranged offense mode if you are engaged
for ranged weaponskills, but not actually meleeing.
Acc on offense mode (which is intended for melee) will currently use .Acc weaponskill
mode for both melee and ranged weaponskills. Need to fix that in core.
--]]
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
mote_include_version = 2
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
-- Whether to use Luzaf's Ring
state.LuzafRing = M(false, "Luzaf's Ring")
state.warned = M(false)
state.CapacityMode = M(false, 'Capacity Point Mantle')
define_roll_values()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Melee', 'Acc')
state.HybridMode:options('Normal', 'PDT' )
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
gear.RAbullet = "Decimating Bullet"
gear.WSbullet = "Decimating Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
--gear.QDbullet = "Adlivun Bullet"
options.ammo_warning_limit = 15
state.AutoRA = M{['description']='Auto RA', 'Normal', 'Shoot', 'WS' }
cor_sub_weapons = S{"Arendsi Fleuret", "Vanir Knife", "Sabebus", "Aphotic Kukri", "Atoyac", "Surcouf's Jambiya"}
auto_gun_ws = "Wildfire"
get_combat_form()
-- Additional local binds
-- Cor doesn't use hybrid defense mode; using that for ranged mode adjustments.
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
send_command('bind != gs c toggle CapacityMode')
send_command('bind ^- gs c cycle AutoRA')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function job_file_unload()
send_command('unbind ^`')
send_command('unbind !='
send_command('unbind !`')
send_command('unbind ^-')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Triple Shot'] = {body="Chasseur's Frac"}
sets.precast.JA['Snake Eye'] = {legs="Lanun Culottes"}
sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +1"}
sets.precast.JA['Random Deal'] = {body="Lanun Frac"}
sets.precast.JA['Fold'] = {hands="Lanun Gauntlets"}
sets.CapacityMantle = { back="Mecistopins mantle" }
sets.precast.CorsairRoll = {
head="Lanun Tricorne +1",
hands="Chasseur's Gants",
body="Lanun Frac",
ring1="Barataria Ring",
back="Gunslinger's Cape",
feet="Lanun Bottes +1"
}
--TaeonHands.Snap = {name="Taeon Gloves", augments={'Attack+22','"Snapshot"+8'}}
--sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Chasseur's Culottes"})
sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Chasseur's Bottes"})
--sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Chasseur's Tricorne"})
sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Chasseur's Frac"})
sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Chasseur's Gants"})
sets.precast.LuzafRing = {ring2="Luzaf's Ring"}
--sets.precast.FoldDoubleBust = {hands="Lanun Gants +1"}
sets.precast.CorsairShot = {}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",
hands="Iuitl Wristbands +1",
legs="Adhemar Kecks",
}
sets.Organizer = {
main="Arendsi Fleuret",
sub="Odium",
range="Doomsday",
hands="Compensator",
ammo="Legion Scutum"
}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {
--ammo="Impatiens",
head="Ejekamal Mask",
ear1="Loquacious Earring",
ring1="Prolix Ring",
body="Samnuha Coat",
hands="Leyline Gloves",
legs="Blood Cuisses",
neck="Voltsurge torque",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.RA = {
ammo=gear.RAbullet,
hands="Lanun Gants +1",
back="Navarch's Mantle",
body="Pursuer's Doublet",
waist="Impulse Belt",
legs="Chasseur's Culottes",
feet="Pursuer's Gaiters"
}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Lanun Tricorne +1",
neck=gear.ElementalGorget,
ear1="Flame Pearl",
ear2="Flame Pearl",
body="Pursuer's Doublet",
hands="Alruna's Gloves +1",
ring1="Karieyh Ring",
ring2="Ifrit Ring +1",
back="Buquwik Cape",
waist="Fotia Belt",
legs="Adhemar Kecks",
feet="Lanun Bottes +1"
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, { ear2="Moonshade Earring"})
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Samnuha Tights"})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ear2="Moonshade Earring", legs="Samnuha Tights"})
sets.precast.WS['Last Stand'] = set_combine(sets.precast.WS, {
ammo=gear.WSbullet,
ear1="Flame Pearl",
ear2="Moonshade Earring",
})
sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {
ammo=gear.WSbullet,
ear1="Volley Earring",
ear2="Moonshade Earring",
back="Buquwik Cape",
ring1="Karieyh Ring",
ring2="Garuda Ring"
})
sets.precast.WS['Wildfire'] = {
ammo=gear.MAbullet,
head="Lanun Tricorne +1",
neck="Stoicheion Medal",
ear1="Hecate's Earring",
ear2="Friomisi Earring",
body="Samnuha Coat",
hands="Leyline Gloves",
ring1="Karieyh Ring",
ring2="Garuda Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Laksamana's Trews +1",
feet="Lanun Bottes +1"
}
sets.precast.WS['Leaden Salute'] = set_combine(sets.precast.WS['Wildfire'], { ear2="Moonshade Earring"})
-- Midcast Sets
sets.midcast.FastRecast = {
head="Uk'uxkaj Cap",
neck="Stoicheion Medal",
hands="Iuitl Wristbands +1",
ear1="Psystorm Earring",
ear2="Lifestorm Earring",
body="Pursuer's Doublet",
back="Gunslinger's Cape",
ring1="Globidonta Ring",
ring2="Sangoma Ring",
legs="Adhemar Kecks",
waist="Aquiline Belt",
}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
sets.midcast.CorsairShot = {
ammo=gear.QDbullet,
head="Chasseur's Tricorne",
neck="Stoicheion Medal",
ear1="Friomisi Earring",
ear2="Moldavite Earring",
body="Samnhua Coat",
hands="Leyline Gloves",
ring1="Acumen Ring",
ring2="Garuda Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Laksamana's Trews +1",
feet="Lanun Bottes +1"
}
sets.midcast.CorsairShot.Acc = set_combine(sets.midcast.CorsairShot, {
body="Samnhua Coat",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
ring1="Angha Ring",
ring2="Sangoma Ring",
feet="Chasseur's Bottes"
})
sets.midcast.CorsairShot['Light Shot'] = sets.midcast.CorsairShot.Acc
sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot['Light Shot']
-- Ranged gear
sets.midcast.RA = {
ammo=gear.RAbullet,
head="Chasseur's Tricorne",
neck="Iqabi Necklace",
ear1="Volley Earring",
ear2="Volley Earring",
body="Laksamana's Frac +1",
hands="Alruna's Gloves +1",
ring1="Rajas Ring",
ring2="Hajduk Ring",
back="Gunslinger's Cape",
waist="Elanid Belt",
legs="Pursuer's Pants",
feet="Pursuer's Gaiters"
}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {
body="Pursuer's Doublet",
ring1="Paqichikaji Ring",
hands="Floral Gauntlets",
waist="Elanid Belt"
})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {
ammo=gear.RAbullet,
head="Lanun Tricorne +1",
neck="Twilight Torque",
ear1="Zennaroi Earring",
ear2="Hecate's Earring",
body="Pursuer's Doublet",
hands="Iuitl Wristbands +1",
ring1="Karieyh Ring",
ring2="Paguroidea Ring",
back="Repulse Mantle",
waist="Flume Belt",
legs="Adhemar Kecks",
feet="Skadi's Jambeaux +1"
}
sets.idle.Regen = set_combine(sets.idle, {
head="Ocelomeh Headpiece +1",
neck="Lissome Necklace",
body="Kheper jacket",
})
sets.idle.Town = {
ammo=gear.RAbullet,
head="Lanun Tricorne +1",
neck="Lissome Necklace",
ear1="Volley Earring",
ear2="Hecate's Earring",
body="Councilor's Garb",
hands="Alruna's Gloves +1",
ring1="Ifrit Ring +1",
ring2="Karieyh Ring",
back="Gunslinger's Cape",
waist="Flume Belt",
legs="Adhemar Kecks",
feet="Skadi's Jambeaux +1"
}
-- Defense sets
sets.defense.PDT = set_combine(sets.idle, {
head="Lithelimb Cap",
neck="Twilight Torque",
hands="Iuitl Wristbands +1",
body="Qaaxo Harness",
ring1="Patricius Ring",
ring2="Defending Ring",
waist="Flume Belt",
legs="Qaaxo Tights",
feet="Lanun Bottes +1"
})
sets.defense.MDT = sets.defense.PDT
sets.Kiting = {feet="Skadi's Jambeaux +1"}
-- 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
sets.engaged = {
ammo=gear.RAbullet,
head="Chasseur's Tricorne",
neck="Iqabi Necklace",
ear1="Volley Earring",
ear2="Volley Earring",
body="Pursuer's Doublet",
hands="Alruna's Gloves +1",
ring1="Rajas Ring",
ring2="Longshot Ring",
back="Gunslinger's Cape",
waist="Elanid Belt",
legs="Adhemar Kecks",
feet="Lanun Bottes +1"
}
-- Normal melee group
sets.engaged.Melee = {
ammo=gear.RAbullet,
head="Taeon Chapeau",
neck="Asperity Necklace",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Qaaxo Harness",
hands="Taeon Gloves",
ring1="Rajas ring",
ring2="Epona's Ring",
back="Bleating Mantle",
waist="Windbuffet Belt +1",
legs="Taeon Tights",
feet="Taeon Boots"
}
sets.engaged.DW = set_combine(sets.engaged.Melee, {
head="Taeon Chapeau",
ear1="Dudgeon Earring",
ear2="Heartseeker Earring",
hands="Floral Gauntlets",
body="Samnuha Coat",
ring1="Oneiros Ring",
legs="Samnuha Tights",
waist="Shetal Stone",
back="Bleating Mantle",
feet="Taeon Boots"
})
sets.engaged.Acc = set_combine(sets.engaged.Melee, {
ring2="Patricius Ring",
waist="Anguinus Belt",
back="Letalis Mantle",
neck="Iqabi Necklace",
ear1="Cessance Earring"
})
sets.engaged.Acc.DW = set_combine(sets.engaged.Melee.DW, {
neck="Lissome Necklace",
ring2="Patricius Ring",
waist="Anguinus Belt",
back="Letalis Mantle",
neck="Iqabi Necklace",
ear1="Cessance Earring"
})
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
function job_pretarget(spell, action, spellMap, eventArgs)
-- If autora enabled, use WS automatically at 100+ TP
if spell.action_type == 'Ranged Attack' then
if player.tp >= 1000 and state.AutoRA.value == 'WS' and not buffactive.amnesia then
cancel_spell()
use_weaponskill()
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
-- Check that proper ammo is available if we're using ranged attacks or similar.
if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
do_bullet_checks(spell, spellMap, eventArgs)
end
-- gear sets
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.LuzafRing.value then
equip(sets.precast.LuzafRing)
elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
classes.CustomClass = 'Acc'
elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
if sets.precast.FoldDoubleBust then
equip(sets.precast.FoldDoubleBust)
eventArgs.handled = true
end
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
end
end
function job_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairShot' or spell.action_type == 'Ranged Attack' then
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairRoll' and not spell.interrupted then
display_roll_info(spell)
end
if state.AutoRA.value ~= 'Normal' then
use_ra(spell)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, action, default_wsmode)
--if buffactive['Transcendancy'] then
-- return 'Brew'
--end
end
function customize_idle_set(idleSet)
if player.hpp < 90 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
return idleSet
end
function customize_melee_set(meleeSet)
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
return meleeSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)
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)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- 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)
get_combat_form()
end
-- Job-specific toggles.
function job_toggle_state(field)
if field:lower() == 'luzaf' then
state.LuzafRing:toggle()
return "Use of Luzaf Ring", state.LuzafRing.value
end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local msg = ''
msg = msg .. 'Off.: '..state.OffenseMode.current
msg = msg .. ', Rng.: '..state.RangedMode.current
msg = msg .. ', WS.: '..state.WeaponskillMode.current
msg = msg .. ', QD.: '..state.CastingMode.current
if state.AutoRA.value ~= 'Normal' then
msg = '[Auto RA: ON]['..state.AutoRA.value..']'
else
msg = msg .. '[Auto RA: OFF]'
end
if state.DefenseMode.value ~= 'None' then
local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
end
if state.Kiting.value then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value then
msg = msg .. ', Target NPCs'
end
msg = msg .. ', Roll Size: ' .. ((state.LuzafRing.value and 'Large') or 'Small')
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function get_combat_form()
if cor_sub_weapons:contains(player.equipment.main) then
--if player.equipment.main == gear.Stave then
if S{'NIN', 'DNC'}:contains(player.sub_job) and cor_sub_weapons:contains(player.equipment.sub) then
state.CombatForm:set("DW")
else
state.CombatForm:reset()
end
else
state.CombatForm:set('Stave')
end
end
function define_roll_values()
rolls = {
["Corsair's Roll"] = {lucky=5, unlucky=9, bonus="Experience Points"},
["Ninja Roll"] = {lucky=4, unlucky=8, bonus="Evasion"},
["Hunter's Roll"] = {lucky=4, unlucky=8, bonus="Accuracy"},
["Chaos Roll"] = {lucky=4, unlucky=8, bonus="Attack"},
["Magus's Roll"] = {lucky=2, unlucky=6, bonus="Magic Defense"},
["Healer's Roll"] = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
["Puppet Roll"] = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
["Choral Roll"] = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
["Monk's Roll"] = {lucky=3, unlucky=7, bonus="Subtle Blow"},
["Beast Roll"] = {lucky=4, unlucky=8, bonus="Pet Attack"},
["Samurai Roll"] = {lucky=2, unlucky=6, bonus="Store TP"},
["Evoker's Roll"] = {lucky=5, unlucky=9, bonus="Refresh"},
["Rogue's Roll"] = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
["Warlock's Roll"] = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
["Fighter's Roll"] = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
["Drachen Roll"] = {lucky=3, unlucky=7, bonus="Pet Accuracy"},
["Gallant's Roll"] = {lucky=3, unlucky=7, bonus="Defense"},
["Wizard's Roll"] = {lucky=5, unlucky=9, bonus="Magic Attack"},
["Dancer's Roll"] = {lucky=3, unlucky=7, bonus="Regen"},
["Scholar's Roll"] = {lucky=2, unlucky=6, bonus="Conserve MP"},
["Bolter's Roll"] = {lucky=3, unlucky=9, bonus="Movement Speed"},
["Caster's Roll"] = {lucky=2, unlucky=7, bonus="Fast Cast"},
["Courser's Roll"] = {lucky=3, unlucky=9, bonus="Snapshot"},
["Blitzer's Roll"] = {lucky=4, unlucky=9, bonus="Attack Delay"},
["Tactician's Roll"] = {lucky=5, unlucky=8, bonus="Regain"},
["Allies's Roll"] = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
["Miser's Roll"] = {lucky=5, unlucky=7, bonus="Save TP"},
["Companion's Roll"] = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
["Avenger's Roll"] = {lucky=4, unlucky=8, bonus="Counter Rate"},
}
end
function display_roll_info(spell)
rollinfo = rolls[spell.english]
local rollsize = 'Small'
if state.LuzafRing then
rollsize = 'Large'
end
if rollinfo then
add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
end
end
-- Determine whether we have sufficient ammo for the action being attempted.
function do_bullet_checks(spell, spellMap, eventArgs)
local bullet_name
local bullet_min_count = 1
if spell.type == 'WeaponSkill' then
if spell.skill == "Marksmanship" then
if spell.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
bullet_name = gear.RAbullet
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
local available_bullets = player.inventory[bullet_name] or player.wardrobe[bullet_name]
-- If no ammo is available, give appropriate warning and end.
if not available_bullets then
if spell.type == 'CorsairShot' and player.equipment.ammo ~= 'empty' then
add_to_chat(104, 'No Quick Draw ammo left. Using what\'s currently equipped ('..player.equipment.ammo..').')
return
elseif spell.type == 'WeaponSkill' and player.equipment.ammo == gear.RAbullet then
add_to_chat(104, 'No weaponskill ammo left. Using what\'s currently equipped (standard ranged bullets: '..player.equipment.ammo..').')
return
else
add_to_chat(104, 'No ammo ('..tostring(bullet_name)..') available for that action.')
eventArgs.cancel = true
return
end
end
-- Don't allow shooting or weaponskilling with ammo reserved for quick draw.
if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
add_to_chat(104, 'No ammo will be left for Quick Draw. Cancelling.')
eventArgs.cancel = true
return
end
-- Low ammo warning.
if spell.type ~= 'CorsairShot' and not state.warned
and available_bullets.count > 1 and available_bullets.count <= options.ammo_warning_limit then
local msg = '**** LOW AMMO WARNING: '..bullet_name..' ****'
local border = ""
for i = 1, #msg do
border = border .. "*"
end
add_to_chat(104, border)
add_to_chat(104, msg)
add_to_chat(104, border)
state.warned = true
elseif available_bullets.count > options.ammo_warning_limit and state.warned then
state.warned = false
end
end
function use_weaponskill()
send_command('input /ws "'..auto_gun_ws..'" <t>')
end
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Auto RA' then
if newValue ~= 'Normal' then
send_command('@wait 2.5; input /ra <t>')
end
end
end
function use_ra(spell)
local delay = '2.2'
-- GUN
if spell.type:lower() == 'weaponskill' then
delay = '2.25'
else
if buffactive["Courser's Roll"] then
delay = '0.7' -- MAKE ADJUSTMENT HERE
elseif buffactive['Flurry II'] then
delay = '0.5'
else
delay = '1.05' -- MAKE ADJUSTMENT HERE
end
end
send_command('@wait '..delay..'; input /ra <t>')
end
function select_default_macro_book()
set_macro_page(6, 12)
end
If anyone could take a look and tell me whats wrong or what im doing wrong would be a great help.
By kazekostryge 2016-01-06 01:20:17
Need some help. getting this error:
Gearswap: Lua runtime error: Gearswap/flow.lua:98:
User Event Error: ...ogram Files (x86)/Windower4//addons/libs/extdata.lua:1915: "lower is not defined for numbers
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-01-08 10:17:37
if cor_sub_weapons:contains(player.equipment.main) then
--if player.equipment.main == gear.Stave then
if S{'NIN', 'DNC'}:contains(player.sub_job) and cor_sub_weapons:contains(player.equipment.sub) then
state.CombatForm:set("DW")
else Are you /nin or /dnc when trying to DW? Are you main & off-handing one of these? Code cor_sub_weapons = S{"Arendsi Fleuret", "Vanir Knife", "Sabebus", "Aphotic Kukri", "Atoyac", "Surcouf's Jambiya"}
Line 409 has 2 errors Code sets.engaged.Acc.DW = set_combine(sets.engaged.Melee.DW
Should be sets.engaged.DW.Acc & you don't have a set called sets.engaged.Melee.DW
Valefor.Omnys
サーバ: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-01-08 10:19:31
A couple days ago, Flippant showed me this.
Ragnarok.Flippant said: »windower.register_event('zone change', function(new, old)
--do stuff
end)
I'm about to implement it, but I'm wondering if I need to, and how to, unregister an event after I'm done with it.
After zone-changing, I'd like to equip all my refresh gear on PLD. So great, stick this in pld.lua. What happens when I change to GEO and change back to PLD? Does the new registration overwrite the previous or add on to it? Will the second/third/fourth loads of pld.lua register multiple copies of the same event?
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-01-08 10:19:31
Need some help. getting this error:
Gearswap: Lua runtime error: Gearswap/flow.lua:98:
User Event Error: ...ogram Files (x86)/Windower4//addons/libs/extdata.lua:1915: "lower is not defined for numbers You're getting this error when attempting to load which lua file? Please post it as there is a flow error in it.
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-01-08 11:46:22
A couple days ago, Flippant showed me this.
Ragnarok.Flippant said: »windower.register_event('zone change', function(new, old)
--do stuff
end)
I'm about to implement it, but I'm wondering if I need to, and how to, unregister an event after I'm done with it.
After zone-changing, I'd like to equip all my refresh gear on PLD. So great, stick this in pld.lua. What happens when I change to GEO and change back to PLD? Does the new registration overwrite the previous or add on to it? Will the second/third/fourth loads of pld.lua register multiple copies of the same event?
No. The events will unregister when the the file is unloaded/reset.
Phoenix.Bunas
サーバ: Phoenix
Game: FFXI
Posts: 21
By Phoenix.Bunas 2016-01-11 16:30:21
was wondering if the blu thing where, its not recognizing buffs as active or non active, seems to think i am eternally in chain affinity and also there seems to be a problem with diffusion where its not equipping my Lulaza charuqs. Anyone else still having this problem? Seems to go away if I reload the lua but instantly resurface when i CA again.
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.
|
|