Item Search
     
BG-Wiki Search
Closed Thread
Page 274 of 302 FirstFirst ... 224 264 272 273 274 275 276 284 ... LastLast
Results 5461 to 5480 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #5461
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Quote Originally Posted by dlsmd View Post
    thats because ffxi only auto removes sub and ammo when you change main and range respectivly


    yes its buffactive[[buff_name_or_buff_id] and if you want to know how many oif them are up do this buffactive[buff_name_or_buff_id] == count_your_looking_for

    Code:
        [299] = {id=299,en="Overload",ja="オーバーロード",enl="overloaded",jal="オーバーロード"},
        [300] = {id=300,en="Fire Maneuver",ja="ファイアマニューバ",enl="Fire Maneuver",jal="ファイアマニューバ"},
        [301] = {id=301,en="Ice Maneuver",ja="アイスマニューバ",enl="Ice Maneuver",jal="アイスマニューバ"},
        [302] = {id=302,en="Wind Maneuver",ja="ウィンドマニューバ",enl="Wind Maneuver",jal="ウィンドマニューバ"},
        [303] = {id=303,en="Earth Maneuver",ja="アースマニューバ",enl="Earth Maneuver",jal="アースマニューバ"},
        [304] = {id=304,en="Thunder Maneuver",ja="サンダーマニューバ",enl="Thunder Maneuver",jal="サンダーマニューバ"},
        [305] = {id=305,en="Water Maneuver",ja="ウォータマニューバ",enl="Water Maneuver",jal="ウォータマニューバ"},
        [306] = {id=306,en="Light Maneuver",ja="ライトマニューバ",enl="Light Maneuver",jal="ライトマニューバ"},
        [307] = {id=307,en="Dark Maneuver",ja="ダークマニューバ",enl="Dark Maneuver",jal="ダークマニューバ"},
    Thanks dlsmd, that would only work for each kind of maneuver separately though? or is there a way to group these into a group of buffs. Say I use light, fire, and water maneuvers, a total of 3 maneuvers, (but I dont always use those particular element maneuvers) hmm or maybe a way to check if those various counts somehow add up to 3. im not sure of the syntax.

  2. #5462

    Quote Originally Posted by Trumpy View Post
    Thanks dlsmd, that would only work for each kind of maneuver separately though? or is there a way to group these into a group of buffs. Say I use light, fire, and water maneuvers, a total of 3 maneuvers, (but I dont always use those particular element maneuvers) hmm or maybe a way to check if those various counts somehow add up to 3. im not sure of the syntax.
    local Maneuver_count = 0
    Maneuver_count = Maneuver_count + buffactive["Fire Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Ice Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Wind Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Earth Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Thunder Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Water Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Light Maneuver"]
    Maneuver_count = Maneuver_count + buffactive["Dark Maneuver"]

  3. #5463
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    ok ill try that out. thank you

  4. #5464

    Quote Originally Posted by Trumpy View Post
    ok ill try that out. thank you
    you might have to do it like this to make it not give a nil error but im not sure
    Code:
    local Maneuver_count = 0
    Maneuver_count = Maneuver_count + (buffactive["Fire Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Ice Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Wind Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Earth Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Thunder Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Water Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Light Maneuver"] or 0)
    Maneuver_count = Maneuver_count + (buffactive["Dark Maneuver"] or 0)
    then check with this
    Maneuver_count ==

  5. #5465
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    Code:
    function pretarget(spell,action)
    	if spell.action_type == 'Magic' or spell.type == "Ninjutsu" and buffactive['Silence'] then
    		cancel_spell()
    		if player.inventory['Echo Drops'].count > 0 or player.satchel['Echo Drops'].count > 0 then
    			send_command('input /item "Echo Drops" <me>')
    		else
    			send_command('input /item "Remedy" <me>')
    		end
    	end
    end
    This doesn't work. Error says: "attempt to index field 'Echo Drops' (a nil value)

    What did I do wrong?

  6. #5466

    Quote Originally Posted by Rehn View Post
    Code:
    function pretarget(spell,action)
        if spell.action_type == 'Magic' or spell.type == "Ninjutsu" and buffactive['Silence'] then
            cancel_spell()
            if player.inventory['Echo Drops'].count > 0 or player.satchel['Echo Drops'].count > 0 then
                send_command('input /item "Echo Drops" <me>')
            else
                send_command('input /item "Remedy" <me>')
            end
        end
    end
    This doesn't work. Error says: "attempt to index field 'Echo Drops' (a nil value)

    What did I do wrong?
    do this
    if (player.inventory['Echo Drops'] and player.inventory['Echo Drops'].count > 0) or (player.satchel['Echo Drops'] and player.satchel['Echo Drops'].count > 0) then

  7. #5467
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    awesome, thanks

  8. #5468
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    can u use echoes from satchel?

  9. #5469
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    If you use itemizer, yes. It'll auto-grab it from satchel when you get silenced.

  10. #5470

    also you could do this to check all always active bags
    Code:
    function find_in_bags(item)
        for _,bag in ipairs({"inventory","satchel","sack","case"}) do
            if player[bag][item] and player[bag][item].count > 0 then
                return true
            end
        end
    end
    function pretarget(spell,action)
        if spell.action_type == 'Magic' or spell.type == "Ninjutsu" and buffactive['Silence'] then
            cancel_spell()
            if find_in_bags("Echo Drops") then
                send_command('input /item "Echo Drops" <me>')
            else
                send_command('input /item "Remedy" <me>')
            end
        end
    end

  11. #5471
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Thank you dlsmd for your help,
    I made some code to check to see if it was working. I just run this command with various combinations of maneuvers on to test. I originally had an else statement in case it was gettin a result larger than 3, but have removed it since.
    Code:
    if command == 'pupmans' then
    	maneuver_count()
    	if MansCount == 0 then
    		windower.add_to_chat(039, '=xXx= '..('::: NO Maneuvers :::'):color(028)..''..(' =xXx='):color(039))
    	elseif MansCount == 1 then
    		windower.add_to_chat(020, '=oOo= '..('::: 1 Maneuvers :::'):color(002)..''..(' =oOo='):color(020))
    	elseif MansCount == 2 then
    		windower.add_to_chat(020, '=oOo= '..('::: 2 Maneuvers :::'):color(158)..''..(' =oOo='):color(020))
    	elseif MansCount == 3 then
    		windower.add_to_chat(020, '=oOo= '..('::: 3 Maneuvers :::'):color(005)..''..(' =oOo='):color(020))
    	end
    end
    And I was gettin an error when Trying to run the command, saying something about a define a global something or other, Couldnt see the full error code as it ran off screen. It would site the line in the above code for "maneuver_count()" (the second line) with the following code, which is what you gave but the variable name altered.
    Code:
    function maneuver_count()
    	local MansCount = 0
    	MansCount = MansCount + (buffactive["Fire Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Ice Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Wind Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Earth Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Thunder Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Water Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Light Maneuver"] or 0)
    	MansCount = MansCount + (buffactive["Dark Maneuver"] or 0)
    end
    Eventually i got it to stop giving the error as i tweaked it. I tried removing the word local, i tried just defining MansCount up at the top of file with other things i define. When I got it to stop givin me the error, in all cases it would give me the "No Maneuvers" message or the "anything larger than 3" message. The second time I altered it I thought I had it, the command gave me "no maneuvers" when i had 0 up, then I did one Maneuver and it gave me the "1" message then i put up a second manevuer and it gave me the "more than 3" message so something wasnt right there. I eventually rewrote it with the following and it works correctly every time I have tried it since. Using the majority of what you gave me.
    Code:
    function maneuver_count()
    	MansCount = 0
    	if buffactive['Fire Maneuver'] then		MansCount = MansCount + buffactive['Fire Maneuver']	end
    	if buffactive['Ice Maneuver'] then		MansCount = MansCount + buffactive['Ice Maneuver']	end
    	if buffactive['Wind Maneuver'] then		MansCount = MansCount + buffactive['Wind Maneuver']	end
    	if buffactive['Earth Maneuver'] then		MansCount = MansCount + buffactive['Earth Maneuver']	end
    	if buffactive['Thunder Maneuver'] then		MansCount = MansCount + buffactive['Thunder Maneuver']	end
    	if buffactive['Water Maneuver'] then		MansCount = MansCount + buffactive['Water Maneuver']	end
    	if buffactive['Light Maneuver'] then		MansCount = MansCount + buffactive['Light Maneuver']	end
    	if buffactive['Dark Maneuver'] then		MansCount = MansCount + buffactive['Dark Maneuver']	end
    end
    It works perfectly for me, so in the end I got what I needed. Im no coding expert (So I might not understand why you coded things a certain way, but I thought I understood what you were doin in this code) and what you gave me seems like it should work, maybe i implemented it wrong somehow, So I was wondering if you could tell me how I messed it up originally if possible So i can learn a bit. Or if there is a way to clean up my code I came up with slightly. Do I really need the word "local" for the "MansCount = 0" part? I normally dont use "local" at all unless Ive copied someone else's code that uses it or altered that same code (trying to keep it the same as possible as to not break it).

  12. #5472

    Quote Originally Posted by Trumpy View Post
    Thank you dlsmd for your help,
    I made some code to check to see if it was working. I just run this command with various combinations of maneuvers on to test. I originally had an else statement in case it was gettin a result larger than 3, but have removed it since.
    Code:
    if command == 'pupmans' then
        maneuver_count()
        if MansCount == 0 then
            windower.add_to_chat(039, '=xXx= '..('::: NO Maneuvers :::'):color(028)..''..(' =xXx='):color(039))
        elseif MansCount == 1 then
            windower.add_to_chat(020, '=oOo= '..('::: 1 Maneuvers :::'):color(002)..''..(' =oOo='):color(020))
        elseif MansCount == 2 then
            windower.add_to_chat(020, '=oOo= '..('::: 2 Maneuvers :::'):color(158)..''..(' =oOo='):color(020))
        elseif MansCount == 3 then
            windower.add_to_chat(020, '=oOo= '..('::: 3 Maneuvers :::'):color(005)..''..(' =oOo='):color(020))
        end
    end
    And I was gettin an error when Trying to run the command, saying something about a define a global something or other, Couldnt see the full error code as it ran off screen. It would site the line in the above code for "maneuver_count()" (the second line) with the following code, which is what you gave but the variable name altered.
    Code:
    function maneuver_count()
        local MansCount = 0
        MansCount = MansCount + (buffactive["Fire Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Ice Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Wind Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Earth Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Thunder Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Water Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Light Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Dark Maneuver"] or 0)
    end
    Eventually i got it to stop giving the error as i tweaked it. I tried removing the word local, i tried just defining MansCount up at the top of file with other things i define. When I got it to stop givin me the error, in all cases it would give me the "No Maneuvers" message or the "anything larger than 3" message. The second time I altered it I thought I had it, the command gave me "no maneuvers" when i had 0 up, then I did one Maneuver and it gave me the "1" message then i put up a second manevuer and it gave me the "more than 3" message so something wasnt right there. I eventually rewrote it with the following and it works correctly every time I have tried it since. Using the majority of what you gave me.
    Code:
    function maneuver_count()
        MansCount = 0
        if buffactive['Fire Maneuver'] then        MansCount = MansCount + buffactive['Fire Maneuver']    end
        if buffactive['Ice Maneuver'] then        MansCount = MansCount + buffactive['Ice Maneuver']    end
        if buffactive['Wind Maneuver'] then        MansCount = MansCount + buffactive['Wind Maneuver']    end
        if buffactive['Earth Maneuver'] then        MansCount = MansCount + buffactive['Earth Maneuver']    end
        if buffactive['Thunder Maneuver'] then        MansCount = MansCount + buffactive['Thunder Maneuver']    end
        if buffactive['Water Maneuver'] then        MansCount = MansCount + buffactive['Water Maneuver']    end
        if buffactive['Light Maneuver'] then        MansCount = MansCount + buffactive['Light Maneuver']    end
        if buffactive['Dark Maneuver'] then        MansCount = MansCount + buffactive['Dark Maneuver']    end
    end
    It works perfectly for me, so in the end I got what I needed. Im no coding expert (So I might not understand why you coded things a certain way, but I thought I understood what you were doin in this code) and what you gave me seems like it should work, maybe i implemented it wrong somehow, So I was wondering if you could tell me how I messed it up originally if possible So i can learn a bit. Or if there is a way to clean up my code I came up with slightly. Do I really need the word "local" for the "MansCount = 0" part? I normally dont use "local" at all unless Ive copied someone else's code that uses it or altered that same code (trying to keep it the same as possible as to not break it).
    all this was because i wrote it to be used in the same function but if you want to use it like that i recommend you do this way if you only going to check it once in one function
    Code:
    if command == 'pupmans' then
        local MansCount = 0
        MansCount = MansCount + (buffactive["Fire Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Ice Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Wind Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Earth Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Thunder Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Water Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Light Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Dark Maneuver"] or 0)
        if MansCount == 0 then
            windower.add_to_chat(039, '=xXx= '..('::: NO Maneuvers :::'):color(028)..''..(' =xXx='):color(039))
        elseif MansCount == 1 then
            windower.add_to_chat(020, '=oOo= '..('::: 1 Maneuvers :::'):color(002)..''..(' =oOo='):color(020))
        elseif MansCount == 2 then
            windower.add_to_chat(020, '=oOo= '..('::: 2 Maneuvers :::'):color(158)..''..(' =oOo='):color(020))
        elseif MansCount == 3 then
            windower.add_to_chat(020, '=oOo= '..('::: 3 Maneuvers :::'):color(005)..''..(' =oOo='):color(020))
        end
    end
    if you want to use it in multiple functions do it like this
    type 1:
    Code:
    if command == 'pupmans' then
        local MansCount = maneuver_count()
        if MansCount == 0 then
            windower.add_to_chat(039, '=xXx= '..('::: NO Maneuvers :::'):color(028)..''..(' =xXx='):color(039))
        elseif MansCount == 1 then
            windower.add_to_chat(020, '=oOo= '..('::: 1 Maneuvers :::'):color(002)..''..(' =oOo='):color(020))
        elseif MansCount == 2 then
            windower.add_to_chat(020, '=oOo= '..('::: 2 Maneuvers :::'):color(158)..''..(' =oOo='):color(020))
        elseif MansCount == 3 then
            windower.add_to_chat(020, '=oOo= '..('::: 3 Maneuvers :::'):color(005)..''..(' =oOo='):color(020))
        end
    end
    function maneuver_count()
        local MansCount = 0
        MansCount = MansCount + (buffactive["Fire Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Ice Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Wind Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Earth Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Thunder Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Water Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Light Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Dark Maneuver"] or 0)
        return MansCount
    end
    type 2:
    if your going to trigger it to update how many you have at a specific time, like when ever your buffs change, then do it like this and you will have a global variable you can use
    Code:
    function maneuver_count()
        MansCount = 0
        MansCount = MansCount + (buffactive["Fire Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Ice Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Wind Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Earth Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Thunder Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Water Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Light Maneuver"] or 0)
        MansCount = MansCount + (buffactive["Dark Maneuver"] or 0)
    end

  13. #5473
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    ah ok thanks.. I tried putting that "return MansCount" part in one of the tweaks i made but i never had the "local MansCount = maneuver_count()" part at any point.

    My goal when starting this, I was trying to do it how I did "how many strategms i have currently" in my sch file (its just math though, no buffactive type things like pup's code) which just simply had "maneuver_count()" kinda thing at the top of the function or command that needed to know how many strats I had, and it just wasnt workin with pup as well til what i had come up with.

    Thanks for the info!

  14. #5474

    strategms are harder because you need to build a timer

  15. #5475
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    yea I think i copied basically what I saw in a Mote's file somewhere for strategms.

  16. #5476
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    So I was tryin to change gears when I used phantom roll on Corsair, It wasnt changin rings for phantom roll but would for double up. But after double up it wouldnt put my idle rings back on afterward. (I'll figure that out, but the followin issue i noticed... ) So I turned on showswaps and debugmode and found i am gettin error messages regardless of job file on any gearswap trigger (abilities, magic, status changes...). I get these for every non armor item in my gobbie bag.

    "GearSwap (Debug Mode): GearSwap (Debug Mode): Item Bullet Pouch does not have a jobs field in the resources."

    Bullet pouch, phil. stone, pearlsack, pearlsack, water card, fire card, trump card case, miser's die, fenrite, carbite, void crystal, h kindred crest, ifritite. for all these items.

    Any idea how I could fix this?



    In another issue, when I change jobs at Moogles for some reason the lua file for that job loads twice 99% of the time. gs reloading just loads it the one time. Also fairly often when I change job/reload file the game just crashes for some reason.

  17. #5477
    Lygre
    Guest

    Comment out lines 40 and 41 in equip_processing.lua in addons\GearSwap\

  18. #5478
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    thank you, that made the error stop poppin up!

  19. #5479
    Lygre
    Guest

    Cool. As for the crashing, that's only happened to me once ever, and it was when i changed main jobs too fast in a super crowded laggy mhaura. have just made sure to give it like a 1s delay and hasn't happened since

  20. #5480
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    I have had that crash in many different zones. and I have had it just doin gs reload as well as the changin jobs. for some reason tho my file loads up twice when i change job. im not sure why this happens though. Usually happens when im done writing a file and am finally going to actually do something for max irony.

    I noticed today when i do emotes it tries to do them twice now. one errors though and other goes thru like normal. im not sure if this is related to commenting those things out or what. i only noticed it today after i had commented them out. Man I cant wait til i get a new PC, this one is driving me Pamamas

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45