Item Search
     
BG-Wiki Search
Page 124 of 302 FirstFirst ... 74 114 122 123 124 125 126 134 174 ... LastLast
Results 2461 to 2480 of 6036

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

  1. #2461
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Thanks again

  2. #2462
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    is it possible to change a called functions name based on some rule

    i.e.
    currently i have it setup like this

    Code:
    function precast(spell)
    	whitemage_precast(spell) -- For WHM Sub Job
    	redmage_precast(spell) -- For RDM Sub Job
    	paladin_precast(spell) -- For PLD Sub Job
    	beastmaster_precast(spell) -- For BST Sub Job
    	dancer_precast(spell) -- For DNC Sub Job
    end
    but what i want to do is somthing like this

    Code:
    function precast(spell)
    	[player.sub_job]_precast(spell) -- For Sub Job
    end

  3. #2463
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Issue with the continuously looping auto-Pianissimo should be fixed now, on dev, as part of the include library update. Will get to live whenever the next merge happens.

    Note that you may need to update the brd job file as well, as a lot of stuff from the job files has been moved into the libraries, so if you don't keep it updated you may end up keeping the broken code.

  4. #2464
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by dlsmd View Post
    is it possible to change a called functions name based on some rule

    i.e.
    currently i have it setup like this

    Code:
    function precast(spell)
    	whitemage_precast(spell) -- For WHM Sub Job
    	redmage_precast(spell) -- For RDM Sub Job
    	paladin_precast(spell) -- For PLD Sub Job
    	beastmaster_precast(spell) -- For BST Sub Job
    	dancer_precast(spell) -- For DNC Sub Job
    end
    but what i want to do is somthing like this

    Code:
    function precast(spell)
    	[player.sub_job]_precast(spell) -- For Sub Job
    end

    Yes.
    Code:
    function precast(spell)
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell)
        else
            -- default code if no defined subjob function
        end
    end
    
    function WHM_precast(spell) end
    function RDM_precast(spell) end
    function PLD_precast(spell) end
    function DNC_precast(spell) end
    etc.
    _G is the global reference table to the user environment space (from within that space), which means that all vars and functions descend from that. As such, it's possible to use standard string concatenation on table elements within it in order to find a reference to a specific function.

    If you want another example, check the handle_actions() function in Mote-Include.

  5. #2465
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Motenten View Post
    Yes.
    Code:
    function precast(spell)
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell)
        else
            -- default code if no defined subjob function
        end
    end
    
    function WHM_precast(spell) end
    function RDM_precast(spell) end
    function PLD_precast(spell) end
    function DNC_precast(spell) end
    etc.
    _G is the global reference table to the user environment space (from within that space), which means that all vars and functions descend from that. As such, it's possible to use standard string concatenation on table elements within it in order to find a reference to a specific function.

    If you want another example, check the handle_actions() function in Mote-Include.
    ok one more question
    how do i stop just a sub-function not the main function
    i.e.

    Code:
    function precast(spell)
    	if _G[player.sub_job..'_precast'] then
    		_G[player.sub_job..'_precast'](spell)
    	end
    	if spell.type == "CorsairRoll" then
    		if buffactive[spell.english] then
    			cancel_spell()
    			return
    		end
    	end
    end
    function WAR_precast(spell)
    	return end
    end
    function MNK_precast(spell)
    	return end
    end
    what i want to do is stop the sub function but not the main function
    also whats that way to stop both the sub function and the main function

    im thinking
    return --stops both the main and sub function
    return end --stops just the sub function

    edit
    ok im wrong
    return --stops the function it is in

    what i want to be able to do is stop the precast function from a sub function
    here is an example
    Code:
    function precast (spell)
    	test()
    	add_to_chat(7,"test")
    end
    function test()
    	add_to_chat(7,"test1")
    	return
    end
    with the above code i get (in chat)
    test1
    test

    but what i want is
    test1

  6. #2466
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    I am horribly confused, because your question doesn't make any sense. Or only makes sense when asked by someone with no understanding of programming whatsoever.

    'return end', as you have them in the subjob versions of the precast function, is invalid syntax. Any time you start certain types of code (eg: function, if, for), there must be a matching end. If you do not have a start point, then the end will break the code.

    For example, breaking this down point by point:
    Code:
    function WAR_precast(spell)
        return end
    end
    function: starts the function definition
    WAR_precast: gives the function a name
    (spell): gives a parameter list to the function
    return: tells the function to stop executing, and return nil (since you didn't specify anything else) to the calling point
    end: ends the function
    end: ***BUG*** the function has already ended, so this is invalid code


    The 'return' instruction tells lua to stop executing the current function, and return to the point in the code that the function was originally called. A simplified model:

    Code:
    function precast(spell)
        WAR_precast(spell)  -- *1* << when WAR_precast is done, it returns here; if WAR_precast returned a value, you can assign it to a variable here
        print('WAR_precast is done')
        print('everything after that continues normally')
        print("I'm not sure how you could not understand this")
        print('if you want to stop this function, put in another return')
        return
        print('this will never print out')
    end
    
    function WAR_precast(spell)
        print('started WAR_precast')
        return -- << this ends the function; nothing else is run; it returns to point *1* above
        print('this will never print out')
    end

  7. #2467
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Motenten View Post
    I am horribly confused, because your question doesn't make any sense. Or only makes sense when asked by someone with no understanding of programming whatsoever.

    'return end', as you have them in the subjob versions of the precast function, is invalid syntax. Any time you start certain types of code (eg: function, if, for), there must be a matching end. If you do not have a start point, then the end will break the code.

    For example, breaking this down point by point:
    Code:
    function WAR_precast(spell)
        return end
    end
    function: starts the function definition
    WAR_precast: gives the function a name
    (spell): gives a parameter list to the function
    return: tells the function to stop executing, and return nil (since you didn't specify anything else) to the calling point
    end: ends the function
    end: ***BUG*** the function has already ended, so this is invalid code


    The 'return' instruction tells lua to stop executing the current function, and return to the point in the code that the function was originally called. A simplified model:

    Code:
    function precast(spell)
        WAR_precast(spell)  -- *1* << when WAR_precast is done, it returns here; if WAR_precast returned a value, you can assign it to a variable here
        print('WAR_precast is done')
        print('everything after that continues normally')
        print("I'm not sure how you could not understand this")
        print('if you want to stop this function, put in another return')
        return
        print('this will never print out')
    end
    
    function WAR_precast(spell)
        print('started WAR_precast')
        return -- << this ends the function; nothing else is run; it returns to point *1* above
        print('this will never print out')
    end
    sorry about that i was editing my post while you posted
    so here is the new part

    ok im wrong
    return --stops the function it is in

    what i want to be able to do is stop the precast function from a sub function
    here is an example
    Code:
    function precast (spell)
    	test()
    	add_to_chat(7,"test")
    end
    function test()
    	add_to_chat(7,"test1")
    	return
    end
    with the above code i get (in chat)
    test1
    test

    but what i want is
    test1

  8. #2468
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    For that, you have two scenarios:

    1) If test() is run, then everything is complete and you never want to run anything following that. This would be the case where you have WAR_precast, WHM_precast, etc, and if they get run then you know that everything has been handled. However if they were not run (because they didn't exist) then you need to continue with whatever the default implementation is. So:

    Code:
    function precast(spell)
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell)
        else
            -- default code if no defined subjob function
        end
    end
    
    function WHM_precast(spell)
        -- whm stuff
    end
    function RDM_precast(spell)
        -- rdm stuff
    end
    function PLD_precast(spell)
        -- pld stuff
    end

    2) You have some default handling in the main precast() function that you may or may not want to allow to run, depending on info that only the subjob function knows about. In this case, you need to be able to return some signal value to the calling function to let it know what the subjob function determined.

    This is what I commonly use the eventArgs parameter for.

    Code:
    function precast(spell)
        local eventArgs = {handled = false}
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell, eventArgs)
        end
        
        if eventArgs.handled then
            return
        end
        
        -- do more stuff
    end
    
    function WHM_precast(spell, eventArgs)
        -- whm stuff
        eventArgs.handled = true
    end
    function RDM_precast(spell, eventArgs)
        -- rdm stuff
    end
    function PLD_precast(spell, eventArgs)
        -- pld stuff
    end
    In the above example, WHM is the only subjob function that sets eventArgs.handled to true. If the subjob is RDM, PLD, or anything else (which doesn't have a defined function to run), then eventArgs.handled remains false, and the precast function doesn't return, but instead continues on to the "do more stuff" section. WHM, however, is stopped, and none of the remaining code is run.

  9. #2469
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Motenten View Post
    For that, you have two scenarios:

    1) If test() is run, then everything is complete and you never want to run anything following that. This would be the case where you have WAR_precast, WHM_precast, etc, and if they get run then you know that everything has been handled. However if they were not run (because they didn't exist) then you need to continue with whatever the default implementation is. So:

    Code:
    function precast(spell)
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell)
        else
            -- default code if no defined subjob function
        end
    end
    
    function WHM_precast(spell)
        -- whm stuff
    end
    function RDM_precast(spell)
        -- rdm stuff
    end
    function PLD_precast(spell)
        -- pld stuff
    end

    2) You have some default handling in the main precast() function that you may or may not want to allow to run, depending on info that only the subjob function knows about. In this case, you need to be able to return some signal value to the calling function to let it know what the subjob function determined.

    This is what I commonly use the eventArgs parameter for.

    Code:
    function precast(spell)
        local eventArgs = {handled = false}
        if _G[player.sub_job..'_precast'] then
            _G[player.sub_job..'_precast'](spell, eventArgs)
        end
        
        if eventArgs.handled then
            return
        end
        
        -- do more stuff
    end
    
    function WHM_precast(spell, eventArgs)
        -- whm stuff
        eventArgs.handled = true
    end
    function RDM_precast(spell, eventArgs)
        -- rdm stuff
    end
    function PLD_precast(spell, eventArgs)
        -- pld stuff
    end
    In the above example, WHM is the only subjob function that sets eventArgs.handled to true. If the subjob is RDM, PLD, or anything else (which doesn't have a defined function to run), then eventArgs.handled remains false, and the precast function doesn't return, but instead continues on to the "do more stuff" section. WHM, however, is stopped, and none of the remaining code is run.
    ok that was what i was trying to avoid but i did come up with this
    Code:
    function precast (spell) --main function
    	if test(spell) then cancel_spell() return end
    	add_to_chat(7,"test")
    end
    function test(spell) --sub function
    	if spell then
    		add_to_chat(7,"test1")
    		return true
    	end
    	add_to_chat(7,"test2")
    	return false
    end
    this question is actually for this code http://pastebin.com/RgKyV47y
    i was hoping there was a function that would do it for me

  10. #2470
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by dlsmd View Post
    ok that was what i was trying to avoid but i did come up with this
    Code:
    function precast (spell) --main function
    	if test(spell) then cancel_spell() return end
    	add_to_chat(7,"test")
    end
    function test(spell) --sub function
    	if spell then
    		add_to_chat(7,"test1")
    		return true
    	end
    	add_to_chat(7,"test2")
    	return false
    end

    Ah, yes, a third scenario. However this one depends on the purpose of the test() function (and given what you'd described thus far, I did not expect it to fall into the third scenario's parameters, so didn't give it any consideration).

    If the purpose of the test function is explicitly and solely to return that true/false value that you use to determine whether to cancel a spell, then yes, you can go with that pattern.

    However if the test function is primarily for another purpose, but only returns a value indicating whether to cancel the spell as a side effect, then it should not be done in that way.

    Code:
    function precast(spell)
        -- this pattern is fine
        if check_to_interrupt(spell) then
            cancel_spell()
            return
        end
        
        -- this pattern is bad
        if whm_handling(spell) then
            cancel_spell()
            return
        end
    end
    
    function check_to_interrupt(spell)
        if spell.english == 'spell we want to cancel' then
            return true
        else
            return false
        end
    end
    
    function whm_handling(spell)
        -- do whm stuff
        -- do more whm stuff
        
        if spell.english == 'spell we want to cancel' then
            return true
        else
            return false
        end
    end

  11. #2471
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    this is what i wanted it for

    Code:
    function precast(spell)
            if spell_stopper(spell) then cancel_spell() return end
    end
    function spell_stopper(spell)
            if spell.english ~= 'Ranged' and spell.type ~= 'WeaponSkill' then
                    if spell.action_type == 'Ability' then
                            if spell and (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) then
                                    return true
                            end
                    elseif spell.action_type == 'Magic' then
                            if spell and (windower.ffxi.get_spell_recasts()[spell.recast_id] > 0)then
                                    return true
                            elseif spell then
                                    if spell.tp_cost > player.tp then
                                            return true
                                    end
                                    if spell.mp_cost > player.mp and not (buffactive['Manawell'] or buffactive['Manafont']) then
                                            return true
                                    end
                            end
                    end
            end
            if buffactive['sleep'] then
                    return true
            end
            if spell.type == "Trust" and party.count > 1 then
                    if player.in_combat then
                            return true
                    end
                    if partynames.party1:contains(string.gsub(spell.english, "%s+", "")) then
                            return true
                    end
            end
            if windower.wc_match(spell.english, 'Warp*|Teleport*|Recall*|Retrace|Escape') then
                    return true
            end
            if midaction() or pet_midaction() then
                    return true
            end
            if  player.tp < 1000 and spell.type == 'WeaponSkill'  then
                    return true
            end
            return false
    end
    but i was hoping for a command that would do it with it not being in an if
    i.e.
    return --stops current function
    kill_function --stops gearswap from continuing or something like that

    these are all the ones i thought of before i even asked this question thay all do there job
    Spoiler: show
    Code:
    ----type1----
    function precast (spell) --main function
    	if test(spell) then cancel_spell() return end
    	add_to_chat(7,"test")
    end
    function test(spell) --sub function
    	if spell then
    		add_to_chat(7,"test1")
    		return true
    	end
    	add_to_chat(7,"test2")
    	return false
    end
    
    ----type2 [local only type]----
    function precast (spell) --main function
    	local test = test(spell) 
    	if test then cancel_spell() return end
    	add_to_chat(7,"test")
    end
    function test(spell) --sub function
    	if spell then
    		add_to_chat(7,"test1")
    		return true
    	end
    	add_to_chat(7,"test2")
    	return false
    end
    
    ----type3 [global type]----
    function precast (spell) --main function
    	test = false
    	test(spell) 
    	if test then cancel_spell() return end
    	add_to_chat(7,"test")
    end
    function test(spell) --sub function
    	if spell then
    		add_to_chat(7,"test1")
    		test = true
    		return
    	end
    	add_to_chat(7,"test2")
    	test = false
    end

  12. #2472
    Melee Summoner
    Join Date
    Apr 2010
    Posts
    37
    BG Level
    1
    FFXI Server
    Odin

    recast time bug

    I have recently returned to the game after taking an 8-month break, so I'm converting my spellcasts to Gearswap. Gearswap is really, really awsome -- so easy to troubleshoot problems compared to spellcast, and with the limited testing I've done so far, it seems to have much more precise timing! Thanks very much, Byrthnoth!!

    However, I did notice a bug in the release version. It seems that in order to use the windower.ffxi.get_spell_recasts() function, spell.id must be used instead of the documented spell.recast_id. Recast_id seems to have the buffarray index? I didn't check the testing version.
    Also, I can start casting with about 80 time-units remaining. Seems like quite a lot if they are 60ths of a second. Maybe the number doesnt account for any network delays, but I have a very good connection from the east coast USA...

  13. #2473
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    actualy the correct way is
    for abilitys (jobabilitys)
    windower.ffxi.get_ability_recasts()[spell.recast_id]
    for spells(magic,songs,ninjutsu)
    windower.ffxi.get_spell_recasts()[spell.recast_id]

    thay are both off by about .01 seconds tho i have tried to compensate but i cant

    you need to check your connection with japan not east coast USA

    i have about a 10 ms delay with japan

  14. #2474
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,765
    BG Level
    7
    FFXI Server
    Bahamut

    Back with more questions concerning a Geo.lua. I couldn't get the sub job specific bits asked and answered earlier, but for the most part, it works between the two now.

    Today was the first time I got to use it in any content as /Rdm and I noticed that none of the midcast sets for my enfeebles were working. The original .lua I pulled off of FFXIAH, and it's not the first thing I've found to not work. Trying to solve it myself, I looked at Mote's Sch .lua and saw enfeebles defined as MndEnfeebles and IntEnfeebles, just like they were here. When I checked the mapping file, I didn't see any enfeebles listed though, just the ElementalEnfeebles. I added them all in at the bottom, reloaded, and still no luck.

    I'm also having issues with getting Bagua Pants +1 to swap in during the midcast of Indi- spells. The original .lua had..

    sets.midcast['Indi-*'] =

    Which never worked for me. I've tried a few different strings that I've seen in other luas, but none have worked yet. Any ideas?

    Upon reading the "Gearswap for Dummies" thread I saw something regarding copy/pasting your gear sets into newly released .luas, and figured I'd try that with a fresh copy of Mote's Geo.lua. I got a few errors from the custom sets that were blank, but after deleting those, it ran, but the above issues still happen. The sets.idle.Pet set (for Loupan -Dt) doesn't seem to be working for me either.

    The original modded .lua.

    Gear copied into Motes Geo.lua

    Any help would be appreciated, specially with the enfeebling issues. Still really new to gearswap and not all that great at coding. :3

  15. #2475
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by Heatsink
    However, I did notice a bug in the release version. It seems that in order to use the windower.ffxi.get_spell_recasts() function, spell.id must be used instead of the documented spell.recast_id.
    Make sure you're referring to the correct resources. The XML resources (windower/plugins/resources) are largely deprecated, and what used to be spell.id in the XML resources is spell.recast_id in the lua resources (windower/res).

  16. #2476
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by Malithar View Post
    Today was the first time I got to use it in any content as /Rdm and I noticed that none of the midcast sets for my enfeebles were working. The original .lua I pulled off of FFXIAH, and it's not the first thing I've found to not work. Trying to solve it myself, I looked at Mote's Sch .lua and saw enfeebles defined as MndEnfeebles and IntEnfeebles, just like they were here. When I checked the mapping file, I didn't see any enfeebles listed though, just the ElementalEnfeebles. I added them all in at the bottom, reloaded, and still no luck.
    MndEnfeebles and IntEnfeebles are custom spell maps. They won't be in Mote-Mappings. Check the job_get_spell_map() function sch or whm. Remove any changes you made to Mote-Mappings.

    Quote Originally Posted by Malithar View Post
    I'm also having issues with getting Bagua Pants +1 to swap in during the midcast of Indi- spells. The original .lua had..

    sets.midcast['Indi-*'] =

    Which never worked for me. I've tried a few different strings that I've seen in other luas, but none have worked yet. Any ideas?
    That's a completely nonsensical set name. It will never work. Would recommend a simple:

    sets.midcast.Indi = {}
    or
    sets.midcast.Geomancy.Indi = {}

    and add Indi as a custom spell map. Along with the enfeebles, you'd end up with something like:

    Code:
    function job_get_spell_map(spell, default_spell_map)
        if spell.action_type == 'Magic' then
            if spell.skill == 'Enfeebling Magic' then
                if spell.type == 'WhiteMagic' then
                    return 'MndEnfeebles'
                else
                    return 'IntEnfeebles'
                end
            elseif spell.skill == 'Geomancy' then
                if spell.english:startswith('Indi') then
                    return 'Indi'
                end
            end
        end
    end

    Quote Originally Posted by Malithar View Post
    Upon reading the "Gearswap for Dummies" thread I saw something regarding copy/pasting your gear sets into newly released .luas, and figured I'd try that with a fresh copy of Mote's Geo.lua.
    That was most likely a recommendation for using sidecar files. You end up with files like:

    GearSwap/data/Malithar/geo.lua -- downloaded version of my file
    GearSwap/data/Malithar/gear/geo.lua -- sidecar version.

    The sidecar version only needs a copy of the user_setup(), init_gear_sets(), and select_default_macro_book() functions (and user_unload(), if appropriate). Place all your customizations (gear, macro book, mode definitions, etc) in the sidecar file, while leaving the original to maintain the rules to be used. Update the original as new versions are released in the repository.

    If you want to modify rule functions, you can create those in the sidecar file as well. I'll be adding the above rules to the repository version for convenience, though.


    Quote Originally Posted by Malithar View Post
    The sets.idle.Pet set (for Loupan -Dt) doesn't seem to be working for me either.
    Will need more detail on that.

  17. #2477
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,765
    BG Level
    7
    FFXI Server
    Bahamut

    Quote Originally Posted by Motenten View Post
    Will need more detail on that.
    Everything listed above worked great, thanks a ton Motenten! ^^/ Seems I'll need to learn a lot about custom spell maps, pretty cool that you can define out your own rules like that. Makes sense once I looked at it more, thanks again!

    As for the pet gear, I'm referring to the

    Code:
    -- .Pet sets are for when Luopan is present.
    sets.idle.Pet =
    When a luopans present, I'm needing my idle set to be Idris, Geo. Mitaines +1, and Dunna + other idle gear, however it doesn't switch to the defined set in the aftercast. I've tried defining each piece of the set as well as a set_combine, but it doesn't seem to notice that there's a pet present at all.

  18. #2478
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    i finally have my nin tool map done

    Spoiler: show
    Code:
    	nin_tools ={
    		["Monomi: Ichi"] = {tool='Sanjaku-Tenugui',tool_bag="Toolbag (Sanja)",tool_bag_id=5417,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Aisha: Ichi"] = {tool='Soshi',tool_bag="Toolbag (Soshi)",tool_bag_id=5734,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Katon: Ichi"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Katon: Ni"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Katon: San"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Hyoton: Ichi"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Hyoton: Ni"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Hyoton: San"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Huton: Ichi"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Huton: Ni"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Huton: San"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Doton: Ichi"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Doton: Ni"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Doton: San"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Raiton: Ichi"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Raiton: Ni"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Raiton: San"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Suiton: Ichi"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Suiton: Ni"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Suiton: San"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
    		["Utsusemi: Ichi"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Utsusemi: Ni"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Utsusemi: San"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Jubaku: Ichi"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Jubaku: Ni"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Jubaku: San"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Hojo: Ichi"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Hojo: Ni"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Hojo: San"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Kurayami: Ichi"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Kurayami: Ni"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Kurayami: San"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Dokumori: Ichi"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Dokumori: Ni"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Dokumori: San"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Tonko: Ichi"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Tonko: Ni"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Tonko: San"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Gekka: Ichi"] = {tool='Ranka',tool_bag="Toolbag (Ranka)",tool_bag_id=6265,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Yain: Ichi"] = {tool='Furusumi',tool_bag="Toolbag (Furu)",tool_bag_id=6266,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Myoshu: Ichi"] = {tool='Kabenro',tool_bag="Toolbg. (Kaben)",tool_bag_id=5863,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Yurin: Ichi"] = {tool='Jinko',tool_bag="Toolbag (Jinko)",tool_bag_id=5864,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
    		["Kakka: Ichi"] = {tool='Ryuno',tool_bag="Toolbag (Ryuno)",tool_bag_id=5865,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		["Migawari: Ichi"] = {tool='Mokujin',tool_bag="Toolbag (Moku)",tool_bag_id=5866,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
    		}

  19. #2479
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Remember my issue where, randomly, when using my Nightingale/Troubadour macro, some times Gearswap would not correctly swap into Bihu Justaucorps +1 to augment the duration of Troubadour?
    Thanks to Byrth and other people we finally nailed down the issue a bit, full read HERE.

    tl;dr there are likely multiple things causing this random issue (one possibly being in the Hook) but a common thing probably is the intersection of aftercast packet from the first JA (Nightingale) and the Precast packet from the second JA (Troubadour)

    We'll proceed fixing this issue in several ways because it might affect other people and other Luas as well, it's just that nobody noticed.
    As you can notice from Byrth's last post I've been suggested to use Midaction().
    So far I used this function only once, in my SCH Lua. At the beginning of my precast I have the following
    Code:
    	if midaction() then
    		cancel_spell()
    		return
    	end
    I get roughly how it works. If an action is currently ongoing (i.e. casting a spell) this will interrupt the precast function and so no gear will be swapped.
    With an action (spell) that actually has a casting time it's easy to understand how this could work, but how would this work with a JA?
    What is considered to be a "midaction(true)" JA for Gearswap? How should I implement this?

  20. #2480
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Remember my issue where, randomly, when using my Nightingale/Troubadour macro, some times Gearswap would not correctly swap into Bihu Justaucorps +1 to augment the duration of Troubadour?
    Thanks to Byrth and other people we finally nailed down the issue a bit, full read HERE.

    tl;dr there are likely multiple things causing this random issue (one possibly being in the Hook) but a common thing probably is the intersection of aftercast packet from the first JA (Nightingale) and the Precast packet from the second JA (Troubadour)

    We'll proceed fixing this issue in several ways because it might affect other people and other Luas as well, it's just that nobody noticed.
    As you can notice from Byrth's last post I've been suggested to use Midaction().
    So far I used this function only once, in my SCH Lua. At the beginning of my precast I have the following
    Code:
    	if midaction() then
    		cancel_spell()
    		return
    	end
    I get roughly how it works. If an action is currently ongoing (i.e. casting a spell) this will interrupt the precast function and so no gear will be swapped.
    With an action (spell) that actually has a casting time it's easy to understand how this could work, but how would this work with a JA?
    What is considered to be a "midaction(true)" JA for Gearswap? How should I implement this?
    what you can do
    its a little dirty but try locking the gear on till aftercast

Page 124 of 302 FirstFirst ... 74 114 122 123 124 125 126 134 174 ... LastLast

Similar Threads

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