Item Search
     
BG-Wiki Search
Page 166 of 302 FirstFirst ... 116 156 164 165 166 167 168 176 216 ... LastLast
Results 3301 to 3320 of 6036

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

  1. #3301
    First invited, last in the zone.
    Join Date
    Sep 2008
    Posts
    1,448
    BG Level
    6
    FFXI Server
    Lakshmi

    Change
    "if petisvalid == 'TRUE' then"
    to
    "if pet.isvalid then"

    and see if that works.

  2. #3302
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by ToadieOdie View Post
    Okay I have another question. In spellcast I had this code snipet:

    Code:
                <if PetISValid="TRUE" Advanced='"$Fight"="0" AND "$PetRest"="0"'>
                    <action Type="Command" When="engaged">wait 1 3;input /pet "Fight" $target</action>
                </if>
                <else>
                                    <AddToChat Color="158">Pet Not Available</AddToChat>
                    <action Type="Command" When="engaged">wait 4 6;input /ja "Box Step" $target</action>
                </else>
    $Fight was the cool down timer for the pet command and $PetRest was a toggled variable to indicate whether or not I wanted the pet to auto fight with me or not.

    The problem is, Spellcast no longer detects the pet and thus I am switching to GearSwap but it doesn't seem to detect my pet either. Here is the GearSwap code snippet:

    Code:
    function status_change(new,old)
        if new == 'Engaged' then
            equip(sets.engaged.tp)
            if petisvalid == 'TRUE' then
                send_command('wait 2 3;input /pet "Fight" <t>')
            else 
                add_to_chat(158,'Pet Not Available')
                send_command('wait 5 6;input /ja "Box Step" <t>')
            end
        else
            equip(sets.idle.pettank)
        end
    end
    Whether I have a pet or not, I get the message Pet Not Available but Box Step doesn't fire off. Does GearSwap currently detect the pet and am I even typing this up correctly? Are you even able to send an action command with GearSwap like you could with Spellcast? And I'm not even sure I understand how variables work in GearSwap, so I don't have cool down timer variables set up yet.

    Sorry for all the questions. I had to teach myself XML just to use Spellcast and now I'm trying to sort out Lua.
    the reason pet.isvalid == 'TRUE' does not work is because its not a String its a Boolean so it would be pet.isvalid == true but sence booleans only have 2 ways thay can be all you need is pet.isvalid
    i.e.
    if pet.isvalid == 'TRUE' then --will not work for boolean
    if pet.isvalid then --is used when the vareable is true
    if not pet.isvalid then --is used when the variable is false

    here is your sc code rebuilt in to gs
    Code:
    if new == 'Engaged' then
        equip(sets.engaged.tp)
        if not pet.isvalid then
            add_to_chat(158,'Pet Not Available')
        end
        if pet.isvalid and (windower.ffxi.get_ability_recasts()[100] == 0) then
            send_command('wait 2 3;input /pet "Fight" <t>')
        else
            send_command('wait 5 6;input /ja "Box Step" <t>')
        end
    it checks to see if you have a pet and if you can cast fight
    if you do not have a pet it will send a message to chat then cast box step
    else it will checket to see if the recast of fight is 0 and if it is will cast fight if not it will cast boxestep

  3. #3303
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    So this: (windower.ffxi.get_ability_recasts()[100] == 0) is a universal recast check in GearSwap? That's pretty cool!

  4. #3304
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by ToadieOdie View Post
    So this: (windower.ffxi.get_ability_recasts()[100] == 0) is a universal recast check in GearSwap? That's pretty cool!
    no that just checks to see if the recast for fight is 0
    in gearswap the universal one is
    windower.ffxi.get_ability_recasts()[spell.recast_id] -- for abilitys
    windower.ffxi.get_spell_recasts()[spell.id] --for spells

  5. #3305
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    That's good to know and still pretty cool. Much cleaner than Spellcast!

  6. #3306
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    New question though: Can I get GearSwap to detect whether or not my pet is resting like:

    pet.status == 'Resting'
    pet.status == 'Idle'
    pet.status == 'Engaged'

    Because I don't want to use Fight unless the pet is idle.

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

    Quote Originally Posted by ToadieOdie View Post
    New question though: Can I get GearSwap to detect whether or not my pet is resting like:

    pet.status == 'Resting'
    pet.status == 'Idle'
    pet.status == 'Engaged'

    Because I don't want to use Fight unless the pet is idle.
    here
    pet.status
    but if you do not have a pet active it might cause an error im not sure

    all of the info for what is native for gearswap is in the Windower4\addons\GearSwap\beta_examples_and_inform ation Variables.xlsx file as well as the conversion from spellcast

  8. #3308
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    I've tried this both just pet.status and pet.status == 'Idle' and then made the pet "Stay" but it still uses Fight when I engage a target:

    Code:
    function status_change(new,old)
        if new == 'Engaged' then
            equip(sets.engaged.tp)
            if not pet.isvalid then
                add_to_chat(158,'Pet Not Available')
            end
            if pet.isvalid and pet.status == 'Idle' and (windower.ffxi.get_ability_recasts()[100] == 0) then
                send_command('wait 2 4;input /pet "Fight" <t>')
            else
                send_command('wait 5 6;input /ja "Box Step" <t>')
            end
        else
            equip(sets.idle.pettank)
        end
    end
    It's possible the pet never actually counts as resting, even though it recovers HP when you use the Stay command. If so I'll just use a toggled variable that switches on when I use Stay and off when I use Heel like before.

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

    Quote Originally Posted by ToadieOdie View Post
    I've tried this both just pet.status and pet.status == 'Idle' and then made the pet "Stay" but it still uses Fight when I engage a target:

    Code:
    function status_change(new,old)
        if new == 'Engaged' then
            equip(sets.engaged.tp)
            if not pet.isvalid then
                add_to_chat(158,'Pet Not Available')
            end
            if pet.isvalid and pet.status == 'Idle' and (windower.ffxi.get_ability_recasts()[100] == 0) then
                send_command('wait 2 4;input /pet "Fight" <t>')
            else
                send_command('wait 5 6;input /ja "Box Step" <t>')
            end
        else
            equip(sets.idle.pettank)
        end
    end
    It's possible the pet never actually counts as resting, even though it recovers HP when you use the Stay command. If so I'll just use a toggled variable that switches on when I use Stay and off when I use Heel like before.
    your pet status only changes when your does

  10. #3310
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    Ohhh okay that makes sense then. Thank you for your help. ^_^

  11. #3311
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by dlsmd View Post
    no that just checks to see if the recast for fight is 0
    in gearswap the universal one is
    windower.ffxi.get_ability_recasts()[spell.recast_id] -- for abilitys
    windower.ffxi.get_spell_recasts()[spell.id] --for spells
    The first one works for both, the latter only works for spells.

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

    Quote Originally Posted by Arcon View Post
    The first one works for both, the latter only works for spells.
    windower.ffxi.get_ability_recasts()
    Returns a table containing the current ability recast times. See below for spell recast times.
    --contains only about 250 values depending on what abilitys have the same timer but only thoes that your current job setup has access to

    windower.ffxi.get_spell_recasts()
    Returns a table containing the current spell recast times. See above for ability recast times.
    --contains over 900 values one for each spell

    http://dev.windower.net/doku.php?id=...ons:ffxi:start

  13. #3313
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    I meant using recast_id works for both. You don't have to use spell.recast_id for one and spell.id for the other.

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

    i was not sure if thay made that fix yet

  15. #3315
    Nidhogg
    Join Date
    Jul 2008
    Posts
    3,746
    BG Level
    7
    FFXIV Character
    Seraphus Highwynn
    FFXIV Server
    Gilgamesh
    FFXI Server
    Diabolos

    I tried to copy my macro book code from my DRG lua to my BLU lua but got an error.

    My DRG lua has at the top:
    Code:
    function get_sets()
    	AccIndex = 1
    	AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    	AttIndex = 1
    	AttArray = {"LowATT","HighATT","LowContent"} -- LowATT Is The Same As LowACC Set. MidACC & HighACC Take Priority Over These 2 Sets(HighATT & LowContent). --
    	select_default_macro_book(1) -- Change Default Macro Book At The End -
    My BLU Lua has:
    Code:
    function get_sets()
    	send_command('bind f9 gs c toggle TP set')
    	send_command('bind f10 gs c toggle Idle set')
    	send_command('bind f11 gs c toggle CDC set')
    	send_command('bind f12 gs c toggle Req set')
    	send_command('bind !f12 gs c toggle Rea set')
            select_default_macro_book(1) -- Change Default Macro Book At The End -- 

    But for some reason when I load my BLU lua, it says error with the line associated with the select_default_macro_book. The error says: attempt to call global 'select_default_macro_book....then the rest is cut off in the console ><

    It's literally copy and pasted into the same 'get_sets' section so not sure why it's not working. I even copyed the same bottom section where I define which subs correspond to which macro books...

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

    Quote Originally Posted by Ophannus View Post
    I tried to copy my macro book code from my DRG lua to my BLU lua but got an error.

    My DRG lua has at the top:
    Code:
    function get_sets()
    	AccIndex = 1
    	AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    	AttIndex = 1
    	AttArray = {"LowATT","HighATT","LowContent"} -- LowATT Is The Same As LowACC Set. MidACC & HighACC Take Priority Over These 2 Sets(HighATT & LowContent). --
    	select_default_macro_book(1) -- Change Default Macro Book At The End -
    My BLU Lua has:
    Code:
    function get_sets()
    	send_command('bind f9 gs c toggle TP set')
    	send_command('bind f10 gs c toggle Idle set')
    	send_command('bind f11 gs c toggle CDC set')
    	send_command('bind f12 gs c toggle Req set')
    	send_command('bind !f12 gs c toggle Rea set')
            select_default_macro_book(1) -- Change Default Macro Book At The End -- 

    But for some reason when I load my BLU lua, it says error with the line associated with the select_default_macro_book. The error says: attempt to call global 'select_default_macro_book....then the rest is cut off in the console ><

    It's literally copy and pasted into the same 'get_sets' section so not sure why it's not working. I even copyed the same bottom section where I define which subs correspond to which macro books...
    i dont beleve your using motes include setup
    so the issue is that you did not copy the select_default_macro_book function to your new file

  17. #3317
    CoP Dynamis
    Join Date
    Mar 2013
    Posts
    275
    BG Level
    4
    FFXI Server
    Odin

    I am currently using Mote's WHM GS lua, I have a question regarding separating the sets for Cure I-IV and Cure V-VI.

    The reason being, I want to use a set of 50% cure potency, 500 healing magic skill, and -50 enmity for Cure I-IV and a set where I simply try to maximize Power for Cure V-VI.

    I realize that your Cure logic is further broken down to Cure and CureSolace, which I also utilize. I can see it being quite simple if I change the library mapping of Cures (change V-VI to CureHigh or something, then add additional logic to get_spell_map function), but is there a way to do it easily without touching the library?

    Thanks in advance.

    Correction: Cure I-IV should be 50 potency and -50 enmity, healing magic will be automatically 500+ since I will be trying to maximize power with those 2 conditions.

  18. #3318
    Smells like Onions
    Join Date
    Nov 2014
    Posts
    1
    BG Level
    0

    Figured it out thanks!

  19. #3319
    Smells like Onions
    Join Date
    Nov 2014
    Posts
    4
    BG Level
    0

    Gearswap and Nitro

    When using gearswap is there a way that when nitro is active to put on my song set and lock it? No need for precast etc cause its instant cast, and tired of disabling my gs and remaking macros over and over. Thanks!

  20. #3320
    Smells like Onions
    Join Date
    Nov 2014
    Posts
    4
    BG Level
    0

    Gearswap and Nitro

    When using gearswap is there a way that when nitro is active to put on my song set and lock it? No need for precast etc cause its instant cast, and tired of disabling my gs and remaking macros over and over. Thanks!

Page 166 of 302 FirstFirst ... 116 156 164 165 166 167 168 176 216 ... LastLast

Similar Threads

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