as far as i know it will not change your gear automatically after zoning so you need to /heal to get it to change
as far as i know it will not change your gear automatically after zoning so you need to /heal to get it to change
Of that too, I am fully aware. There needs to be some status change for it to register.
Buuuuuuuuuuuut I have found the problem; it needs to not go under this rule:
Code:if pet.isvalid then
Hey guys, been away from ffxi for a while and just coming back, and I'm trying to convert all my spellcasts to gearswap. I dug thru a bunch of posts and just decided to ask instead, how do I set variables to do things such as using enfeebling mind potency vs enfeebling mind accuracy sets?
that depends how you want to do it
1. via commands input by user<manually>
ill use my magen stave to show how its done
--with the above you change staves automatically when a viable spell is castCode:Changestaff = false Usestaff = 'Atk' sets.staff = {} sets.staff.Atk = {Fire={main="Atar I",sub="Fire Grip"},Ice={main="Vourukasha I",sub="Ice Grip"},Wind={main="Vayuvata I",sub="Wind Grip"}, Earth={main="Vishrava I",sub="Earth Grip"},Lightning={main="Apamajas I",sub="Thunder Grip"},Water={main="Haoma I",sub="Water Grip"}, Light={main="Arka I",sub="Light Grip"},Dark={main="Xsaeta I",sub="Dark Grip"},} sets.staff.Acc = {Fire={main="Atar II",sub="Fire Grip"},Ice={main="Vourukasha II",sub="Ice Grip"},Wind={main="Vayuvata II",sub="Wind Grip"}, Earth={main="Vishrava II",sub="Earth Grip"},Lightning={main="Apamajas II",sub="Thunder Grip"},Water={main="Haoma II",sub="Water Grip"}, Light={main="Arka II",sub="Light Grip"},Dark={main="Xsaeta II",sub="Dark Grip"},} sets.staff.Cur = {main="Arka IV",sub="Dominie's Grip",body="Heka's Kalasiris",hands="Bokwus Gloves",neck="Phalaina Locket",left_ear="Roundel Earring",} Cure = {spells = {'Cura','Cura II','Cura III','Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'},} Typ = {spells = {'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},abilitys = {'/jobability','/pet','/weaponskill','/monsterskill'},} function precast(spell) if Changestaff then if table.contains(Typ.spells,spell.type) then if table.contains(Cure.spells,spell.english) then equip(sets.staff.Cur) else equip(sets.staff[Usestaff][spell.element]) end end end end function self_command(command) if command == 'tstavetouse' then Usestaff = (Usestaff=='Atk' and 'Acc' or 'Atk') add_to_chat(7, '----- Staves Set To '..Usestaff..' -----') elseif command == 'tchangemagestaff' then Changestaff = not Changestaff add_to_chat(7, '----- Staves Will ' .. (Changestaff and '' or 'NOT ') .. 'Change -----') end end
--the commands are
-- //gs c tchangemagestaff --to toggle weather to change staves or not
-- //gs c tstavetouse -- to toggle between the type of staves to use
2. via rules in precast/midcast/aftercast<automatically>
--this one if you equip Fire Grip it sets it to Atk stavesCode:Changestaff = false Usestaff = 'Atk' sets.staff = {} sets.staff.Atk = {Fire={main="Atar I",sub="Fire Grip"},Ice={main="Vourukasha I",sub="Ice Grip"},Wind={main="Vayuvata I",sub="Wind Grip"}, Earth={main="Vishrava I",sub="Earth Grip"},Lightning={main="Apamajas I",sub="Thunder Grip"},Water={main="Haoma I",sub="Water Grip"}, Light={main="Arka I",sub="Light Grip"},Dark={main="Xsaeta I",sub="Dark Grip"},} sets.staff.Acc = {Fire={main="Atar II",sub="Fire Grip"},Ice={main="Vourukasha II",sub="Ice Grip"},Wind={main="Vayuvata II",sub="Wind Grip"}, Earth={main="Vishrava II",sub="Earth Grip"},Lightning={main="Apamajas II",sub="Thunder Grip"},Water={main="Haoma II",sub="Water Grip"}, Light={main="Arka II",sub="Light Grip"},Dark={main="Xsaeta II",sub="Dark Grip"},} sets.staff.Cur = {main="Arka IV",sub="Dominie's Grip",body="Heka's Kalasiris",hands="Bokwus Gloves",neck="Phalaina Locket",left_ear="Roundel Earring",} Cure = {spells = {'Cura','Cura II','Cura III','Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'},} Typ = {spells = {'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},abilitys = {'/jobability','/pet','/weaponskill','/monsterskill'},} function precast(spell) if player.equipment.sub == "Fire Grip" then Usestaff = 'Atk' end if player.equipment.sub == "Earth Grip" then Usestaff = 'Acc' end if spell.type == "Ninjutsu" then Changestaff = false else Changestaff = true end if Changestaff then if table.contains(Typ.spells,spell.type) then if table.contains(Cure.spells,spell.english) then equip(sets.staff.Cur) else equip(sets.staff[Usestaff][spell.element]) end end end end
--and if you equip Earth Grip it sets it to Acc staves
--and if the spell type is Ninjutsu it does not change the staves but all other types it does
Yes, but how would I write them? In spellcast it'd be something like this:
<if skill="EnfeeblingMagic">
<if spell="Paral*|Silence|Slow*">
<action type="equip" when="midcast" set="FullMndEnfeeb" />
<if advanced="$Potency=1">
<equip set="Potency" />
</if>
<elseif advanced="$Accuracy=1">
<equip set="Accuracy">
</elseif>
</if>
</if>
How would I write it for gearswap?
but windower.wc_match is not recommended because its so slowCode:if spell.skill == "Enfeebling Magic" then if windower.wc_match(spell.en,"Paral*|Silence|Slow*") then equip(sets.FullMndEnfeeb) if Potency == 1 then equip(sets.Potency) elseif Accuracy == 1 then equip(sets.Accuracy) end end end
i also added to my last post
here is a must read(not finished yet tho)
http://pastebin.com/GLdhjSuR
With this would I have to manually equip the grip for it to use macc set?
What I want to do is to be able to set a variable where if I want to be using macc set when casting mnd based enfeebles it will automatically switch to them or if I want to use potency set instead it will swap to that. Just not sure what I'm doing in lua.2. via rules in precast/midcast/aftercast<automatically>
--this one if you equip Fire Grip it sets it to Atk stavesCode:Changestaff = false Usestaff = 'Atk' sets.staff = {} sets.staff.Atk = {Fire={main="Atar I",sub="Fire Grip"},Ice={main="Vourukasha I",sub="Ice Grip"},Wind={main="Vayuvata I",sub="Wind Grip"}, Earth={main="Vishrava I",sub="Earth Grip"},Lightning={main="Apamajas I",sub="Thunder Grip"},Water={main="Haoma I",sub="Water Grip"}, Light={main="Arka I",sub="Light Grip"},Dark={main="Xsaeta I",sub="Dark Grip"},} sets.staff.Acc = {Fire={main="Atar II",sub="Fire Grip"},Ice={main="Vourukasha II",sub="Ice Grip"},Wind={main="Vayuvata II",sub="Wind Grip"}, Earth={main="Vishrava II",sub="Earth Grip"},Lightning={main="Apamajas II",sub="Thunder Grip"},Water={main="Haoma II",sub="Water Grip"}, Light={main="Arka II",sub="Light Grip"},Dark={main="Xsaeta II",sub="Dark Grip"},} sets.staff.Cur = {main="Arka IV",sub="Dominie's Grip",body="Heka's Kalasiris",hands="Bokwus Gloves",neck="Phalaina Locket",left_ear="Roundel Earring",} Cure = {spells = {'Cura','Cura II','Cura III','Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'},} Typ = {spells = {'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},abilitys = {'/jobability','/pet','/weaponskill','/monsterskill'},} function precast(spell) if player.equipment.sub == "Fire Grip" then Usestaff = 'Atk' end if player.equipment.sub == "Earth Grip" then Usestaff = 'Acc' end if spell.type == "Ninjutsu" then Changestaff = false else Changestaff = true end if Changestaff then if table.contains(Typ.spells,spell.type) then if table.contains(Cure.spells,spell.english) then equip(sets.staff.Cur) else equip(sets.staff[Usestaff][spell.element]) end end end end
--and if you equip Earth Grip it sets it to Acc staves
http://pastebin.com/QF5qrDUx
That's as far as I have gotten, and I cannot figure out how to get the potency stuff to work, or get anything to actually change gear. Ugh it's a mess, and I've been working at it for over 3 hours now. I've tried everything!
On my Bard, I have it so i can //gs c toggle harp, to switch between daurdabla and regular horns. (http://pastebin.com/wqQ2Gc2t) and that works just fine. So, i herpy-derpy'd and copy+paste that entire .lua file, altered it to fit my Red Mage in terms of spells and such, and then I get errors about " Mote-Libs: Toggle: Unknown Field [macc]" - when I've changed everything in relation to the toggle rules, variables, etc.. So, I went a step further, deleted the whole mid-cast build for BRD with all of those songs, and just left one 'song' string open, and changed the March to Slow, filled out the gear, and did the //gs c toggle harp, and then it errored Mote-Libs: Toggle: Unkown Field [harp]... So, I go back in and //gs load BRD.lua and //gs c toggle harp and it works just fine. Not sure what changed. So frustrating! Help please.![]()
Just confusing learning a new format.
that would be 1 to set user varables and thoes are just examples
this is how i would do your requested code
this code allowes you to use a combination of accuracy and potency sets based what commands you send to your code with the priority on potencyCode:potency = false accuracy = false sets.Accuracy = {} sets.Potency = {} enfeeb_spells = S{"Paralyze","Paralyze II","Paralyga","Silence","Slow","Slow II","Slowga"} function precast(spell) if spell.skill == "Enfeebling Magic" then if enfeeb_spells:contains(spell.en) then equip(sets.FullMndEnfeeb) if accuracy then equip(sets.Accuracy) end if potency then equip(sets.Potency) end end end end function self_command(command) if command == 'setpotency' then potency = not potency elseif command == 'setaccuracy' then accuracy = not accuracy end end
--//gs c setpotency -- enables potency set
--//gs c setaccuracy -- enables accuracy set
how ever if you only want to equip one or the other do this
--//gs c enfeebsettype switches between potency and accuracy setsCode:enfeeb_set_type = {"potency","accuracy") enfeeb_set_type_count = 1 sets.accuracy = {} sets.potency = {} enfeeb_spells = S{"Paralyze","Paralyze II","Paralyga","Silence","Slow","Slow II","Slowga"} function precast(spell) if spell.skill == "Enfeebling Magic" then if enfeeb_spells:contains(spell.en) then equip(sets.FullMndEnfeeb, sets[enfeeb_set_type[enfeeb_set_type_count]]) end end end function self_command(command) if command == 'enfeebsettype' then enfeeb_set_type_count = (enfeeb_set_type_count % #enfeeb_set_type_count) + 1 add_to_chat(7,'Enfeeb Set Type = ' .. tostring(enfeeb_set_type[enfeeb_set_type_count])) end end
of cores the events are up to you
Okay, I've got Slow/Para working.. Now to get the rest of the gearswap to work...
ugh this is a mess, sorry for all of the questions.
EDIT:
This is where I'm at.... Cleaned it up a bit..
Code:function get_sets() enfeeb_set_type = {"potency","accuracy"} enfeeb_set_type_count = 1 sets.accuracy = {main="Chatoyant Staff", sub="raptor strap +1", head="blood Mask", neck="Enfeebling Torque", ear1="Incubus Earring +1", ear2="Incubus Earring +1", body="Warlock's Tabard", hands="Devotee's Mitts +1", ring1="Celestial Ring", ring2="Celestial Ring", back="Hecate's Cape", waist="Witch Sash", legs="Mahatma Slops", feet="Mahatma Pigaches"} sets.potency = {main="Mistilteinn", sub="Nms. Shield +1", head="blood Mask", neck="Promis Badge", ear1="Celestial Earring", ear2="Celestial Earring", body="Mahatma Houppelande", hands="Devotee's Mitts +1", ring1="Celestial Ring", ring2="Celestial Ring", back="Prism Cape", waist="Witch Sash", legs="Mahatma Slops", feet="Mahatma Pigaches"} enfeeb_spells = S{"Paralyze","Paralyze II","Slow","Slow II"} --Idle Sets sets.idle = {main="Terra's Staff", sub="Vivid Strap +1", ammo="Hedgehog Bomb", neck="Orocho Nodowa +1", ear1="Merman's Earring", ear2="Merman's Earring", body="Ixion Cloak", hands="Dst. Mittens +1", ring1="Merman's Ring", ring2="Merman's Ring", back="Umbra Cape", waist="Ocean Rope", legs="Blood Cuisses", feet="Dst. Leggings +1"} sets.idle.standard = {main="Terra's Staff", sub="Vivid Strap +1", ammo="Hedgehog Bomb", neck="Orocho Nodowa +1", ear1="Merman's Earring", ear2="Merman's Earring", body="Ixion Cloak", hands="Dst. Mittens +1", ring1="Merman's Ring", ring2="Merman's Ring", back="Umbra Cape", waist="Ocean Rope", legs="Blood Cuisses", feet="Dst. Leggings +1"} sets.idle.PDT = {main="Terra's Staff", sub="Vivid Strap +1", ammo="Hedgehog Bomb", neck="Orocho Nodowa +1", ear1="Merman's Earring", ear2="Merman's Earring", body="Ixion Cloak", hands="Dst. Mittens +1", ring1="Merman's Ring", ring2="Merman's Ring", back="Umbra Cape", waist="Ocean Rope", legs="Blood Cuisses", feet="Dst. Leggings +1"} --Precast Sets sets.precast = {head="Warlock's Chapeau", body="Goliard Saio", sub="Vivid Strap +1"} --Midcast sets sets.midcast = {head="Warlock's Chapeau", body="Goliard Saio", hands="Dusk Gloves +1", waist="Speed Belt", feet="Dusk Ledelsens +1"} sets.midcast.Cure = {main="Chatoyant Staff", sub="Staff Grip", head="Warlock's Chapeau", neck="Fylgja Torque +1", ear1="Roundel Earring", ear2="Celestial Earring", body="Goliard Saio", hands="Dusk Goves +1", ring1="Celestal Ring", ring2="Celestial Ring", back="Mahatma Cape", waist="Pythia Sash +1", legs="Mahatma Slops", feet="Dusk Ledelsens +1"} sets.midcast.DarkEnfeeble = {main="Chatoyant Staff", sub="Vivid Strap +1", head="blood Mask", neck="Enfeebling Torque", ear1="Incubus Earring +1", ear2="Incubus Earring +1", body="Warlock's Tabard", hands="Mahatma Cuffs", ring1="Omn. Ring +1", ring2="Omn. Ring +1", back="Hecate's Cape", waist="Witch Sash", legs="Mahatma Slops", feet="Wise Pigaches +1"} sets.midcast.MndEnfeeble = {main="Chatoyant Staff", sub="raptor strap +1", head="blood Mask", neck="Enfeebling Torque", ear1="Incubus Earring +1", ear2="Incubus Earring +1", body="Warlock's Tabard", hands="Devotee's Mitts +1", ring1="Celestial Ring", ring2="Celestial Ring", back="Hecate's Cape", waist="Witch Sash", legs="Mahatma Slops", feet="Mahatma Pigaches"} sets.midcast.Curaga = sets.midcast.Cure sets.midcast.CureSelf = {main="Chatoyant Staff", sub="Staff Grip", head="Warlock's Chapeau", neck="Fylgja Torque +1", ear1="Roundel Earring", ear2="Celestial Earring", body="Goliard Saio", hands="Dusk Goves +1", ring1="Celestal Ring", ring2="Celestial Ring", back="Mahatma Cape", waist="Pythia Sash +1", legs="Mahatma Slops", feet="Dusk Ledelsens +1"} sets.midcast['Enhancing Magic'] = {head="Warlock's Chapeau", body="Goliard Saio", neck="Enhancing Torque", ear1="Augment. Earring", legs="Warlock's Tights", hands="Duelist's Gloves", feet="Dusk Ledelsens +1", waist="Speed Belt"} sets.midcast.Buffs = {head="Warlock's Chapeau", body="Goliard Saio", legs="Warlock's Tights", hands="Dusk Gloves +1", feet="Dusk Ledelsens +1", waist="Speed Belt"} sets.midcast.Stoneskin = {head="Warlock's Chapeau", body="Goliard Saio", neck="Enhancing Torque", ear1="Augment. Earring", ear2="Celestial Earring", legs="Warlock's Tights", hands="Dusk gloves +1", feet="Dusk Ledelsens +1", waist="Speed Belt", back="Prism Cape", ring1="celestial Ring", ring2="Celestial Ring"} sets.midcast['Elemental Magic'] = {main="Lehbrailg +2", sub="Mephitis Grip", range="Aureole", head="Hagondes Hat", neck="Eddy Necklace", ear1="Friomisi Earring", ear2="Hecate's Earring", body="Hagondes Coat", hands="Hagondes Cuffs", ring1="Sangoma Ring", ring2="Acumen Ring", back="Toro Cape", waist="Sekhmet Corset", legs="Hagondes Pants", feet="Umbani Boots"} end function precast(spell) if spell.skill == "Enfeebling Magic" then if enfeeb_spells:contains(spell.en) then equip(sets.FullMndEnfeeb, sets[enfeeb_set_type[enfeeb_set_type_count]]) end end end function midcast(spell) if spell.action_type == 'Magic' then if spell.skill == "HealingMagic" then if spell.name == 'Cure*' then equip(sets.midcast.Cure) else equip(sets.midcast) end end if spell.skill == "EnfeeblingMagic" then if spell.name == 'Silence|Dia*' then equip(sets.midcast.MndEnfeeble) else if spell.name =='Bio*|Poison*|Blind|Bind|Sleep*|Gravity' then equip(sets.midcast.DarkEnfeeble) end end end end function aftercast(spell) equip(sets.idle) end function self_command(command) if command == 'enfeebsettype' then enfeeb_set_type_count = (enfeeb_set_type_count % #enfeeb_set_type_count) + 1 add_to_chat(7,'Enfeeb Set Type = ' .. tostring(enfeeb_set_type[enfeeb_set_type_count])) end end end
here 1 hr till delete
http://pastebin.com/zwUHY6nF
That looks much cleaner than the mess I was dealing with, but a lot of the gear isn't swapping. None of the enfeeble/healing gear is working. Still only Slow/Paralyze
try this
http://pastebin.com/zwUHY6nF
edit
removed windower.wc_match
It errors out, something about line 100.
elseif swindower.wc_match(spell.english,'Refresh*|Haste*' ) then
"attempt to index global 'swindower' (a nil value)
And none of the spells are gearswapping.
Still not swapping any gear, not even slow/para now. //gs showswaps shows nothing.
It's not doing anything still. x.x; Are you updating http://pastebin.com/zwUHY6nF ?
thats one of the reasons i perfer using a defined table
like enfeeb_spells = S{"Paralyze","Paralyze II","Slow","Slow II"}
but here you go
http://pastebin.com/zwUHY6nF