Item Search
     
BG-Wiki Search
Page 167 of 302 FirstFirst ... 117 157 165 166 167 168 169 177 217 ... LastLast
Results 3321 to 3340 of 6036

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

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

    Quote Originally Posted by Redrumyou View Post
    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!
    it would be something like this
    Code:
    function buff_change(name,gain)
        if name == "Nitro" then
            if gain then
                send_command('gs enable all')
                equip(sets.song)
                send_command('gs disable all')
            else
                send_command('gs enable all')
                equip(sets[player.status])
            end
        end
    end

  2. #3322
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    Can you use wild cards in GearSwap and if so, how? Namely wondering for zones and spell targets.

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

    Quote Originally Posted by ToadieOdie View Post
    Can you use wild cards in GearSwap and if so, how? Namely wondering for zones and spell targets.
    yes and no it depends on what you are trying to do

    example1(slow):
    Code:
    windower.wc_match(spell.english, 'Warp*|Teleport*|Recall*|Retrace|Escape')
    exanple 2(fast):
    Code:
    cities = S{"Ru'Lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno","Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls",
    "Heavens Tower","Port San d'Oria","Northern San d'Oria","Southern San d'Oria","Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
    "Aht Urhgan Whitegate","Tavanazian Safehold","Nashmau","Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
    
    cities:contains(world.area)

  4. #3324
    RIDE ARMOR
    Join Date
    Nov 2014
    Posts
    15
    BG Level
    1

    Meaning if the current area matches any of the ones listed in the set it is true? So I wouldn't need to type "cities:contains(world.area) = TRUE" in a conditional, it would just be "cities:contains(world.area)"? And I assume the set itself would need to be placed in the setup with any other variables you may have?

    "wc_match" must mean "wild card match" - not really a question, just musing there.

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

    Quote Originally Posted by ToadieOdie View Post
    Meaning if the current area matches any of the ones listed in the set it is true? So I wouldn't need to type "cities:contains(world.area) = TRUE" in a conditional, it would just be "cities:contains(world.area)"? And I assume the set itself would need to be placed in the setup with any other variables you may have?

    "wc_match" must mean "wild card match" - not really a question, just musing there.
    in lua statements are only true or false
    true:
    example1:
    test = true
    if test then -- true
    example2:
    test = 5
    if test == 5 then -- true

    false:
    example1:
    test = false
    if test then -- false in this case you would use if not test then to get true

    example2:
    test = 5
    if test == 6 then -- false

    all if/elseif to trigger need to be true
    http://www.lua.org/pil/4.3.1.html

    and im guessing that wc_match does = wild card match

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

    So if I wanted to cancel Healing Waltz because I don't want to bother removing a condition when fighting certain monsters would I type it this way:

    windower.wc_match(spell.target, '*Pukis|Sharaba|Iktomi')

    or should I set up a set listing all the conditional mobs I want and type it this way:

    conditionalmobs:contains(spell.target)

    Edit: wait spell.target probably wouldn't work for Healing Waltz since the target would always be a player.

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

    Quote Originally Posted by ToadieOdie View Post
    So if I wanted to cancel Healing Waltz because I don't want to bother removing a condition when fighting certain monsters would I type it this way:

    windower.wc_match(spell.target, '*Pukis|Sharaba|Iktomi')

    or should I set up a set listing all the conditional mobs I want and type it this way:

    conditionalmobs:contains(spell.target)

    Edit: wait spell.target probably wouldn't work for Healing Waltz since the target would always be a player.
    player.target.name
    but yes

    with conditionalmobs:contains(spell.target) your actualy building a table not a list and because the table is already defined its fast
    with windower.wc_match(spell.target, '*Pukis|Sharaba|Iktomi') it build a table with all possibility(as far as i know) every time it runs

    all variables in lua are tables

    read this
    http://pastebin.com/GLdhjSuR

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

    Quote Originally Posted by dlsmd View Post
    with conditionalmobs:contains(spell.target) your actualy building a table not a list and because the table is already defined its fast
    with windower.wc_match(spell.target, '*Pukis|Sharaba|Iktomi') it build a table with all possibility(as far as i know) every time it runs
    This, basically. windower.wc_match does not build a table, but it still needs to operate on the string, it needs to split it on every pipe and then go through an expensive algorithm for every alternative (expensive because it needs to consider single-place and multiple-place placeholders ? and * respectively). The advantage is that you can match multiple mobs with wild cards (like you did with *Pukis above). If you need that, sets aren't even an option, as you'd need to manually include every possibility in there. If you don't need that, you should definitely use a pre-made set and then call :contains on it.

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

    Quote Originally Posted by Arcon View Post
    This, basically. windower.wc_match does not build a table, but it still needs to operate on the string, it needs to split it on every pipe and then go through an expensive algorithm for every alternative (expensive because it needs to consider single-place and multiple-place placeholders ? and * respectively). The advantage is that you can match multiple mobs with wild cards (like you did with *Pukis above). If you need that, sets aren't even an option, as you'd need to manually include every possibility in there. If don't need that, you should definitely use a pre-made set and then call :contains on it.
    thx i was not sure how it worked so i guessed

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

    Quote Originally Posted by dlsmd View Post
    all variables in lua are tables

    read this
    http://pastebin.com/GLdhjSuR
    That statement is not correct and the file linked to uses some confusing terminology, although it probably means the right things. Variables can be non-tables as well:

    Code:
    t = {} -- Table variable
    n = 3 -- Number variable
    s = 'foo' -- String variable
    f = function() end -- Function variable
    What the file calls iterators are just strings used to access table elements. Tables are always a mapping from a key to a value.

    Code:
    t = { -- Defining a table called t
        a = 3, -- t's a key is now set to the value of 3
        b = 'foo', -- t's b key is now set to the value of "foo"
        c = {} -- t's c key is now set to the value of another (currently empty) table
    }
    "a", "b" and "c" here are strings. You access a table with the [] operator. So after you define the above table, and you want to print its "a" key, you would do this:

    Code:
    print(t['a']) -- Prints: 3
    However, keys do not need to be strings, they can be numbers as well:

    Code:
    t[4.2] = 'Something'
    print(t[4.2]) -- Prints: Something
    The only difference is that if keys are strings and only contain letters and underscores and do not start with a numeric character (0-9), you can use the . operator to access them. So instead of t['a'] you could write t.a and they evaluate to exactly the same thing. The latter is called syntactic sugar to the former, because it makes writing it a bit easier.

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

    Quote Originally Posted by Arcon View Post
    That statement is not correct and the file linked to uses some confusing terminology, although it probably means the right things. Variables can be non-tables as well:

    Code:
    t = {} -- Table variable
    n = 3 -- Number variable
    s = 'foo' -- String variable
    f = function() end -- Function variable
    What the file calls iterators are just strings used to access table elements. Tables are always a mapping from a key to a value.

    Code:
    t = { -- Defining a table called t
        a = 3, -- t's a key is now set to the value of 3
        b = 'foo', -- t's b key is now set to the value of "foo"
        c = {} -- t's c key is now set to the value of another (currently empty) table
    }
    "a", "b" and "c" here are strings. You access a table with the [] operator. So after you define the above table, and you want to print its "a" key, you would do this:

    Code:
    print(t['a']) -- Prints: 3
    However, keys do not need to be strings, they can be numbers as well:

    Code:
    t[4.2] = 'Something'
    print(t[4.2]) -- Prints: Something
    The only difference is that if keys are strings and only contain letters and underscores and do not start with a numeric character (0-9), you can use the . operator to access them. So instead of t['a'] you could write t.a and they evaluate to exactly the same thing. The latter is called syntactic sugar to the former, because it makes writing it a bit easier.
    i wrote it out the way i think of it not actuality's
    yes it seams more complex but my mind sees it this way and understands it better this way
    and if you think about it even this is a table
    a=1
    b=2
    c=3
    its just that you dont need to declare the _G or _L
    the above is why its easier for me to see all of them as tables
    primarily because its useful if you ever use something like this
    if _G['debug_'..event_type] then -- modifiable check for function

  12. #3332
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,757
    BG Level
    7
    FFXI Server
    Bahamut

    Is there a way to extend the time a piece of gear remains on for a JA? Radial Arcana and Mending Halation are both JAs that act more like pet commands; use JA, 1-2 seconds later luopan blows up. Both pieces of gear that enhance these typically don't stay on long enough to gain the effect unless there's lag.

  13. #3333
    Old Odin
    Join Date
    Oct 2006
    Posts
    6,198
    BG Level
    8
    FFXI Server
    Asura

    Quote Originally Posted by Malithar View Post
    Is there a way to extend the time a piece of gear remains on for a JA? Radial Arcana and Mending Halation are both JAs that act more like pet commands; use JA, 1-2 seconds later luopan blows up. Both pieces of gear that enhance these typically don't stay on long enough to gain the effect unless there's lag.
    omg and i was constantly asking myself what i scripted wrong in gearswap lol

  14. #3334
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,757
    BG Level
    7
    FFXI Server
    Bahamut

    Yeah, I didn't even notice it for the longest time, until a laggy night when I got back like 460 instead of 330 or whatever. After that I kept watching it finally remembered to ask here how to delay the change. XD

  15. #3335
    BG Content
    Join Date
    Jul 2007
    Posts
    22,372
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    You could do it like this:
    Code:
    function precast(spell)
        if spell.name == "Mending Halation" then
            equip({legs="Bagua Pants +1"})
            disable('legs')
        end
    end
    
    function pet_change(pet,gain_or_loss)
        if not gain_or_loss then
            enable('legs')
        end
    end
    You would want to put this code inside of the current functions, but you can probably see how it works.

  16. #3336
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Would Full Circle work the same way as mending halation and radial arcana. Would i need to put that disable armor slot stuff in for that as well?

  17. #3337
    Nidhogg
    Join Date
    Aug 2007
    Posts
    3,757
    BG Level
    7
    FFXI Server
    Bahamut

    I don't believe so. Full Circle doesn't act like a pet command, you use the JA and the luopan disappears immediately with no delay in the returned HP/MP.

    Been busy past few days and just now got a chance to try that out Byrth, but it doesn't seem to be working. Is there a specific place in the functions it needs to be? Leaving the original precast sets in has it equipping the legs/feet for the JAs still, but the disabling/enabling isn't taking place. Removing the original precast sets has nothing taking place. I'm still such a nub about GS. XD It's using Mort's files if that makes a difference.

  18. #3338
    Smells like Onions
    Join Date
    Nov 2014
    Posts
    2
    BG Level
    0

    How might i lock a slot if i equip a certain item in it, such as for instance, a reraise hairpin/earring. or even more-so; weapons? is there an easy way equip something and have it lock other slots? sometimes i want to melee/dw as a mage and not lose all my tp if i cast a spell and i dont want to have to overhaul my whole file to do it. so maybe if i equip a certain something in my off hand it'll lock my main/sub and ranged slots. can that happen?

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

    Quote Originally Posted by Lopan View Post
    How might i lock a slot if i equip a certain item in it, such as for instance, a reraise hairpin/earring. or even more-so; weapons? is there an easy way equip something and have it lock other slots? sometimes i want to melee/dw as a mage and not lose all my tp if i cast a spell and i dont want to have to overhaul my whole file to do it. so maybe if i equip a certain something in my off hand it'll lock my main/sub and ranged slots. can that happen?
    you could do something like this at the top of your precast but this would require you to do something after you change your gear
    Code:
    if player.equipment.sub == "" then
        disable("slot_name")
    end

  20. #3340
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    36
    BG Level
    1

    What is the code in Gearswap to automatically switch to the reward neckpiece Ygnas's Resolve +1 when your in a Reive?

Page 167 of 302 FirstFirst ... 117 157 165 166 167 168 169 177 217 ... LastLast

Similar Threads

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