Item Search
     
BG-Wiki Search
Page 71 of 302 FirstFirst ... 21 61 69 70 71 72 73 81 121 ... LastLast
Results 1401 to 1420 of 6036

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

  1. #1401
    Impossiblu
    Join Date
    Mar 2010
    Posts
    10,445
    BG Level
    9
    FFXIV Character
    Prothescar Centursa
    FFXIV Server
    Balmung
    FFXI Server
    Valefor

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

    Writing my PUP lua and got some questions:

    1. There is no specific category for "Maneuvers" (prefix is /pet and action_type is "Petcommand"). To use a single precast set for all 8 maneuvers I used a spell.english:endswith('Maneuver') line. Any better way to do it?
    2. Can you use the normal checks you can do for players even for automaton? Like can I check for spell.skill['Dark Magic'] and if I place this line into a Pet_midcast/Pet_aftercast function, then GS will check for such an action performed by the Pet and not myself. Correct?
    3. Trying to make a rule to equip Sheltered Ring when I'm engaged and my automaton starts casting either Protect or Shell ON ME. Would this work?
      Spoiler: show
      Code:
      function pet_midcast(spell,action)
        if (spell.english:startswith('Protect') or spell.english:startswith('Shell')) and player.status == 'Engaged' and spell.target == 'Sechs' then
           player.equipment.left_ring = "Sheltered Ring"
        end
      end
      
      function pet_aftercast(spell,action)
        if (spell.english:startswith('Protect') or spell.english:startswith('Shell')) and player.status == 'Engaged' and spell.target == 'Sechs' then
           equip(sets.TP[TPmode])
        end
      end
    4. Something strange now. I have a special mode called "Pet Mode" which I'm gonna track somehow. When I activate this I need to swap my idle sets according to pet.status. If it's engaged it needs to swap PLAYER idle to a different one. If it's not engaged then it needs to return to the default idle set. This is because when I'm in "Pet Mode" I don't engage the target myself, only my automaton does.
      Now... how could I track this? Let's say I already have two idle sets: sets.Idle.normal and sets.Idle.Pet.
      I know how to perform the check since I can just use the pet.status variable.
      The question is: where/when should I put this check? There is no correspondant pet version for "function status_change", which is what I use to discriminate between engaged true/false for the main player and swap sets accordingly.



    Thanks!

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

    Quote Originally Posted by Infinite
    I get a error when i try to load the lua, the line for the error is 19 (the PhysicalBlueMagic = S{ part) when i changed it from BlueMagic to ['Blue Magic'] i got this error and i do not know how to fix it, all i am asking is the correct way to fix it.
    How to fix it: Change it back from ['Blue Magic'] to BlueMagic. That is, from what you described, you changed it from PhysicalBlueMagic to Physical['Blue Magic']. That is fundamentally wrong. PhysicalBlueMagic is one word naming a single table, and is in no way dependent on the spell.skill value (though that may not be immediately apparent, due to the way Bokwus built his file). Physical['Blue Magic'] describes a table called 'Physical' that contains a sub-table called 'Blue Magic' that is dependent on spell.skill. Two very different things.

    Essentially, from the original file, Do Not Change Anything.

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

    Quote Originally Posted by Sechs View Post
    Writing my PUP lua and got some questions:

    There is no specific category for "Maneuvers" (prefix is /pet and action_type is "Petcommand"). To use a single precast set for all 8 maneuvers I used a spell.english:endswith('Maneuver') line. Any better way to do it?
    That should be spell.type, not spell.action_type (and PetCommand, not Petcommand).

    Unfortunately there's no way to better isolate them based on what Windower resources. You could, perhaps, create a set naming the maneuvers and refer to that, though.

    Code:
    Maneuvers = S{'Fire Maneuver', 'Wind Maneuver', 'Water Maneuver', etc}
    
    if Maneuvers:contains(spell.english) then

    Can you use the normal checks you can do for players even for automaton? Like can I check for spell.skill['Dark Magic'] and if I place this line into a Pet_midcast/Pet_aftercast function, then GS will check for such an action performed by the Pet and not myself. Correct?
    Correct.


    Trying to make a rule to equip Sheltered Ring when I'm engaged and my automaton starts casting either Protect or Shell ON ME. Would this work?
    Spoiler: show
    Code:
    function pet_midcast(spell,action)
      if (spell.english:startswith('Protect') or spell.english:startswith('Shell')) and player.status == 'Engaged' and spell.target == 'Sechs' then
         player.equipment.left_ring = "Sheltered Ring"
      end
    end
    
    function pet_aftercast(spell,action)
      if (spell.english:startswith('Protect') or spell.english:startswith('Shell')) and player.status == 'Engaged' and spell.target == 'Sechs' then
         equip(sets.TP[TPmode])
      end
    end
    No. You need to use a standard equip() function command in the pet_midcast code. Otherwise, yes.

    Something strange now. I have a special mode called "Pet Mode" which I'm gonna track somehow. When I activate this I need to swap my idle sets according to pet.status. If it's engaged it needs to swap PLAYER idle to a different one. If it's not engaged then it needs to return to the default idle set. This is because when I'm in "Pet Mode" I don't engage the target myself, only my automaton does.
    Now... how could I track this? Let's say I already have two idle sets: sets.Idle.normal and sets.Idle.Pet.
    I know how to perform the check since I can just use the pet.status variable.
    The question is: where/when should I put this check? There is no correspondant pet version for "function status_change", which is what I use to discriminate between engaged true/false for the main player and swap sets accordingly.
    pet_status_change() is a thing. I specifically asked Byrth to add it a few months back. However.. it looks like it didn't get added to the documentation. Will need to fix that.

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

    Thanks Motenten!
    So pet_status_change() does exist! Then I'll just use that and put my "if" checks inside that, and everything should work in theory.

    Another small thing, in the "equip sheltered ring" code I posted above there are 3 conditions that need to be true for the following line to be processed.
    The last condition is "spell.target == 'Sechs'", which is ok but would work only for me. If another PUP were to use that lua, it wouldn't work for them.
    Is there a variable I can use for that? player.name?
    So I would just have to change that last part to: spell.target = player.name ?

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

    spell.target.type == 'SELF'

  7. #1407
    Relic Shield
    Join Date
    Sep 2007
    Posts
    1,740
    BG Level
    6
    FFXI Server
    Sylph

    EDIT: WRONG THREAD.

  8. #1408
    Cerberus
    Join Date
    Jun 2010
    Posts
    461
    BG Level
    4

    Wanted to add a self cure pot rule for BLU GS and was unsure the best way to do it.

    table reference code:
    Code:
        bluSpells = T{["Magic Fruit"]="CurePot", ["Plenilune Embrace"]="CurePot", ["White Wind"]="CurePot"}
    Midcast Code:
    Code:
            elseif bluSpells[spell.english] then
                equip(sets.midcast.BlueMagic[bluSpells[spell.english]])
    gear sets:
    Code:
        sets.midcast.BlueMagic.CurePot = {ammo="Aqua Sachet",
                    head="Weath. Corona +1", neck="Phalaina Locket", lear="Loquac. Earring", rear="Lifestorm Earring",
                    body="Chelona Blazer", hands="Weath. Cuffs +1", lring="Aquasoul Ring", rring="Aquasoul Ring",
                    back="Tempered Cape", waist="Cascade Belt", legs="Magavan Slops", feet="Weath. Souliers +1"}
        sets.midcast.BlueMagic.CurePot.Self = set_combine(sets.midcast.BlueMagic.CurePot, {
                    hands="Buremte Gloves", lring="Kunaji Ring",
                    waist="Chuq'aba Belt"})
    Normally it will call the spellset that matches the name
    I wanted to add if self cure then use a different set without having to write out each spell to over ride.

    would something like this work:
    Code:
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    or:

    Code:
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagicCurePot.Self)
    if that is too sloppy or just wrong any help to correct would be wonderful.
    Thank you.

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

    Quote Originally Posted by nikia View Post
    Wanted to add a self cure pot rule for BLU GS and was unsure the best way to do it.

    table reference code:
    Code:
        bluSpells = T{["Magic Fruit"]="CurePot", ["Plenilune Embrace"]="CurePot", ["White Wind"]="CurePot"}
    Midcast Code:
    Code:
            elseif bluSpells[spell.english] then
                equip(sets.midcast.BlueMagic[bluSpells[spell.english]])
    gear sets:
    Code:
        sets.midcast.BlueMagic.CurePot = {ammo="Aqua Sachet",
                    head="Weath. Corona +1", neck="Phalaina Locket", lear="Loquac. Earring", rear="Lifestorm Earring",
                    body="Chelona Blazer", hands="Weath. Cuffs +1", lring="Aquasoul Ring", rring="Aquasoul Ring",
                    back="Tempered Cape", waist="Cascade Belt", legs="Magavan Slops", feet="Weath. Souliers +1"}
        sets.midcast.BlueMagic.CurePot.Self = set_combine(sets.midcast.BlueMagic.CurePot, {
                    hands="Buremte Gloves", lring="Kunaji Ring",
                    waist="Chuq'aba Belt"})
    Normally it will call the spellset that matches the name
    I wanted to add if self cure then use a different set without having to write out each spell to over ride.

    would something like this work:
    Code:
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    or:

    Code:
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagicCurePot.Self)
    if that is too sloppy or just wrong any help to correct would be wonderful.
    Thank you.
    i think this will work but im not sure
    function sets
    sets.midcast.BlueMagic.CurePot = {ammo="Aqua Sachet",
    head="Weath. Corona +1", neck="Phalaina Locket", lear="Loquac. Earring", rear="Lifestorm Earring",
    body="Chelona Blazer", hands="Weath. Cuffs +1", lring="Aquasoul Ring", rring="Aquasoul Ring",
    back="Tempered Cape", waist="Cascade Belt", legs="Magavan Slops", feet="Weath. Souliers +1"}

    sets.midcast.BlueMagic.CurePot.Self = set_combine(sets.midcast.BlueMagic.CurePot, {
    hands="Buremte Gloves", lring="Kunaji Ring",
    waist="Chuq'aba Belt"})

    bluSpells = T{["Magic Fruit"]="CurePot", ["Plenilune Embrace"]="CurePot", ["White Wind"]="CurePot"}

    function precast
    local bluspell = [bluSpells[spell.english]]
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    elseif bluSpells[spell.english] then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]])

  10. #1410
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    27
    BG Level
    1

    Quote Originally Posted by Motenten View Post
    How to fix it: Change it back from ['Blue Magic'] to BlueMagic. That is, from what you described, you changed it from PhysicalBlueMagic to Physical['Blue Magic']. That is fundamentally wrong. PhysicalBlueMagic is one word naming a single table, and is in no way dependent on the spell.skill value (though that may not be immediately apparent, due to the way Bokwus built his file). Physical['Blue Magic'] describes a table called 'Physical' that contains a sub-table called 'Blue Magic' that is dependent on spell.skill. Two very different things.

    Essentially, from the original file, Do Not Change Anything.
    ok i am confused... My BLU lua (and others) stopped switching gear for spells (didn't even equip fast cast gear) some of my other lua's switched to fast cast still but not end cast. I was under the impression that all BlueMagic in my lua would be changed to ['Blue Magic'] is that not the case and only some of it needs to be converted to ['Blue Magic']? if so what needs changing and what doesn't? please... sorry for the noobness

  11. #1411
    Cerberus
    Join Date
    Jun 2010
    Posts
    461
    BG Level
    4

    Quote Originally Posted by dlsmd View Post
    i think this will work but im not sure
    function sets
    sets.midcast.BlueMagic.CurePot = {ammo="Aqua Sachet",
    head="Weath. Corona +1", neck="Phalaina Locket", lear="Loquac. Earring", rear="Lifestorm Earring",
    body="Chelona Blazer", hands="Weath. Cuffs +1", lring="Aquasoul Ring", rring="Aquasoul Ring",
    back="Tempered Cape", waist="Cascade Belt", legs="Magavan Slops", feet="Weath. Souliers +1"}

    sets.midcast.BlueMagic.CurePot.Self = set_combine(sets.midcast.BlueMagic.CurePot, {
    hands="Buremte Gloves", lring="Kunaji Ring",
    waist="Chuq'aba Belt"})

    bluSpells = T{["Magic Fruit"]="CurePot", ["Plenilune Embrace"]="CurePot", ["White Wind"]="CurePot"}

    function precast
    local bluspell = [bluSpells[spell.english]]
    if bluSpell = "CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    elseif bluSpells[spell.english] then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]])
    Not a precast rule however. Precast is used for fastcast.

    didnt want to add local variables if i can help it. the example i wrote above, can that work or am i missing something.
    Note: since GS is down atm i cant test to see what works and doesnt work.

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

    Quote Originally Posted by nikia View Post
    Not a precast rule however. Precast is used for fastcast.

    didnt want to add local variables if i can help it. the example i wrote above, can that work or am i missing something.
    Note: since GS is down atm i cant test to see what works and doesnt work.
    you cant do this bluSpells[spell.english]
    and this bluSpell = "CurePot"
    with the same table or variable

    and sence function gear sets only runs once it cant change another variable with out a rule to do it

  13. #1413
    Cerberus
    Join Date
    Jun 2010
    Posts
    461
    BG Level
    4

    So baisicly writing out each spell(not that many) is the best way to do it then?

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

    Quote Originally Posted by nikia View Post
    So baisicly writing out each spell(not that many) is the best way to do it then?
    yes its the easyest way
    like this(example)
    Transportspells = S{'Retrace','Escape','Warp','Warp II','Teleport-Dem','Teleport-Holla','Teleport-Mea','Teleport-Altep','Teleport-Vahzl','Recall-Jugner','Recall-Meriph','Recall-Pashh'}
    if Transportspells[spell.name]

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

    I don't see why this wouldn't work.
    Code:
    if bluSpells[spell.english]=="CurePot" and spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    elseif bluSpells[spell.english] then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]])
    end
    Unless there are other keys in the table with values other than CurePot, though, it's kind of weird.

    Code:
    if bluSpells:contains(spell.english) then
    if spell.target.type == 'SELF' then
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]].Self)
    else
    equip(sets.midcast.BlueMagic[bluSpells[spell.english]])
    end
    end
    That's more orderly.

  16. #1416
    Melee Summoner
    Join Date
    Mar 2014
    Posts
    25
    BG Level
    1

    JA broken atm with mothenten files.

    Thks in advance for your works mothenten

    => can't use any Ja with rdm, need to unload GS, use Ja, reload GS

  17. #1417
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    update windower it was fixed(issue with resources)

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

    well precast for JA's arent working... just tested Boost, Chakra, Mantra...

    but it is working for spells...

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

    Quote Originally Posted by Infinite View Post
    ok i am confused... My BLU lua (and others) stopped switching gear for spells (didn't even equip fast cast gear) some of my other lua's switched to fast cast still but not end cast. I was under the impression that all BlueMagic in my lua would be changed to ['Blue Magic'] is that not the case and only some of it needs to be converted to ['Blue Magic']? if so what needs changing and what doesn't? please... sorry for the noobness
    There was indeed a change in formatting for magic skills. The value of spell.skill changed so that "BlueMagic" became "Blue Magic". However this is only relevant if your lua made decisions based on the value of spell.skill. If you had code like:

    Code:
        sets.midcast.BlueMagic = {}
    
    function midcast(spell)
        if sets.midcast[spell.skill] then
            equip(sets.midcast[spell.skill])
        end
    end
    Then you needed to change the set name from sets.midcast.BlueMagic to sets.midcast['Blue Magic']. However that's not what you have in your lua. You have:

    Code:
        PhysicalBlueMagic = S{
            'Asuran Claws','Bludgeon','Body Slam','Feather Storm','Mandibular Bite',
            'Queasyshroom','Power Attack','Ram Charge','Screwdriver','Sickle Slash',
            'Smite of Rage','Spinal Cleave','Spiral Spin','Terror Touch'}
    
        sets.midcast.PhysicalBlueMagic = {}                  
            
    function midcast(spell)
        if PhysicalBlueMagic:contains(spell.english) then
            equip(sets.midcast.PhysicalBlueMagic)
        end
    end
    You'll note that nowhere in there does it even look at spell.skill; it just does an explicit check against a predefined set of spell names. Therefore changing the table and set names does absolutely nothing except break your lua file.

  20. #1420
    RIDE ARMOR
    Join Date
    Oct 2013
    Posts
    18
    BG Level
    1

    Ok, so once GS started working , my Daub dummy macro isn't working. my macro is /console gs c set daurdabla Dummy and when I try to use it doesn't put my daub in and it says Unknown mode value. pls help , how do I fix this?

    I figured it out. ty

Page 71 of 302 FirstFirst ... 21 61 69 70 71 72 73 81 121 ... LastLast

Similar Threads

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