Item Search
     
BG-Wiki Search
Page 44 of 302 FirstFirst ... 34 42 43 44 45 46 54 94 ... LastLast
Results 861 to 880 of 6036

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

  1. #861
    Smells like Onions
    Join Date
    Jan 2013
    Posts
    2
    BG Level
    0

    I'm trying to use the RUN gs file (from the front page) and I keep getting errors switching back into aftercast gear.

    "Gearswap: Lua Error (runtime) - F: windower4//addons/gearswap/flow.lua:257:
    Gearswap has detected an error in the user function aftercast:
    F: windower4/addons/gearswap/data/RUN.lua : 207 : attempt to index field 'index' (a nil value)"

    I'm wondering if there was something that needs to be changed since the last update?

  2. #862
    BG Content
    Join Date
    Jul 2007
    Posts
    22,404
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    If you are on -dev, index no longer exists in the resources. It's now called recast_id.

  3. #863
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Greetings everyone.

    I'm trying to write a lua based on Xilk's Bst xml and stuck on one part. I haven't been able to figure how to toggle and equip different jugs once I Call Beast. No matter what I try nothing seems to work. Looking over other lua examples, I haven't been able to find any hints as to how to accomplish this. Any advice that would point me in the right direction would be greatly appreciated.

    The below is just an example of what it is I'm trying to do.
    Code:
    function get_sets()
    	item={}
    	item.broth="none"
    
    	sets.JA = {}
    	sets.JA['Call Beast'] = {ammo=item.broth,hands="Ankusa Gloves +1"}
    
    	BrothIndex = 1
    	BrothArray = {"Lucky Broth","Fizzy Broth","Spicy Broth","Saline Broth"}
    end
    
    function precast(spell,action)
    	if sets.JA[spell.english] then
    		equip(sets.JA[spell.english])
    	end
    end
    
    function self_command(command)
    	if command == 'broth' then
    		BrothIndex = (BrothIndex % #BrothArray) + 1
    		add_to_chat(8,'Use Broth: ' .. BrothArray[BrothIndex])
    		item.broth = item.broth[BrothArray[BrothIndex]]
    	end
    end

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

    There are two issues with your code, I think. The first problem is that get_sets() is only run once at login and item.broth is a string and thus undergoes static assignment. So the way that you have it set up right now, sets.JA['Call Beast'].ammo should be "none" regardless what item.broth changes to. The second is probably mostly a syntactic problem in the "item.broth = item.broth[BrothArray[BrothIndex]]" assignment, which isn't possible because item.broth isn't a table.

    Anyway, there are two ways to solve the first problem and they both also solve the second:
    1: (you no longer need the item table)
    Code:
    function self_command(command)
        if command == 'broth' then
            BrothIndex = (BrothIndex % #BrothArray) + 1
            add_to_chat(8,'Use Broth: ' .. BrothArray[BrothIndex])
            sets.JA.['Call Beast'].ammo = BrothArray[BrothIndex]
        end
    end
    2: (make item.broth into a table)
    Code:
    function get_sets()
        item={}
        item.broth={name="none"}
        sets.JA = {}
        sets.JA['Call Beast'] = {ammo=item.broth,hands="Ankusa Gloves +1"}
        BrothIndex = 1
        BrothArray = {"Lucky Broth","Fizzy Broth","Spicy Broth","Saline Broth"}
    end
    ...
    function self_command(command)
        if command == 'broth' then
            BrothIndex = (BrothIndex % #BrothArray) + 1
            add_to_chat(8,'Use Broth: ' .. BrothArray[BrothIndex])
            item.broth.name = BrothArray[BrothIndex]
        end
    end

  5. #865
    Smells like Onions
    Join Date
    Jan 2013
    Posts
    2
    BG Level
    0

    Quote Originally Posted by Byrthnoth View Post
    If you are on -dev, index no longer exists in the resources. It's now called recast_id.
    I was hoping I could just replace every 'index' with 'recast_id' but that also gets the same error. Is there a guide to writing GS luas out somewhere? I was just getting the hang of writing spellcasts when people switched to gearswap lol

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

    Is this a good way to handle locking twilight mail while weakened?

    Code:
    function status_change(new,old)
    	...
    	elseif new == 'weakness' then
    		equip({head="Twilight Helm",body="Twilight mail"})
    		disable('head','body')
    	elseif old == 'weakness' then
    		enable('head','body')
    	...
    	end
    end
    I haven't gotten a chance to test it.

  7. #867
    BG Content
    Join Date
    Jul 2007
    Posts
    22,404
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    No, because disabling that way will cause twilight helm and mail to not swap, because they equip command would be applied after the disable command. If you use send command with wait 0.1 on the disable statement then it would work.

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

    Oh. I thought it would call the status_change() function, reach the weakness condition, then enter the elseif block and call the equip() function (equipping the two items) then call the disable() function disabling the two slots. Do the two function calls occur simultaneously?

    Thanks!

  9. #869
    Nidhogg
    Join Date
    Oct 2006
    Posts
    3,665
    BG Level
    7

    I'm really old school so I'm still using input /equip on scripts for windower. But why isn't it working when I put it in a macro? //exec SAMTP.txt ? Sorry if this isn't the thread to post it in, didn't want to make a new thread.

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

    /console exec ....

  11. #871
    Nidhogg
    Join Date
    Oct 2006
    Posts
    3,665
    BG Level
    7

    Quote Originally Posted by JSHidaka View Post
    /console exec ....
    ty friend

  12. #872
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Quote Originally Posted by Byrthnoth View Post
    There are two issues with your code, I think. The first problem is that get_sets() is only run once at login and item.broth is a string and thus undergoes static assignment. So the way that you have it set up right now, sets.JA['Call Beast'].ammo should be "none" regardless what item.broth changes to. The second is probably mostly a syntactic problem in the "item.broth = item.broth[BrothArray[BrothIndex]]" assignment, which isn't possible because item.broth isn't a table.

    Anyway, there are two ways to solve the first problem and they both also solve the second:
    1: (you no longer need the item table)
    Code:
    function self_command(command)
        if command == 'broth' then
            BrothIndex = (BrothIndex % #BrothArray) + 1
            add_to_chat(8,'Use Broth: ' .. BrothArray[BrothIndex])
            sets.JA.['Call Beast'].ammo = BrothArray[BrothIndex]
        end
    end
    2: (make item.broth into a table)
    Code:
    function get_sets()
        item={}
        item.broth={name="none"}
        sets.JA = {}
        sets.JA['Call Beast'] = {ammo=item.broth,hands="Ankusa Gloves +1"}
        BrothIndex = 1
        BrothArray = {"Lucky Broth","Fizzy Broth","Spicy Broth","Saline Broth"}
    end
    ...
    function self_command(command)
        if command == 'broth' then
            BrothIndex = (BrothIndex % #BrothArray) + 1
            add_to_chat(8,'Use Broth: ' .. BrothArray[BrothIndex])
            item.broth.name = BrothArray[BrothIndex]
        end
    end
    Byrth, if it wasn't for your help I would never have been able to figure this out. Your explanation for both solutions make sense to me. The part you mentioned that get_sets() only runs at login is to me another revelation. Thanks SOOO much for your help.

  13. #873
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    27
    BG Level
    1

    Quote Originally Posted by Infinite View Post
    I have been using Bokura's lua's and converted all my jobs to gearswap, I'm very happy with them all so far apart from my JA sets wont work on RUN (Swordplay works but no others) I dont have 10 posts yet so i cant post link to my pastebin... its pastebin . com / u / Amadis

    Also i get a error pop up when i use <stnpc> for WS in macros, spells and other stuff work fine with <stnpc> but WS i get a error, is there any way around that?

    Thanks in advance :D
    Nobody can help me with this? ; ;

  14. #874
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,094
    BG Level
    6
    FFXI Server
    Ragnarok

    This is because most of RUN's JAs don't have jobability as their "type" So,

    Code:
    elseif spell.type == "JobAbility" then
    Won't catch any thing but swordplay, pulse, one for all, and SPs.

    Lunge, swipe, gambit, and rayke are all type = Effusion.
    Vallation, Valliance, pflug, liement, and Battuta are under type= Ward.

    And Runes, of course arre type rune. but that lua you linked should have that covered.

    So, solutions. Right now you have:
    Code:
            elseif spell.type == "JobAbility" then
                    if sets.JA[spell.english] then
                            equip(sets.JA[spell.english])
                    end
    Could go to
    Code:
    elseif spell.type == "JobAbility" or spell.type == "Ward" or spell.type == "Effusion" then
                    if sets.JA[spell.english] then
                            equip(sets.JA[spell.english])
                    end
    Which will catch JA, wards, and effusions and check for a set with a matching name.

    EDIT: btw, probably gonna hit the same issue with waltzes/steps/sambas in that lua.

  15. #875
    CoP Dynamis
    Join Date
    Apr 2010
    Posts
    290
    BG Level
    4
    FFXI Server
    Quetzalcoatl

    Trying to figure out what some code means, taken from Byrth's example files that come with GS:

    Code:
    function pretarget(spell)
        if spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.pianissimo and not spell.target.charmed and not pianissimo_cycle then
            cancel_spell()
            pianissimo_cycle = true
            send_command('input /ja "Pianissimo" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
            return
        end
        if spell.name ~= 'Pianissimo' then
            pianissimo_cycle = false
        end
    end
    Why is the red text written twice? I'm assuming this isn't a typo.

    Code:
    function precast(spell)
        if sets.precast[spell.english] then
            equip(sets.precast[spell.english])
        elseif spell.type=="WeaponSkill" then
            equip(sets.precast.WS)
        elseif string.find(spell.english,'Waltz') then
            equip(sets.precast.Waltz)
        elseif spell.type:lower() == 'ninjutsu' and spell.casttime > 1 then
            equip(sets.precast.Ninjutsu)
        end
    end
    What does lower() do? Can't you just do if spell.type == 'Ninjutsu' much like the first brd example?

  16. #876
    New Spam Forum
    Join Date
    Jun 2007
    Posts
    174
    BG Level
    3

    Quote Originally Posted by Scrooge View Post
    Trying to figure out what some code means, taken from Byrth's example files that come with GS:

    Code:
    function pretarget(spell)
        if spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.pianissimo and not spell.target.charmed and not pianissimo_cycle then
            cancel_spell()
            pianissimo_cycle = true
            send_command('input /ja "Pianissimo" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
            return
        end
        if spell.name ~= 'Pianissimo' then
            pianissimo_cycle = false
        end
    end
    Why is the red text written twice? I'm assuming this isn't a typo.

    Code:
    function precast(spell)
        if sets.precast[spell.english] then
            equip(sets.precast[spell.english])
        elseif spell.type=="WeaponSkill" then
            equip(sets.precast.WS)
        elseif string.find(spell.english,'Waltz') then
            equip(sets.precast.Waltz)
        elseif spell.type:lower() == 'ninjutsu' and spell.casttime > 1 then
            equip(sets.precast.Ninjutsu)
        end
    end
    What does lower() do? Can't you just do if spell.type == 'Ninjutsu' much like the first brd example?
    The first red text is in there twice because the first instance of it is checking to make sure that spell.target.type exists, because if it doesn't then using that to compare to 'PLAYER' will have issues. The :lower() function lowercases the text supplied so for example 'Ninjutsu' will become 'ninjutsu' it's mostly a safety thing when doing string comparisons because it allows you to take input in any case combination and then compare it to a lower case value. The best example is if for some reason that value could change to 'NINJUTSU' it would still work.

  17. #877
    CoP Dynamis
    Join Date
    Apr 2010
    Posts
    290
    BG Level
    4
    FFXI Server
    Quetzalcoatl

    Thanks.

    Is there a simple way to lock equipment under certain conditions with GearSwap? Specifically I am trying to figure out a way to lock Twilight Helm and Twilight Mail in place if I'm weakened or my HP drops below a certain percentage. Right now, I'm sticking an if condition for every function I make that combines sets with sets.Twilight, but this seems redundant. For example precasting WS:

    Code:
    function precast(spell,action)
        if spell.type=="Weapon Skill" then
            if buffactive['Weakness'] then
                equip(sets.precast.WS,sets.Twilight)
            else
                equip(sets.precast.WS)
            end
        end
    end
    Also, would if buffactive['Weakness'] or player.HP<(player.max_hp/10) then work, or is there a way to write that in lua that I'm not familiar with?

  18. #878
    BG Content
    Join Date
    Jul 2007
    Posts
    22,404
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Put this in your buff_change function:
    Code:
    function buff_change(name,gain)
        if name:lower() == 'weakness' and gain then
            equip(sets.Twilight)
            windower.send_command('wait 0.1;gs disable head, body')
        elseif name:lower() == 'weakness' then
            enable('head','body')
        end
    end

  19. #879
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by IceSylph View Post
    Much appreciated. At work now so can't check it , but will when I get home. Thanks, buddy.
    I had some time to check this out, and my previous attempt didn't work.

    This is what I got working.

    Create a sets.bow = { } with whatever you want inside, and modify the following function.

    Code:
    function customize_melee_set(meleeSet)
        if player.equipment.range == 'Yoichinoyumi' or player.equipment.range == 'Speleogen bow' then
            meleeSet = set_combine(meleeSet, sets.bow)
        end
        return meleeSet
    end

  20. #880
    Puppetmaster
    Join Date
    Apr 2013
    Posts
    63
    BG Level
    2
    FFXI Server
    Asura

    Does anyone know why gear swap starts spamming utsemini NI and ichi as soon as i change to nin sub? happens with both brd/nin and blue/nin so not sure when the problem might be, Heres the blu lua, using the mote include sethttp://pastebin.com/iY431ySD

Page 44 of 302 FirstFirst ... 34 42 43 44 45 46 54 94 ... LastLast

Similar Threads

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