Item Search
     
BG-Wiki Search
Page 251 of 302 FirstFirst ... 201 241 249 250 251 252 253 261 301 ... LastLast
Results 5001 to 5020 of 6036

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

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

    Thanks dlsmd, but it seems I completely misunderstood what my friends were trying to do.
    Let's get back to the start.

    There's a NM that uses a move that strips you completely of your gear.
    My friends want to automatize a way in Gearswap so that it re-equips all your gear INSTANTLY when that happens, and it has to be fast because even 2 seconds too late can mean Death.

    The way they were thinking to do it is by using the player.max_hp value.
    If they know the exact amount of their max HP when naked, they can use that as a "If player.max_hp == 'value' then equip set" condition.

    My problem is... how do you do that?
    I mean the way I've been using Gearswap so far is through "events".
    Perform a certain check before an action is performed, or during, or after, or when I change my status (engage/disengage) or when I gain/lose a buff etc.

    In this case instead it seems almost as if you'd need to be CONSTANTLY monitoring your player.max_hp value and perform an action if the value becomes equal to XXX.
    How do you do something like that in GS? I've never had to do something like this before.

  2. #5002
    Jem
    Jem is offline
    Claustrum. Really?
    Join Date
    Nov 2007
    Posts
    3,806
    BG Level
    7
    FFXIV Character
    Kaith Laqueus
    FFXIV Server
    Ragnarok
    FFXI Server
    Asura

    Can you not have it check to see if an equipment slot is empty? And just toggle it on for certain fights.

  3. #5003
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Thanks dlsmd, but it seems I completely misunderstood what my friends were trying to do.
    Let's get back to the start.

    There's a NM that uses a move that strips you completely of your gear.
    My friends want to automatize a way in Gearswap so that it re-equips all your gear INSTANTLY when that happens, and it has to be fast because even 2 seconds too late can mean Death.

    The way they were thinking to do it is by using the player.max_hp value.
    If they know the exact amount of their max HP when naked, they can use that as a "If player.max_hp == 'value' then equip set" condition.

    My problem is... how do you do that?
    I mean the way I've been using Gearswap so far is through "events".
    Perform a certain check before an action is performed, or during, or after, or when I change my status (engage/disengage) or when I gain/lose a buff etc.

    In this case instead it seems almost as if you'd need to be CONSTANTLY monitoring your player.max_hp value and perform an action if the value becomes equal to XXX.
    How do you do something like that in GS? I've never had to do something like this before.
    in the code that i posted you have all sorts of data like ja/ws/ma effects
    029 is Action Message
    --Actor/Target/Param 1/Param 2/Actor Index/Target Index/Message
    --this one is based on messages in chat
    example(this is how i do my th watch):
    Code:
        if id == 0x029 then
            local packet = packets.parse('incoming', data)
            if S{6,20,97,113,406,605,646}:contains(packet['Message']) then --removes mobs/th in aggro/th list
                reg_event.remove_add_agro(packet['Target'])
                if reg_event.treasure_hunter[packet['Target']] then
                    reg_event.treasure_hunter[packet['Target']] = nil
                end
                triggered = true
            elseif S{603,608}:contains(packet['Message']) and player.id == packet['Actor'] then --treasure hunter counter
                reg_event.treasure_hunter[packet['Target']] = packet['Param 1']
                -- print(packet['Param 1'])
                if mf_treasure_hunter_change then
                    local name = windower.ffxi.get_mob_by_id(packet['Target']).name
                    local gain = (packet['Param 1'] < reasure_hunter[packet['Target']] and false or true)
                    local th_count = packet['Param 1'] mf_treasure_hunter_change(gain,th_count,name)
                end
            end
    028 is Action packet
    --you can get <Added Effect/Spike Effect> <effect/parameters/Animation/Message> all based in each attack
    example(this is how i do my aggro counter):
    Code:
        elseif id == 0x028 then
            local packet = packets.parse('incoming', data)
            local target_in_party,pt_num = reg_event.party_id_check(packet['Target 1 ID'])
            local actor_in_party,num = reg_event.party_id_check(packet['Actor'])
            if target_in_party and not actor_in_party then --adds mobs to aggro list
                local apply_where
                if S{2,3}:contains(pt_num) then
                    apply_where = 'alliance'
                elseif pt_num == 1 then
                    if player.id == packet['Target 1 ID'] then
                        apply_where = 'player'
                    else
                        apply_where = 'party'
                    end
                elseif pt_num == 4 then
                    apply_where = 'pet'
                end
                reg_event.remove_add_agro(packet['Actor'],apply_where)
                triggered = true
            elseif player.id == packet['Actor'] and player.target.id == packet['Target 1 ID'] and not target_in_party then --adds mobs that player attacks
                reg_event.remove_add_agro(player.target.id,'player')
                triggered = true
            elseif not (target_in_party or actor_in_party) then --removes mobs that attack a target out of party/alliance
                reg_event.remove_add_agro(packet['Actor'])
                triggered = true
            end
    you would have to figure out what you want to use and how because its not something that is easy to do when i cant log in to ffxi(i am taking a 1 month break)

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

    This guy is already making onevent in the windower thread:
    https://www.bluegartr.com/threads/11...=1#post6656503

    No need to really have parallel conversations with the same endgoal that use different methods.

    PS. Why are so many people interested in onevent all of a sudden?

  5. #5005
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Byrthnoth View Post
    This guy is already making onevent in the windower thread:
    https://www.bluegartr.com/threads/11...=1#post6656503

    No need to really have parallel conversations with the same endgoal that use different methods.

    PS. Why are so many people interested in onevent all of a sudden?
    there is a difference between Roland_J(on-even/stun-bot) and what Sechs wants
    Sechs wants to re equip his gear after a specific attack from a mob that removes his gear but gives no debuff similar to Yovra's Torre ntial Torment

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

    Yeah but there is something I'm missing here, so bear with me.
    There are two "components" that I need to perform the "action" (equipping a specific gearset)

    Component 1 => Verify if a certain condition is true or false
    Component 2 => Decide when to perform the above check

    There are many possible solutions for component 1. I could check for max_HP like my friends originally wanted to do, or for an empty slot like Jem suggested, or for incoming packets like you suggested.
    My problem at the moment is rather with component 2.
    So far I've been using gearswap so that something that gets checked once after a specific "event" happened.

    Some examples of how I'm used to do this:
    • Event happens (I'm about to start casting a spell, precast) > perform various checks and equip some gear accordingly
    • I''ve completed an action > perform various checks and equip some gear accordingly
    • My status changes from standing to healing > perform various checks > equip gear accordingly
    • I receive a certain buff > equip gear accordingly


    You get what I mean by now I'm sure.
    But for this specific situation what would the "event" be? Where would I put such a check?
    It's not a player action, it's not a buff, it's not a status change, etc etc.
    It's an enemy action, and afaik there is no built-in Gearswap function for target_actions, is there?


    Edit:
    Ow... just saw you editing your post and Byrth's link, gonna read a bit now I guess :D

  7. #5007
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Yeah but there is something I'm missing here, so bear with me.
    There are two "components" that I need to perform the "action" (equipping a specific gearset)

    Component 1 => Verify if a certain condition is true or false
    Component 2 => Decide when to perform the above check

    There are many possible solutions for component 1. I could check for max_HP like my friends originally wanted to do, or for an empty slot like Jem suggested, or for incoming packets like you suggested.
    My problem at the moment is rather with component 2.
    So far I've been using gearswap so that something that gets checked once after a specific "event" happened.

    Some examples of how I'm used to do this:

    • Event happens (I'm about to start casting a spell, precast) > perform various checks and equip some gear accordingly
    • I''ve completed an action > perform various checks and equip some gear accordingly
    • My status changes from standing to healing > perform various checks > equip gear accordingly
    • I receive a certain buff > equip gear accordingly



    You get what I mean by now I'm sure.
    But for this specific situation what would the "event" be? Where would I put such a check?
    It's not a player action, it's not a buff, it's not a status change, etc etc.
    It's an enemy action, and afaik there is no built-in Gearswap function for target_actions, is there?
    what you want to do is not easy but it can be done
    if you want to look at my full registered events file look here:
    https://github.com/smd111/Gearswap/b...red_Events.lua

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

    After reading your github page and this page I'm starting to get a better feel of how the windower.register_event works.
    Thing is, I can't use the "inventory slot == empty" thing because there is no pre-made event for that function. So unless I want to create my own, I'll have to rely on the HP thing.
    Which is less accurate than checking for a specific inventory slot, but it'll have to do I guess.

    Unless someone has something in mind that could be used as a workaround?

  9. #5009
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    After reading your github page and this page I'm starting to get a better feel of how the windower.register_event works.
    Thing is, I can't use the "inventory slot == empty" thing because there is no pre-made event for that function. So unless I want to create my own, I'll have to rely on the HP thing.
    Which is less accurate than checking for a specific inventory slot, but it'll have to do I guess.

    Unless someone has something in mind that could be used as a workaround?
    thats why i suggested "incoming chunk" and one of the packets(0x028/0x029) to get what you want
    --this will allow you to see the parameter that removes your gear and then you can trigger your gear to be reequipped

    gearswap.equip_sets:schedule(<delay you want>, <the name you want to giv it>, nil, <the set you want to equip>)--equips with delay
    gearswap.equip_sets(<the name you want to giv it>, nil, <the set you want to equip>)--equips with out delay
    -the above two are the only way to equip gear outside of one of gearswap predefined functions (in other words if you want to equip gear from a self created function you need this)
    info:
    <delay you want> = time in seconds (for 2.5 seconds use 2.5)
    <the name you want to giv it> = the name you want to show up in gearswaps show_swaps (for special function use 'special function')
    <the set you want to equip> = the set you want to equip (for sets.Engaged use sets.Engaged)

    you can try something like this but if your max hp does not equal exactly what you put in it wont work (every time your max hp with out gear changes you will have to update this code) -- this is not my recommended way to do it
    Code:
    frame_count = 1
    windower.raw_register_event('prerender',function()
        if frame_count%30 == 0 and player.max_hp == 200 then
            gearswap.equip_sets('Clear Gear After Removal', nil, sets.naked)--clears gearswaps equipped set data
            gearswap.equip_sets('ReEquip Gear After Removal', nil, sets.TP)--equips your tp set
        end
        frame_count = frame_count + 1
    end)

  10. #5010
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    If you were going to base it on HP, maybe you could use autoexec. Autoexec I think can trigger things when your HP hits certain amount. and you can just have it enter a self_command command your gearswap will know what to do with or an update gear command or whatever. Thats how I still do alot of stuff. If you only want it when you are fightin a certain NM or w/e you could possibly restrict it to the NM's zone or something.

  11. #5011
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    Don't hurt me Q_Q

    I am have read every thread imaginable but I cannot get my problem solved. I am trying to swap gear on when I have a debuff of my choosing on. I have tried show_swaps to see what is going on and obviously it is not equipping the items. I tried the debugmode to see if I can glean anything from that. It it not even giving me an indication that it's trying to run that function. It just tells me about the buff_change that I forced. I am using moten's DNC file with minor tweaks.

    I used this function from rook's post a long time ago. He said it works but to no avil.

    Code:
    function buff_change(buff,gain)
            if (buff == "sleep" and gain) and player.hp > 100 and player.status == "Engaged" then 
                    equip({head="Frenzy Sallet"})
                    if buffactive.stoneskin then
                        send_command('cancel Stoneskin') 
                    end
            end
            if (buff == "terror" or buff == "petrification" or buff == "stun") and gain then
                equip(sets.TP.DT)
            end
    end

  12. #5012
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Rikimarueye View Post
    I am have read every thread imaginable but I cannot get my problem solved. I am trying to swap gear on when I have a debuff of my choosing on. I have tried show_swaps to see what is going on and obviously it is not equipping the items. I tried the debugmode to see if I can glean anything from that. It it not even giving me an indication that it's trying to run that function. It just tells me about the buff_change that I forced. I am using moten's DNC file with minor tweaks.

    I used this function from rook's post a long time ago. He said it works but to no avil.

    Code:
    function buff_change(buff,gain)
            if (buff == "sleep" and gain) and player.hp > 100 and player.status == "Engaged" then 
                    equip({head="Frenzy Sallet"})
                    if buffactive.stoneskin then
                        send_command('cancel Stoneskin') 
                    end
            end
            if (buff == "terror" or buff == "petrification" or buff == "stun") and gain then
                equip(sets.TP.DT)
            end
    end
    show swaps only shows gear thats actualy changed
    the only thing i cant think of is something is up in your sets.TP.DT set
    can you post your sets

    if your talking about equip({head="Frenzy Sallet"})
    it can only be equipped to these jobs Monk / Thief / Dark Knight / Beastmaster / Samurai / Dragoon / Dancer / Rune Fencer

  13. #5013
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    This is my lua as per request ^^

    http://pastebin.com/jMCC6Gkj

    I am trying to use those jobs for the sallet, but it isn't working. As far as the DT- equip. I will just take it out.

  14. #5014
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Rikimarueye View Post
    This is my lua as per request ^^

    http://pastebin.com/jMCC6Gkj

    I am trying to use those jobs for the sallet, but it isn't working. As far as the DT- equip. I will just take it out.
    ok what i thought is correct
    1. you dont even have a set called sets.TP.DT
    2. (the big one) use job_buff_change(buff, gain, eventArgs)[it already exists in your file] not buff_change(buff, gain)

  15. #5015
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    I was able to correct the problem with your help! Thank you very much. If you don't mind, are you able to explain why job_buff_change was preventing the change and taking the priority? I am trying to learn why. ^^;

  16. #5016
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Rikimarueye View Post
    I was able to correct the problem with your help! Thank you very much. If you don't mind, are you able to explain why job_buff_change was preventing the change and taking the priority? I am trying to learn why. ^^;
    because motes include was already using buff_change and in lua every function requires a different name and if you do use the same name a second time it will over write the previous one

  17. #5017
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    Oh, I see now ^^ Thank you again!

  18. #5018
    Smells like Onions
    Join Date
    Jul 2014
    Posts
    7
    BG Level
    0

    Spell Interruption rate set

    Im trying to figure out how to make a Spell Interruption rate set have a toggle that will cast normally for all spells. Then when active it only goes to 1 set for all spells. This is for PLD/blu for fights such as Schah. Ive gone over a few GS.luas and have not figured out a solution. Any help would be appreciated.

  19. #5019
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by maxplayer View Post
    Im trying to figure out how to make a Spell Interruption rate set have a toggle that will cast normally for all spells. Then when active it only goes to 1 set for all spells. This is for PLD/blu for fights such as Schah. Ive gone over a few GS.luas and have not figured out a solution. Any help would be appreciated.
    that depends on you code so can you post it (please use http://pastebin.com not the forums code post it makes the forum to hard to read)
    -- and if you cant post a link yet just post every thing after "pastebin.com/" in the address bar
    --example: pastebin.com/8da7WHu0 (my Dancer Waltz Potency Claculator)
    --you post: [Pastebin] 8da7WHu or pastebin.com/8da7WHu0 (with out the http:// if it works for you)

  20. #5020
    Smells like Onions
    Join Date
    Jul 2014
    Posts
    7
    BG Level
    0

    Did you want my full lua? I dont have a code started for it. Im not the best when it comes to LUA code just yet. I dont use mote-includes though. and I cant post URLs just yet either lol

    Also: the LUA is on Pastebin right now
    UEj81mKK

Page 251 of 302 FirstFirst ... 201 241 249 250 251 252 253 261 301 ... LastLast

Similar Threads

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