Or save it as UTF-8 without BOM, if you need the extra characters.
Or save it as UTF-8 without BOM, if you need the extra characters.
Seems you're using my includes, based on an older version of how I set things up. That initialization is potentially going to screw things up if you've kept updated with my latest include revisions.
Replace your current get_sets() with the one above, and add in the user_setup() function as well (it just copies the binds you had in the original get_sets()).Code:-- Initialization function for this job file. function get_sets() -- Load and initialize the include file. include('Mote-Include.lua') end -- Setup vars that are user-dependent. Can override this function in a sidecar file. function user_setup() send_command('bind f9 gs c cycle RangedMode') send_command('bind ^f9 gs c cycle DefenseMode') send_command('bind !f9 gs c cycle WeaponskillMode') send_command('bind ^[ input /lockstyle on') end
Ugh, and just realized, I pushed my latest changes last night because of something I was working on, but forgot to post update notes about it. One of the changes involves this:
bow_gun_weaponskills doesn't exist anymore. Since the resources have been updated to include skill for weaponskills, you should now useCode:if (spell.target.distance >8 and not bow_gun_weaponskills:contains(spell.english)) or (spell.target.distance >21) then
for that sort of test.Code:if spell.skill == 'Archery' or spell.skill == 'Marksmanship' then
Now, on the error you're receiving, I'm going to guess it's because the old "Ranged" 'job ability' isn't in the new resources. As such, when my code tries to handle auto-adjusting the target, when it looks for spell.targets, that doesn't exist, and causes the error. I'll need to test it, and verify with Byrth about the existance of that field for ranged attacks.
@Astaro (and anyone else using ranged attacks, who's using my includes):
A temporary patch for the problem. At line 216 of Mote-Utility, change:
toCode:local intersection = spell.targets * validPlayers local canUseOnPlayer = not intersection:empty()
Code:if spell.targets ~= 'Enemy' then local intersection = spell.targets * validPlayers local canUseOnPlayer = not intersection:empty() end
I'm getting the exact same error as Astaro.
GearSwap: Lua error (runtime) - ...gram files (x86)/Windower4//addons/GearSwap/flow.lua:276:
GearSwap has detected an error in the user function pretarge:
.../Program Files (x86)/Windower4//addons/libs/sets.lua:103: bad argument #1 to 'pairs' (table expected, got string).
Any suggestions for a fix would be greatly appreciated.
Thank you!
Edit: Never mind I see the post above.
Edit 2: Updated code as above post suggested and seems to be working fine, no errors. Thank you!
Literally, I could kiss you all right now!
Thanks for all the hard work you guys :D !!!
By the way, Byrth just pushed the fix for the above problem to live, so you can undo the temporary patch.
What do i need to change in this Moten:
Code:function pretarget(spell,action) if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced -- cancel_spell() send_command('input /item "Echo Drops" <me>') elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On -- cancel_spell() send_command('Aggressor') elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On -- cancel_spell() send_command('ThirdEye') elseif spell.english == "Meditate" and player.tp > 290 then -- Cancel Meditate If TP Is Above 290 -- cancel_spell() add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]') elseif (spell.english == 'Ranged' and spell.target.distance > 24.9) or (player.status == 'Engaged' and ((ranged_ws:contains(spell.english) and spell.target.distance > 16+target_distance) or (spell.type == "WeaponSkill" and not ranged_ws:contains(spell.english) and spell.target.distance > target_distance))) then -- Cancel Ranged Attack or WS If You Are Out Of Range -- cancel_spell() add_to_chat(123, spell.name..' Canceled: [Out of Range]') return elseif spell.english == 'Ranged' then -- Auto WS/Decoy Shot/Double Shot -- if player.tp >= 100 and AutoMode == 'ON' and not buffactive.amnesia then cancel_spell() autoWS() elseif windower.ffxi.get_ability_recasts()[52] < 1 and not buffactive.amnesia then cancel_spell() send_command('DecoyShot') elseif windower.ffxi.get_ability_recasts()[126] < 1 and not buffactive.amnesia then cancel_spell() send_command('DoubleShot') elseif windower.ffxi.get_ability_recasts()[129] < 1 and not buffactive.amnesia then cancel_spell() send_command('VelocityShot') end end
Don't want to sound needy but still struggling to figure out a solution to have the elemental staffs in. Using an slightly adjusted lua that byrth included for bard to learn the ropes. However the function to call on elemental fastcast staffs in correlation to element doesn't seem to work.
http://pastebin.com/AHhbuims
particularly line 147 to the sets listed at line 31
Code:if sets.precast.FC[tostring(spell_element)] then equip(sets.precast.FC[tostring(spell_element)])
You need to use spell.element instead of spell_element.
Ive actually tried that to no avail. Even just using the brythBRD.lua that is included with gearswap it would not use the staff.
Did you make a table entry for the staff up in the get sets function?
Negative. Only took the original for what it was already without any mapping.
Fair enough though doesn't explain the fire.
Correct it does have the dagger listed. But does not actually place it in pre-cast
Did you fix spell_element to spell.element?
I use this file on Bard ~every other day and it works fine.
Ok, up and working, thunder swapped to lightning, obvious solution there. For fire now it does work with removing the escape charcter and using "
Had already fixed it and reverted back to what was originally there. Complication would be the element being lightning not thunder. Did not know the naming convention that was being used so was using byrthBRD.lua as refrence.Did you fix spell_element to spell.element?
I use this file on Bard ~every other day and it works fine.
Thanks for the help.