Item Search
     
BG-Wiki Search
Closed Thread
Page 292 of 302 FirstFirst ... 242 282 290 291 292 293 294 ... LastLast
Results 5821 to 5840 of 6036

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

  1. #5821
    Old Merits
    Join Date
    Nov 2015
    Posts
    1,181
    BG Level
    6
    FFXI Server
    Asura
    WoW Realm
    Cho'gall

    I'm no expert, but I did manage to put together a fully non-Mote BLM lua that does everything it should. ^^ You could try nesting them instead.

    Instead of:
    Code:
                            if buffactive.Camouflage and equipSet["Camouflage"] then
                                    equipSet = equipSet["Camouflage"]
                            end
                            if buffactive["Double Shot"] then
                                    equipSet = set_combine(sets.Midshot,{head="Oshosi Mask"})
                            end
    You can try:
    Code:
                            if buffactive.Camouflage and equipSet["Camouflage"] then
                                    equipSet = equipSet["Camouflage"]
                            elseif buffactive["Double Shot"] then
                                    equipSet = set_combine(sets.Midshot,{head="Oshosi Mask"})
                            end
    Or if you want both:
    Code:
                            if buffactive.Camouflage and buffactive["Double Shot"] then
                                    equipSet = set_combine(equipSet["Camouflage"],sets.Midshot,{head="Oshosi Mask"})
                            end
    I think those should work. ^^;;

  2. #5822
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    36
    BG Level
    1

    Quote Originally Posted by Nyarlko View Post
    I'm no expert, but I did manage to put together a fully non-Mote BLM lua that does everything it should. ^^ You could try nesting them instead.

    Instead of:
    Code:
                            if buffactive.Camouflage and equipSet["Camouflage"] then
                                    equipSet = equipSet["Camouflage"]
                            end
                            if buffactive["Double Shot"] then
                                    equipSet = set_combine(sets.Midshot,{head="Oshosi Mask"})
                            end
    You can try:
    Code:
                            if buffactive.Camouflage and equipSet["Camouflage"] then
                                    equipSet = equipSet["Camouflage"]
                            elseif buffactive["Double Shot"] then
                                    equipSet = set_combine(sets.Midshot,{head="Oshosi Mask"})
                            end
    Or if you want both:
    Code:
                            if buffactive.Camouflage and buffactive["Double Shot"] then
                                    equipSet = set_combine(equipSet["Camouflage"],sets.Midshot,{head="Oshosi Mask"})
                            end
    I think those should work. ^^;;
    I tried this didn't work for me, since I'm trying to do two different bodies depending on the buff, so it's one or the other for me. I think this (Oshosi Vest) needs to stay on while double shot is on. So I played around with my Lua (I used mote includes), and finally got it to work, needs to be a midcast set, so I made a set called sets.midcast.RA.Double. And the I made this code:

    function job_post_midcast(spell, action, spellMap, eventArgs)
    if buffactive['Double Shot'] then
    equip(sets.midcast.RA.Double)
    end
    end

    This worked for me.

  3. #5823
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    36
    BG Level
    1

    Quote Originally Posted by Drizzt View Post
    I tried this didn't work for me, since I'm trying to do two different bodies depending on the buff, so it's one or the other for me. I think this (Oshosi Vest) needs to stay on while double shot is on. So I played around with my Lua (I used mote includes), and finally got it to work, needs to be a midcast set, so I made a set called sets.midcast.RA.Double. And the I made this code:

    function job_post_midcast(spell, action, spellMap, eventArgs)
    if buffactive['Double Shot'] then
    equip(sets.midcast.RA.Double)
    end
    end

    This worked for me.
    Word of caution when using this at high level content, make sure what ever midcast set you are using is a mid or high accuracy set. Learned that the hard way when I was whiffing, while double shot was active. That body piece doesn't have that high of Racc, especially when compared to the AF3 (with the set bonus).

  4. #5824
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Trying to break down my RUN GS into tanking, 2H DD, and 1H DD. Right now it is just all on one TP index with no way to use 1H weapons (no DW gear).

    Still figuring out how to do that how I want, but first I just had a question. Is it possible to specify weapon type? It would be nice to just have the DDing aspect handled by "if weapon.type == 'Great Sword' then" rather than a toggle.

    The next best thing I could think of was mapping each weapon to a table to call.

  5. #5825
    Radsourceful

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

    Quote Originally Posted by Spicyryan View Post
    Trying to break down my RUN GS into tanking, 2H DD, and 1H DD. Right now it is just all on one TP index with no way to use 1H weapons (no DW gear).

    Still figuring out how to do that how I want, but first I just had a question. Is it possible to specify weapon type? It would be nice to just have the DDing aspect handled by "if weapon.type == 'Great Sword' then" rather than a toggle.

    The next best thing I could think of was mapping each weapon to a table to call.
    That's probably the fastest way but looking at items.lua, you should be able to pull up the rest of the line given the ID - see Windower Lua Wiki on getting equipped IDs - may also be a shortcut in gearswap for this I'm not aware of offhand.

    Once you have the ID, the 'skill=##' appears to pair with weapon type. You can also check delay of the weapon if you have 2 different sets for STP - IE Apocalypse vs Anguta.

    Untested pseudocode version

    Code:
    mainID = windower.ffxi.get_items()['equipped']['main']
    mainSkill = items[mainID]['skill']
    if mainSkill == 4 then
    	//GSword
    elseif mainSkill == 3 then
    	//Sword
    elseif mainSkill == 5 then
    	//Axe
    end

  6. #5826
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by Radec View Post
    That's probably the fastest way but looking at items.lua, you should be able to pull up the rest of the line given the ID - see Windower Lua Wiki on getting equipped IDs - may also be a shortcut in gearswap for this I'm not aware of offhand.

    Once you have the ID, the 'skill=##' appears to pair with weapon type. You can also check delay of the weapon if you have 2 different sets for STP - IE Apocalypse vs Anguta.

    Untested pseudocode version

    Code:
    mainID = windower.ffxi.get_items()['equipped']['main']
    mainSkill = items[mainID]['skill']
    if mainSkill == 4 then
    	//GSword
    elseif mainSkill == 3 then
    	//Sword
    elseif mainSkill == 5 then
    	//Axe
    end
    Thanks a lot. That is a bit above my head, but at least I can make an attempt at it now. Where would I want to put that mainID code anyway? Under it's own function?

    I suppose first I need to break down my tp sets before I even try to add that feature. Tanking on or off would be a toggle, and then if I can get something like the aforementioned working then TPing aspect would be automatic instead of yet another toggle for 2H/1H.

    Edit: Broke down my TP and Tanking sets how I want which was actually very easy. It was one of those things that you indirectly know how to do after doing something else, and then falls into place.

    Pastebin of the .lua

    Perhaps what I have done so far isn't the best practice, but it has worked exactly as I thought it would and how I wanted. Now I just need to automate the 1H/2H TP sets based on what I have equipped. :D

    Now, I just don't really have an idea about how to use get_items : /

    EDIT#2: Spent what feels like forever trying to figure this out after being all happy I built the rest of the rules by myself. Still no idea how to utilize anything you posted, feel disheartened by my ignorance.

  7. #5827
    Radsourceful

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

    I'll say this - it was just an idea, never used it before. Trying to see if I can make something out of it now, but the results from get_items aren't what I was expecting - looks like they're related to the position of the item in your inv/wardrobe. I'll look into this more, but won't be as easy as I was hoping above

  8. #5828
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by Radec View Post
    I'll say this - it was just an idea, never used it before. Trying to see if I can make something out of it now, but the results from get_items aren't what I was expecting - looks like they're related to the position of the item in your inv/wardrobe. I'll look into this more, but won't be as easy as I was hoping above
    Hey, I appreciate it either way. Could be worse and no one cared and it sat there unanswered until someone else asked about SMN or something and it was lost to time.

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

    I could tell you how i do it but you and everyone else will prolly hate it lol. I use tables and variables and stuffs.

  10. #5830
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by Trumpy View Post
    I could tell you how i do it but you and everyone else will prolly hate it lol. I use tables and variables and stuffs.
    Worse case scenario I was thinking of just mapping my 2H weapons and saying if my main contains one of them or my sub is empty than 2HDD == 'ON' else OFF. Slightly less automated, but it is within my wheelhouse, and the only thing I can think of.

    EDIT:

    Okay I made this:

    Code:
    TwoHandedWeapons = S { 
    	'Aettir', 'Epeolatry', 'Lionheart', 'Beheader +1', 'Takoba', 'Zulqifar', 'Bidenhander',
    	'Montante', 'Montante +1', 'Humility', 'Nibiru Faussar', 'Macbain', 'Soulcleaver',
    	' Kaqulijaan', 'Beorc Sword', 'Trial Blade', 'Sword of Trials', 'Irradiance Blade',
    	'Greatsword', 'Parashu'
    }
    and a rule then put it in my function status change to test it:

    Code:
    function status_change(new, old)
    	if new == 'Idle' then
    		IdleState()
    	elseif new == 'Resting' then
    		RestingState()
    	elseif new == 'Engaged' then
    		EngagedState()
    	end
    	
    	if player.status == 'Engaged' and TH == 'ON' then
    		ChangeGear(set_combine(equipSet, sets.Utility.TH))			
    	end
    	
    	if player.status == 'Engaged' and TwoHandedWeapons:contains(player.equipment.main) or player.equipment.sub == 'empty' then
    		TwoHandedTP = 'ON'
    		send_command('@input /echo <----- 2H TP Active!!')
    	else
    		TwoHandedTP = 'OFF'
    		send_command('@input /echo <----- 1H TP Active!')
    	end
    	
    end
    It works, but since it is in status change it only works when starting or ending combat essentially. How can I create a check for if weapons change mid combat reasonably?

    Updated Lua: here

    EDIT #2: Suppose I could just put it in aftercast to somewhat fix the problem, but it all feels a bit shoddy to do.

  11. #5831

    Quote Originally Posted by Spicyryan View Post
    Worse case scenario I was thinking of just mapping my 2H weapons and saying if my main contains one of them or my sub is empty than 2HDD == 'ON' else OFF. Slightly less automated, but it is within my wheelhouse, and the only thing I can think of.

    EDIT:

    Okay I made this:

    Code:
    TwoHandedWeapons = S { 
        'Aettir', 'Epeolatry', 'Lionheart', 'Beheader +1', 'Takoba', 'Zulqifar', 'Bidenhander',
        'Montante', 'Montante +1', 'Humility', 'Nibiru Faussar', 'Macbain', 'Soulcleaver',
        ' Kaqulijaan', 'Beorc Sword', 'Trial Blade', 'Sword of Trials', 'Irradiance Blade',
        'Greatsword', 'Parashu'
    }
    and a rule then put it in my function status change to test it:

    Code:
    function status_change(new, old)
        if new == 'Idle' then
            IdleState()
        elseif new == 'Resting' then
            RestingState()
        elseif new == 'Engaged' then
            EngagedState()
        end
        
        if player.status == 'Engaged' and TH == 'ON' then
            ChangeGear(set_combine(equipSet, sets.Utility.TH))            
        end
        
        if player.status == 'Engaged' and TwoHandedWeapons:contains(player.equipment.main) or player.equipment.sub == 'empty' then
            TwoHandedTP = 'ON'
            send_command('@input /echo <----- 2H TP Active!!')
        else
            TwoHandedTP = 'OFF'
            send_command('@input /echo <----- 1H TP Active!')
        end
        
    end
    It works, but since it is in status change it only works when starting or ending combat essentially. How can I create a check for if weapons change mid combat reasonably?

    Updated Lua: here

    EDIT #2: Suppose I could just put it in aftercast to somewhat fix the problem, but it all feels a bit shoddy to do.
    first you need to watch spaces and spelling with strings because when using :contains() every thing must be exact
    example:
    ' Kaqulijaan'
    should be
    'Kaquljaan'

    second if things are only going to have 2 states use true/false not on off unless your using the string for something else

    third you can place the check at the top of your precast/pretarget function

    forth here is a better way to do it
    Code:
    if S{4,6,7,8,10,12}:contains(gearswap.res.items:with('en' player.equipment.main).skill) then
        TwoHandedTP = true
        send_command('@input /echo <----- 2H TP Active!!')
    else
        TwoHandedTP = false
        send_command('@input /echo <----- 1H TP Active!')
    end
    and here are the rest of the weapon types
    1 = Hand-to-Hand
    2 = Dagger
    3 = Sword
    4 = Great Sword
    5 = Axe
    6 = Great Axe
    7 = Scythe
    8 = Polearm
    9 = Katana
    10 = Great Katana
    11 = Club
    12 = Staff

    as far as watching for weapon changes it can be done but that is a crap tone of code

  12. #5832
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by dlsmd View Post
    first you need to watch spaces and spelling with strings because when using :contains() every thing must be exact
    example:
    ' Kaqulijaan'
    should be
    'Kaquljaan'

    second if things are only going to have 2 states use true/false not on off unless your using the string for something else

    third you can place the check at the top of your precast/pretarget function

    forth here is a better way to do it
    Code:
    if S{4,6,7,8,10,12}:contains(gearswap.res.items:with('en' player.equipment.main).skill) then
        TwoHandedTP = true
        send_command('@input /echo <----- 2H TP Active!!')
    else
        TwoHandedTP = false
        send_command('@input /echo <----- 1H TP Active!')
    end
    and here are the rest of the weapon types
    1 = Hand-to-Hand
    2 = Dagger
    3 = Sword
    4 = Great Sword
    5 = Axe
    6 = Great Axe
    7 = Scythe
    8 = Polearm
    9 = Katana
    10 = Great Katana
    11 = Club
    12 = Staff

    as far as watching for weapon changes it can be done but that is a crap tone of code
    You are always the best anytime I have asked about RUN or BLU (I think I have only asked about RUN and DRG) lua stuff, thanks. :D

    1) Good catch on the space. Happens all the time

    2) Changed all my .luas from ON OFF to true false. Updated paste.

    3) It was missing a couple of parenthesis from what it kept telling me, but after I added them the lua loaded, and that works. I tested all the weapons and the modes echoed back right.

    However, for some reason line 618 (which is the "if S{4,6,7,8,10,12}:contains" line) throws me an error, "attempt to call a string value" when I do anything in combat. Not sure how to fix that.

    4) As far as putting this in the precast/pretarget(I don't even have a pretarget function afaik), how different is that from just using my status change and aftercast functions for this as I am now? I wouldn't want tons of code just to make something slightly more functional. Especially since I can't do it.

  13. #5833

    Quote Originally Posted by Spicyryan View Post
    However, for some reason line 618 (which is the "if S{4,6,7,8,10,12}:contains" line) throws me an error, "attempt to call a string value" when I do anything in combat. Not sure how to fix that.
    my mistake(i forgot a comma)
    change
    ('en' player.equipment.main).skill)
    to
    ('en', player.equipment.main).skill)

  14. #5834
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,764
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by dlsmd View Post
    my mistake(i forgot a comma)
    change
    ('en' player.equipment.main).skill)
    to
    ('en', player.equipment.main).skill)
    Smooth sailing now, awesome. Ty.

    So, was there a better way to do the 1H TP/2H TP check besides how I have it in my function status_change(new, old) and function aftercast(spell, act)?

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

    Can i make gearswap reconize what weapon i have and depending on weapon it equips different tp sets?

    I've tried

    Code:
    sets.engaged.Ragnarok
    or
    Code:
    sets.engaged['Ragnarok']
    But neither gearswap reconizes that it swaps the propperiate set.

  16. #5836

    Quote Originally Posted by Landsoul View Post
    Can i make gearswap reconize what weapon i have and depending on weapon it equips different tp sets?

    I've tried

    Code:
    sets.engaged.Ragnarok
    or
    Code:
    sets.engaged['Ragnarok']
    But neither gearswap reconizes that it swaps the propperiate set.
    yes use
    set names:
    sets.Engaged = {}
    sets.Engaged['Ragnarok'] = {put your set gear here}
    equip command:
    equip(sets.engaged[player.equipment.main])

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

    Thanks for the help.

    equip(sets.engaged[player.equipment.main])
    Do i have to make an engage function?

  18. #5838

    Quote Originally Posted by Landsoul View Post
    Thanks for the help.



    Do i have to make an engage function?
    no as long as you name them correctly you can do what ever you want
    and i messed up a bit
    equip(sets.engaged[player.equipment.main])
    should be
    equip(sets.Engaged[player.equipment.main])

  19. #5839
    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
    no as long as you name them correctly you can do what ever you want
    and i messed up a bit
    equip(sets.engaged[player.equipment.main])
    should be
    equip(sets.Engaged[player.equipment.main])
    I meant do I have to put the equip command in an engage function in order to trigger the equip command.

  20. #5840

    Quote Originally Posted by Landsoul View Post
    I meant do I have to put the equip command in an engage function in order to trigger the equip command.
    it must be in one of gearswaps functions
    pretarget\precast\midcast\aftercast\etc.
    or a subsidiary of said function

Similar Threads

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