Item Search
     
BG-Wiki Search
Page 217 of 302 FirstFirst ... 167 207 215 216 217 218 219 227 267 ... LastLast
Results 4321 to 4340 of 6036

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

  1. #4321
    New Merits
    Join Date
    Jul 2011
    Posts
    245
    BG Level
    4
    FFXIV Character
    Already Banned
    FFXIV Server
    Hyperion
    FFXI Server
    Quetzalcoatl

    If you want to use if spellmap == for multiple spells in a single line do you have to use spellMap == 'SpellName' every time? Or is there a shorter way of doing this?

    Like
    If spellMap == 'Spell1' or spellMap == 'Spell 2' or spellMap == 'Spell3' or spellMap == 'Spell 4'

    Is there a better/shorter way of doing this like in Spellcast you could put | pineline between spells.

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

    Quote Originally Posted by Landsoul View Post
    If you want to use if spellmap == for multiple spells in a single line do you have to use spellMap == 'SpellName' every time? Or is there a shorter way of doing this?

    Like
    If spellMap == 'Spell1' or spellMap == 'Spell 2' or spellMap == 'Spell3' or spellMap == 'Spell 4'

    Is there a better/shorter way of doing this like in Spellcast you could put | pineline between spells.
    if S{ 'Spell1','Spell 2','Spell3','Spell 4'}:contains(spellmap) then
    and to anybody who needs it here is my obi rules
    Code:
    sets.spell_obi={Fire={waist="Karin Obi"},Earth={waist="Dorin Obi"},Water={waist="Suirin Obi"},Wind={waist="Furin Obi"},Ice={waist="Hyorin Obi"},
        Lightning={waist="Rairin Obi"},Light={waist="Korin Obi"},Dark={waist="Anrin Obi"},}
    Typ = {spells = S{'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},
                abilitys = S{'/jobability','/pet','/weaponskill','/monsterskill','/range'},}
    if not Typ.abilitys:contains(spell.prefix) and spell.action_type ~= "Item" then
        local spell_element = (type(spell.element)=='number' and res.elements[spell.element] or res.elements:with('name', spell.element))
        if spell_element.name == world.weather_element or spell_element.name == world.day_element then
            if player.inventory["Hachirin-no-Obi"] or player.wardrobe["Hachirin-no-Obi"] then
                equip({waist="Hachirin-no-Obi"})
            elseif player.inventory[sets.spell_obi[spell_element.en].waist] or player.wardrobe[sets.spell_obi[spell_element.en].waist] then
                equip(sets.spell_obi[spell_element.en])
            end
        end
    end

  3. #4323
    New Merits
    Join Date
    Jul 2011
    Posts
    245
    BG Level
    4
    FFXIV Character
    Already Banned
    FFXIV Server
    Hyperion
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by dlsmd View Post
    if S{ 'Spell1','Spell 2','Spell3','Spell 4'}:contains(spellmap) then
    and to anybody who needs it here is my obi rules
    Code:
    sets.spell_obi={Fire={waist="Karin Obi"},Earth={waist="Dorin Obi"},Water={waist="Suirin Obi"},Wind={waist="Furin Obi"},Ice={waist="Hyorin Obi"},
        Lightning={waist="Rairin Obi"},Light={waist="Korin Obi"},Dark={waist="Anrin Obi"},}
    Typ = {spells = S{'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},
                abilitys = S{'/jobability','/pet','/weaponskill','/monsterskill','/range'},}
    if not Typ.abilitys:contains(spell.prefix) and spell.action_type ~= "Item" then
        local spell_element = (type(spell.element)=='number' and res.elements[spell.element] or res.elements:with('name', spell.element))
        if spell_element.name == world.weather_element or spell_element.name == world.day_element then
            if player.inventory["Hachirin-no-Obi"] or player.wardrobe["Hachirin-no-Obi"] then
                equip({waist="Hachirin-no-Obi"})
            elseif player.inventory[sets.spell_obi[spell_element.en].waist] or player.wardrobe[sets.spell_obi[spell_element.en].waist] then
                equip(sets.spell_obi[spell_element.en])
            end
        end
    end
    I was testing it with this

    Code:
      	    if S{'Drain','Aspir','Sleep'}:contains(spellmap) and world.day_element == 'Water' or world.weather_element == 'Dark' then
    But it wasn't reconizing the spells I'm casting it seems, removing S{'Drain','Aspir','Sleep'}:contains(spellmap) and replacing it with spellMap == '' does seem to work.

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

    Quote Originally Posted by Landsoul View Post
    I was testing it with this

    Code:
              if S{'Drain','Aspir','Sleep'}:contains(spellmap) and world.day_element == 'Water' or world.weather_element == 'Dark' then
    But it wasn't reconizing the spells I'm casting it seems, removing S{'Drain','Aspir','Sleep'}:contains(spellmap) and replacing it with spellMap == '' does seem to work.
    2 issues with your code
    1. motes include does not have a mapping for sleep that might be your issue
    2. and world.day_element == 'Water' or world.weather_element == 'Dark' then will not work
    try this
    if (S{'Drain','Aspir'}:contains(spellmap) or spell.en:startswith("Sleep")) and (world.day_element == 'Water' or world.weather_element == 'Dark') then

  5. #4325
    Melee Summoner
    Join Date
    Jan 2008
    Posts
    31
    BG Level
    1

    *deleted in error*

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

    Omg Ast do you still live lol

  7. #4327
    Melee Summoner
    Join Date
    Jan 2008
    Posts
    31
    BG Level
    1

    Quote Originally Posted by Sechs View Post
    Omg Ast do you still live lol
    I'm backkkkk ;D

  8. #4328
    RIDE ARMOR
    Join Date
    May 2015
    Posts
    15
    BG Level
    1

    Hello.
    I've found this blm lua and edited to my current gear.
    However it seem to fulltime in idle gear when Im nuking or debuffing.
    Any ideas how to fix it?

    Also, would like to add in the file so I automaticly equip my Uggaleiph Pendant when mp is <51%

    Here is a link to my lua
    http://pastebin.com/qsb24fr1

    edit:
    from testing it seems it ignores my Elemental/Dark/Enfeeble sets all together. Temp solotion for me is putting the elemental gear in fastcast set which isnt optimal

  9. #4329
    RIDE ARMOR
    Join Date
    May 2015
    Posts
    15
    BG Level
    1

    bump

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

    @joso33 i looked through your code and it all looks good so the only thing i can think of is something on your computer is messing up eather gearswap or Windower
    try deleting your windower/update folder and re launching windower to force it to redownload all of it files again

  11. #4331
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    Joso33:

    Skills are spaced in the Resources now for magic.

    If you go through your file and anywhere you see if (spell.skill == "ElementalMagic") and change it to if (spell.skill == "Elemental Magic") it should fix your issues.

    specifically
    Line 87, 116 change "ElementalMagic" to "Elemental Magic"
    Line 128 change "EnhancingMagic" to "Enhancing Magic"

    I don't even see any rules for Dark Magic or Enfeebling Magic

    Also, not really sure why, but you have your obi check in midcast only acting when you are casting Enhancing Magic, which doesn't benefit from obis.

    Edit: Additionally, looks like a copy/paste issue but the second spell.element value on lines 92, 110, 121, and 173 is misspelled as spell_element, which is an undeclared variable.

    also, you'll get a null set error if you ever do line 129, because it will send as the set sets['midcast_Enhancing Magic'] which you don't have declared

  12. #4332
    Cerberus
    Join Date
    Aug 2010
    Posts
    446
    BG Level
    4
    FFXIV Character
    Alistrianna Galanodel
    FFXIV Server
    Hyperion

    I am using Mote's SMN lua and would like to add to the rule for Flaming Crush to use its own set. Here is the rules below.

    Code:
    function job_get_spell_map(spell)
        if spell.type == 'BloodPactRage' then
            if magicalRagePacts:contains(spell.english) then
                return 'MagicalBloodPactRage'
            else
                return 'PhysicalBloodPactRage'
            end
        elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
            return 'DebuffBloodPactWard'
        end
    end
    How would I add to this rule so Flaming Crush uses its own set?

    Also, would the set name need to be sets.midcast.pet['Flaming Crush'] or would I need to make it sets.midcast.pet.BloodPactRage['Flaming Crush']?

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

    Search the lua for "MagicalBloodPactRage" and "PhysicalBloodPactRage" If I am reading that right they should have a table with a list of blood pacts that fit that category. Simply remove Flaming Crush from the list. Then you'd have to figure out how to equip the right gear for it. (Maybe a "if spell.name == flaming crush then equip stuffs" type thing) Being its a Motes file and im too stupid to figure those out.

  14. #4334
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    I wouldn't mess with the mapping or even that specific function at all to tell the truth.

    I would find your job_midcast function for smn and there I would find the rule where it handles blood pacts and just add an if spell.name == "Flaming Crush" and change the first blood pact rule to an elseif.

    Nevermind my advice: I was looking through mote's luas and he handles the actual equipping of the bloodpact gear somewhere else that I'm not sure of at the moment.

  15. #4335
    New Merits
    Join Date
    Jul 2011
    Posts
    245
    BG Level
    4
    FFXIV Character
    Already Banned
    FFXIV Server
    Hyperion
    FFXI Server
    Quetzalcoatl

    What's the best way going about a cancel Ni while casting ichi rule?

    I currently have
    Code:
    function midcast(spell)
        if spell.name == 'Utsusemi: Ichi' and overwrite then
            send_command('cancel Copy Image|Copy Image (2)')
        end
    end
     
    function aftercast(spell)
        if not spell.interrupted then
            if spell.name == 'Utsusemi: Ichi' then
                overwrite = false
            elseif spell.name == 'Utsusemi: Ni' then
                overwrite = true
            end
        end
    end
    But the problem with this code is that it cancels it too fast.

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

    You mean cancelling the spell or the buff for utsusemi?

    I do my buff cancelling in the precast (this requires Shortcuts addon). I figured this out in order to save a macro slot (I will need to update it when I get san). I just need one macro for utsusemi ni. If the recast for Ni is not ready it switches to Ichi. Then when it does cast Ichi it checks if the spell is ready to be cast and if copy image 1-3 are up. if so it cancels copy image 1-3 after waiting 2 seconds (you can change the wait to whatever u are happy with). I did not know you could use a "pipe" ( "|" ) in Gearswap. If i have more shadows than 3 (which I think would apply to NIN main only) it cancels Ichi altogether. It also puts a message in chat log and plays a sound for me via chatmon plugin. The only bad thing about this is if A monster is casting a ga spell or something So i cast ahead of time so Utsusemi Ichi will finish right after the spell lands and wipes my copy images it wont work. If i was casting NI nowever it would work fine. So maybe you can utilize this for your purposes in some manner.
    EDIT: I used to have issues when utsusemi would quickcast though, It would cancel the buff. I am sure this would still be an issue but least you can recast it instantly. I am not ure you can do anything about quickcasts.

    Code:
    local spell_recasts = windower.ffxi.get_spell_recasts()
    if spell.name == 'Utsusemi: Ni' then
    	if spell_recasts[339] > 1 then
    		cancel_spell()
    		send_command('//UtsusemiIchi')
    		return
    	end
    end
    if spell.name == 'Utsusemi: Ichi' then
    	if spell_recasts[338] < 1 and ( buffactive["Copy Image"] or buffactive["Copy Image (2)"] or buffactive["Copy Image (3)"] ) then
    		send_command('wait 2;cancel 66;cancel 444;cancel 445')
    	elseif spell_recasts[338] < 1 and buffactive["Copy Image (4+)"] then
    		add_to_chat(039,'=x=X=x= Cancel: '..spell.name..' =x=X=x=')
    		send_command('chatmon play c:/chatmonwavs/error.wav')
    		cancel_spell()
    		return
    	end
    end



    Question:
    I put this in my lua in the aftercast function. For some reason it isnt working for me correctly. Is it working for anyone else?
    Code:
    if spell.name == 'Paralyna' then
    	if spell.interrupted then
    		add_to_chat(039, 'Paralyna: Interrupted')
    	else
    		add_to_chat(158, 'Paralyna: Success')
    	end
    end
    In this code it prints out the add to chat when it IS NOT interrupted. When it IS interrupted it does nothing. So It knows it didnt go off but doesnt act. It is making me worry a bit as i have some variables changed when some spells are interrupted and if its not actin on interruption I need to figure something else out.

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

    @Trumpy
    this code should work the same as you have except it will auto kill any spell and it removes all the redundant recast checks and it should be way more efficient
    Code:
    if spell.action_type == 'Magic' and windower.ffxi.get_spell_recasts()[spell.recast_id] < 1 then cancel_spell() end
    if _global.cancel_spell then -- put what you want to do when spell is canceled in here
        if spell.name == 'Utsusemi: Ni' then
            send_command('//UtsusemiIchi')
            return
        end
    else -- put what you want to do when spell is not canceled in here
        if spell.name == 'Utsusemi: Ichi' then
            local buff = has_any_buff_of({66,444,445})
            if buff then
                send_command('wait 2;cancel '..buff)
            elseif buffactive["Copy Image (4+)"] then
                add_to_chat(039,'=x=X=x= Cancel: '..spell.name..' =x=X=x=')
                send_command('chatmon play c:/chatmonwavs/error.wav')
                cancel_spell()
                return
            end
        end
    end
    
    function has_any_buff_of(buff_set)
        for i,v in pairs(buff_set) do
            if buffactive[v] ~= nil then
                return v 
            end
        end
        return false
    end

  18. #4338
    Relic Shield
    Join Date
    Feb 2012
    Posts
    1,909
    BG Level
    6

    So does anyone know offhand what in Kinematic's RUN LUA causes runes to show up with timer text in the chat log? I'll copy what I think is the relevant section below:

    Code:
    ------------------------------------------------------------------
    -- Timer manipulation
    ------------------------------------------------------------------
    
    -- Add a new run to the custom timers, and update index values for existing timers.
    function update_timers(spell)
        local expires_time = os.time() + 300
        local entry_index = rune_count(spell.name) + 1
    
        local entry = {rune=spell.name, index=entry_index, expires=expires_time}
    
        rune_timers:append(entry)
        local cmd_queue = create_timer(entry).. ';wait 0.05;'
        
        cmd_queue = cmd_queue .. trim()
    
        add_to_chat(123,'cmd_queue='..cmd_queue)
    
        send_command(cmd_queue)
    end
    
    -- Get the command string to create a custom timer for the provided entry.
    function create_timer(entry)
        local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
        local duration = entry.expires - os.time()
        return 'timers c ' .. timer_name .. ' ' .. tostring(duration) .. ' down'
    end
    
    -- Get the command string to delete a custom timer for the provided entry.
    function delete_timer(entry)
        local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
        return 'timers d ' .. timer_name .. ''
    end
    
    -- Reset all timers
    function reset_timers()
        local cmd_queue = ''
        for index,entry in pairs(rune_timers) do
            cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
        end
        rune_timers:clear()
        send_command(cmd_queue)
    end
    
    -- Get a count of the number of runes of a given type
    function rune_count(rune)
        local count = 0
        local current_time = os.time()
        for _,entry in pairs(rune_timers) do
            if entry.rune == rune and entry.expires > current_time then
                count = count + 1
            end
        end
        return count
    end
    
    -- Remove the oldest rune(s) from the table, until we're below the max_runes limit.
    -- If given a value n, remove n runes from the table.
    function trim(n)
        local cmd_queue = ''
    
        local to_remove = n or (rune_timers:length() - max_runes)
    
        while to_remove > 0 and rune_timers:length() > 0 do
            local oldest
            for index,entry in pairs(rune_timers) do
                if oldest == nil or entry.expires < rune_timers[oldest].expires then
                    oldest = index
                end
            end
            
            cmd_queue = cmd_queue .. prune(rune_timers[oldest].rune)
            to_remove = to_remove - 1
        end
        
        return cmd_queue
    end
    
    -- Drop the index of all runes of a given type.
    -- If the index drops to 0, it is removed from the table.
    function prune(rune)
        local cmd_queue = ''
        
        for index,entry in pairs(rune_timers) do
            if entry.rune == rune then
                cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
                entry.index = entry.index - 1
            end
        end
    
        for index,entry in pairs(rune_timers) do
            if entry.rune == rune then
                if entry.index == 0 then
                    rune_timers[index] = nil
                else
                    cmd_queue = cmd_queue .. create_timer(entry) .. ';wait 0.05;'
                end
            end
        end
        
        return cmd_queue
    end
    Basically while playing RUN when I hit a timer it shows in the chat log of 0.05 Ignis, etc. And occasionally it'll toss in an entire line of that message, just wondering if anyone knows how I can get that to stop.

  19. #4339
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by Kanriel View Post
    So does anyone know offhand what in Kinematic's RUN LUA causes runes to show up with timer text in the chat log? I'll copy what I think is the relevant section below:

    Code:
    ------------------------------------------------------------------
    -- Timer manipulation
    ------------------------------------------------------------------
    
    -- Add a new run to the custom timers, and update index values for existing timers.
    function update_timers(spell)
        local expires_time = os.time() + 300
        local entry_index = rune_count(spell.name) + 1
    
        local entry = {rune=spell.name, index=entry_index, expires=expires_time}
    
        rune_timers:append(entry)
        local cmd_queue = create_timer(entry).. ';wait 0.05;'
        
        cmd_queue = cmd_queue .. trim()
    
        add_to_chat(123,'cmd_queue='..cmd_queue)
    
        send_command(cmd_queue)
    end
    
    -- Get the command string to create a custom timer for the provided entry.
    function create_timer(entry)
        local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
        local duration = entry.expires - os.time()
        return 'timers c ' .. timer_name .. ' ' .. tostring(duration) .. ' down'
    end
    
    -- Get the command string to delete a custom timer for the provided entry.
    function delete_timer(entry)
        local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
        return 'timers d ' .. timer_name .. ''
    end
    
    -- Reset all timers
    function reset_timers()
        local cmd_queue = ''
        for index,entry in pairs(rune_timers) do
            cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
        end
        rune_timers:clear()
        send_command(cmd_queue)
    end
    
    -- Get a count of the number of runes of a given type
    function rune_count(rune)
        local count = 0
        local current_time = os.time()
        for _,entry in pairs(rune_timers) do
            if entry.rune == rune and entry.expires > current_time then
                count = count + 1
            end
        end
        return count
    end
    
    -- Remove the oldest rune(s) from the table, until we're below the max_runes limit.
    -- If given a value n, remove n runes from the table.
    function trim(n)
        local cmd_queue = ''
    
        local to_remove = n or (rune_timers:length() - max_runes)
    
        while to_remove > 0 and rune_timers:length() > 0 do
            local oldest
            for index,entry in pairs(rune_timers) do
                if oldest == nil or entry.expires < rune_timers[oldest].expires then
                    oldest = index
                end
            end
            
            cmd_queue = cmd_queue .. prune(rune_timers[oldest].rune)
            to_remove = to_remove - 1
        end
        
        return cmd_queue
    end
    
    -- Drop the index of all runes of a given type.
    -- If the index drops to 0, it is removed from the table.
    function prune(rune)
        local cmd_queue = ''
        
        for index,entry in pairs(rune_timers) do
            if entry.rune == rune then
                cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
                entry.index = entry.index - 1
            end
        end
    
        for index,entry in pairs(rune_timers) do
            if entry.rune == rune then
                if entry.index == 0 then
                    rune_timers[index] = nil
                else
                    cmd_queue = cmd_queue .. create_timer(entry) .. ';wait 0.05;'
                end
            end
        end
        
        return cmd_queue
    end
    Basically while playing RUN when I hit a timer it shows in the chat log of 0.05 Ignis, etc. And occasionally it'll toss in an entire line of that message, just wondering if anyone knows how I can get that to stop.
    Look for calls to add_to_chat(). It could be the one in update_timers() you pasted above.

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

    I guess I will repost my paralyna code when gearswap is fixed and see if anyone else is having the ssame issue with that code.

Page 217 of 302 FirstFirst ... 167 207 215 216 217 218 219 227 267 ... LastLast

Similar Threads

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