Item Search
     
BG-Wiki Search
Closed Thread
Page 147 of 302 FirstFirst ... 97 137 145 146 147 148 149 157 197 ... LastLast
Results 2921 to 2940 of 6036

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

  1. #2921
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by Motenten View Post
    1) That set won't be automatically selected. Midcast set selection ignores JAs (though I suppose I should adjust that, just for completeness).
    2) Even if it did get selected, it *only* is active during the actual use of the JA (Troubadour, in this case). It will have absolutely no effect on songs you sing afterwards.

    You indicate you want to equip that set when singing Lullaby while Troubadour is active. In that case, you're making a modification to the default gear selection, which should be applied in post_midcast.
    Spoiler: show
    Code:
        -- Need to add this to job_setup():
        state.Buff['Troubadour'] = buffactive['Troubadour'] or false
    
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spellMap == 'Lullaby' and state.Buff.Troubadour then
            equip(sets.midcast.Troubadour)
        end
    end
    ]
    Thanks Mote, I will try it out.

  2. #2922
    Smells like Onions
    Join Date
    Jul 2010
    Posts
    9
    BG Level
    0
    FFXI Server
    Titan

    Quote Originally Posted by Motenten View Post
    The code he provided is a way to use that helm -instead of- whatever you'd use normally. If you wanted to use that helm all the time, regardless, just put it in the weaponskill's gear set.
    Hi Motenten and thanks for confirming.

    I want to use these rules to get the helm equipped on corresponding elemental days, not fulltime. My other question was tho, how do I make it exclude equipment sets instead of the ws itself as shown in the example?

    Ex. I want to use the helm on Fudo days for most Fudo equipment sets (Normal, Attack) - but in situations I need heavy accuracy i swap to engaged.Ws.HighAcc['Tachi: Fudo'] and want to use another headpiece in this and these (Ws.HighAcc) sets.

    In the example it is shown how I exclude the weaponskill itself, however as said I want to exclude it from specific set variations of WS's. Is that possible to do?

    Thanks alot for your input!


    Quote Originally Posted by Orestes View Post
    This is what I'm doing. Mote already had most of the logic in place for switching elemental belt/gorgets, so I just modified that a bit.
    Code:
    function is_sc_element_today(spell)
        if spell.type ~= 'WeaponSkill' then
            return
        end
    
       local weaponskill_elements = S{}:
        union(skillchain_elements[spell.skillchain_a]):
        union(skillchain_elements[spell.skillchain_b]):
        union(skillchain_elements[spell.skillchain_c])
    
        if weaponskill_elements:contains(world.day_element) then
            return true
        else
            return false
        end
    
    end
    Then you can query the function in job_post_precast() (assuming you use Mote's). It will return true if the day is aligned with whichever WS you're using. You'll have to make a set containing just the helm somewhere in init_gear_sets() i.e. sets.WSDayBonus = { head="Gavialis Helm" }

    Code:
    job_post_precast(spell, action, spellMap, eventArgs)
    	if spell.type == 'WeaponSkill' then
                if is_sc_element_today(spell) then
                    equip(sets.WSDayBonus)
                end
    	end
    end
    If you want to exclude any WS's or lock it down to only working with certain WS, you'd have to do something like this.
    Code:
    if spell.type == 'WeaponSkill' then
        if spell.english ~= 'Stardiver' then
            equip(sets.WSDayBonus)
        end
    end

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

    Quote Originally Posted by Digg View Post
    Hi Motenten and thanks for confirming.

    I want to use these rules to get the helm equipped on corresponding elemental days, not fulltime. My other question was tho, how do I make it exclude equipment sets instead of the ws itself as shown in the example?

    Ex. I want to use the helm on Fudo days for most Fudo equipment sets (Normal, Attack) - but in situations I need heavy accuracy i swap to engaged.Ws.HighAcc['Tachi: Fudo'] and want to use another headpiece in this and these (Ws.HighAcc) sets.

    In the example it is shown how I exclude the weaponskill itself, however as said I want to exclude it from specific set variations of WS's. Is that possible to do?

    Thanks alot for your input!
    It doesn't look like you're using Mote's includes, so it's hard to say without seeing your lua.

    If you were, then you could do something like this.

    Code:
    if spell.type == 'WeaponSkill' then
        if state.OffenseMode.value ~= 'Acc' then
            equip(sets.WSDayBonus)
        end
    end

  4. #2924
    Smells like Onions
    Join Date
    Jul 2010
    Posts
    9
    BG Level
    0
    FFXI Server
    Titan

    Quote Originally Posted by Orestes View Post
    It doesn't look like you're using Mote's includes, so it's hard to say without seeing your lua.

    If you were, then you could do something like this.

    Code:
    if spell.type == 'WeaponSkill' then
        if state.OffenseMode.value ~= 'Acc' then
            equip(sets.WSDayBonus)
        end
    end

    Oh, I am, I just manually added HighAcc sets for hiiiigh acc situations (situational 950+ acc in gear on SAM) + I notice i referred to the HighAcc sets with "engaged" instead of "precast" by talking from top of my head from work.. I'm sorry about the confusion. Thanks alot again Orestes, your code makes perfect sense and I should really be able to figure that myself but.. hopfully next time.



    Code:
    -- Setup vars that are user-dependent.
    function user_setup()
        state.OffenseMode:options('Normal', 'Acc','HighAcc')
        state.HybridMode:options('Normal', 'PDT', 'Reraise')
        state.WeaponskillMode:options('Normal', 'Acc', 'HighAcc', 'Mod')
        state.PhysicalDefenseMode:options('PDT', 'Reraise')

  5. #2925

    http://pastebin.com/VaRkZLFG

    this is my pastebin and have 2 problems I cannot get Gavialis Helm to work as had way too many errors trying to input your codes. and also want to make sure Sekkanoki and Sengikori, JA sets to be put in on activation. rest is good i think lol.

  6. #2926
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by tylerderdin4 View Post
    http://pastebin.com/VaRkZLFG

    this is my pastebin and have 2 problems I cannot get Gavialis Helm to work as had way too many errors trying to input your codes. and also want to make sure Sekkanoki and Sengikori, JA sets to be put in on activation. rest is good i think lol.
    You don't have the function is_sc_element_today() included. I put mine in User-Globals.lua, so if you're looking at my luas thats why you didn't see it. You can paste it at the bottom of each of your job luas instead though.

    Code:
    function is_sc_element_today(spell)
        if spell.type ~= 'WeaponSkill' then
            return
        end
       
        local weaponskill_elements = S{}:
            union(skillchain_elements[spell.skillchain_a]):
            union(skillchain_elements[spell.skillchain_b]):
            union(skillchain_elements[spell.skillchain_c])
    
        if weaponskill_elements:contains(world.day_element) then
            return true
        else
            return false
        end
    end
    Also, you have the set and equip lines commented out. This may have been intentional, or you could have copied directly from my luas. (I have them commented out since I don't actually own the helm yet). Remove the two dashes before line 589, and 662 so they look like this.
    Code:
    sets.WSDayBonus     = { head="Gavialis Helm" }
    
    
    if spell.type == 'WeaponSkill' then
    
        if is_sc_element_today(spell) then
            equip(sets.WSDayBonus)
        end
    end

  7. #2927

    Ok thanks alot Orestes

    here is the update Lua, hope all is right.

    http://pastebin.com/VaRkZLFG

  8. #2928
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by tylerderdin4 View Post
    Ok thanks alot Orestes

    here is the update Lua, hope all is right.

    http://pastebin.com/VaRkZLFG

    Not quite.. You had about 15 syntax errors in there. You had ear2="Bladeborn Earring" without a comma after it a bunch of times, missing a bracket to close ["Namas Arrow"] on 571, and a dot before an array index on 587.

    Also, you were missing the "end" to close the if / then block for equipping the helm.

    I'm not 100% it functions, but this is at least is free of syntax errors. http://pastebin.com/u3Qs1LqH

  9. #2929

    Thanks alot ya just put earrings and forgot to fix those. Thanks for update Lua will try tonight when i get home

  10. #2930

    http://pastebin.com/VaRkZLFG

    the one you gave me had few errors I fixed but now says lua757 global skillchain_elements'(a nil value)
    gear has detected an error in the use function precast
    and lua 302

  11. #2931
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by tylerderdin4 View Post
    http://pastebin.com/VaRkZLFG

    the one you gave me had few errors I fixed but now says lua757 global skillchain_elements'(a nil value)
    gear has detected an error in the use function precast
    and lua 302
    Sorry, copy this into the top of your file.

    Code:
    -- Elements for skillchain names
    skillchain_elements = {}
    skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'}
    skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'}
    skillchain_elements.Fusion = S{'Light','Fire'}
    skillchain_elements.Fragmentation = S{'Wind','Lightning'}
    skillchain_elements.Distortion = S{'Ice','Water'}
    skillchain_elements.Gravitation = S{'Dark','Earth'}
    skillchain_elements.Transfixion = S{'Light'}
    skillchain_elements.Compression = S{'Dark'}
    skillchain_elements.Liquification = S{'Fire'}
    skillchain_elements.Induration = S{'Ice'}
    skillchain_elements.Detonation = S{'Wind'}
    skillchain_elements.Scission = S{'Earth'}
    skillchain_elements.Impaction = S{'Lightning'}
    skillchain_elements.Reverberation = S{'Water'}

  12. #2932
    Smells like Onions
    Join Date
    Sep 2014
    Posts
    1
    BG Level
    0

    Quote Originally Posted by Motenten View Post
    My own solution to this issue:
    pastebin.com/uFtapgQs

    It tracks runes by name, including the number of each type of rune.
    It expires them appropriately, including something like using Ignis while 3 Ignis runes are up (the oldest is dropped, the newest added, and the numbering is all adjusted).
    It handles Swipe/Lunge/Gambit, though it doesn't account for keeping runes if you kill the mob prematurely.
    It does not remove timers when a rune is lost on buff_change since runes are no longer dispellable. If the rune wears off on its own, the timer should be expiring at the same time, so trying to preemptively remove it will just cause problems.

    I had to push all the timer creation/deletion into a single queued command per event. If I issued the commands individually, they wouldn't always take effect.

    The code for keeping the timers updated is a bit more complicated than I'd like, due to needing to queue the commands, and making sure deleting from a table doesn't screw things up. However all the code is isolated into what should be very easily-understandable function units.
    Hello sorry. This is the really good works really well.
    But one problem I see it not works with Swype.
    There is something wrong? I did code some mistakes? But I did copy and paste.
    Everything else is really works good and well.

  13. #2933
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,613
    BG Level
    7
    FFXI Server
    Bahamut

    Trying to get a bit of code Martel posted for a self_command to pop Velkk Coffers to work, but not having any luck and didn't want to carry on the discussion in the Incursion thread. With Motenten's .lua, I've tried both within the job .lua:

    Code:
    function job_self_command(cmdParams, eventArgs)
    	if command == 'coffer' then
    		cycle = 0
    		invCount = windower.ffxi.get_bag_info(0).count
    		if invCount == 80 then
    			add_to_chat(140,'Inv. full. Ending cycle')
    		elseif player.inventory["Velkk Coffer"] then
    			send_command('input /item "Velkk Coffer"')
    			cycle = 1
    		else
    			add_to_chat(140,'No Coffers found in inv.')
    			send_command('findall Velkk Coffer')
    		end
    		if cycle == 1 then
    			send_command('wait 2;gc c coffer')
    		end
    	end
    end
    Code:
    function self_command(command)
    	if command == 'coffer' then
    		cycle = 0
    		invCount = windower.ffxi.get_bag_info(0).count
    		if invCount == 80 then
    			add_to_chat(140,'Inv. full. Ending cycle')
    		elseif player.inventory["Velkk Coffer"] then
    			send_command('input /item "Velkk Coffer"')
    			cycle = 1
    		else
    			add_to_chat(140,'No Coffers found in inv.')
    			send_command('findall Velkk Coffer')
    		end
    		if cycle == 1 then
    			send_command('wait 2;gc c coffer')
    		end
    	end
    end
    Both work in the sense that I get no errors when reloading the .lua, however neither work once I input //gs c coffer. I did a search for self_command within the thread and tried a few variations that I found within, which may or may not of even been for Mote's files, with no luck. Any help with what am I missing here would be appreciated, would love to do this rather than alter a script each time. :3

  14. #2934
    Old Merits
    Join Date
    Sep 2008
    Posts
    1,115
    BG Level
    6
    FFXI Server
    Leviathan

    i could be missing something here too, but neither /item "Velkk Coffer" nor /item "Velkk Coffer" <me> input directly into FFXI would open the box, so i suspect that is the problem.

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

    Did spell.action_type get removed at some time? I can't find it anymore in the XLS example file, but I have a bunch of old lines that try to use spell.action_type in my luas.


    edit:
    Quote Originally Posted by Tosh86 View Post
    Hello sorry. This is the really good works really well.
    But one problem I see it not works with Swype.
    There is something wrong? I did code some mistakes? But I did copy and paste.
    Everything else is really works good and well.
    Nah the Swipe part doesn't work. Me and another friend are having the same issue so it's gotta be something in the original code I think.
    I do not understand completely every single line inside the trim() function, so I don't really know what's wrong.

    The reset runes while dead thing doesn't work either but there's a simple fix for that.
    Use the following lines instead
    Code:
    windower.raw_register_event('status change',function(new, old)
        if gearswap.res.statuses[new].english == 'Dead' then
            reset_timers()
        end
    end)

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

    I have found sometimes switchin double quotes to single quotes makes things work when dealin with windower things. try /item 'Velkk Coffer' <me>.

    For instance I tried alot of times in the past to be able to get my mule to use a forbidden key via send and it never seemed to work but recently figured out a macro using single quotes worked:

    /con send @others /targetnpc
    /con send @others /item 'Forbidden Key' <t>

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

    Quote Originally Posted by Tosh86 View Post
    Hello sorry. This is the really good works really well.
    But one problem I see it not works with Swype.
    There is something wrong? I did code some mistakes? But I did copy and paste.
    Everything else is really works good and well.
    Yeah, I forgot to update the pastebin code with the other fixes I made, after Sechs brought up a few points.

    And reviewing things, I think I see what the Swipe problem is. Make the following changes (or just re-copy from the pastebin):
    Code:
            elseif spell.name == "Swipe" then
                send_command(trim(1))
            end
    Code:
    -- 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

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

    @Mote
    Swipe works perfectly for me with that change, thanks Mote.


    Quote Originally Posted by Sechs View Post
    Did spell.action_type get removed at some time? I can't find it anymore in the XLS example file, but I have a bunch of old lines that try to use spell.action_type in my luas.
    I apologize if I insist on this topic. Anybody knows anything?
    I still have these .action_type lines in my luas, they're likely remnants of when I started messing up with luas but I'm not even sure they serve a purpose anymore, plus I don't see the command in the XLS file. Kinda means it got eliminated somewhere along the road? When and why? Which other command took its place?

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

    action_type is still present in the GearSwap code, Sechs. I have no idea if it was ever explicitly in the spreadsheet.

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

    Then it probably never was there in the xls I suppose.
    Which fields does it accept? I only know "Magic" as one of the possible ones.

Similar Threads

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