Gearswap Support Thread

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 83 84 85 ... 181 182 183
 Asura.Serkit
Offline
Serveur: Asura
Game: FFXI
user: Devin622
Posts: 4
By Asura.Serkit 2015-10-24 11:34:08
Link | Citer | R
 
No, doesnt that work independently? i was having problems with it when i had it loaded.
 Shiva.Nitroustaru
Offline
Serveur: Shiva
Game: FFXI
Posts: 29
By Shiva.Nitroustaru 2015-10-24 19:04:04
Link | Citer | R
 
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
 Asura.Arnan
Offline
Serveur: Asura
Game: FFXI
user: amadis
Posts: 132
By Asura.Arnan 2015-10-25 03:52:02
Link | Citer | R
 
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
By Dunigs 2015-10-25 16:49:25
Link | Citer | R
 
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.
 Asura.Arnan
Offline
Serveur: Asura
Game: FFXI
user: amadis
Posts: 132
By Asura.Arnan 2015-10-25 17:23:17
Link | Citer | R
 
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
By Dunigs 2015-10-25 18:44:40
Link | Citer | R
 
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.
 
Offline
Posts:
By 2015-10-25 19:38:34
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Asura.Vafruvant
Offline
Serveur: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2015-10-25 23:33:08
Link | Citer | R
 
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?
That's kind of...inaccurate...since the only thing you need to update is gear. Nothing ground-breaking has happened to WHM in recent history to warrant a "brand new file".
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?
It will kill TP if your grip changes, or if it puts on a ranged weapon instead of ammo, otherwise, your weapon is changing and you don't know it.
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.
Look at the SCH lua he has on his site. There are two segments you need to copy:
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"}
and
Code
        if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if world.weather_element == 'Light' then
                return 'CureWithLightWeather'
            end
 
Offline
Posts:
By 2015-10-25 23:47:56
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Asura.Vafruvant
Offline
Serveur: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2015-10-26 00:04:09
Link | Citer | R
 
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    
So, from what I have tried, and it might not work really, but preliminary testing does, just say:
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     
Just changing it to the number has worked for every buff I tested.
 Asura.Vafruvant
Offline
Serveur: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2015-10-26 00:06:03
Link | Citer | R
 
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.
 Leviathan.Vow
Offline
Serveur: Leviathan
Game: FFXI
user: woVow
Posts: 125
By Leviathan.Vow 2015-10-26 00:42:51
Link | Citer | R
 
Code
if n then end
(where n is an integer) will always evaluate to true. Conditionals consider false and nil as false and anything else as true.
 Asura.Arnan
Offline
Serveur: Asura
Game: FFXI
user: amadis
Posts: 132
By Asura.Arnan 2015-10-26 04:13:08
Link | Citer | R
 
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
By Dunigs 2015-10-26 09:05:28
Link | Citer | R
 
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.
 Asura.Vafruvant
Offline
Serveur: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2015-10-26 11:42:40
Link | Citer | R
 
Dunigs said: »
Did my second suggestion not work?
It does not, that is why I replied with what I did. I tried extrapolating how the buff_change function works, but I just don't know enough about lua to figure it out. I will admit to only testing one buff when I should have tested multiple given the problem given.
Offline
Posts: 101
By Dunigs 2015-10-26 12:12:27
Link | Citer | R
 
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.
 Asura.Vafruvant
Offline
Serveur: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2015-10-26 12:16:57
Link | Citer | R
 
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.
Yep, the parameters were identical. Basically, as a test, I took your example directly:
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
it was missing a "then" but otherwise verbatim.
Offline
Posts: 346
By Sidiov 2015-10-26 14:23:27
Link | Citer | R
 
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.
 Asura.Brennski
Offline
Serveur: Asura
Game: FFXI
user: Ogri
Posts: 127
By Asura.Brennski 2015-10-27 06:22:29
Link | Citer | R
 
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?
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2015-10-27 09:27:12
Link | Citer | R
 
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
By Sidiov 2015-10-28 21:20:52
Link | Citer | R
 
Quetzalcoatl.Orestes said: »
...
Thanks a bunch! I've just created lists of weapons I will keep up to date based on your example, thanks.

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).
 Asura.Arnan
Offline
Serveur: Asura
Game: FFXI
user: amadis
Posts: 132
By Asura.Arnan 2015-10-29 05:06:37
Link | Citer | R
 
Sorry for the slow reply I've only just got round to trying it, it seems to work good so far. Thanks a lot
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2015-10-29 08:48:01
Link | Citer | R
 
Sidiov said: »
Quetzalcoatl.Orestes said: »
...
Thanks a bunch! I've just created lists of weapons I will keep up to date based on your example, thanks.

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.
 Bahamut.Ratchie
Offline
Serveur: Bahamut
Game: FFXI
user: Ratchety
Posts: 4
By Bahamut.Ratchie 2015-10-30 00:23:00
Link | Citer | R
 
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!
 Phoenix.Faloun
Offline
Serveur: Phoenix
Game: FFXI
user: Chroph
Posts: 81
By Phoenix.Faloun 2015-10-30 02:20:57
Link | Citer | R
 
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 ?
 Bahamut.Ratchie
Offline
Serveur: Bahamut
Game: FFXI
user: Ratchety
Posts: 4
By Bahamut.Ratchie 2015-10-30 08:56:24
Link | Citer | R
 
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.
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2015-10-30 09:28:44
Link | Citer | R
 
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
By Ratchety 2015-10-30 09:41:50
Link | Citer | R
 
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.
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2015-10-30 09:54:47
Link | Citer | R
 
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.
First Page 2 3 ... 83 84 85 ... 181 182 183