Item Search
     
BG-Wiki Search
Page 88 of 302 FirstFirst ... 38 78 86 87 88 89 90 98 138 ... LastLast
Results 1741 to 1760 of 6036

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

  1. #1741
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Typed it into the chat log.

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

    Quote Originally Posted by dlsmd View Post
    if you look in the documentation it says
    buff_change(name,gain)
    name is the buff name
    gain is true for gain and false for lose

    mote uses buff_change(buff,gain_or_loss) but he has code that figures it out
    Er, no, I've always and only used 'gain'. gain_or_loss is a remnant of how Byrth wrote it, when the value was originally a string. Kensagaku managed to mix both of them together, which meant that neither was being used properly.

    Quote Originally Posted by Kensagaku View Post
    Works like a charm. But how does that work, so I know for the future? Mostly I like to know the "how" so I don't make the same error again and again. @.@
    As for 'how it works' -- it's a function parameter. If you use a function parameter, you have to use the name it's been given. If you use something else, then clearly you're not referring to the function parameter. If whatever you're using has never been defined at all (as in the case of your code), then clearly you're not going to get any sensible value.

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

    Quote Originally Posted by TSFFXI View Post
    On an unrelated note, I was able to use a weaponskill without being engaged. I haven't played in a while, but I was only aware of that happening with ranged weaponskills.
    It typically only happened with ranged, because ranged users are most likely to not be engaged to something they decide to shoot at/weaponskill. Plus a melee has to be standing right next to the mob. It's always been an issue with both types, just more likely to happen (and thus be noticed) with one rather than the other.

  4. #1744
    BG Content
    Join Date
    Jul 2007
    Posts
    22,409
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah, I decided that one was a feature a while ago. Updated the documentation and fixed a bug with monster-pet WSs.

  5. #1745
    Smells like Onions
    Join Date
    Jun 2013
    Posts
    7
    BG Level
    0

    Okay. I have read through a lot of Gearswap help stuff and gone through a lot of Gearswap files, and I haven't found a solution for specifically what I want to do, so I'll just ask.

    My Spellcast file for PUP was set up so that, if I was on PUP/THF, it would automatically equip my Treasure Hunter belt when engaged. Then, after any action, it would switch to my standard TP belt. This worked well for me in Dynamis/Salvage and I want to be able to continue doing this without having to hit a macro every single fight.

    Is it possible to do this in Gearswap, and if so, how? I have my PUP gearswap file up and running in every other way I needed it to run, just missing this TH piece.

    Thanks in advance!

  6. #1746
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    Quote Originally Posted by Sharmarali View Post
    Okay. I have read through a lot of Gearswap help stuff and gone through a lot of Gearswap files, and I haven't found a solution for specifically what I want to do, so I'll just ask.

    My Spellcast file for PUP was set up so that, if I was on PUP/THF, it would automatically equip my Treasure Hunter belt when engaged. Then, after any action, it would switch to my standard TP belt. This worked well for me in Dynamis/Salvage and I want to be able to continue doing this without having to hit a macro every single fight.

    Is it possible to do this in Gearswap, and if so, how? I have my PUP gearswap file up and running in every other way I needed it to run, just missing this TH piece.

    Thanks in advance!
    hmmm would be "easier" if you post that code you used in Spellcast, I have an idea how to make it, but for example you have multiple links, it wont swap back to TH, if you have autotarget on..

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

    Quote Originally Posted by Motenten View Post
    Verifying: Did you call the function from precast? Also,put some print statements in the auto-correction code to make sure it's getting called, and what portions are running.
    Thanks, I called the function and it is working fine now.

  8. #1748
    Smells like Onions
    Join Date
    Jun 2013
    Posts
    7
    BG Level
    0

    Quote Originally Posted by JSHidaka View Post
    hmmm would be "easier" if you post that code you used in Spellcast, I have an idea how to make it, but for example you have multiple links, it wont swap back to TH, if you have autotarget on..
    No prob, it was actually ridiculously simple in SC, but I'm really just beginning in GS and have no idea if it's even possible. It didn't swap back to TH with autotarget then either, and for that I resigned myself to using a macro. Not a problem if I have to do that, just want it to equip the TH belt for the initial target. Anyways, this is how I did it in Spellcast:

    <if job="PUP/THF">
    <if status="engaged">
    <equip when="engaged" set="TP">
    <waist>Tarutaru sash</waist>
    </equip>
    <equip when="aftercast">
    <waist>Windbuffet Belt</waist>
    </equip>
    </if>
    </if>

    Since it's PUP, I'm pretty much always using maneuvers and ending up in aftercast, so it worked out really well.

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

    I havent been actually doin much stuff in game since i started making gearswap work for my whm mule. But two days ago i was doin dynamis with me and my mule, and while i was fighting with my thf i spotted a nm pop and ran over to claim with my whm mule with flash or stun. I did this several times that night and each time my subtarget was blue color but i would be out of range. Is that gearswap makin the sub target not change colors if out of range? if it is, is there a way to fix that?

  10. #1750
    BG Content
    Join Date
    Jul 2007
    Posts
    22,409
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    No, gearswap doesn't interfere with the targeting colors.

  11. #1751
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Or shortcuts i guess could be a culprit too. my macro was just /ma "stun" <stnpc> and im pretty sure always had different colors based on range before. Alright Byrthnoth, was just checking cause I knew there was a pretarget function and i really have no clue what that is for and what the difference betwixt that and precast was, and since it was called pretarget i wasnt sure if it interfered with sub targetting.

  12. #1752
    BG Content
    Join Date
    Jul 2007
    Posts
    22,409
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Nothing Shortcuts or GearSwap does could potentially interfere with targeting colors.

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

    Quote Originally Posted by Sharmarali View Post
    Okay. I have read through a lot of Gearswap help stuff and gone through a lot of Gearswap files, and I haven't found a solution for specifically what I want to do, so I'll just ask.

    My Spellcast file for PUP was set up so that, if I was on PUP/THF, it would automatically equip my Treasure Hunter belt when engaged. Then, after any action, it would switch to my standard TP belt. This worked well for me in Dynamis/Salvage and I want to be able to continue doing this without having to hit a macro every single fight.

    Is it possible to do this in Gearswap, and if so, how? I have my PUP gearswap file up and running in every other way I needed it to run, just missing this TH piece.

    Thanks in advance!
    Trivial code to do what you're asking:

    Code:
    function status_change(new_status, old_status)
        if new_status == 'Engaged' then
            equip(sets.engaged, {waist="Tarutaru Sash"})
        else
            equip(sets.idle)
        end
    end
    
    function aftercast(spell)
        if player.status == 'Engaged' then
            equip(sets.engaged)
        else
            equip(sets.idle)
        end
    end

  14. #1754
    Smells like Onions
    Join Date
    Jun 2013
    Posts
    7
    BG Level
    0

    Awesome, I'll try it, thanks! Yes, I'm sure it was really easy, but I've never used lua before and don't fully understand what I'm doing. I just have to keep plugging at it til I understand it. To be honest, sir, your files confused me so much I had to find some more basic ones to start off with.

    One other issue I'm having that I just noticed today. My gear is switching to my pet healer set when my puppet casts ANYTHING (Bio, Protect, Haste, Dia, etc, etc). I only WANT it to switch for cures. Can you tell me what I did wrong below? Thanks again!

    function pet_midcast(spell,action)
    if petWS:contains(spell.english) then
    equip(sets.Midcast.Pet.WS)
    elseif {'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'} then
    equip(sets.TP.Pet.Cure)
    else
    equip(sets.TP)
    end
    end

  15. #1755
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Quote Originally Posted by Sharmarali View Post
    elseif {'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'} then
    That line doesn't do what you think it does. In Lua, anything that isn't nil or false has the boolean value true. To gearswap, that line reads "elseif true then," which is to say that it will always equip(sets.TP.Pet.Cure) unless the spell meets the earlier condition. You can fix your problem by moving that table out of the pet_midcast function and defining it in the get_sets function. Cast it as a T-table, then check to see if the table contains spell.english in the pet_midcast function.
    Code:
    function get_sets()
        automaton_cures=T{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
    end
    
    function pet_midcast(spell,action)
        if petWS:contains(spell.english) then
            equip(sets.Midcast.Pet.WS)
        elseif automaton_cures:contains(spell.english) then
            equip(sets.TP.Pet.Cure)
        else
            equip(sets.TP)
        end
    end
    Also, how did you write your sets tables?

  16. #1756
    Smells like Onions
    Join Date
    Jun 2013
    Posts
    7
    BG Level
    0

    Thank you, I will try that out! And thank you for explaining as well, only way I'll learn.

    To be honest, I copied the majority of my PUP gearswap from Bokura's PUP gearswap (can't post url, too few posts, too much suckage, but shouldn't be too hard to locate). What about the naming convention is odd to you? Asking so I'll better understand as I tweak it and work on other files.

  17. #1757
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    equip(sets.TP)
    This means sets.TP is a table with gear in it, i.e.
    Code:
    sets.TP={head="",body="",etc...}
    equip(sets.TP.Pet.Cure)
    This means something else: sets.TP contains a key named Pet. Unless I'm mistaken, the table looks something like this:
    Code:
    sets.TP={head="",body="",etc...,Pet={Cure={head="",body="",etc...}}}
    That's kind of strange. It would be better to separate the pet table from the TP table.

  18. #1758
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    So i was kinda curious about this:

    function status_change(new_status, old_status)

    I wasnt sure what new and old meant. So does New mean you went from idle to engaged, and is old you were engaged did a spell and after spell were still engaged? Cause that seems to me like it would mean old is the same as aftercast. Is there a difference between using old status change and aftercast?

  19. #1759
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    I'm not sure I follow. New and old are parameters passed by gearswap to the status_change function. Here are all of the statuses:
    [0] = {id=0,en="Idle"},
    [1] = {id=1,en="Engaged"},
    [2] = {id=2,en="Dead"},
    [3] = {id=3,en="Engaged dead"},
    [4] = {id=4,en="Event"},
    [5] = {id=5,en="Chocobo"},
    [33] = {id=33,en="Resting"},
    [34] = {id=34,en="Locked"},
    [38] = {id=38,en="Fishing fighting"},
    [39] = {id=39,en="Fishing caught"},
    [40] = {id=40,en="Fishing broken rod"},
    [41] = {id=41,en="Fishing broken line"},
    [42] = {id=42,en="Fishing caught monster"},
    [43] = {id=43,en="Fishing lost catch"},
    [44] = {id=44,en="Crafting"},
    [47] = {id=47,en="Sitting"},
    [48] = {id=48,en="Kneeling"},
    [50] = {id=50,en="Fishing"},
    [51] = {id=51,en="Fishing fighting center"},
    [52] = {id=52,en="Fishing fighting right"},
    [53] = {id=53,en="Fishing fighting left"},
    [56] = {id=56,en="Fishing rod in water"},
    [57] = {id=57,en="Fishing fish on hook"},
    [58] = {id=58,en="Fishing caught fish"},
    [59] = {id=59,en="Fishing rod break"},
    [60] = {id=60,en="Fishing line break"},
    [61] = {id=61,en="Fishing monster catch"},
    [62] = {id=62,en="Fishing no catch or lost"}
    If you were to go from /healing to standing (idling), gearswap would call the status_change function and pass it "Resting" for Old, and "Idle" for new. There are no statuses for casting or aftercast.
    In your example, you go from idle to engaged, cast a spell, then continue fighting. From gearswap's perspective, it sees you go from idle to engaged and calls the status_change function, passing new=engaged, old=idle. Gearswap sees you cast the spell, but your status is still engaged, so it does not call the status_change function.

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

    Because i always see stuff like this in luas
    Code:
    function aftercast(spell)
        if player.status=='Engaged' then
            equip(sets.TP[TP_Set_Names[TP_Index]])
        else
            equip(sets.Idle[Idle_Set_Names[Idle_Index]])
        end
    end
    
    function status_change(new,old)
        if T{'Idle','Resting'}:contains(new) then
            equip(sets.Idle[Idle_Set_Names[Idle_Index]])
        elseif new == 'Engaged' then
            equip(sets.TP[TP_Set_Names[TP_Index]])
        end
    end
    Both seem to do the same thing to me, in spellcast you only needed one thing to put tp equip ment on when you engaged and after casting a spell/using a JA,WS And i would see new and old on status change with out any explanation so i wasnt sure exaclty what it does. jsut like i dont exactly understand the purpose of pretarget coding cause it sounds like the same as precast to me. I am sure there is a reason for 2 different things, but until i know what it is, it just wont make sense to me.

Page 88 of 302 FirstFirst ... 38 78 86 87 88 89 90 98 138 ... LastLast

Similar Threads

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