Hi Motenten and thanks for confirming.
I want to use these rules to get the helm equipped on corresponding elemental days, not fulltime. My other question was tho, how do I make it exclude equipment sets instead of the ws itself as shown in the example?
Ex. I want to use the helm on Fudo days for most Fudo equipment sets (Normal, Attack) - but in situations I need heavy accuracy i swap to engaged.Ws.HighAcc['Tachi: Fudo'] and want to use another headpiece in this and these (Ws.HighAcc) sets.
In the example it is shown how I exclude the weaponskill itself, however as said I want to exclude it from specific set variations of WS's. Is that possible to do?
Thanks alot for your input!
Oh, I am, I just manually added HighAcc sets for hiiiigh acc situations (situational 950+ acc in gear on SAM) + I notice i referred to the HighAcc sets with "engaged" instead of "precast" by talking from top of my head from work.. I'm sorry about the confusion. Thanks alot again Orestes, your code makes perfect sense and I should really be able to figure that myself but.. hopfully next time.
Code:-- Setup vars that are user-dependent. function user_setup() state.OffenseMode:options('Normal', 'Acc','HighAcc') state.HybridMode:options('Normal', 'PDT', 'Reraise') state.WeaponskillMode:options('Normal', 'Acc', 'HighAcc', 'Mod') state.PhysicalDefenseMode:options('PDT', 'Reraise')
http://pastebin.com/VaRkZLFG
this is my pastebin and have 2 problems I cannot get Gavialis Helm to work as had way too many errors trying to input your codes. and also want to make sure Sekkanoki and Sengikori, JA sets to be put in on activation. rest is good i think lol.
You don't have the function is_sc_element_today() included. I put mine in User-Globals.lua, so if you're looking at my luas thats why you didn't see it. You can paste it at the bottom of each of your job luas instead though.
Also, you have the set and equip lines commented out. This may have been intentional, or you could have copied directly from my luas. (I have them commented out since I don't actually own the helm yet). Remove the two dashes before line 589, and 662 so they look like this.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
Code:sets.WSDayBonus = { head="Gavialis Helm" } if spell.type == 'WeaponSkill' then if is_sc_element_today(spell) then equip(sets.WSDayBonus) end end
Ok thanks alot Orestes
here is the update Lua, hope all is right.
http://pastebin.com/VaRkZLFG
Not quite.. You had about 15 syntax errors in there. You had ear2="Bladeborn Earring" without a comma after it a bunch of times, missing a bracket to close ["Namas Arrow"] on 571, and a dot before an array index on 587.
Also, you were missing the "end" to close the if / then block for equipping the helm.
I'm not 100% it functions, but this is at least is free of syntax errors. http://pastebin.com/u3Qs1LqH
Thanks alot ya just put earrings and forgot to fix those. Thanks for update Lua will try tonight when i get home
http://pastebin.com/VaRkZLFG
the one you gave me had few errors I fixed but now says lua757 global skillchain_elements'(a nil value)
gear has detected an error in the use function precast
and lua 302
Sorry, copy this into the top of your file.
Code:-- Elements for skillchain names skillchain_elements = {} skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'} skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'} skillchain_elements.Fusion = S{'Light','Fire'} skillchain_elements.Fragmentation = S{'Wind','Lightning'} skillchain_elements.Distortion = S{'Ice','Water'} skillchain_elements.Gravitation = S{'Dark','Earth'} skillchain_elements.Transfixion = S{'Light'} skillchain_elements.Compression = S{'Dark'} skillchain_elements.Liquification = S{'Fire'} skillchain_elements.Induration = S{'Ice'} skillchain_elements.Detonation = S{'Wind'} skillchain_elements.Scission = S{'Earth'} skillchain_elements.Impaction = S{'Lightning'} skillchain_elements.Reverberation = S{'Water'}
Trying to get a bit of code Martel posted for a self_command to pop Velkk Coffers to work, but not having any luck and didn't want to carry on the discussion in the Incursion thread. With Motenten's .lua, I've tried both within the job .lua:
Code:function job_self_command(cmdParams, eventArgs) if command == 'coffer' then cycle = 0 invCount = windower.ffxi.get_bag_info(0).count if invCount == 80 then add_to_chat(140,'Inv. full. Ending cycle') elseif player.inventory["Velkk Coffer"] then send_command('input /item "Velkk Coffer"') cycle = 1 else add_to_chat(140,'No Coffers found in inv.') send_command('findall Velkk Coffer') end if cycle == 1 then send_command('wait 2;gc c coffer') end end endBoth work in the sense that I get no errors when reloading the .lua, however neither work once I input //gs c coffer. I did a search for self_command within the thread and tried a few variations that I found within, which may or may not of even been for Mote's files, with no luck. Any help with what am I missing here would be appreciated, would love to do this rather than alter a script each time. :3Code:function self_command(command) if command == 'coffer' then cycle = 0 invCount = windower.ffxi.get_bag_info(0).count if invCount == 80 then add_to_chat(140,'Inv. full. Ending cycle') elseif player.inventory["Velkk Coffer"] then send_command('input /item "Velkk Coffer"') cycle = 1 else add_to_chat(140,'No Coffers found in inv.') send_command('findall Velkk Coffer') end if cycle == 1 then send_command('wait 2;gc c coffer') end end end
i could be missing something here too, but neither /item "Velkk Coffer" nor /item "Velkk Coffer" <me> input directly into FFXI would open the box, so i suspect that is the problem.
Did spell.action_type get removed at some time? I can't find it anymore in the XLS example file, but I have a bunch of old lines that try to use spell.action_type in my luas.
edit:
Nah the Swipe part doesn't work. Me and another friend are having the same issue so it's gotta be something in the original code I think.
I do not understand completely every single line inside the trim() function, so I don't really know what's wrong.
The reset runes while dead thing doesn't work either but there's a simple fix for that.
Use the following lines instead
Code:windower.raw_register_event('status change',function(new, old) if gearswap.res.statuses[new].english == 'Dead' then reset_timers() end end)
I have found sometimes switchin double quotes to single quotes makes things work when dealin with windower things. try /item 'Velkk Coffer' <me>.
For instance I tried alot of times in the past to be able to get my mule to use a forbidden key via send and it never seemed to work but recently figured out a macro using single quotes worked:
/con send @others /targetnpc
/con send @others /item 'Forbidden Key' <t>
Yeah, I forgot to update the pastebin code with the other fixes I made, after Sechs brought up a few points.
And reviewing things, I think I see what the Swipe problem is. Make the following changes (or just re-copy from the pastebin):
Code:elseif spell.name == "Swipe" then send_command(trim(1)) endCode:-- Remove the oldest rune(s) from the table, until we're below the max_runes limit. -- If given a value n, remove n runes from the table. function trim(n) local cmd_queue = '' local to_remove = n or (rune_timers:length() - max_runes) while to_remove > 0 and rune_timers:length() > 0 do local oldest for index,entry in pairs(rune_timers) do if oldest == nil or entry.expires < rune_timers[oldest].expires then oldest = index end end cmd_queue = cmd_queue .. prune(rune_timers[oldest].rune) to_remove = to_remove - 1 end return cmd_queue end
@Mote
Swipe works perfectly for me with that change, thanks Mote.
I apologize if I insist on this topic. Anybody knows anything?
I still have these .action_type lines in my luas, they're likely remnants of when I started messing up with luas but I'm not even sure they serve a purpose anymore, plus I don't see the command in the XLS file. Kinda means it got eliminated somewhere along the road? When and why? Which other command took its place?
action_type is still present in the GearSwap code, Sechs. I have no idea if it was ever explicitly in the spreadsheet.
Then it probably never was there in the xls I suppose.
Which fields does it accept? I only know "Magic" as one of the possible ones.