There's nothing to be afraid of. All of Lua's libraries are tables full of functions (table.sort, string.find, etc.).
the only thing i can think of is your using a macro and in it its spelt "Defense" not "defense" as all of the defense's in motes code are spelt defense not Defense except thoes being written to the chat
but this would only be true if you are using different macros for each job(are you??)
I have a different macro book for each job? None of my macros call directly on the lua, they are just "/ma "Fire V" <t>" etc... unless you mean a macro within the lua? Then I'm honestly not sure, I just used Moten's and adapted the equipment. I get the same error message even with Moten's base lua file too.
does that error show when you first change jobs
if so try reloading gearswap like this after you change jobs
"lua reload gearswap" (no quotes in the windower console)
let me know if the error shows again after
Exactly the same issue.
I wonder if I need to perhaps update my flow.lua file?
I'm gonna delete it and redownload and see if that works. - nope that still doesn't work! Bah
im not sure then
but
you can remove these
elements.obi_of because its already in motes include with the Hachirin-no-obi
info.helix_nukes because you would just use spell_maps[spell.en] == "Helix" to tell if its a Helix spell
then change this
elseif info.helix_nukes:contains(spell.english) then --line 365
to this
elseif spell_maps[spell.en] == "Helix" then
i ran your and motes sch file through a file compare and that all i could see other then gear that looks odd to me (mind you i know next to nothing about motes include)
one thing i can recommend is to start with a fresh motes include file then add in your changes one by one then reload gearswap till it crashes (you can do this with npp++)
order for doing this(this would be the only way to narrow it down) this is how you debug code with out a debuger
1. set motes include as your sch file(save you current file to your desktop or somewhere other then your gearswap folder)
2. open both files with npp++(npp++ can edit gearswap files even if there open)
3. load ffxi
4. change jobs to sch
5. if it loads with no errors go on
6. add one new thing
7. save your file
8. use "lua reloads gearswap"
9. if all changes are no it go to #5
10. if all changes are in your done
here is my ws and obi gear equip code
this returns the highest level AOE ws that you have available(based on current weapon)Code:sets.WS_types={['Hand-to-Hand']={head="Tokon Hachimaki"},['Dagger']={head="Issen Hachimaki"},['Sword']={head="Kensho Hachimaki"},['Great Sword']={head="Hako Hachimaki"}, ['Axe']={head="Ryoshi Hachimaki"},['Great Axe']={head="Senshin Hachimaki"},['Scythe']={head="Rekka Hachimaki"},['Polearm']={head="Shitotsu Hachimaki"}, ['Katana']={head="Kanja Hachimaki"},['Great Katana']={head="Kengo Hachimaki"},['Club']={head="Rokugo Hachimaki"},['Staff']={head="Hakke Hachimaki"}, ['Archery']={head="Shunten Hachimaki"},['Marksmanship']={head="Saika Hachimaki"},['Throwing']={},} sets.ws_belt={Dark={waist="Shadow Belt"},Water={waist="Aqua Belt"},Earth={waist="Soil Belt"},Ice={waist="Snow Belt"},Fire={waist="Flame Belt"}, Wind={waist="Breeze Belt"},Lightning={waist="Thunder Belt"},Light={waist="Light Belt"},} sets.ws_neck={Dark={neck="Shadow Gorget"},Water={neck="Aqua Gorget"},Earth={neck="Soil Gorget"},Ice={neck="Snow Gorget"},Fire={neck="Flame Gorget"}, Wind={neck="Breeze Gorget"},Lightning={neck="Thunder Gorget"},Light={neck="Light Gorget"},} sets.spell_obi={Fire={waist="Karin Obi"},Earth={waist="Dorin Obi"},Water={waist="Suirin Obi"},Wind={waist="Furin Obi"},Ice={waist="Hyorin Obi"}, Lightning={waist="Rairin Obi"},Light={waist="Korin Obi"},Dark={waist="Anrin Obi"},} function WS_Gear_precast(spell)--outputs correct ws gear set local a = {} if spell.type == "WeaponSkill" then local spell_element = (type(spell.element)=='number' and res.elements[spell.element] or res.elements:with('name', spell.element)) if player.inventory["Fotia Gorget"] or player.wardrobe["Fotia Gorget"] then a = set_combine(a, {neck="Fotia Gorget"}) elseif player.inventory[sets.ws_neck[spell_element.en].neck] or player.wardrobe[sets.ws_neck[spell_element.en].neck] then a = set_combine(a, sets.ws_neck[spell_element.en]) end if player.inventory["Fotia Belt"] or player.wardrobe["Fotia Belt"] then a = set_combine(a, {waist="Fotia Belt"}) elseif player.inventory[sets.ws_belt[spell_element.en].waist] or player.wardrobe[sets.ws_belt[spell_element.en].waist] then a = set_combine(a, sets.ws_belt[spell_element.en]) end if ws_head and (player.inventory[sets.WS_types[spell.skill].head] or player.wardrobe[sets.WS_types[spell.skill].head]) then a = set_combine(a, sets.WS_types[spell.skill]) end return a end end WS_Gear_midcast = WS_Gear_precast function e_obi_midcast(spell)--outputs correct obi set if not Typ.abilitys:contains(spell.prefix) and spell.action_type ~= "Item" then local spell_element = (type(spell.element)=='number' and res.elements[spell.element] or res.elements:with('name', spell.element)) if spell_element.name == world.weather_element or spell_element.name == world.day_element then if player.inventory["Hachirin-no-Obi"] or player.wardrobe["Hachirin-no-Obi"] then return {waist="Hachirin-no-Obi"} elseif player.inventory[sets.spell_obi[spell_element.en].waist] or player.wardrobe[sets.spell_obi[spell_element.en].waist] then return sets.spell_obi[spell_element.en] end end end end
Code:aoe_ws = S{"Spinning Attack","Aeolian Edge","Cyclone","Shockwave","Fell Cleave","Spinning Scythe","Cataclysm","Earth Crusher","Uriel Blade","Glory Slash","Circle Blade"} function ws_to_aoews(spell)--returs the highest level AOE weaponskill you can use at this time for _,v in pairs(table.reverse(windower.ffxi.get_abilities().weapon_skills)) do local ws = res.weapon_skills[v][gearswap.language] if aoe_ws:contains(ws) then return ws end end return spell.name end
Tried this function but doesnt work, still swap to precast even with flurry up:
function job_precast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Ranged Attack' then
if buffactive[581] then
equip(sets.Flurry2)
elseif buffactive[265] then
equip(sets.Flurry)
else
equip(sets.precast.RA)
end
end
end
Anyone know how to tweak it so i can preshot based on what flurry i have up?
If you're using Motes-Includes--which it looks like you are but I could be wrong--try putting an "eventArgs.handled = true" after each equip() line. Otherwise the handler's just gonna default to your regular precast set.
If that doesn't work, here's two other possible solutions.
Spoiler: show
Worked like a charm, the first solution.
Happy rng, thx a lot.
Gear swap can tell if you have flurry 1 or 2 on?
Revised the hell out of itemize_sets to process one set at a time with the second argument being whether to get it out or put it away.
Now I just need to know how to call it from a macro line. I tried //gs c itemize_sets but it doesn't work. What am I doing wrong?
EDIT: Gee, Jeanne, it might help if you actually gave the people something to work with.
Well, Windower can, anyway. I'm not sure which component it is. Each status effect has its own ID in the game data, so basically it just monitors for whether that one's active.Code:--from define_sets() if it's needed sets.Stoneskin = {neck="Stone Gorget",ear1="Earthcry Earring",hands="Stone Mufflers", waist="Siegel Sash",legs="Haven Hose"} function itemize_sets(set, move) --put unneeded stuff away or get needed stuff out. for drawer,junk in pairs(set) do local thisThing = '' if type(junk) == "string" then --ignore tables and nils thisThing = junk print("Now "..move.."ting "..thisThing) send_command(move..' "'..thisThing..'" case') end end end --[[And now the command i'm trying to test. All the pieces are in my case already. I think I just don't have the function defined right to be called like this.]] > gs c itemize_sets(sets.Stoneskin, 'get')
I am not super code smart. So I might just not know it can work this way.
to call a function (usually in a if statement in your lua) I usually do soemthing like "update_gear()" to call a self command I made i do "gs c follow". So I might not know that you can call a function in the same manner you can call a command? Is there a way to macro calling functions if it isnt the same you would use for a command? Short solution would be make a command that calls that function or convert said function into a command if possible. So if it isnt possible to call a function in the same manner u call a command Id say its failing cause you dont have a command set up.
Code:function self_command(command) if command == 'itemize_sets' then itemize_sets() end end
Well I thought it couldnt tell whether you had haste 1 or 2 on, just that you had a haste effect on. I have some things that happen when buffactive.haste is true or not and it works for both haste 1 and haste 2. I assumed flurry was the same.
Also is there a way to tell if u have 2 marches on for example? Cause I assume buffactive.march would show true whichever one u had on (not that I have messed with these particualr buffs yet) OR for example I have been playing on PUP lately and Ive thought of things like oh i can do this if i have 2 earth maneuvers on (as an example), but I wasnt sure how to determine i have 2 of the same buff.