Gearswap Support Thread |
||
Gearswap Support Thread
No, doesnt that work independently? i was having problems with it when i had it loaded.
i'm not sure which ones you've tried, but I would think the following would work. Keep in mind this would cancel ichi as well. To only target ni shadows you would have to use a variable.
Code function midcast(spell,action) if spell.english == "Utsusemi: Ichi" then if buffactive{"Copy Image (2)"] then windower.ffxi.cancel_buff(444) end if buffactive["Copy Image"] then windower.ffxi.cancel_buff(66) end end end Hi I recently added in a new section to my BLU lua warning me when my commonly used buffs wear or when a debuff that is restricting me wears. I originaly used if buff == "buff name" and everything was working fine but when a GEO bubble drops with the same name as my blue magic buff (attack boost/defence boost/haste etc) I get the warning. So I decided to change those particular spells to buff ID's. It works fine except now every time any of the buffs I listed drop it gives my 'Nat. Meditation: [OFF]' warning no mater which buff I have lost.
I first start to use buff ID's online 82 This is my full Lua http://pastebin.com/Lj14Vq9A (line 1363 is where you can find this section) Im sure there is something simple im missing, Thanks in advance Offline
Posts: 101
Asura.Arnan said: » Hi I recently added in a new section to my BLU lua warning me when my commonly used buffs wear or when a debuff that is restricting me wears. I originaly used if buff == "buff name" and everything was working fine but when a GEO bubble drops with the same name as my blue magic buff (attack boost/defence boost/haste etc) I get the warning. So I decided to change those particular spells to buff ID's. It works fine except now every time any of the buffs I listed drop it gives my 'Nat. Meditation: [OFF]' warning no mater which buff I have lost. Pretty simple issue, your lines using the buff array aren't checking anything specific. Line 82's elseif logically equates to : 1)Is buff[91] defined? It always is. 2)Is not gain? True anytime you lose any buff. So it triggers anytime you lose a buff that wasn't previously defined in the order of the code. Since it's all one big if/elseif tree, it stops checking once the Nat. Med. check returns true. sorry I think I understand what you mean but don't understand the fix
Should I make each buff a separate if instead of making everything a elseif? like this Code if buff[91] then -- Nat. Meditation -- if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end end if buff[93] then -- Cocoon Notification -- if not gain then add_to_chat(123,'Cocoon: [OFF]') end end Thanks for the help Offline
Posts: 101
Sorry for being unclear. To try to explain myself better, your if statement isn't checking for what you think it is. It is checking if "buff[91]" is a defined value, not whether or not that's what you gained or lost. My proposed fix :
Code function buff_change(buff,gain,buff_table) ...Your normal name related stuff here... elseif buff_table['id'] == 91 if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end ..Rest of your ID related checks using the same proposed format.. Make sure you add the buff_table parameter to your function buff_change line. This should do as you want. It's OK to keep it in the elseif format like you have, I just brought it up as an explanation to why it picked Nature's Meditation specifically. Asura.Alfylicious said: » (1) Does anyone know where I can find a nice simple bare-bones whm LUA that is essentially just gear swaps for every different type of spell? Asura.Alfylicious said: » (2) I noticed with Kinematics every time I enfeeble even if the weapon doesn't swap my TP gets reset and it's beginning to get annoying. Question 1 would by why does that happen? Asura.Alfylicious said: » (3) I would also prefer having separate cure sets. One while under the aurorastorm buff and one without. How would I go about achieving this? Much like how he has it set up for while under the effects of afflatus solace. Code sets.midcast.CureWithLightWeather = {main="Chatoyant Staff",sub="Achaq Grip",ammo="Incantor Stone", head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring", body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring", back="Twilight Cape",waist="Korin Obi",legs="Nares Trews",feet="Academic's Loafers"} Code if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then if world.weather_element == 'Light' then return 'CureWithLightWeather' end Asura.Arnan said: » elseif buff[91] then -- Nat. Meditation -- if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end elseif buff[93] then -- Cocoon Notification -- if not gain then add_to_chat(123,'Cocoon: [OFF]') end Code elseif 91 then -- Nat. Meditation -- if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end elseif 93 then -- Cocoon Notification -- if not gain then add_to_chat(123,'Cocoon: [OFF]') end Although, I was manually canceling buffs... it doesn't seem to trigger unless some event triggers a GS update, then it will recognize that the buff is gone.
Code if n then end Ok so I done what Vefruvant said and I still have the same problem as I did before and my natures meditation warning comes up when I loose any of the buffs I listed.
I tried changing the elseif's to if's and it said 'end' was expected to close the if on the 1st line when I started using buff ID'd, so I added in end's where I thought they'd be needed and my lua loaded with no errors but what then happened was I received several of the 'Buff: [OFF]' warnings every time I lost a buff. I'm so confused right now :( Offline
Posts: 101
Did my second suggestion not work?
Dunigs said: » Sorry for being unclear. To try to explain myself better, your if statement isn't checking for what you think it is. It is checking if "buff[91]" is a defined value, not whether or not that's what you gained or lost. My proposed fix : Code function buff_change(buff,gain,buff_table) ...Your normal name related stuff here... elseif buff_table['id'] == 91 if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end ..Rest of your ID related checks using the same proposed format.. Make sure you add the buff_table parameter to your function buff_change line. This should do as you want. It's OK to keep it in the elseif format like you have, I just brought it up as an explanation to why it picked Nature's Meditation specifically. Vaf's suggestion is no different than what you were originally. Your if statements are not testing what you think they are. The above should actually do what you want. Dunigs said: » Did my second suggestion not work? Offline
Posts: 101
Did you add buff_table as a third parameter to buff_change? Was returning properly yesterday when I was testing but may have missed something when I copied over. Can check when I get home tonight if this issue is still open.
Dunigs said: » Did you add buff_table as a third parameter to buff_change? Was returning properly yesterday when I was testing but may have missed something when I copied over. Can check when I get home tonight if this issue is still open. Code function buff_change(buff,gain,buff_table) if buff_table['id'] == 91 then if not gain then add_to_chat(123,'Nat. Meditation: [OFF]') end Offline
Posts: 346
is there an entity that returns weapon type?
I am looking to do something like: if player.weapontype == 'great axe' then... without having to define each weapon individually. Hi I have a GearSwap that has a 'blue_spell_map' section to allow me to put the correct gear for each type of Blue spell rather than writing if spell = 'Magic Fruit' for each spell.
I found this in another GearSwap but I was trying to write my own and I was wondering if anyone could explain how I look into this map to put on the correct gear midcast for each spell type? Sidiov said: » is there an entity that returns weapon type? I am looking to do something like: if player.weapontype == 'great axe' then... without having to define each weapon individually. Off the top of my head, the only thing I can think of is spell.skill, which will return 'Great Axe' when using any of the Gaxe WS's. This a specialized usage scenario, and probably not what you were hoping for. i.e. Code function precast(spell, action, spellMap, eventArgs) if spell.skill == 'Great Axe' then -- do something before gaxe ws end end Otherwise, I usually create a table for this situation. For example, inside job_setup(), I do a few things. Code function job_setup() -- Greatswords you use. gsList = S{'Malfeasance', 'Macbain', 'Kaquljaan', 'Mekosuchus Blade' } -- call function that checks your main weapon get_combat_weapon() end I use Mote's libs, so this may not be helpful. One of the wonderful things about Mote's libs, is he provides us with a ton of mechanisms for classifying custom equip sets, and we don't have to write the back end to support them. state.CombatWeapon is one such mechanism, and it's perfect for this task. This is the function defined above. It checks if your equipped main hand weapon is in the table, and if so creates a custom set named "GreatSword". Code function get_combat_weapon() if gsList:contains(player.equipment.main) then state.CombatWeapon:set("GreatSword") else -- use regular set state.CombatWeapon:reset() end end This allows us to create sets like the following. Code sets.engaged.GreatSword = {} sets.engaged.GreatSword.Mid = {} sets.engaged.GreatSword.Acc = {} If you don't use Mote's libs, then you'll still do generally the same thing, but you'll use player.equipment.main to index gsList where you construct your other sets. My DRK or WAR lua's should provide more info, if needed. Offline
Posts: 346
Quetzalcoatl.Orestes said: » ... An unrelated question, I recently moved to windows 10 and I can no longer use my Win+F12 key binds, has anyone else run across that? All the other binds seem to work, so wondering if there is a workaround (apart from moving the bind). Sorry for the slow reply I've only just got round to trying it, it seems to work good so far. Thanks a lot
Sidiov said: » Quetzalcoatl.Orestes said: » ... An unrelated question, I recently moved to windows 10 and I can no longer use my Win+F12 key binds, has anyone else run across that? All the other binds seem to work, so wondering if there is a workaround (apart from moving the bind). No problem. Sorry, no clue on the shortcuts. I still use Windows 7, and can't see myself updating anytime soon. Just make sure if you're creating custom binds that you unbind them in file_unload() so they might work for the next lua you load. Any help is appreciated!
Hey all, just wanted to shoot this quick one at y'all and see if anyone has any ideas on what I can do to resolve the issue. I just got the addon downloaded and added a WHM lua, but when I log in and get ingame I'm getting a Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Error code, I'm just wondering if anyone has any idea's how to fix this issue? P.S. I've tried deleting the gearswap file and redownloading it, didn't do anything. Also I do not have BlinkMeNot or Dressup on. Thanks in advance guys/gals! Bahamut.Ratchie said: » Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Mostly, when it come to refresh.lua error, it shows a second line of error, do you have a second line of error speaking about your whm.lua ? Phoenix.Faloun said: » Bahamut.Ratchie said: » Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Mostly, when it come to refresh.lua error, it shows a second line of error, do you have a second line of error speaking about your whm.lua ? No I do not, I only have the line of the refresh.lua error. Bahamut.Ratchie said: » Phoenix.Faloun said: » Bahamut.Ratchie said: » Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Mostly, when it come to refresh.lua error, it shows a second line of error, do you have a second line of error speaking about your whm.lua ? No I do not, I only have the line of the refresh.lua error. Your WHM lua most likely has a syntax error. You can run your file through an online interpreter, like this one. Choose lua.. hit submit. Offline
Posts: 22
Quetzalcoatl.Orestes said: » Bahamut.Ratchie said: » Phoenix.Faloun said: » Bahamut.Ratchie said: » Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Mostly, when it come to refresh.lua error, it shows a second line of error, do you have a second line of error speaking about your whm.lua ? No I do not, I only have the line of the refresh.lua error. Your WHM lua most likely has a syntax error. You can run your file through an online interpreter, like this one. Choose lua.. hit submit. Okay so I ran the whm lua through it, and it came back as having 1 error in the lua, on line 7, the line reads: include('Obi_Check') It read's this @ the bottom: line 7: attempt to call global 'include' (a nil value) stack traceback: t.lua:7: in main chunk [C]: ? Any suggestions? P.S. I believe I'm just using Grouf's WHM lua if that helps any. Ratchety said: » Quetzalcoatl.Orestes said: » Bahamut.Ratchie said: » Phoenix.Faloun said: » Bahamut.Ratchie said: » Gearswap: Lua Runtime Error: Gearswap/refresh.lua:675: attempt to concatenate a nil value Mostly, when it come to refresh.lua error, it shows a second line of error, do you have a second line of error speaking about your whm.lua ? No I do not, I only have the line of the refresh.lua error. Your WHM lua most likely has a syntax error. You can run your file through an online interpreter, like this one. Choose lua.. hit submit. Okay so I ran the whm lua through it, and it came back as having 1 error in the lua, on line 7, the line reads: include('Obi_Check') It read's this @ the bottom: line 7: attempt to call global 'include' (a nil value) stack traceback: t.lua:7: in main chunk [C]: ? Any suggestions? P.S. I believe I'm just using Grouf's WHM lua if that helps any. Your WHM.lua is trying to load a file named Obi_Check.lua, which you apparently don't have. Try looking wherever you got it from possibly. I've never heard of Grouf, so no idea. |
||
All FFXI content and images © 2002-2024 SQUARE ENIX CO., LTD. FINAL
FANTASY is a registered trademark of Square Enix Co., Ltd.
|