there is a very doom happy tiger nm in abby lathiene. and that minotaur in vunker. Id go with the tiger though as I believe he has endoom or something. pair that with the Auto RR atma and ur set to test!
there is a very doom happy tiger nm in abby lathiene. and that minotaur in vunker. Id go with the tiger though as I believe he has endoom or something. pair that with the Auto RR atma and ur set to test!
oh and there is a uragnite i think in delve tha thas a doom aura u can outrun
Easier way - change the buffactive=doom part to something a lot easier to apply, say.. Protect. Have mule or yourself cast protect until swaps working well, change back to doom when happy.
Hey i'm looking for some help with my code i'm using motenn's lua for rdm and i'm trying to get it to equip my lethargy gantherots when ever saboteur is active here is the code i'm using after the original code wouldn't switch them in, this still isn't working either though
function midcast(spell)
if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
Then as a set I have
sets.buff.Saboteur = {hands="Leth. Gantherots +1"}
How can you differentiate between physical and magical weaponskills in Gearswap? I'm helping a friend get set up on COR and his lua (based on Motes) is checking if a ws is physical with spell.element == 'None' which is failing because all weaponskills I tried are returning an element type. Here's the code snippet. There's more, but this should illustrate the problem:
Code:if spell.type == 'WeaponSkill' then if spell.skill == "Marksmanship" then if spell.element == 'None' then -- physical weaponskills bullet_name = gear.WSbullet else -- magical weaponskills add_to_chat(104, 'Element: '..spell.element) bullet_name = gear.MAbullet end else -- Ignore non-ranged weaponskills return end
OK, thanks for letting me know. I made a set in user_setup:and this seems to work:Code:physicalWS = S{'Split Shot','Sniper Shot','Slug Shot','Detonator','Numbing Shot','Last Stand','Coronach'}
Code:if spell.type == 'WeaponSkill' then if spell.skill == "Marksmanship" then if physicalWS:contains(spell.english) then -- physical weaponskills bullet_name = gear.WSbullet add_to_chat(104, 'Physical WS used. Bullet name: '..bullet_name) else -- magical weaponskills bullet_name = gear.MAbullet add_to_chat(104, 'Magical WS used. Bullet name: '..bullet_name) 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
Yeah, I did this, and it works.
However, I noticed a flaw in my GS and made some code to remedy it. It works, but I felt someone who actually knows how to code would find it messy. Like half of it should be simplified.
The flaw: Locked gear index is triggered (generally for PDT gear), and doom, petrify, sleep, stun, etc lands on me. The rule to put me in a certain set is triggered, and it does that. When the debuff wears off it sets me back to the TP set beneath the lock gear index which is simply changing me into a set then disabling the slots, but works with pre and midcast actions (like WSing or casting) and then back to the lock set on top of my TP set. The lock gear index is still reading true so attempting to lock a set will trigger a false and not work until hit again.
Most noticable on the dragon in Reisenjima, get terrored by the dragon, then the wings sleep you. Sleep wears off and you then take off your PDT gear while still terrored and getting hundredfisted in the face.
So obliviously the .lua wasn't being told to look for this index. doh..
So here was the old code:
New code that seems to work from brief testing, but I'd like feedback on:Code:function buff_change(n, gain, buff_table) local name name = string.lower(n) if name == "terror" or name == "petrification" or name == "sleep" or name == "stun" then if gain == true then ChangeGear(sets.Utility.DerpDT) elseif player.status == 'Engaged' then ChangeGear(sets.TP[sets.TP.index[TP_ind]]) else ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) end end if name == "doom" then if gain == true then ChangeGear(sets.Utility.Doom) send_command('@input /p Doomed :|') disable('ring1','waist') elseif player.status == 'Engaged' then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) else enable('ring1','waist') ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) end end end
Here is the updated .lua:Code:function buff_change(n, gain, buff_table) local name name = string.lower(n) if name == "terror" or name == "petrification" or name == "sleep" or name == "stun" then if gain == true then ChangeGear(sets.TP.Tank) elseif player.status == 'Engaged' and LockGearIndex == true then enable('ring1','waist') ChangeGear(LockGearSet) elseif player.status == 'Engaged' and LockGearIndex == false then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) elseif player.status == 'Idle' and LockGearIndex == true then enable('ring1','waist') ChangeGear(LockGearSet) elseif player.status == 'Idle' and LockGearIndex == false then enable('ring1','waist') ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) end end if name == "doom" then if gain == true then ChangeGear(sets.Utility.Doom) send_command('@input /p Doomed :|') disable('ring1','waist') elseif player.status == 'Engaged' and LockGearIndex == true then enable('ring1','waist') ChangeGear(LockGearSet) elseif player.status == 'Engaged' and LockGearIndex == false then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) elseif player.status == 'Idle' and LockGearIndex == true then enable('ring1','waist') ChangeGear(LockGearSet) elseif player.status == 'Idle' and LockGearIndex == false then enable('ring1','waist') ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) end end end
https://pastebin.com/THLpaa7D
this might work
Code:function buff_change(name, gain, buff_table) if S{"terror","petrification","sleep","stun"}:contains(name) then if gain then ChangeGear(sets.TP.Tank) elseif not has_any_buff_of({"terror","petrification","sleep","stun"}) then if player.status == 'Engaged' then if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) elseif not LockGearIndex then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end elseif player.status == 'Idle' then if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) elseif not LockGearIndex then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end end end elseif name == "doom" then if gain then ChangeGear(sets.Utility.Doom) send_command('@input /p Doomed :|') disable('ring1','waist') else if player.status == 'Engaged' then if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) elseif not LockGearIndex then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end elseif player.status == 'Idle' then if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) elseif not LockGearIndex then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end end end end end function has_any_buff_of(buff_set)--returns true if you have any of the buffs given in table for i,v in pairs(buff_set) do if buffactive[v] ~= nil then return true end end end
Mhm, no, it didn't work at all.
I changed doom to protect and casting protect (how I was testing it before) didn't trigger anything. In either of them.
Please help. I'm trying to use :contains on a table that I've defined within the same .lua but it is giving me a nil error.
Here is the error code:
GearSwap: Lua runtime error: gearswap/flow.lua:341:
GearSwap has detected an error in the user function self_command:
...er4\/addons/gearswap/libs/lim2/Mote-SelfCommands.lua:220: attempt to index global 'Cites' (a nil value)
It is giving the error on the line 'if areas.Cities:contains(world.area) then'
Here is the code:
Thanks!Code:elseif commandArgs[1] == 'testb' if areas.Cites:contains(world.area) then add_to_chat('this work') end areas = {} -- City areas for town gear and behavior. areas.Cities = S{ "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno", "Port Windurst", "Windurst Waters", "Windurst Woods", "Windurst Walls", "Heavens Tower", "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria", "Port Bastok", "Bastok Markets", "Bastok Mines", "Metalworks", "Aht Urhgan Whitegate", "Tavanazian Safehold", "Nashmau", "Selbina", "Mhaura", "Norg", "Eastern Adoulin", "Western Adoulin", "Kazham" }
Thank You so much dlsmd
(fail)
(facepalm)
Okay, did some testing.
Issue was "protect" wasnt valid until I tried "Protect". Added back
and it fixed it.Code:local name name = string.lower(n)
Seems to work the same as my sloppy coding did. Thanks.
Noticed a flaw with locksets in general outside of this. While engaging or going idle while locked it isnt set to look at that index. Makes sense I will fix that later (have to head to Omen static now). I just never noticed because I am not ever generally locked while idle before engaging and don't generally need to be locked into a gearset when going idle (id have idle pdt set).
Which is all just my very poor way of saying "gear lock is overwritten by changing to and from idle to tp in general and I never noticed".
So, I started messing around since that is all I have done to this point and changed:
toCode:function IdleState() ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) if buffactive['Weakness'] then ChangeGear({head = "Twilight Helm", body = "Twilight Mail"}) --Not locked in, only on during weakened idle, and requires an action after raising to trigger. Lockgear otherwise. elseif mp_jobs:contains(player.sub_job) and player.mpp < 75 then ChangeGear({head = "Jumalik Helm", body = "Chozoron Coselete"}) end end
And fixed it based on the code you gave me dlsmd :DCode:function IdleState() if LockGearIndex then ChangeGear(LockGearSet) elseif not LockGearIndex then ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]]) elseif buffactive['Weakness'] then ChangeGear({head = "Twilight Helm", body = "Twilight Mail"}) --Not locked in, only on during weakened idle, and requires an action after raising to trigger. Lockgear otherwise. elseif mp_jobs:contains(player.sub_job) and player.mpp < 75 then ChangeGear({head = "Jumalik Helm", body = "Chozoron Coselete"}) end end
Same for TPing.
Now I just need to figure out how to stop GS from getting stuck in casting or WS gear while I am slept, stunned, terrored, etc.
EDIT: Fixed this^
That and it be nice if it the Fucho-no-obi didn't equip over my flume belt while I am in a pdt idle set. That one has been the bane of my RUN. Is there a rule that I could add to that if mp <= 50 "and equipt set = then". That would fix it, but I don't know anyone who works like that to check and compare against.
EDIT: Still don't know this one^
EDIT2: Had the bright idea of adding "and Idle_ind == # then" to the rule instead of thinking about from a gear perspective and it worked :D
EDIT:
I have to really hand it to Mote too. I created a basic TH rule just now since that is easy, but it would be nice not to have to toggle it on off constantly after a hit.
So I looked up the TH rule he has in his THF luas. Unsurprisingly, it was more complex than I expected. The issue also is that it requires his includes for the "gs c update auto" function, which I assume is colloquially what is refereed to as the "heart beat". Meaning it updates your status ever few seconds. I hate this function for the fact if I throw something on like crafting gear, a warp ring, etc it all has to be defined or else it is replaced with idle gear.
I do see the use for this though as it would fix my issue of town (trying to figure out how to do this based on a zone change rule at the moment) or weakness gear not equipping until an action is preformed. I wish there was a compromise though instead of it seemingly being one way or the other.
https://pastebin.com/4gba1GcM
Hi guys, above is my SMN lua, I've spent weeks trying to work out how I would go about adding different toggle modes F9-F12 etc.
This is taken from my BST lua,
state.IdleMode:options('Normal', 'PetDT')
state.OffenseMode:options('Normal', 'PetDT', 'Pet.HighAcc')
If possible please please please can someone edit my lua so I could toggle through the modes. With F12 putting me into the current idle set. I'm not clever enough!
Thanks :)
Spent the last couple of weeks on and off working my DRG and BLU luas.
I left my RUN lua alone because I need to break it into modes (TP dual wield, TP tanking, and TP DDing, with toggles in each based on the mode) so I am interested in what you work out before I dive into figuring mine out.
That being said, thanks in large part to the help I have received here. I finished my DRG lua (pretty much), and refined my BLU one. So, thanks for that.
I only have one question. For the section that sends recasts to the chat log (if not spell.interrupted then), is it possible to change the ('wait xxx;input /echo) from a send command to an add to chat? Just because send command puts this in the DD log with everything else, and add to chat goes into the chat log instead with the option to change text color.
You have this written at several points:
It should be:Code:if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) elseif not LockGearIndex then enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end
As it is written, if you ever added a conditional statement beyond the first two, the new statement would never run.Code:if LockGearIndex then enable('ring1','waist') ChangeGear(LockGearSet) else enable('ring1','waist') ChangeGear(sets.TP[sets.TP.index[TP_ind]]) end