Item Search
     
BG-Wiki Search
Closed Thread
Page 67 of 302 FirstFirst ... 17 57 65 66 67 68 69 77 117 ... LastLast
Results 1321 to 1340 of 6036

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

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

    Quote Originally Posted by Motenten View Post
    By default, they're in Mote-Globals, under binds_on_load(). You can override that by having a load_user_globals() function in a sidecar file, if you use one.

    Also by default, Ctrl-F11 cycles casting modes, the most common of which is a Resistant mode, which it sounds like you want. Define a set as sets.midcast['Elemental Magic'].Resistant, and it will be automatically selected when casting nukes while in Resistant casting mode.
    Thks but, when i try to cycle casting after create a resistant one and reload gearswap, i have always the same message :

    "Castinh mode is now in normal mode"

    Never toogle to resistant one.

    Any idea ?

    Code:
    sets.midcast['Elemental Magic'] = {
    		main="Lehbrailg +2",sub="Mephitis grip",ammo="Dosis tathlum",
    		head="Buremte Hat",neck="eddy necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
    		body="Seidr Cotehardie" ,hands="Otomi Gloves",ring1="Sangoma Ring",ring2="Locus Ring",
    		back="Toro Cape",waist="Sekhmet Corset",legs="Hagondes Pants +1",feet="Vitivation Boots +1"}
    		
    	sets.midcast['Elemental Magic'].Resistant = {
    		main="Lehbrailg +2",sub="Mephitis grip",range="Aureole",
    		head="Atro. Chapeau +1",neck="eddy necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
    		body="Atrophy Tabard +1" ,hands="Otomi Gloves",ring1="Sangoma Ring",ring2="Locus Ring",
    		back="Toro Cape",waist="Sekhmet Corset",legs="Hagondes Pants +1",feet="Vitivation Boots +1"}

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

    Quote Originally Posted by Sechs View Post
    • This is not a proper Gearswap question maybe but... how do you guys handle idle/movspeed sets on mage jobs? On Melees I don't have this issue because I can use the player.status='engaged' to discriminate. When it's true it will equip a series of TP sets according to rules, when it's false it will equip the idle set, which in my case will be composed by a mixture of regen, movspeed and dt. Now this is clearly not possible for a mage job since typically you do not engage. How can I create a difference between my idle set in-between spellcasts but during a fight, and my idle set when I'm moving around and not fighting at all? I think this is not possible and I will have to resort to a self command to equip a movspeed set.


    What I meant might be unclear.
    Could make examples for several slots but there's one in particular which makes it clear: feet.
    When I'm fighting I want to idle between spellcasts in Serpentes Sabots, when I'm not fighting I want to use Herald's Gaiters.
    In mine, I have different idle modes, similar to TP modes and weaponskill modes. Default idle mode focuses on refresh gear, while PDT idle mode focuses more on PDT/Defense, but still keeps movement feet on (full emergency PDT/MDT sets override the movement feet). Toggling between them is easy enough, though I don't bother setting up a mode for refresh feet since going in and out of combat changes so frequently, and it's too easy to get left behind (eg: in Delve) if I forget.

    Alternatively, I have a kiting mode which puts on the +movement gear on top of whatever other gear is being used. Can just toggle that on and off, and not worry about an idle mode.

    Also, regarding your check for startswith('Cur') -- I assume you're trying to get all types of cures, but don't forget that that also matches the spell Cursna. You're better off checking for startswith('Cure') or startswith('Cura').

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

    Quote Originally Posted by psylo View Post
    Thks but, when i try to cycle casting after create a resistant one and reload gearswap, i have always the same message :

    "Castinh mode is now in normal mode"

    Never toogle to resistant one.

    Any idea ?
    Ensure that up in user_setup() you have something like:

    Code:
    	options.CastingModes = {'Normal', 'Resistant'}

  4. #1324
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Quote Originally Posted by Motenten View Post
    Also, regarding your check for startswith('Cur') -- I assume you're trying to get all types of cures, but don't forget that that also matches the spell Cursna. You're better off checking for startswith('Cure') or startswith('Cura').
    Yep noticed that, in the end I went with a String and a :contains formula.
    A double startswith(Cure) or startswith(Cura) looks nice as well, think I'll change it to this suggestion of yours!

    Back to the annoying GearSwap lessons guys, first core version of my soon-to-be SCH Lua:
    http://pastebin.com/HjpZGFAL

    It's incomplete of course, need to fill some sets still, some strings etc.
    Here are my doubts:
    • Check the precast and midcast for Impact. They are set_combine. Will they work though? I'm basically combining a Twilight Cloak with a set that doesn't have a body but has a head. In theory the set on the right should take priority over the set on the left, but that's on a slot-by-slot basis though. Will a BODY slot on the right (cloak) take priority over a HEAD slot in the left? (nahtirah hat)
    • I presume there is no smart/efficient way to include all T1/T2 spells under the same category unless I'm making a string like I did on the top, correct?
    • I kinda need suggestions on how to implement "overrides" for specific slots when stratagems are active. For instance Perpetuance, it needs to override whatever the midcast sets say when Buffactive['Perpetuance'] is true. I know how to do this (I would create two branches into midcast, one for condition true with set_combine(set, {bracers+2}) and the other branch like now... but this is a very unelegant and unefficent solution. Isn't there something better? Also this wouldn't allow me to make exceptions. Take another example, Penury and Parsimony. On the majority of spells I want these legs to override (just like perpetuance) but in some circumstances, like Embrava and arguably spell.skill['Elemental Magic'], I want to just use the Stratagems without any override.
    • Do you guys even bother using precast for T1 spells and Stun? For instance in my old spellcast I was using the midcast set on precast and nothing else.



    Edit:
    How do you make a negative condition in GS? Like in spellcast it was "not". Couldn't find it in the Variables.xls, probably because this is a basic lua thing and not a GS one.
    Uhm... let's go see if Motenten mentioned this in his W.I.P. guide

  5. #1325
    Melee Summoner
    Join Date
    Mar 2014
    Posts
    25
    BG Level
    1

    Quote Originally Posted by Motenten View Post
    Ensure that up in user_setup() you have something like:

    Code:
    	options.CastingModes = {'Normal', 'Resistant'}
    Thks motenten ^^

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

    Quote Originally Posted by Sechs View Post

    It's incomplete of course, need to fill some sets still, some strings etc.
    Here are my doubts:
    • I presume there is no smart/efficient way to include all T1/T2 spells under the same category unless I'm making a string like I did on the top, correct?
    • I kinda need suggestions on how to implement "overrides" for specific slots when stratagems are active. For instance Perpetuance, it needs to override whatever the midcast sets say when Buffactive['Perpetuance'] is true. I know how to do this (I would create two branches into midcast, one for condition true with set_combine(set, {bracers+2}) and the other branch like now... but this is a very unelegant and unefficent solution. Isn't there something better? Also this wouldn't allow me to make exceptions. Take another example, Penury and Parsimony. On the majority of spells I want these legs to override (just like perpetuance) but in some circumstances, like Embrava and arguably spell.skill['Elemental Magic'], I want to just use the Stratagems without any override.
    • Do you guys even bother using precast for T1 spells and Stun? For instance in my old spellcast I was using the midcast set on precast and nothing else.



    Edit:
    How do you make a negative condition in GS? Like in spellcast it was "not". Couldn't find it in the Variables.xls, probably because this is a basic lua thing and not a GS one.
    Uhm... let's go see if Motenten mentioned this in his W.I.P. guide
    1. Yea, list.
    2.
    in the end of midcast function
    Code:
    	if spell.skill == 'Enhancing Magic' then 
    	    if buffactive["Perpetuance"] then
                   equip(sets.Perpetuance)
    			   send_command('@input /echo ------- Perpetuance >> '..spell.english..' >>> '..spell.target.name..'-------')
            end
    	end
    the reason of the send command is to confirm the Swap for Perpetuance went, GS takes it time to check if the buff is up... so for example you make a macro
    /ja Perpetuance <me> <wait 1>
    /ma Haste <t>

    or if you are a fast typer (like me) // Perpetuance - // Haste, GS dont have time to verify perpetuace buff is up and the gearswap for it wont kick in.

    On my mule I where I have macros w/ Accession and Perpetuance, I have Perpetuance first then accession then cast the spell...

    3. w/ GS you can precast on any spell. you can even precast w/ Occ. Quickmagic and even on proc you will cast on the right midcast set.

    4. "not"

    if not buffactive.paralyze then...
    if not enf_spells[spell.name] then...
    if spell.name ~= 'Pianissimo' then... ~= > Not equal

  7. #1327
    Custom Title
    Join Date
    Nov 2008
    Posts
    1,066
    BG Level
    6
    FFXI Server
    Diabolos

    Just set a boolean 'true' on the aftercast of perpetuance, check against that variable when casting a spell. Use a buff_change of perpetuance wearing to set it false again, and maybe a backup method in your general spell aftercast. This is what I've done for Seigan+Third Eye so I can check Seigan active before Third Eye, but still fire off Third Eye in the buffactive delay if GS knows Seigan fired (via a boolean set in aftercast).

  8. #1328

    curiously i checked all of the suggested mage lua's to find not one single idle set using Fucho-no-Obi... Thought that was weird and the reason i checked was because I could not get gearswap to equip this. Can someone take a look? maybe the dashes are screwing it up?

  9. #1329
    Salvage Bans
    Join Date
    Oct 2010
    Posts
    792
    BG Level
    5
    FFXI Server
    Sylph

    Quote Originally Posted by Jackx View Post
    curiously i checked all of the suggested mage lua's to find not one single idle set using Fucho-no-Obi... Thought that was weird and the reason i checked was because I could not get gearswap to equip this. Can someone take a look? maybe the dashes are screwing it up?
    Works for me....

    sets.idle.normal = {
    head="geo. galero +1",neck="twilight torque",ear1="sanare earring",ear2="moonshade earring",
    body="geo. tunic +1",hands="bagua mitaines",ring1="sheltered ring",ring2="paguroidea ring",
    back="repulse mantle",waist="fucho-no-obi",legs="geo. pants +1",feet="bagua sandals"}

    Is something else wrong?

  10. #1330
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Quote Originally Posted by JSHidaka View Post
    2.
    in the end of midcast function
    Code:
    	if spell.skill == 'Enhancing Magic' then 
    	    if buffactive["Perpetuance"] then
                   equip(sets.Perpetuance)
    			   send_command('@input /echo ------- Perpetuance >> '..spell.english..' >>> '..spell.target.name..'-------')
            end
    	end
    the reason of the send command is to confirm the Swap for Perpetuance went, GS takes it time to check if the buff is up... so for example you make a macro
    /ja Perpetuance <me> <wait 1>
    /ma Haste <t>

    or if you are a fast typer (like me) // Perpetuance - // Haste, GS dont have time to verify perpetuace buff is up and the gearswap for it wont kick in.
    Blahblah, I wrote a long and useless post but I think now I get what you meant.
    Add that IF as a second one, separated from the long, branched, currently existing one.
    After all the checks and after equipping this or that, I would do a second check before the end of the Midcast function, and if the spell is enhancing magic and Perpetuance is active, I would force an item in the hands slot.
    Yes... I can see this working.

    The "delay" in the checks that you mention looks troublesome =/ I don't have premade macros, I just have stratagems macros and spell macros, and many other times I just type using shortcuts/spellcast simplified syntax.

    Basically the line you wrote is like a confirmation that Perpetuance thing got checked and worked? If I don't see the line it means something went wrong.
    This could be useful I suppose.

    And I could address Alacrity/Penury in the same way, choosing the categories/skill of spells where I want it to work.
    Gonna try it! Thanks :D


    Quote Originally Posted by Raelia View Post
    Just set a boolean 'true' on the aftercast of perpetuance, check against that variable when casting a spell. Use a buff_change of perpetuance wearing to set it false again, and maybe a backup method in your general spell aftercast. This is what I've done for Seigan+Third Eye so I can check Seigan active before Third Eye, but still fire off Third Eye in the buffactive delay if GS knows Seigan fired (via a boolean set in aftercast).
    Post the Seigan/Thirdeye example you're talking of because I'm not getting it!
    I don't see the difference between setting a specific boolean to True after using Perpetuance, or checking the pre-existing buffactive['Perpetuance'] boolean.

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

    Quote Originally Posted by Sechs
    Post the Seigan/Thirdeye example you're talking of because I'm not getting it!
    I don't see the difference between setting a specific boolean to True after using Perpetuance, or checking the pre-existing buffactive['Perpetuance'] boolean.
    Sequence:
    buffactive['Perpetuance'] returns false
    Use Perpetuance
    precast called
    midcast called
    aftercast called >> indicates whether the JA completed, was interrupted (if a spell), or wasn't used (timers not up, for example)
    - delay period of indeterminate length, but maybe 1-2 seconds
    - potential casting point 1
    client is notified that player gained a buff; buff_change is called, and buffactive['Perpetuance'] now returns true
    - potential casting point 2

    The problem is that indeterminate delay, and whether you end up casting at point 1 or point 2. If you cast at point 1, then buffactive[] will return false because the client hasn't received the message that you gained the buff, yet. If you cast at point 2 then you won't notice anything.

    The solution is realizing that you can know for certain whether Perpetuance (or whatever) is active at its aftercast call, and set a variable there that is guaranteed to be correct before any possible point where you can cast the following spell.

    The following shows supporting code that uses this solution:
    Code:
    function job_setup()
        state.Buff['Sneak Attack'] = buffactive['sneak attack'] or false
        state.Buff['Trick Attack'] = buffactive['trick attack'] or false
        state.Buff['Feint'] = buffactive['feint'] or false
    end
    
    function aftercast(spell)
        if not spell.interrupted then
            if state.Buff[spell.name] ~= nil then
                state.Buff[spell.name] = true
            end
        end
    end
    
    function buff_change(buff, gain)
        if state.Buff[buff] ~= nil then
            state.Buff[buff] = gain
        end
    end
    Note: initializing the variables uses "or false" to ensure that the variable has a value (ie: is not nil), so that I can check for "state.Buff[spell.name] ~= nil" so that this doesn't try to create variable instances for every single action I take.

    And then, if I want to use SA+WS or TA+WS, I could do something like this (note - simplified code for illustration purposes):

    Code:
    function precast(spell)
        if spell.type == 'WeaponSkill' then
            if state.Buff['Sneak Attack'] then
                equip(sets.precast.WS[spell.english].SA
            elseif state.Buff['Trick Attack'] then
                equip(sets.precast.WS[spell.english].TA
            else
                equip(sets.precast.WS[spell.english]
            end
        end
    end
    This is used because I can't trust that buffactive['sneak attack'] will be true when I hit SA+WS really close together.

  12. #1332
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Ah Motenten I see... now that's some issue with the delay, think I'm gonna try to implement your example then, don't wanna risk Perpetuance not going off at the worst possible time.
    For the time being this is what I completed. Tested and as far as I could see it's working, didn't notice any big error.

    http://pastebin.com/tfEZhfjD

    Anybody feels they want to comment/improve/simplify?
    Oh and appearently I was right when I asked my question #1 before (about Twilight Cloak "overriding" the head slot in my other set during a set_combine(set1, {Twilight Cloak}).
    It wasn't working. Had to add a head="" (empty) together with the cloak for it to work. Now it seems to be workin all good

    One thing that I noticed not working correctly is the Aftercast on Sublimation (see in my lua).
    Or rather, it works partially.
    If I activate Sublimation and then cast a spell or perform any other action, then GS corretly returns me to the Idle.Subli set instead of the default.
    But if I just use Sublimation, it stays on Idle.
    Either I did something wrong in the Aftercast and in the Status_change sections, or maybe this is another circumstance of delay issue, like the one mentioned above by Motenten and JSHidaka.

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

    But if I just use Sublimation, it stays on Idle.
    The reason is exactly the same as what I just explained: buffactive[] will not be true until some point -after- aftercast() runs.

  14. #1334
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Yeah, thought as much. Should do something similar for "Sublimation: Activated" then.

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

    Overall logic for sublimation is easier to deal with, though. Since you can only use it every 30 seconds, you don't need to maintain a state variable. Just handle things in aftercast() and buff_change().

  16. #1336
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Tryin to implement those states Mote, but getting errors.
    Tried to change something here and there but I still get the same error on the line "if state.Buff[spell.name] ~= nil then"
    The error I get is "attempt to index a global 'state' (a nil value)"

    I also did initialize the variable at the beginning of the file under job_setup, and since I don't use mote_include atm, I also initialized "state" and "state.Buff" to {}.
    Still getting errors on that line, what am I doing wrong? D:

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

    Quote Originally Posted by Sechs
    The error I get is "attempt to index a global 'state' (a nil value)"

    I also did initialize the variable at the beginning of the file under job_setup, and since I don't use mote_include atm, I also initialized "state" and "state.Buff" to {}.
    Still getting errors on that line, what am I doing wrong? D:
    :sigh: Didn't we just go over this like twice in the last week? job_setup() is a locally-defined function. If you did the definitions within that function and you never call that function, those variables will never be initialized. GearSwap does not call that function. It is not in the GearSwap documentation list.

    I gave the example using job_setup() because my includes call that function, and I was doing a simple copy/paste, and needed to indicate that they were initialized during setup, and weren't just laying around in the middle of the file at random.

  18. #1338
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    /comfort
    Good display of patience!
    Yeah I remember now, sorry lol
    Set the variables up the good way and everything seems to be working for Stratagems and for Subli, both when I gain it and when I lose it. :D

    Still got some doubts though.
    The parts that I judge being relevant here under:
    Spoiler: show
    Code:
    function aftercast(spell,action)
    	if not spell.interrupted then
    		if state.Buff[spell.name] ~= nil then
    			state.Buff[spell.name] = true
    		end
    		if state.Buff['Sublimation: Activated'] == true then
    			equip(sets.Idle.Sublimation)
    		else
    			equip(sets.Idle)
    		end
    	end
    end
    
    function buff_change(buff, gain)
    	if state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    		if state.Buff['Sublimation: Activated'] == true then
    			equip(sets.Idle.Sublimation)
    		else
    			equip(sets.Idle)
    		end
    	end
    end


    First:
    what's the use of that "not spell.interrupted" line? I mean I get what it does, but since in my situation state.Buff['spell.name'] is always going to be a JA (stratagem or subli) it can't really be interrupted like a spell, it either goes off or it doesn't.
    Tried commenting the line (and the related "end") and noticed no behaviour difference. Only difference being that if I casted a spell and interrupted it, game left me in the midcast set instead of returning me to the idle one. (which is the intended behaviour I think?)

    Second:
    Am I doing something wrong in "function buff_change"? Afraid it might do too many checks or that I branched the second "if" the wrong way.
    Seems to be working altough I did not really understand completely what this part does, I can only grasp it.

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

    Quote Originally Posted by Sechs
    what's the use of that "not spell.interrupted" line?
    If you try to use a JA (or spell), but the recast timer isn't ready, aftercast is called with spell.interrupted == true. Thus, if you try to use sublimation/perpetuance/etc and it's not available because of the recast timer, it won't attempt to change your config.

    Quote Originally Posted by Sechs
    Am I doing something wrong in "function buff_change"?
    Yes.

    Exercise: Get rid of the code. Ignore it; pretend it doesn't exist. Now, start writing down a list of things you want to happen when you gain or lose a buff. Any buff, doesn't matter. Try to think of any possible scenario where gaining or losing a buff matters to you. Explain what you want to happen and why, for gaining or losing any buff or combination of buffs. Then figure out which ones are the same, and put them together.

    Then go back to the code describe exactly what you just wrote out, but using the terms of the programming language.

    Come back here and provide both what you wrote out for yourself, and what you wrote out as code.

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

    Hmm added the code as stated earlier, the mid cancel for jigs and utsemini still not working, added cancel_conflicting_buffs(spell, action, spellMap, eventArgs) to job precasts, did it like this:
    function job_precast(spell, action, spellMap, eventArgs)

    cancel_conflicting_buffs(spell, action, spellMap, eventArgs)

    -- Don't gearswap for weaponskills when Defense is on.
    if spell.type:lower() == 'weaponskill' and state.Defense.Active then
    eventArgs.handled = true
    elseif spell.type == 'Waltz' then
    refine_waltz(spell, action, spellMap, eventArgs)
    end
    end

    -- Run after the general precast() is done.
    function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type:lower() == 'weaponskill' and not state.Defense.Active then
    if buffactive.impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
    equip({body="Tantra Cyclas +2"})
    elseif buffactive.footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then
    equip({feet="Anchorite's Gaiters +1"})
    end
    end
    end

Similar Threads

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