Item Search
     
BG-Wiki Search
Page 297 of 302 FirstFirst ... 247 287 295 296 297 298 299 ... LastLast
Results 5921 to 5940 of 6036

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

  1. #5921
    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 Radec View Post
    I wouldn't have thought this would matter, but I was able to get that sets.midcast.Enmity to work by moving your set.midcast.Enmity = {...} to a line above sets.midcast.Cure

    https://pastebin.com/v2z63Sdb

    ===================

    Aside - the deal w/ Mote's includes is the automatic event for "midcast" is handled by the include, so anything you want to do other than that should be a different function, job_midcast

    Code:
    function midcast(spell)
        handle_actions(spell, 'midcast')
    end
    The handle actions function looks like, in essence:

    Code:
    function handle_actions(spell, action)
    Do some things to prepare and get spell info
    if exists, run User_midcast(spell, action, spellMap, eventArgs) --Defined in a personal include? I don't use any of these to say for sure
    if exists, run Job_midcast(spell, action, spellMap, eventArgs) --Defined in your own job lua for specific actions to that job that you want to happen before the default swaps - for example, deciding which elemental obi is the best one for this spell
    run default_midcast(spell, spellMap) --action defined by mote's includes - equip the set defined as midcast for this spell or action. Some fancy things to see exactly which set that is, but all boils down to 'equip this set'
    if exists, run User_Post_midcast(spell, action, spellMap, eventArgs) --actions to take after the set is equipped on the user level. Again, haven't used this
    if exists, run Job_Post_midcast(spell, action, spellMap, eventArgs) --Defined by job lua, things that should happen after other rules - ie, equip sch hands over top of default for bonus duration if perpetuance is active
    end
    Thanks! It works now as well as midcast.utsusemi and midcast.haste. I didn't know it mattered either.

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

    I'm trying to make an capped haste rule. But it doesnt swap accordingly.

    Code:
    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
    
        if state.Buff[buff] ~= nil then
            handle_equipping_gear(player.status)
        end
    
        if S{'haste', 'march'}:contains(buff:lower()) and gain then
            if (buffactive['Last Resort'] or (buffactive.hasso and buffactive['Aftermath'])) then
                if (buffactive.march) then
                    equip({head="Nocturnus Helm"})
                    if not midaction() then
                        handle_equipping_gear(player.status)
                    end
                end
    	end
        end
     end
    pastebin: https://pastebin.com/L1B8XYUJ

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

    Quote Originally Posted by Landsoul View Post
    I'm trying to make an capped haste rule. But it doesnt swap accordingly.

    ...

    pastebin: https://pastebin.com/L1B8XYUJ
    1. you dont need to worry about changing buff to lowercase letters as thay are always written the way it is in buffs.lua en= section
    --only the debuffs are lowercase as far as i can tell
    2. you check to see if the new buff is March then check to see if buffactive is also March but buffactive happens after the buff_change function

    so i think this will fix your issues
    Code:
        if S{'Haste', 'March'}:contains(buff) and gain then
            if buffactive['Last Resort'] or (buffactive.Hasso and buffactive['Aftermath']) then
                if buffactive.March or buff == 'March' then
                    equip({head="Nocturnus Helm"})
                    if not midaction() then
                        handle_equipping_gear(player.status)
                    end
                end
            end
        end

  4. #5924
    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
    1. you dont need to worry about changing buff to lowercase letters as thay are always written the way it is in buffs.lua en= section
    --only the debuffs are lowercase as far as i can tell
    2. you check to see if the new buff is March then check to see if buffactive is also March but buffactive happens after the buff_change function

    so i think this will fix your issues
    Code:
        if S{'Haste', 'March'}:contains(buff) and gain then
            if buffactive['Last Resort'] or (buffactive.Hasso and buffactive['Aftermath']) then
                if buffactive.March or buff == 'March' then
                    equip({head="Nocturnus Helm"})
                    if not midaction() then
                        handle_equipping_gear(player.status)
                    end
                end
            end
        end
    It doesn't want to swap reliably. Sometimes it randomly swaps. Most of the time it doesn't work. It's like it doesnt really reapply or apply the gear over the regular engage set. It also sometimes swaps to the item when in idle mode. Is there away to make it only function as an engage only swap?

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

    Quote Originally Posted by Landsoul View Post
    It doesn't want to swap reliably. Sometimes it randomly swaps. Most of the time it doesn't work. It's like it doesnt really reapply or apply the gear over the regular engage set. It also sometimes swaps to the item when in idle mode. Is there away to make it only function as an engage only swap?
    oh i forgot to say something about the fact that buff_change gear equip can be affected by all other gear equips unless you lock your gear and the only way to stop this from happening is to lock your gear

    an example is how id it for sleep
    Code:
        if S{2,19}:contains(buff_table.id) then
            if gain then
                equip({neck="Opo-opo Necklace",back="Aries Mantle"})
                disable("neck","back")
            else
                enable("neck","back")
                equip(gear_equip(name,'buff_change'))
            end

  6. #5926
    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
    oh i forgot to say something about the fact that buff_change gear equip can be affected by all other gear equips unless you lock your gear and the only way to stop this from happening is to lock your gear

    an example is how id it for sleep
    Code:
        if S{2,19}:contains(buff_table.id) then
            if gain then
                equip({neck="Opo-opo Necklace",back="Aries Mantle"})
                disable("neck","back")
            else
                enable("neck","back")
                equip(gear_equip(name,'buff_change'))
            end
    If it locks to the helm wouldnt that be a problem if I was to use WS or other gearswaps involving head gear? Would it switch to the propper WS gear? Is there maybe a more efficient way to do this?

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

    Quote Originally Posted by Landsoul View Post
    If it locks to the helm wouldnt that be a problem if I was to use WS or other gearswaps involving head gear? Would it switch to the propper WS gear? Is there maybe a more efficient way to do this?
    yes it could be a problem however there is no way to setup a gear equip order except if you do it your self
    how to do this in motes include i have no idea
    and no there is no more efficient way to do this

  8. #5928
    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
    yes it could be a problem however there is no way to setup a gear equip order except if you do it your self
    how to do this in motes include i have no idea
    and no there is no more efficient way to do this
    Back when there was still spellcast XML i had a rule for DRK for max haste where it equiped certain gear only while engaged. You could still switch the gear off and back on but it worked specifically for engage|Aftercast. Is this not possible with Gearswap in LUA?

    Code:
        <if advanced='(bool)buffactive("Haste") AND (bool)buffactive("Last Resort") AND ((bool)buffactive("March") OR (bool)buffactive("Embrava"))'>
          <action type="equip" when="aftercast|engaged" set="Ragnarok-TP-Embrava"/>
          <command when="engaged|aftercast">input /echo :: [DRK Rag Embrava/March/LR VW set] ::</command>
        </if>
    I believe this was the XML code i used. Is there a way to achieve the same in LUA? Basically I'm trying to mimic what I had in Spellcast XML back then.

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

    Quote Originally Posted by Landsoul View Post
    Back when there was still spellcast XML i had a rule for DRK for max haste where it equiped certain gear only while engaged. You could still switch the gear off and back on but it worked specifically for engage|Aftercast. Is this not possible with Gearswap in LUA?

    Code:
        <if advanced='(bool)buffactive("Haste") AND (bool)buffactive("Last Resort") AND ((bool)buffactive("March") OR (bool)buffactive("Embrava"))'>
          <action type="equip" when="aftercast|engaged" set="Ragnarok-TP-Embrava"/>
          <command when="engaged|aftercast">input /echo :: [DRK Rag Embrava/March/LR VW set] ::</command>
        </if>
    I believe this was the XML code i used. Is there a way to achieve the same in LUA? Basically I'm trying to mimic what I had in Spellcast XML back then.
    this might work but im not sure as im not well versed with motes include
    Code:
    --if you want it while your weapon is out add this customize_melee_set(meleeSet)
    --if you want it when your idle add this to customize_idle_set(idleSet)
        if haste_trigger then
            idleSet = set_combine(idleSet, {neck="Berserker's Torque"})
        end
    -- add this to job_buff_change(buff, gain)
        if S{'Haste', 'March'}:contains(buff) then
            if gain then
                if buffactive['Last Resort'] or (buffactive.Hasso and buffactive['Aftermath']) then
                    if buffactive.March or buff == 'March' then
                        equip({head="Nocturnus Helm"})
                        haste_trigger = true
                        if not midaction() then
                            haste_trigger = false
                            handle_equipping_gear(player.status)
                        end
                    end
                end
            else
                haste_trigger = false
                handle_equipping_gear(player.status)
            end
        end

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

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

    I have been down this road before and know it won't work.


    sets.JA.SpiritJump = (set_combine(sets.TP[sets.TP.index[TP_ind]],{
    feet = "Peltast's Schynbalds +1"
    })

    However, it only takes the very first set in the index. Is there a way to make this work or do I just have to go around it?

    I could make something ridiculous in my precast for each jump where If tp_index == 1 (2, 3, etc) then equip sets.ja.jump1 (jump2, jump3, etc) which is just a specific set combine of a tp set.
    That or I can make an index for each jump that toggles along with my current tp sets in a combine, similar to the previous idea, but less "if tp index= ==" spaghetti on the back end.

  11. #5931
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Spicyryan View Post
    I have been down this road before and know it won't work.
    ...
    However, it only takes the very first set in the index. Is there a way to make this work or do I just have to go around it?

    I could make something ridiculous in my precast for each jump where If tp_index == 1 (2, 3, etc) then equip sets.ja.jump1 (jump2, jump3, etc) which is just a specific set combine of a tp set.
    That or I can make an index for each jump that toggles along with my current tp sets in a combine, similar to the previous idea, but less "if tp index= ==" spaghetti on the back end.
    the reason that it gets setup the way it does is because your sets load before you even start using gearswap

    there are ways to build your gear/sets to do this but sence you did not post your full code i cant tell how things are done in your code

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

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

    Quote Originally Posted by dlsmd View Post
    the reason that it gets setup the way it does is because your sets load before you even start using gearswap

    there are ways to build your gear/sets to do this but sence you did not post your full code i cant tell how things are done in your code
    https://pastebin.com/THLpaa7D

    Sorry.

    At the moment I have a half measure that works as it combines my current equipped set and the pieces of the jump sets. This is an issue if I jump while Idle at something though which is why I wanted to fix it.

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

    Quote Originally Posted by Spicyryan View Post
    https://pastebin.com/THLpaa7D

    Sorry.

    At the moment I have a half measure that works as it combines my current equipped set and the pieces of the jump sets. This is an issue if I jump while Idle at something though which is why I wanted to fix it.
    Holy hell, that lua is huge! @_@;; How do you manage maintaining something that big? I aim to keep my self-written files around/under 500 lines...

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

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

    Quote Originally Posted by Nyarlko View Post
    Holy hell, that lua is huge! @_@;; How do you manage maintaining something that big? I aim to keep my self-written files around/under 500 lines...
    Because I don't use an include. Everything anyone needs to use it is all right there. Very easy to just change the gear out and I leave notes.

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

    Quote Originally Posted by Spicyryan View Post
    Because I don't use an include. Everything anyone needs to use it is all right there. Very easy to just change the gear out and I leave notes.
    I don't use much as far as notes, and don't use includes.. But I also try to minimize automation and aim for something akin to enhanced /equipset functionality.

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

    Quote Originally Posted by Spicyryan View Post
    Because I don't use an include. Everything anyone needs to use it is all right there. Very easy to just change the gear out and I leave notes.
    well that could be one reason but it not the best reason

    the best reason is because its cobbled code from dozens of sources put in to one
    and it looks like you have no idea how most of it works because you use different code all over the place and some times to do the same thing

    and you do not understand why we use includes
    1. so code that is used by every job never has to be written more then once
    2. so the job files are kept as small as possible with only the most important job specific code in them

    Quote Originally Posted by Nyarlko View Post
    I don't use much as far as notes, and don't use includes..
    i dont yous large notes eather just one line thing that tell the input and the output
    if you use thew same code in different files it would minimize the edites you have to make every time you need to change your code
    Quote Originally Posted by Nyarlko View Post
    But I also try to minimize automation and aim for something akin to enhanced /equipset functionality.
    but i bet your include is not a jumbled mess of dozens of sources

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

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

    Hey, it works though! Well, for the most part.

    Short of learning to fix all the short comings, it works as someone who does the self maintenance

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

    Quote Originally Posted by dlsmd View Post
    if you use the same code in different files it would minimize the edits you have to make every time you need to change your code

    but i bet your include is not a jumbled mess of dozens of sources
    I don't have to change the code very often tbh. Why should I change parts of the engine if everything runs smooth already? My standard format is as straightforward, simple, and self-taught. The only exception that I don't really truly understand being the spell degrade function that I stole from someone on ffxiah. >_>

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

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

    Quote Originally Posted by Nyarlko View Post
    I don't have to change the code very often tbh. Why should I change parts of the engine if everything runs smooth already?
    Because if you make something better it is an improvement, and improvements are good. If I never changed what worked I wouldn't have any aftermath recognition or for BLU, or SAMs roll recognition for DRG, and so on.

  20. #5940
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Spicyryan View Post
    I have been down this road before and know it won't work.


    sets.JA.SpiritJump = (set_combine(sets.TP[sets.TP.index[TP_ind]],{
    feet = "Peltast's Schynbalds +1"
    })

    However, it only takes the very first set in the index. Is there a way to make this work or do I just have to go around it?

    I could make something ridiculous in my precast for each jump where If tp_index == 1 (2, 3, etc) then equip sets.ja.jump1 (jump2, jump3, etc) which is just a specific set combine of a tp set.
    That or I can make an index for each jump that toggles along with my current tp sets in a combine, similar to the previous idea, but less "if tp index= ==" spaghetti on the back end.
    ok i have been looking at it and this is the best/easiest i can give you
    go to where you equip your gear and change it to this
    ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{feet = "Peltast's Schynbalds +1"}))
    and remove the set its self "sets.JA.SpiritJump = (set_combine(sets.TP[sets.TP.index[TP_ind]],{feet = "Peltast's Schynbalds +1"}))" line 771
    in this case its at line 1406 of the code you posted also it will be always up to date

Page 297 of 302 FirstFirst ... 247 287 295 296 297 298 299 ... LastLast

Similar Threads

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