Gearswap Support Thread |
||
Gearswap Support Thread
Offline
Posts: 1018
Any way to determine if your busy casting or shooting range or weaponskilling so I can cancel spells?
midaction() is supposed to do that. It honestly doesn't work that well and I'm still trying to figure out why.
Quetzalcoatl.Dab said: » How would I add a more then 100MP TP set for THF.lua? for the triple attack ring I use this on monk: Code function aftercast(spell) if player.status =='Engaged' then if TP_Index == 1 then if player.mp >= 100 then equip(sets.TP[sets.TP.index[TP_Index]]) elseif player.mp < 100 then equip(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"}) end else equip(sets.TP[sets.TP.index[TP_Index]]) end else equip(sets.aftercast.Idle) end end big picture here: Offline
Posts: 1018
That extra elseif can be eliminated simply needs a else:
Code if player.mp >= 100 then equip(sets.TP[sets.TP.index[TP_Index]]) else equip(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"}) end Is there a way to do something similar to this but make it less spamtastic?
Code function buff_change(new,old) if buffactive['Enmity Boost'] then send_command('@ input /echo >>> Crusade UP <<<') else send_command('@ input /echo >>> Crusade DOWN <<<') end if buffactive['Phalanx'] then send_command('@ input /echo >>> Phalanx UP <<<') else send_command('@ input /echo >>> Phalanx DOWN <<<') end end Offline
Posts: 284
Something like:
Code function job_buff_change(buff, gain) if S{'enmity boost'}:contains(buff:lower()) then if gain == true then send_command('@ input /echo >>> Crusade UP <<<') else send_command('@ input /echo >>> Crusade DOWN <<<') end end end EDIT/UNDELETE: Sorry, just wanted to make sure it worked. :x The argument for buff_change is (name,gain), unlike status_change which uses (new,old). Name refers to the buff name, and gain is true if you gained said buff, or false if you lost said buff.
I imagine your problem right now is you're getting the echos every time you get any buff, when you actually just want it to echo when you activate it(seems a little trivial since if you activate you clearly know you have the buff), and the moment its lost. If my assumptions are correct, you'd want it to look something like this : Code function buff_change(name,gain) if name == 'Enmity Boost' and gain then send_command('@ input /echo >>> Crusade UP <<<') elseif name == 'Enmity Boost' and not gain then send_command('@ input /echo >>> Crusade DOWN <<<') end end Phalanx would be the same except for changing 'Enmity Boost' to 'Phalanx' obviously. Edit : Or could further generalize using the : Code if S{'Enmity Boost'}:contains(name) then suggestion, expanding the table to include everything you'd like to check S{'Enmity Boost','Phalanx','Protect'} for example, then changing your send command lines to Code send_command('@ input /echo >>> '..name..' UP <<<') The upside is you only have to change the table anytime you want to adjust the trigger buffs, and less lines of code. The downside is you get 'Enmity Boost UP' displayed instead of 'Crusade UP', but specific spells that have different buff names like that could be custom mapped if it's that important. So.. new to GS and have a couple questions. Messing with the Byrth_Pld sample, I notice it's calling out JA sets as midcast, as well as WS sets, is this correct? I thought it would be precast.
Also I can't seem to figure how to save my work to w/e correct folder within GS, keeps telling me I don't have permission. Bismarck.Inference said: » The argument for buff_change is (name,gain), unlike status_change which uses (new,old). Name refers to the buff name, and gain is true if you gained said buff, or false if you lost said buff. I imagine your problem right now is you're getting the echos every time you get any buff, when you actually just want it to echo when you activate it(seems a little trivial since if you activate you clearly know you have the buff), and the moment its lost. If my assumptions are correct, you'd want it to look something like this : Code function buff_change(name,gain) if name == 'Enmity Boost' and gain then send_command('@ input /echo >>> Crusade UP <<<') elseif name == 'Enmity Boost' and not gain then send_command('@ input /echo >>> Crusade DOWN <<<') end end Phalanx would be the same except for changing 'Enmity Boost' to 'Phalanx' obviously. Edit : Or could further generalize using the : Code if S{'Enmity Boost'}:contains(name) then suggestion, expanding the table to include everything you'd like to check S{'Enmity Boost','Phalanx','Protect'} for example, then changing your send command lines to Code send_command('@ input /echo >>> '..name..' UP <<<') The upside is you only have to change the table anytime you want to adjust the trigger buffs, and less lines of code. The downside is you get 'Enmity Boost UP' displayed instead of 'Crusade UP', but specific spells that have different buff names like that could be custom mapped if it's that important. Thanks for that. Yes... I only really need the DOWN part... but at the time of writing it I put the UP in as well. Pro/Shell visuals are usually noticeable when gone. Phalanx and Crusade can blend in with Rampart/Zerk/Whatever else and generally don't last as long as pro/shell. Thanks for the (name, gain) tip though! I'll play around with it. :) EDIT: Code function buff_change(name,gain) if name == 'Enmity Boost' and not gain then send_command('@ input /echo >>> Crusade DOWN <<<') end if name == 'Phalanx' and not gain then send_command('@ input /echo >>> Phalanx DOWN <<<') end end Ended up going with this. Lakshmi.Byrth said: » midaction() is supposed to do that. It honestly doesn't work that well and I'm still trying to figure out why. It seems odd to me that gearswap is (or my state tracker is buggy) re-entrant between the 3 casting phases since you can't ever sucessfully start an action before your previous action is finished or interrupted. I'd think that it would be enough for midaction to just keep track of what gearswap is doing without needing to rely on game state, but I don't really know what I'm talking about.... Also, about the resources conflict between spell.recast_id and spell.id you mentioned confused me, since I'm not specifying which to use anywhere. Is it configurable somewhere? I'm using a lightly-modified version of Bokura's Gearswap for SAM. Even when I don't meet the conditions, it keeps triggering my STR earring to equip as precast for Fudo/Shoha:
Code if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It -- cancel_spell() add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]') return else equipSet = sets.WS if equipSet[spell.english] then equipSet = equipSet[spell.english] end if Attack == 'ON' then equipSet = equipSet["ATT"] end if equipSet[AccArray[AccIndex]] then equipSet = equipSet[AccArray[AccIndex]] end if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then equipSet = equipSet["STP"] end if buffactive.Sekkanoki then -- Equip Unkai Kote +2 When Sekkanoki Is On -- equipSet = set_combine(equipSet,{hands="Unkai Kote +2"}) end if buffactive.Sengikori then -- Equip Unkai Sune-ate +2 When Sengikori Is On -- equipSet = set_combine(equipSet,{feet="Unkai Sune-ate +2"}) end if (spell.english == "Tachi: Fudo" or spell.english == "Tachi: Shoha") and (player.tp > 299 or buffactive.Sekkanoki or (player.tp > 199 and buffactive.Hagakure)) then -- Equip Flame Pearl When You Have 300 TP or Sekkanoki On or 200+ TP For Hagakure -- equipSet = set_combine(equipSet,{ear1="Flame Pearl"}) end equip(equipSet) end Anyone else run into this? edit: nevermind. I'm an idiot. I had asked this before, but thought I had "fixed" it, but the issue cropped up agai very soon after and I have been simply dealing with it.
Fenrir.Divinian said: » I apologize if this has been said/asked already, but I am having some trouble with the '//gs export sets xml' command. It is leaving certain pieces of gear (both older and newer) out. It has been leaving Izizoeksi out for a while now (I manually add it) and is now not converting new gear sets that I make into an xml. Is this happening for anyone else? Is there something I am doing wrong? Any advice? Thanks in advance. This is still happening to me when I use //gs export sets xml. When I make a DD GS, I never put weapons into the actual gear sets so that I can choose which weapons I want to use manually instead of allowing GS to do it. What I do to try and collect the items is create a "dummy" set that does not have a rule attached to it. This does not seem to be working. For example, if I put Usonmunku in a dummy precast_collect set, and then //gs export sets xml, it will not end up in the xml. Also, //gs export sets xml does not catch gear locks, like mavi kavuk +2 when chain affinity is up. Thoughts? Offline
Posts: 284
Does 'gs c update' run your update function or just updates your set to your current status?
Has to be a command you defined in self_command, at which point it will do whatever you tell it to do. Easiest method is to just tell it to run status_change(player.status) which would do the latter.
Offline
Posts: 284
Bismarck.Inference said: » Has to be a command you defined in self_command, at which point it will do whatever you tell it to do. Easiest method is to just tell it to run status_change(player.status) which would do the latter. Maybe it's a Mote command then? Because it's not in any of my files but it seems to maybe do the later. I'll look. EDIT: Yeah, it is. And it does just do the latter. gdiShun said: » Does 'gs c update' run your update function or just updates your set to your current status? If it's based on mine, it will: refresh state.Buff tracking variables, run any job_update function you've defined, and (unless you told it otherwise in job_update) re-equip gear based on your current status. If you add 'user' to the end of it (so 'gs c update user') it will also call the function that displays your current state. So where do I save name_job xml files? and is it in xml or lua? confused here,also bump for my last post, ty in advance.
Phoenix.Chomeymatt
Offline
Save em as .lua files, name them as charactername_job.lua . Save em to Windower 4 folder -> addons -> GearSwap -> data.
Quote: So.. new to GS and have a couple questions. Messing with the Byrth_Pld sample, I notice it's calling out JA sets as midcast, as well as WS sets, is this correct? I thought it would be precast. Technically, JAs and weaponskills have their effects calculated at midcast. That's usually ignored, though, because there's nothing of value to equip in precast that you'd have any reason to separate equips for. So basically, you can go either way and it's all pretty much the same. Quote: Also I can't seem to figure how to save my work to w/e correct folder within GS, keeps telling me I don't have permission. If you have permissions problems with saving files in the default Windower directory, you can instead save your files in $APPDATA$/Windower/GearSwap (or optionally, $APPDATA$/Windower/GearSwap/<charactername>). $APPDATA$ depends on your OS. On Windows 7, it would be C:\Users\<username>\AppData\Roaming\Windower. Google 'windows appdata directory' for other operating systems. Anyway, that directory is explicitly for saving files that the user has full access to, so you don't have to worry about permissions problems editing files in the install directory. Cool,thanks, so now about 20 more hours of fiddling to get it halfway where I want it,lol.
Mote (or anyone else),
In Mote's SMN file, how could I set up a rule to use SMN AF3+2 when using Cure BPs to gain the TP bonus on them? Thanks! This is more a windower question, but what's the shortcut to bind the \ key, I've tried \ and backslash and even |, if you're not following what I'm asking:
send_command('bind ^\ input /ja "Chivalry" <me>') send_command('bind !\ input /ja "Palisade" <me>') send_command('bind ^backslash input /ja "Chivalry" <me>') send_command('bind !backslash input /ja "Palisade" <me>') send_command('bind ^| input /ja "Chivalry" <me>') send_command('bind !| input /ja "Palisade" <me>') This works fine with backspace, and most keys I've tried, but I can't seem to get it to work with backslash, anyone know? bind \\ input stuff
Backslash is an escape character. Ah, thanks!
--Correction, still not working for me, just tried: send_command('bind ^\\ input /ja "Dark Arts" <me>') send_command('bind !\\ input /ja "Addendum: Black" <me>') send_command('bind @\\ input /ja "Manifestation" <me>') send_command('bind \\ input /ja "Manifestation" <me>') update: Interestingly that works if I just use a command in the windower console to bind, but it doesn't work when loaded with my lua, which is important as I want these bindings to change from job to job. From a Lua file: bind \\\\ input stuff.
Again, thank you!
Having issues with sets.precast.WS["Rudra's Storm"]
No lua errors. However, in game, when I try to //gs equip sets.precast.WS["Rudra's Storm"] - I get an error that says the set does not exist. It's case sensitive, make sure that you have capitals in all the right places.
Offline
Posts: 284
Make sure sets.precast is declared somewhere(Unless you're using Mote's which then I don't think it needs to be).
|
||
All FFXI content and images © 2002-2024 SQUARE ENIX CO., LTD. FINAL
FANTASY is a registered trademark of Square Enix Co., Ltd.
|