Item Search
     
BG-Wiki Search
+ Reply to Thread
Page 9 of 22 FirstFirst ... 7 8 9 10 11 19 ... LastLast
Results 161 to 180 of 421
  1. #161
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    A question of my own: I'm using this function to upgrade spells to the highest tier available:

    Code:
    if spell.action_type == 'Magic' then 
            if spell.english:startswith("Protect") or 
            spell.english:startswith("Shell") or 
            spell.english:startswith("Dia") or 
            spell.english:startswith("Fire") or 
            spell.english:startswith("Stone") or 
            spell.english:startswith("Thunder") or 
            spell.english:startswith("Water") or 
            spell.english:startswith("Blizzard") or 
            spell.english:startswith("Aero") or 
            spell.english:startswith("Bio") or 
            spell.english:startswith("Poison") or 
            spell.english:startswith("Sleep") or 
            spell.english:startswith("Raise") or 
            spell.english:startswith("Holy") or 
            spell.english:startswith("Banish") or 
            spell.english:startswith("Enlight") or 
            spell.english:startswith("Endark") or
            spell.english:startswith("Drain") or 
            spell.english:startswith("Aspir") or
            spell.english:startswith("Reraise") or
            spell.english:startswith("Regen") then 
            for _,lvl in pairs({" VI"," V"," IV"," III"," II",""}) do 
            --print("current spell checking = "..string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                local spellR = gearswap.res.spells:with("name", string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                if spellR then 
                    --print("spellR is good") 
                    if spell.english == spellR.en and 
                    windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                    spellR.mp_cost <= player.mp then 
                        --print("spell confirmed as casted spell and is good to cast") 
                        --print("casted spell = "..spell.english) 
                        break 
                    elseif spell.english ~= spellR.en and 
                    ((spellR.levels[player.main_job_id] and 
                    spellR.levels[player.main_job_id] <=  player.main_job_level) or 
                    (spellR.levels[player.sub_job_id] and 
                    spellR.levels[player.sub_job_id] <=  player.sub_job_level)) and 
                    windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                    spellR.mp_cost <= player.mp then 
                    --print("spell confirmed as new spell and is good to cast = "..spellR.en) 
                        eventArgs.cancel = true 
                        send_command('input /ma "'..spellR.en..'"'..spell.target.raw) 
                        break 
                    end 
                end
            end
            --print("spell test end")
            end
         end
    Most of the time, it works great. However, it keeps trying to upgrade Banishga to Banishga III, which doesn't exist. Since Banish III does, I think it has to do with using startswith, but I can't think of another way to do that.




    edit: interesting. it's doing the same thing with regular banish, but IV, and both only happen on White Mage.

  2. #162

    Quote Originally Posted by BaneTheBrawler View Post
    A question of my own: I'm using this function to upgrade spells to the highest tier available:

    Code:
    if spell.action_type == 'Magic' then 
            if spell.english:startswith("Protect") or 
            spell.english:startswith("Shell") or 
            spell.english:startswith("Dia") or 
            spell.english:startswith("Fire") or 
            spell.english:startswith("Stone") or 
            spell.english:startswith("Thunder") or 
            spell.english:startswith("Water") or 
            spell.english:startswith("Blizzard") or 
            spell.english:startswith("Aero") or 
            spell.english:startswith("Bio") or 
            spell.english:startswith("Poison") or 
            spell.english:startswith("Sleep") or 
            spell.english:startswith("Raise") or 
            spell.english:startswith("Holy") or 
            spell.english:startswith("Banish") or 
            spell.english:startswith("Enlight") or 
            spell.english:startswith("Endark") or
            spell.english:startswith("Drain") or 
            spell.english:startswith("Aspir") or
            spell.english:startswith("Reraise") or
            spell.english:startswith("Regen") then 
            for _,lvl in pairs({" VI"," V"," IV"," III"," II",""}) do 
            --print("current spell checking = "..string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                local spellR = gearswap.res.spells:with("name", string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                if spellR then 
                    --print("spellR is good") 
                    if spell.english == spellR.en and 
                    windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                    spellR.mp_cost <= player.mp then 
                        --print("spell confirmed as casted spell and is good to cast") 
                        --print("casted spell = "..spell.english) 
                        break 
                    elseif spell.english ~= spellR.en and 
                    ((spellR.levels[player.main_job_id] and 
                    spellR.levels[player.main_job_id] <=  player.main_job_level) or 
                    (spellR.levels[player.sub_job_id] and 
                    spellR.levels[player.sub_job_id] <=  player.sub_job_level)) and 
                    windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                    spellR.mp_cost <= player.mp then 
                    --print("spell confirmed as new spell and is good to cast = "..spellR.en) 
                        eventArgs.cancel = true 
                        send_command('input /ma "'..spellR.en..'"'..spell.target.raw) 
                        break 
                    end 
                end
            end
            --print("spell test end")
            end
         end
    Most of the time, it works great. However, it keeps trying to upgrade Banishga to Banishga III, which doesn't exist. Since Banish III does, I think it has to do with using startswith, but I can't think of another way to do that.




    edit: interesting. it's doing the same thing with regular banish, but IV, and both only happen on White Mage.
    try this
    Code:
    if spell.action_type == 'Magic' then 
            if spell.english:startswith("Protect") or 
            spell.english:startswith("Shell") or 
            spell.english:startswith("Dia") or 
            spell.english:startswith("Fire") or 
            spell.english:startswith("Stone") or 
            spell.english:startswith("Thunder") or 
            spell.english:startswith("Water") or 
            spell.english:startswith("Blizzard") or 
            spell.english:startswith("Aero") or 
            spell.english:startswith("Bio") or 
            spell.english:startswith("Poison") or 
            spell.english:startswith("Sleep") or 
            spell.english:startswith("Raise") or 
            spell.english:startswith("Holy") or 
            spell.english:startswith("Banish") or 
            spell.english:startswith("Enlight") or 
            spell.english:startswith("Endark") or
            spell.english:startswith("Drain") or 
            spell.english:startswith("Aspir") or
            spell.english:startswith("Reraise") or
            spell.english:startswith("Regen") then 
            for _,lvl in pairs({" VI"," V"," IV"," III"," II",""}) do 
            --print("current spell checking = "..string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                local spellR = gearswap.res.spells:with("name", string.mgsub(spell.english, "%s.+", "")..""..lvl) 
                if spellR then
                    local reject = {"Banishga III","Banish IV"}
                    if not reject[spellR.en] then
                        --print("spellR is good") 
                        if spell.english == spellR.en and 
                        windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                        spellR.mp_cost <= player.mp then 
                            --print("spell confirmed as casted spell and is good to cast") 
                            --print("casted spell = "..spell.english) 
                            break 
                        elseif spell.english ~= spellR.en and 
                        ((spellR.levels[player.main_job_id] and 
                        spellR.levels[player.main_job_id] <=  player.main_job_level) or 
                        (spellR.levels[player.sub_job_id] and 
                        spellR.levels[player.sub_job_id] <=  player.sub_job_level)) and 
                        windower.ffxi.get_spell_recasts()[spellR.recast_id] == 0 and 
                        spellR.mp_cost <= player.mp then 
                        --print("spell confirmed as new spell and is good to cast = "..spellR.en) 
                            eventArgs.cancel = true 
                            send_command('input /ma "'..spellR.en..'"'..spell.target.raw) 
                            break 
                        end  
                    end
                end
            end
            --print("spell test end")
            end
         end

  3. #163
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    nope, still the same.

  4. #164

    Quote Originally Posted by BaneTheBrawler View Post
    nope, still the same.
    try changin
    Code:
                     local reject = {"Banishga III","Banish IV"}
                     if not reject[spellR.en] then
    to
    Code:
                     local reject = S{"Banishga III","Banish IV"}
                    if not reject:contains(spellR.en) then

  5. #165
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    that did the trick. thanks!

  6. #166
    New Merits
    Join Date
    Aug 2005
    Posts
    203
    BG Level
    4
    FFXI Server
    Bahamut

    https://pastebin.com/isNX8KbD

    Midcast not working when I Nightgale Troubador, any help is appreciated

  7. #167

    Quote Originally Posted by Gorion View Post
    https://pastebin.com/isNX8KbD

    Midcast not working when I Nightgale Troubador, any help is appreciated
    its because Nightgale and Troubador are job abilities so they have no midcast


    with all ja's it goes from precast to aftercast in one second

  8. #168
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    So, I've been trying to get a function running to automatically equip stuff when i get put to sleep. i've tried several approaches. the current one is:

    Code:
    (under user setup) state.Buff.Sleep = buffactive.sleep or false
    
    (under sets) sets.buff.Sleep = {
            neck="Opo-opo Necklace",
            ring2="Nesanica ring"}
    
    
    (Under customize_idle_set) if state.Buff.sleep then
            idleSet = set_combine(idleSet, sets.buff.Sleep)
        end
    
    
    (under customize_melee_set) if state.Buff.sleep then
            meleeSet = set_combine(meleeSet, sets.buff.Sleep)
        end
    
    
    (its own function)
    
    
    
    function buff_change(buff,gain,buff_table)
        if state.Buff.sleep then
                equip(sets.buff.Sleep)
        end
    end
    am i coming at this entirely wrong? i feel like one of the two methods should have worked but neither does.

  9. #169

    Quote Originally Posted by BaneTheBrawler View Post
    So, I've been trying to get a function running to automatically equip stuff when i get put to sleep. i've tried several approaches. the current one is:

    Code:
    (under user setup) state.Buff.Sleep = buffactive.sleep or false
    
    (under sets) sets.buff.Sleep = {
            neck="Opo-opo Necklace",
            ring2="Nesanica ring"}
    
    
    (Under customize_idle_set) if state.Buff.sleep then
            idleSet = set_combine(idleSet, sets.buff.Sleep)
        end
    
    
    (under customize_melee_set) if state.Buff.sleep then
            meleeSet = set_combine(meleeSet, sets.buff.Sleep)
        end
    
    
    (its own function)
    
    
    
    function buff_change(buff,gain,buff_table)
        if state.Buff.sleep then
                equip(sets.buff.Sleep)
        end
    end
    am i coming at this entirely wrong? i feel like one of the two methods should have worked but neither does.
    i use this in the buff_change function
    Code:
        if S{2,19}:contains(buff_table.id) then
            if gain then
                equip({neck="Opo-opo Necklace",back="Aries Mantle",ring2="Nesanica ring"})
                disable("neck","back","ring2")
            else
                 enable("neck","back","ring2")
                --equips back to needed set
    
                 equip(gear_equip(name,'buff_change'))
            end

  10. #170
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    nope, no response at all. shits effin weird. i'mma try approaching it through autoexec.


    edit: bah, nothing there either.

  11. #171

    Quote Originally Posted by BaneTheBrawler View Post
    nope, no response at all. shits effin weird. i'mma try approaching it through autoexec.


    edit: bah, nothing there either.
    you are using motes include and it has not been updated to include the buff table that was added to buff_change
    dont use buff_change motes include already uses it
    use job_buff_change

    example:
    Code:
    function job_buff_change(buff, gain, eventArgs)
        if buff == "sleep" then
            if gain then
                equip({neck="Opo-opo Necklace",back="Aries Mantle",ring2="Nesanica ring"})
                disable("neck","back","ring2")
            else
                 enable("neck","back","ring2")
                --put you re-equip rules here
            end
        end
    end

  12. #172
    The Shitlord
    Join Date
    Feb 2008
    Posts
    11,366
    BG Level
    9
    FFXIV Character
    Kharo Hadakkus
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph
    WoW Realm
    Rivendare

    holy balls that did it. thank you!

  13. #173
    Sea Torques
    Join Date
    Nov 2007
    Posts
    694
    BG Level
    5
    FFXI Server
    Asura

    It's been like 6 years since I made my gearswap, how do I edit what elementalRing/elementalObi falls back to? (Hoping I can change it based on ability/WS used)

  14. #174
    New Merits
    Join Date
    Aug 2005
    Posts
    203
    BG Level
    4
    FFXI Server
    Bahamut

    i know they are abilities. i meant that When Nand T are active my songs dont show midcast. is it because the cast is too fast?

  15. #175

    Quote Originally Posted by Gorion View Post
    i know they are abilities. i meant that When Nand T are active my songs dont show midcast. is it because the cast is too fast?
    im not sure but it is possible that it is just to fast for gearswap to do anything of note

    im guessing that only some songs have enuf cast time to worry about midcast
    as most songs take 2 seconds(base) to cast

  16. #176
    A. Body
    Join Date
    Nov 2005
    Posts
    4,315
    BG Level
    7
    FFXI Server
    Leviathan

    Gearswap shouldn't have issues putting in midcast gear even on a Quick Magic proc. You can do a //gs showswaps to have things dumped to the log if you want to double check it, though I'd assume you'd see a difference in duration anyway.

  17. #177
    New Merits
    Join Date
    Aug 2005
    Posts
    203
    BG Level
    4
    FFXI Server
    Bahamut

    during normal songs Showswaps shows midcast but when NT is up i dont see midcast in showswaps. and btw thanks for the responses

  18. #178
    Radsourceful

    Join Date
    Jul 2007
    Posts
    1,964
    BG Level
    6
    FFXI Server
    Bismarck

    Quote Originally Posted by Gorion View Post
    during normal songs Showswaps shows midcast but when NT is up i dont see midcast in showswaps. and btw thanks for the responses
    Do you actually need midcasted song gear during N/T? Looks like if nightingale is active, you equip midcast gear in precast.

    Midcast should still fire, but you won't see any changes in showswaps since you already have the right gear on.

    Code:
    function precast(spell,action)
    ....
    elseif buffactive.Nightingale then
          equip_song_gear(spell)
    return
    ...
    end

  19. #179
    Hydra
    Join Date
    Nov 2009
    Posts
    116
    BG Level
    3
    FFXI Server
    Shiva

    hope im doing this right

    trying to get a spell degrade for my run gearswap. copied this sorta from the pld.lua on ffxiah's pld guide. i cast Geist Wall, but spell does not change and gives me message of all spells on cooldown.
    Code:
    function job_post_precast(spell, action, spellMap, eventArgs)
     refine_various_spells(spell, action, spellMap, eventArgs)
    end
    
    function refine_various_spells(spell, action, spellMap, eventArgs)
    
    	Enmity = S{'Soporific', 'Sheep Song', 'Stinking Gas', 'Geist Wall'}
    	if not Enmity:contains(spell.english) then
    		return
    	end
     
         local newSpell = spell.english
         local spell_recasts = windower.ffxi.get_spell_recasts()
         local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
      
        if spell_recasts[spell.recast_id] > 0 then
            if Enmity:contains(spell.english) then
                if spell.english == 'Geist Wall' then
                    add_to_chat(122,cancelling)
                    eventArgs.cancel = true
                return
                elseif spell.english == 'Geist Wall' then
                    newSpell = 'Stinking Gas'
                elseif spell.english == 'Stinking Gas' then
                    newSpell = 'Sheep Song'
                elseif spell.english == 'Sheep Song' then
                    newSpell = 'Soporific'
                end 
            end
        end
      
        if newSpell ~= spell.english then
            send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
            eventArgs.cancel = true
            return
        end
    end

  20. #180

    Quote Originally Posted by fattucus View Post
    hope im doing this right

    trying to get a spell degrade for my run gearswap. copied this sorta from the pld.lua on ffxiah's pld guide. i cast Geist Wall, but spell does not change and gives me message of all spells on cooldown.
    Code:
    function job_post_precast(spell, action, spellMap, eventArgs)
     refine_various_spells(spell, action, spellMap, eventArgs)
    end
    
    function refine_various_spells(spell, action, spellMap, eventArgs)
    
    	Enmity = S{'Soporific', 'Sheep Song', 'Stinking Gas', 'Geist Wall'}
    	if not Enmity:contains(spell.english) then
    		return
    	end
     
         local newSpell = spell.english
         local spell_recasts = windower.ffxi.get_spell_recasts()
         local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
      
        if spell_recasts[spell.recast_id] > 0 then
            if Enmity:contains(spell.english) then
                if spell.english == 'Geist Wall' then
                    add_to_chat(122,cancelling)
                    eventArgs.cancel = true
                return
                elseif spell.english == 'Geist Wall' then
                    newSpell = 'Stinking Gas'
                elseif spell.english == 'Stinking Gas' then
                    newSpell = 'Sheep Song'
                elseif spell.english == 'Sheep Song' then
                    newSpell = 'Soporific'
                end 
            end
        end
      
        if newSpell ~= spell.english then
            send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
            eventArgs.cancel = true
            return
        end
    end
    yes you are doing it wrong the best example there is is here https://www.bluegartr.com/threads/13...=1#post7056794

+ Reply to Thread
Page 9 of 22 FirstFirst ... 7 8 9 10 11 19 ... LastLast

Quick Reply Quick Reply

  • Decrease Size
    Increase Size
  • Remove Text Formatting
  • Insert Link Insert Image Insert Video
  • Wrap [QUOTE] tags around selected text
  • Insert NSFW Tag
  • Insert Spoiler Tag

Similar Threads

  1. Gearswap Help Thread!
    By JSHidaka in forum FFXI: Everything
    Replies: 6035
    Last Post: 2018-05-06, 17:15
  2. Randomerest Question Thread III: This Time It's Random
    By isladar in forum FFXI: Everything
    Replies: 868
    Last Post: 2009-08-18, 12:03