Item Search
     
BG-Wiki Search
Page 300 of 302 FirstFirst ... 250 290 298 299 300 301 302 LastLast
Results 5981 to 6000 of 6036

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

  1. #5981
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    Quote Originally Posted by dlsmd View Post
    this line was in the original and it was not needed as well
    you can also look hear to see my gearswap
    Include:https://github.com/smd111/Gearswap
    Skill-Up:https://github.com/smd111/Gearswap-Skillup

    I cannot seem to post a code reply so I'll use a pastebin!


    https://pastebin.com/4AZqcmmp


    If I am wrong, please correct me ^^

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

    Quote Originally Posted by Rikimarueye View Post
    I cannot seem to post a code reply so I'll use a pastebin!
    ...
    If I am wrong, please correct me ^^
    i think this is what you want
    Code:
    local fm_count = 0
    -you start with this so if no startswith('finishing move') is found it will not error on nil
    Code:
      if tostring(i):startswith('finishing move') or tostring(i):startswith('フィニシングムーブ') then
                fm_count = tonumber(string.match(i, '%d+')) or 1
            end
    tonumber() changes a number string("0011997") into a number (0011997) in lua
    string.match(i, '%d+') '%d+' is how you tell it to only grab the number or numbers in order
    -https://www.lua.org/pil/20.2.html
    the or 1 tells it that if it is nil to use a 1 instead
    -this is an error catch

    Code:
     if spell.type == 'Step' and fm_count < 6 then
            ---
            ---
            ---
        end
    yes you got it right

  3. #5983
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    I happen to have another question! Based on that function you made. I am trying to make something that displays number of finishing moves in chat.

    Right now this is what I have! The +1 could account for presto (when I add that part) but I've been getting odd results. Any step over 6 always returns as 6 (+ the number modifying the count). How would someone account for that or is there a way around that?

    https://pastebin.com/r2ZaFYzt

    edit:

    I added the following to simplify and possibly prevent more errors xD I still have the 6+ problem tho :<

    Code:
    local prestoed = fm_count + 1
    edit2: Sowwi for so many edit :> I managed to put the presto check in and the correct math for the first presto from 0

    https://pastebin.com/3cvinA4n

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

    Quote Originally Posted by Rikimarueye View Post
    I happen to have another question! Based on that function you made. I am trying to make something that displays number of finishing moves in chat.

    Right now this is what I have! The +1 could account for presto (when I add that part) but I've been getting odd results. Any step over 6 always returns as 6 (+ the number modifying the count). How would someone account for that or is there a way around that?

    https://pastebin.com/r2ZaFYzt

    edit:

    I added the following to simplify and possibly prevent more errors xD I still have the 6+ problem tho :<

    Code:
    local prestoed = fm_count + 1
    edit2: Sowwi for so many edit :> I managed to put the presto check in and the correct math for the first presto from 0

    https://pastebin.com/3cvinA4n
    this is pointless because of the fact that there is no way to see if you have more then 6 FM's(5 FM's in Jap) without heavy chat watching
    if you want that you have to do it on your own i will not help because it
    -it would require about this much code: https://github.com/smd111/Gearswap/b...red_Events.lua
    --with out watching chat everything over 6 will always be inaccurate

    if you came up with a 100% accurate way to do this then i would be able and willing to help but otherwise your on your own

  5. #5985
    Melee Summoner
    Join Date
    Nov 2014
    Posts
    33
    BG Level
    1

    Quote Originally Posted by dlsmd View Post
    this is pointless because of the fact that there is no way to see if you have more then 6 FM's(5 FM's in Jap) without heavy chat watching
    if you want that you have to do it on your own i will not help because it
    -it would require about this much code: https://github.com/smd111/Gearswap/b...red_Events.lua
    --with out watching chat everything over 6 will always be inaccurate

    if you came up with a 100% accurate way to do this then i would be able and willing to help but otherwise your on your own
    Not a problem! ^^ Thank you for helping me with what you did help with!

    It would be a nice project to work on an strive for on my own

    I appreciate everything you've ever done for me! ^^

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

    Quote Originally Posted by Rikimarueye View Post
    Not a problem! ^^ Thank you for helping me with what you did help with!

    It would be a nice project to work on an strive for on my own

    I appreciate everything you've ever done for me! ^^
    i was thinking about this issue while sitting around
    you could try this if you want

    just create a new file call test.lua then paste this in and save it in your gearswap file folder with all your other gearswap job files
    Code:
    fm_test = 0
    function buff_change(name,gain,buff_table)
        if name:startswith('Finishing Move') then
            if gain then
                if buffactive('Presto')
                    fm_test = fm_test+2
                else
                    fm_test= fm_test+1
                end
                print('current FM count = '..fm_test)
            end
        end
    end
    function aftercast(spell)
        if spell.interrupted then
            return
        end
        if spell.type:startswith('Flourish') then
            local fm_for_flourishes = {['Animated Flourish']={m=2},
                                       ['Desperate Flourish']=1,
                                       ['Violent Flourish']=1,
                                       ['Reverse Flourish']={m=5},
                                       ['Building Flourish']={m=3},
                                       ['Wild Flourish']=2,
                                       ['Climactic Flourish']={m=5},
                                       ['Striking Flourish']=2,
                                       ['Ternary Flourish']=3,}
            if type(fm_for_flourishes[spell.name]) == 'number' then
                fm_test = fm_test-fm_for_flourishes[spell.name]
            else
                if fm_for_flourishes[spell.name].m >= fm_test then
                    fm_test = 0
                else
                    fm_test = fm_test-fm_for_flourishes[spell.name].m
                end
            end
            print('current FM count = '..fm_test)
        end
    end
    then use this command in ffxi's chat to load it to test
    //gs l test.lua

    if it counts past 6 and is accurate let me know

  7. #5987
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    Is it possible to make some kind of internal timer in gearswap code, where if it passes a certain point, it'll equip a refresh feet? But if it detects my character moving, it'll jump back to movement gear?

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

    Quote Originally Posted by Rehn View Post
    Is it possible to make some kind of internal timer in gearswap code, where if it passes a certain point, it'll equip a refresh feet? But if it detects my character moving, it'll jump back to movement gear?
    yes and no
    let me explain:
    no you cant equip gear outside of any function called by gearswap the normal way
    yes you can set a timer but its harder then you think
    yes you can equip gear outside of gearswaps called functions by calling your own function through gearswap
    here is some quick things i put together to help you get started:
    Code:
    function out_of_GS_func ()
        --put your timer and such here
        --you can do normal equips from here as well
        --the rest you're on your own
    end
    windower.raw_register_event('prerender', function
        local player = windower.ffxi.get_player()
        if not windower.ffxi.get_info().logged_in or not player then -- stops prender if not loged in yet
            return
        end
        if frame_count%30 == 0 then
            gearswap.equip_sets('out_of_GS_func',nil,1)
        end
        frame_count = frame_count + 1
    end)

  9. #5989
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    I figured it would have been troublesome... oh well.

    On another note, is there a way to code a method to randomize the mount I want to use? Let's say I have 3 mounts I like, and I want to do something like "//gs c mount" to let it randomly pick one of the 3. Is that doable or is that a pain to code in gearswap as well?

  10. #5990
    TIME OUT MOTHERFUCKER

    Join Date
    Nov 2007
    Posts
    3,885
    BG Level
    7
    FFXI Server
    Ragnarok

    I'm having an issue where my gearswap is no longer canceling stoneskin.

    This is how my code currently looks:
    Code:
    function precast(spell)
    	if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and not buffactive['Astral Conduit'] then
    		equip(sets.BPDelay)
    	elseif spell.type == 'SummonerPact' then
    		if spell.name == 'Dark Spirit' then
    			if world.weather_element == 'Dark' then
    				equip(sets.Summoning)
    			elseif world.weather_element ~= 'None' and spirit_conflict[world.day_element] ~= world.weather_element then
    				cancel_spell()
    				send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
    			elseif world.day_element == 'Dark' then
    				equip(sets.Summoning)
    			else
    				cancel_spell()
    				send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
    			end
    		elseif (spell.name == 'Alexander' or spell.name == 'Odin') and not pet.isvalid and not buffactive['Astral Flow'] and windower.ffxi.get_ability_recasts()[0] then
    			cast_delay(1)
    			send_command('input /ja "Astral Flow" <me>')
    		else
    			equip(sets.Summoning)
    		end
    	elseif spell.type == 'WhiteMagic' then
    		if spell.name == 'Stoneskin' then
    			windower.ffxi.cancel_buff(37)
    			equip(sets.Stoneskin)
    		elseif spell.skill == 'Enhancing Magic' then
    			if spell.name == 'Sneak' then
    				windower.ffxi.cancel_buff(71)
    			end
    			equip(sets.Summoning)
    		elseif spell.name:match('Cure') then
    			equip(sets.Healing)
    		end
    	elseif spell.name == 'Elemental Siphon' then
    		equip(sets.Siphon)
    	elseif spell.name == 'Mana Cede' then
            equip(sets.ManaCede)
    	elseif spell.name == 'Astral Flow' then
            equip(sets.AstralFlow)
    	end
    end
    Did the buff change from 37?

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

    Quote Originally Posted by Tarage View Post
    I'm having an issue where my gearswap is no longer canceling stoneskin.

    This is how my code currently looks:
    Code:
    function precast(spell)
        if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and not buffactive['Astral Conduit'] then
            equip(sets.BPDelay)
        elseif spell.type == 'SummonerPact' then
            if spell.name == 'Dark Spirit' then
                if world.weather_element == 'Dark' then
                    equip(sets.Summoning)
                elseif world.weather_element ~= 'None' and spirit_conflict[world.day_element] ~= world.weather_element then
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
                elseif world.day_element == 'Dark' then
                    equip(sets.Summoning)
                else
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
                end
            elseif (spell.name == 'Alexander' or spell.name == 'Odin') and not pet.isvalid and not buffactive['Astral Flow'] and windower.ffxi.get_ability_recasts()[0] then
                cast_delay(1)
                send_command('input /ja "Astral Flow" <me>')
            else
                equip(sets.Summoning)
            end
        elseif spell.type == 'WhiteMagic' then
            if spell.name == 'Stoneskin' then
                windower.ffxi.cancel_buff(37)
                equip(sets.Stoneskin)
            elseif spell.skill == 'Enhancing Magic' then
                if spell.name == 'Sneak' then
                    windower.ffxi.cancel_buff(71)
                end
                equip(sets.Summoning)
            elseif spell.name:match('Cure') then
                equip(sets.Healing)
            end
        elseif spell.name == 'Elemental Siphon' then
            equip(sets.Siphon)
        elseif spell.name == 'Mana Cede' then
            equip(sets.ManaCede)
        elseif spell.name == 'Astral Flow' then
            equip(sets.AstralFlow)
        end
    end
    Did the buff change from 37?
    i dont use windower.ffxi.cancel_buff(id) i use the addon cancel and send_command i.e. send_command('cancel 71') for Sneak
    Code:
        if spell.en == 'Spectral Jig' then
            send_command('cancel 71')
        end
    for Stoneskin you would use send_command('cancel 37')

    edit:
    also i do not understand why you do this:
    Code:
                if world.weather_element == 'Dark' then
                    equip(sets.Summoning)
                elseif world.weather_element ~= 'None' and spirit_conflict[world.day_element] ~= world.weather_element then
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
                elseif world.day_element == 'Dark' then
                    equip(sets.Summoning)
                else
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
                end
    and not this:
    Code:
                if world.weather_element == 'Dark' or world.day_element == 'Dark' then
                    equip(sets.Summoning)
                elseif world.weather_element ~= 'None' and spirit_conflict[world.day_element] ~= world.weather_element then
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
                else
                    cancel_spell()
                    send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
                end

  12. #5992
    TIME OUT MOTHERFUCKER

    Join Date
    Nov 2007
    Posts
    3,885
    BG Level
    7
    FFXI Server
    Ragnarok

    It's an old script I copied from someone else.

  13. #5993
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Quote Originally Posted by Rehn View Post
    I figured it would have been troublesome... oh well.

    On another note, is there a way to code a method to randomize the mount I want to use? Let's say I have 3 mounts I like, and I want to do something like "//gs c mount" to let it randomly pick one of the 3. Is that doable or is that a pain to code in gearswap as well?
    A while back i asked for the same thing and the guys helped me come up with this ADDON.

    They had it look at key items but it needed to be updated when new mounts became available and i dont have the know how to find those IDs or whatever (so i altered it to use a list i made of the mounts available) and i also had the problem i wanted to use it for 2 characters who at the time didnt have all the same mounts available. So in order to not have situations where one char summons a mount the other didnt have where the other just stood there cause he didnt have it, i made two mount array tables, one for each, and somewhere else i made a per character line like "if player.name == name then" to to point to either mountarray for the two characters. I think i removed that now they have all the same mount list though, but feel free to alter it if you like. I also made a self command in my job luas that would look if im on a mount or chocobo already and makes me dismount if so, and if not on a chobo to summon a mount but thats just how i likes it.

    the command to use is "mu usemount"

    Code:
    _addon.name = 'MountUp'
    _addon.version = '1.00'
    _addon.author = 'Trumpy (Shiva)'
    _addon.command = 'mu'
    
    require 'luau'
    packets = require('packets')
    --mountarray = T{} -- mount table
    mountarray = T{"Raptor","Tiger","Crab","Red Crab","Bomb","Ram","Morbol","Crawler","Fenrir","Beetle","Moogle","Magic Pot","Tulfaire","Warmachine","Xzomit"} -- mount table
    
    function random_mount() --randomly selects mount
        local select_mount = 0
        while select_mount < 1 do
            select_mount = math.ceil(math.random(0,#mountarray))
        end
        return mountarray[select_mount]
    end
    function UseMount() --main function
        if #mountarray >= 1 then --varifies you have at lest one mount
            windower.send_command('input /mount "'..random_mount()..'"')
    		windower.send_command('timers c Mount 60 up')
        end
    end
    windower.register_event('addon command', function()
            UseMount()
    end)
    Just alter the mount array to only list the mounts you like, or i supose you can list alot more, but repeat some to "add some weight" to the choice so it might more likely get picked. Also since its an addon make a folder in "addons" called "MountUp" and make a "MountUp.lua" in that folder and load it like an addon "lua l mountup" I usually add that line to my init file or something so its always loaded.

  14. #5994
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    Hella neat, thanks.

  15. #5995
    Special at 11:30 or w/e
    Sweaty Dick Punching Enthusiast

    Join Date
    Feb 2012
    Posts
    10,263
    BG Level
    9
    FFXIV Character
    Kalmado Espiritu
    FFXIV Server
    Gilgamesh
    FFXI Server
    Sylph
    Blog Entries
    4

    So I'm starting anew and am deeply sad Spellcast is no longer a thing. So I need to learn this Gearswap thing. I've poked around for beginners guides and saw a few, but was wondering if there are any BG'ers would recommend? One thing I loved about Spellcast is say you wanted to use Dodge on Monk you could just do //dodge. Is there similar with GS?

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

    Spellcasts functionality was broken into 3 different addons. Shortcuts does teh part you're referring to with the short spell aliases.

    Gearswap handles gear, and inforeplacer does the thing where you could say %targethpp etc, in chat and it'd replace that value with your targets HP percent.

    As for guides.. sorry I don't really know any good ones.

  17. #5997
    Fake Numbers
    Join Date
    Oct 2007
    Posts
    91
    BG Level
    2
    FFXI Server
    Asura

    Hello all

    https://pastebin.com/1HyVnxZL

    My gearswap for smn isn't swapping back the lucidity sash. I can't figure out for the life of me why. It's spelled right, but just not working.

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

    Quote Originally Posted by Patsu View Post
    Hello all

    https://pastebin.com/1HyVnxZL

    My gearswap for smn isn't swapping back the lucidity sash. I can't figure out for the life of me why. It's spelled right, but just not working.
    if any of these are true that is the reason as far as i can tell
    1.player MP less then 51%
    2.pet is active and still in combat
    if you get lag on the packet for your pet leavening combat this can happen
    to check put this:
    print("yup pet is still in combat")
    above:
    idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
    -if any of the above are the case there is nothing we can do to help you

  19. #5999
    TIME OUT MOTHERFUCKER

    Join Date
    Nov 2007
    Posts
    3,885
    BG Level
    7
    FFXI Server
    Ragnarok

    I tried switching to send_command('cancel 37') and it's still not canceling stoneskin, likewise 71 and sneak. What's going on?

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

    Quote Originally Posted by Tarage View Post
    I tried switching to send_command('cancel 37') and it's still not canceling stoneskin, likewise 71 and sneak. What's going on?
    are you using the cancel addon??

Similar Threads

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