Item Search
     
BG-Wiki Search
Page 153 of 302 FirstFirst ... 103 143 151 152 153 154 155 163 203 ... LastLast
Results 3041 to 3060 of 6036

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

  1. #3041
    Gave 5$ to bg and all I could think of was this lousy title.
    -____-

    Join Date
    Jul 2008
    Posts
    1,695
    BG Level
    6

    Ok thanks for nothing.

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

    Quote Originally Posted by SubzeroDiabolos View Post
    Ok thanks for nothing.
    i dont know what that was for i was not trying to be rude or anything just stating facts
    but if you want the latest version you can find the link on the gearswap shop thread
    or you can just go here
    https://github.com/smd111/Gearswap-Skillup

  3. #3043
    Relic Weapons
    Join Date
    Oct 2007
    Posts
    324
    BG Level
    4
    FFXI Server
    Valefor

    Quote Originally Posted by dlsmd View Post
    i dont know what that was for i was not trying to be rude or anything just stating facts
    but if you want the latest version you can find the link on the gearswap shop thread
    or you can just go here
    https://github.com/smd111/Gearswap-Skillup
    Speaking of... I just downloaded your skill up file (via the zip) and am getting the following in the console when I try to load it:

    16:11:06 > GearSwap: Loaded your skillup.lua Lua file!
    16:11:06 > GearSwap: Lua error (runtime) - ...m Files (x86)/Windower4//addons/gearswap/refresh.lua:151: GearSwap: File failed to load:
    16:11:06 > ...rogram Files (x86)\Windower4\addons/libs/packets.lua:18: attempt to index global '_addon' (a nil value)

    Any idea what I'm doing wrong?

  4. #3044
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Terravcota View Post
    Speaking of... I just downloaded your skill up file (via the zip) and am getting the following in the console when I try to load it:

    16:11:06 > GearSwap: Loaded your skillup.lua Lua file!
    16:11:06 > GearSwap: Lua error (runtime) - ...m Files (x86)/Windower4//addons/gearswap/refresh.lua:151: GearSwap: File failed to load:
    16:11:06 > ...rogram Files (x86)\Windower4\addons/libs/packets.lua:18: attempt to index global '_addon' (a nil value)

    Any idea what I'm doing wrong?
    your on the live version correct?
    if so you need to copy this
    Code:
    _addon = _addon,
    to /gearswap/refresh.lua
    between lines 97 and 113

    the best place is to put on this line
    Code:
    user_env = {gearswap = _G, _global = _global, _settings = _settings,
    like this
    Code:
    user_env = {gearswap = _G, _global = _global, _settings = _settings,_addon = _addon,
    after doing this you will eather need to
    lua reload gearswap
    or
    reload luacore

  5. #3045
    Relic Weapons
    Join Date
    Oct 2007
    Posts
    324
    BG Level
    4
    FFXI Server
    Valefor

    Worked like a charm. Thanks!

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

    Quote Originally Posted by Terravcota View Post
    Worked like a charm. Thanks!
    no problem

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

    The Geo Lua

    The Alljobs Include

    Reposting question in case it was missed amongst all that other stuff that came after it. There aren't any GEO luas anywhere that I have seen, so I made my own. I think it works fine for me without being overly complicated. But I do have a question about setting up a custom timer for indi spells. I dont have a whole lot of experience with lua except what i have managed to blunder thru so far.

    With the code below, it will set up a timer for when I gain an indi spell effect. It will restart the timer when I use a different indi spell before the timer expires. It will delete the timer when the indi effect is gone AKA wore off. But what it will not do is restart the timer if I use the same indi spell before the first timer expired. Is there a way by using tables or some kind of variable somehow to do this? Like maybe store a value of the last indi spell name and if it matches what i just casted to restart the timer?

    Code:
    function indi_change(indi_table,gain) 
            if gain then
                    send_command('@timers c Indi-Spell 180 up IndiAura.png')
            else
                    send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
            end
    end

  8. #3048
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Trumpy View Post
    The Geo Lua

    The Alljobs Include

    Reposting question in case it was missed amongst all that other stuff that came after it. There aren't any GEO luas anywhere that I have seen, so I made my own. I think it works fine for me without being overly complicated. But I do have a question about setting up a custom timer for indi spells. I dont have a whole lot of experience with lua except what i have managed to blunder thru so far.

    With the code below, it will set up a timer for when I gain an indi spell effect. It will restart the timer when I use a different indi spell before the timer expires. It will delete the timer when the indi effect is gone AKA wore off. But what it will not do is restart the timer if I use the same indi spell before the first timer expired. Is there a way by using tables or some kind of variable somehow to do this? Like maybe store a value of the last indi spell name and if it matches what i just casted to restart the timer?

    Code:
    function indi_change(indi_table,gain) 
            if gain then
                    send_command('@timers c Indi-Spell 180 up IndiAura.png')
            else
                    send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
            end
    end
    you might want to have it clears the timer when you are im midcast when casting an indy spell (how i dont know)
    but you could try this
    Code:
    function indi_change(indi_table,gain) 
        if gain then
            indi_timmer = true
            send_command('@timers c Indi-Spell 180 up IndiAura.png')
        else
            indi_timmer = false
            send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
        end
    end
    
    and in mid_cast do this
    
    if spell.name:startswith(Indi-) and indi_timmer then
        indi_timmer = false
        coroutine.schedule(send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::'), (spell.cast_time - 1))
    end

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

    Thank you dlsmd, is there a reason you used indi_timmer instead of indi_timer ?

    I made the changes to try it out, except i changed timmer to timer and i had to put startswith('Indi-') to fix a lua error when i loaded it. and then i cast 1 spell and it put the echo in the chat log. then i cast a second spell and game crashed.

    The dump

    Thanks for the help and any in the future here. Also will your code change the timer even if i am spell interrupted? That is what i was going to test when i crashed.

    EDIT: even with timmer it still crashed. And again it crashed on the second cast.

  10. #3050
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Trumpy View Post
    Thank you dlsmd, is there a reason you used indi_timmer instead of indi_timer ?

    I made the changes to try it out, except i changed timmer to timer and i had to put startswith('Indi-') to fix a lua error when i loaded it. and then i cast 1 spell and it put the echo in the chat log. then i cast a second spell and game crashed.

    The dump

    Thanks for the help and any in the future here. Also will your code change the timer even if i am spell interrupted? That is what i was going to test when i crashed.
    the timmer/timer thing was just a mis print (my fingers dont always do what i want and then i copied and pasted it in to the other lines with out rechecking if it was correct)

    as far as the crash i have no clue
    was any thing in the windower command window??
    but it could be because of the coroutine.schedule
    try this
    Code:
    indi_timer = false
    function indi_change(indi_table,gain) 
        if gain then
            indi_timer = true
            send_command('@timers c Indi-Spell 180 up IndiAura.png')
        else
            end_indi_timer()
        end
    end
    function end_indi_timer()
        send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
        indi_timer = false
    end
    and in mid_cast do this

    Code:
    if spell.name:startswith("Indi-") and indi_timmer then
        coroutine.schedule(end_indi_timer, (spell.cast_time - 1))
    end

  11. #3051
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    By the way, the _addon = _addon fix has been pushed live yesterday, so you just need to restart Windower for that to work and don't need to add anything yourself.

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

    OK the good news is that didn't crash me now.The bad news is sometimes it will send that echo twice on casting. and Sometimes a couple seconds later the new timer will delete after casting.

    However, I was looking through some other luas today and noticed "spell.interrupted" in someone's code. One of the problems with how i wanted to do this was It would mess with timers even if i was interrupted (I want to keep the old timer if my new spell was interrupted and before my idea would have deleted it regardless). So now with that in my knowledge bank Ive come up with something.

    I also spotted someone had "info.aftermath.weaponskill = spell.english" in their code and it gave me an idea of how to use that (similar to variables in spellcast) as well. It makes the old timer delete and the new timer create, which means the timer will refresh even if using the same spell, as well as show the specific spell name in the timer. And it will show a chat log message when the indi spell wears or changes to a new effect. It wont show in chat log when you refresh the same spell but i think i am fine with that (As long as the timer restarts and it shows message in log when it eventually wears, I am good.). The only problem i had was the chat log message cant show the specific spell name that just wore or changed (So i just used "Indi-Spell") because there seems to be a bit of lag between aftercast and indi_change happening. If indi_change could realize the difference between an indi effect being lost and an indi effect being overwritten by another effect I could do this better but I think I am happy with what i got here. And omg I have no idea how I will deal with Entrust tomorrow evening! (EDIT: I think i got it workin for Entrust preliminarily.)

    I just added this code to my Lua in the following sections.

    function get_sets()
    Code:
    Now_Indi = "None"
    Last_Indi = "None"
    function precast(spell)
    Code:
    if spell.skill == 'Geomancy' then
    	Now_Indi = spell.name
    	equip(sets.FC.Geo)
    end
    function aftercast(spell)
    Code:
    if spell.name:startswith('Indi-') and not spell.interrupted then
    	send_command('@timers d '..Last_Indi..';timers c '..Now_Indi..' 180 up IndiAura.png')
    	Last_Indi = spell.name
    end
    function indi_change(indi_table,gain)
    Code:
    if not gain then
    	add_to_chat(158, '::O:: ::O:: ::O:: ::O:: Indi-Spell Has Expired Or Been Overwritten!')
    end

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

    Quote Originally Posted by Arcon View Post
    By the way, the _addon = _addon fix has been pushed live yesterday, so you just need to restart Windower for that to work and don't need to add anything yourself.
    yes but at the time it was not pushed till about an hour after Terravcota asked
    so i gave Terravcota the info

  14. #3054
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Trumpy View Post
    OK the good news is that didn't crash me now.The bad news is sometimes it will send that echo twice on casting. and Sometimes a couple seconds later the new timer will delete after casting.

    However, I was looking through some other luas today and noticed "spell.interrupted" in someone's code. One of the problems with how i wanted to do this was It would mess with timers even if i was interrupted (I want to keep the old timer if my new spell was interrupted and before my idea would have deleted it regardless). So now with that in my knowledge bank Ive come up with something.

    I also spotted someone had "info.aftermath.weaponskill = spell.english" in their code and it gave me an idea of how to use that (similar to variables in spellcast) as well. It makes the old timer delete and the new timer create, which means the timer will refresh even if using the same spell, as well as show the specific spell name in the timer. And it will show a chat log message when the indi spell wears or changes to a new effect. It wont show in chat log when you refresh the same spell but i think i am fine with that (As long as the timer restarts and it shows message in log when it eventually wears, I am good.). The only problem i had was the chat log message cant show the specific spell name that just wore or changed (So i just used "Indi-Spell") because there seems to be a bit of lag between aftercast and indi_change happening. If indi_change could realize the difference between an indi effect being lost and an indi effect being overwritten by another effect I could do this better but I think I am happy with what i got here. And omg I have no idea how I will deal with Entrust tomorrow evening! (EDIT: I think i got it workin for Entrust preliminarily.)

    I just added this code to my Lua in the following sections.

    function get_sets()
    Code:
    Now_Indi = "None"
    Last_Indi = "None"
    function precast(spell)
    Code:
    if spell.skill == 'Geomancy' then
    	Now_Indi = spell.name
    	equip(sets.FC.Geo)
    end
    function aftercast(spell)
    Code:
    if spell.name:startswith('Indi-') and not spell.interrupted then
    	send_command('@timers d '..Last_Indi..';timers c '..Now_Indi..' 180 up IndiAura.png')
    	Last_Indi = spell.name
    end
    function indi_change(indi_table,gain)
    Code:
    if not gain then
    	add_to_chat(158, '::O:: ::O:: ::O:: ::O:: Indi-Spell Has Expired Or Been Overwritten!')
    end
    in that case try this
    try this
    Code:
    indi_timer = false
    function indi_change(indi_table,gain) 
        if gain and not indi_timer then
            indi_timer = true
            send_command('@timers c Indi-Spell 180 up IndiAura.png')
        elseif not gain and indi_timer then
            end_indi_timer()
        end
    end
    function end_indi_timer()
        send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell  Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
        indi_timer = false
    end
    and in mid_cast do this

    Code:
    if spell.name:startswith("Indi-") and indi_timer then
        coroutine.schedule(end_indi_timer, (spell.cast_time - 1))
    end

  15. #3055
    Blue Magic is Best Magic
    Join Date
    Jul 2007
    Posts
    8,215
    BG Level
    8

    Is the buff ID known for indi-haste?

  16. #3056
    Melee Summoner
    Join Date
    Apr 2014
    Posts
    28
    BG Level
    1

    Quote Originally Posted by Draylo View Post
    Is the buff ID known for indi-haste?
    580

  17. #3057
    Melee Summoner
    Join Date
    Apr 2014
    Posts
    28
    BG Level
    1

    Quote Originally Posted by Orestes View Post
    Can you show me what your determine_haste_group() function looks like? Or just pastbin your file. What you posted doesn't look right.

    You can see my RNG.lua for an example. I track a few CustomRangedGroups there, which is the same thing you're doing here. Pay attention to the function get_custom_ranged_groups() and job_buff_change()

    Mote's MNK.lua also uses custom groups.

    There's no action you should be taking when the buffs wear. The lua handles that for you, since you're clearing every time job_buff_change is called.
    Code:
    function job_buff_change(buff, gain)
    	-- If we gain or lose any haste buffs, adjust which gear set we target.
    	if S{'haste','march','geo-haste','indi-haste','embrava','haste samba','aftermath'}:contains(buff:lower()) then
    		determine_haste_group()
    		handle_equipping_gear(player.status)
    	elseif state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    		handle_equipping_gear(player.status)
    	end
    	-- If we gain Aftermath
    	if buff == 'Aftermath: Lv.3' then 
           
            if player.equipment.main == 'Nagi' then
                if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
                    classes.CustomMeleeGroups:append('AM')
    			else
    				determine_haste_group()
    				handle_equipping_gear(player.status)
                end
            end
    
        end
        
        if buff == 'Aftermath: Lv.3' then 
            handle_equipping_gear(player.status)
        end
    end
    Code:
    function determine_haste_group()
    
    	classes.CustomMeleeGroups:clear()
    
    	if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive[33])) then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.march == 2 and buffactive[33] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.march and buffactive[580] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive[33] and buffactive[580] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.embrava and (buffactive[33] or buffactive.march) then
    		classes.CustomMeleeGroups:append('EmbravaHaste')
    	elseif buffactive.march == 1 and buffactive[33] and buffactive['haste samba'] then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive.march == 2 then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive[580] then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive[33] then
    		classes.CustomMeleeGroups:append('LowHaste')
    	end
    	
    	if player.equipment.main == 'Nagi' then
    		if buffactive[272] then
    			classes.CustomMeleeGroups:append('AM')
    		end
    	end
    
    end


    I'm actually getting stuck in WS gear sometimes. I'm not sure what triggers it yet. I'll WS then my gear doesn't change afterwards, even if I alt F12. I have to reload gearswap.

  18. #3058
    Gave 5$ to bg and all I could think of was this lousy title.
    -____-

    Join Date
    Jul 2008
    Posts
    1,695
    BG Level
    6

    Is there a way to add an extra custom idle group for pet only engaged? Right now this works for my pet and I, but I want different gears for pet only.

    Code:
                -- If the pet is engaged, adjust potential idle and melee groups.
                if pet.isvalid and pet.status == 'Engaged' then
                        classes.CustomIdleGroups:append('PetEngaged')
                end

  19. #3059
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    i dont use motes includes but i think it would be something like this
    Code:
        if pet.isvalid and pet.status == 'Engaged' and player.in_combat then
            classes.CustomIdleGroups:append('PetPlayerEngaged')
        elseif pet.isvalid and pet.status == 'Engaged' and not player.in_combat then
            classes.CustomIdleGroups:append('PetEngaged')
        end

  20. #3060
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by Santi View Post
    Code:
    function job_buff_change(buff, gain)
    	-- If we gain or lose any haste buffs, adjust which gear set we target.
    	if S{'haste','march','geo-haste','indi-haste','embrava','haste samba','aftermath'}:contains(buff:lower()) then
    		determine_haste_group()
    		handle_equipping_gear(player.status)
    	elseif state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    		handle_equipping_gear(player.status)
    	end
    	-- If we gain Aftermath
    	if buff == 'Aftermath: Lv.3' then 
           
            if player.equipment.main == 'Nagi' then
                if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
                    classes.CustomMeleeGroups:append('AM')
    			else
    				determine_haste_group()
    				handle_equipping_gear(player.status)
                end
            end
    
        end
        
        if buff == 'Aftermath: Lv.3' then 
            handle_equipping_gear(player.status)
        end
    end
    Code:
    function determine_haste_group()
    
    	classes.CustomMeleeGroups:clear()
    
    	if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive[33])) then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.march == 2 and buffactive[33] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.march and buffactive[580] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive[33] and buffactive[580] then
    		classes.CustomMeleeGroups:append('MaxHaste')
    	elseif buffactive.embrava and (buffactive[33] or buffactive.march) then
    		classes.CustomMeleeGroups:append('EmbravaHaste')
    	elseif buffactive.march == 1 and buffactive[33] and buffactive['haste samba'] then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive.march == 2 then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive[580] then
    		classes.CustomMeleeGroups:append('HighHaste')
    	elseif buffactive[33] then
    		classes.CustomMeleeGroups:append('LowHaste')
    	end
    	
    	if player.equipment.main == 'Nagi' then
    		if buffactive[272] then
    			classes.CustomMeleeGroups:append('AM')
    		end
    	end
    
    end


    I'm actually getting stuck in WS gear sometimes. I'm not sure what triggers it yet. I'll WS then my gear doesn't change afterwards, even if I alt F12. I have to reload gearswap.
    Your job_buff_change() has redundant code. The first time you call determine_haste_group, it's going to append the AM group. Then, you are checking for AM again, and appending it again.

    This should work. I'm going to ignore the buff = 'ability' and gain part from my earlier example. Your determine_haste_group() function should take care of everything.

    Code:
    function job_buff_change(buff, gain)
    	-- If we gain or lose any haste buffs, adjust which gear set we target.
    	if S{'haste','march','geo-haste','indi-haste','embrava','haste samba','aftermath'}:contains(buff:lower()) then
    		determine_haste_group()
    		handle_equipping_gear(player.status)
    	elseif state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    		handle_equipping_gear(player.status)
    	end
    end
    Otherwise, I'm not entirely sure why Mote checks if buff == 'Ability' and gain when he handles custom groups. Perhaps it has something to do with trying to use an ability, and getting blocked by paralysis, amnesia, etc. I'm not entirely sure, but he doesn't check 'gain' when determining haste groups in job_buff_change, so it should be safe with aftermath, since it's not an ability you can attempt to use and get blocked. Perhaps buffactive returns true when you try using an ability, but it fails? no idea..

Page 153 of 302 FirstFirst ... 103 143 151 152 153 154 155 163 203 ... LastLast

Similar Threads

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