Item Search
     
BG-Wiki Search
Page 128 of 302 FirstFirst ... 78 118 126 127 128 129 130 138 178 ... LastLast
Results 2541 to 2560 of 6036

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

  1. #2541
    Sea Torques
    Join Date
    Nov 2007
    Posts
    694
    BG Level
    5
    FFXI Server
    Asura

    Quote Originally Posted by Quixacotl View Post
    Just a quick glance at your lua, I noticed your variables contain the following strings;


    Edit: Oops its late and I'm tired. I just realized you can only store one Animikii Bullet so nvm me.
    Thanks! I don't have any /equip in my macros, I use Binder and a G700 mouse which just has the JA/WS/Ranged commands in a single line per macro. I think my downfall was going QD > Wildfire too quickly after noticing QD's timer wasn't up. I just did it wrong and somehow I knew I had shot it.

    e: Getting this:
    cor.lua:489: attempt to index global 'special_QDbullet' (a nil value)

    http://pastebin.com/zVjLyght

    e:
    If I'm only using Animikii, will this do?
    Code:
    if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet then
    		add_to_chat(104, 'Dont lose your special ammo!  Cancelling.')
    		eventArgs.cancel = true
    		return
    end

    e: Doesn't seem to matter. I think I found the problem. If I accidentally press my Quick Draw Macro RIGHT after I press my WS macro, it fires the Quick Draw bullet without checking to see if a WS is going on. Any way to fix this? Like something to ignore Quick Draw commands until Wildfire is done firing?

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

    Quote Originally Posted by Suteru View Post
    e: Getting this:
    cor.lua:489: attempt to index global 'special_QDbullet' (a nil value)
    Actually for Mote's luas, the line in question (484) would probably go in the user_setup block so it looks like this;
    Code:
    function user_setup()
    	-- Options: Override default values
    	options.OffenseModes = {'Ranged', 'Melee', 'Acc'}
    	options.RangedModes = {'Normal', 'Acc'}
    	options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
    	options.CastingModes = {'Normal', 'Resistant'}
    	options.IdleModes = {'Normal'}
    	options.RestingModes = {'Normal'}
    	options.PhysicalDefenseModes = {'PDT'}
    	options.MagicalDefenseModes = {'MDT'}
    
    	state.Defense.PhysicalMode = 'PDT'
    
    	gear.RAbullet = "Bullet"
    	gear.WSbullet = "Oberon's Bullet"
    	gear.MAbullet = "Bronze Bullet"
    	gear.QDbullet = "Animikii Bullet"
    	options.ammo_warning_limit = 15
    
    	special_QDbullet = S{'Animikii Bullet','Omphalos Bullet'}
    
    	-- other lines
    end
    Quote Originally Posted by Suteru View Post
    e:
    If I'm only using Animikii, will this do?
    Code:
    if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet then
    		add_to_chat(104, 'Dont lose your special ammo!  Cancelling.')
    		eventArgs.cancel = true
    		return
    end

    e: Doesn't seem to matter. I think I found the problem. If I accidentally press my Quick Draw Macro RIGHT after I press my WS macro, it fires the Quick Draw bullet without checking to see if a WS is going on. Any way to fix this? Like something to ignore Quick Draw commands until Wildfire is done firing?
    The most likely scenario is that you weaponskilled after QD. And because you typo'd,

    gear.WSbullet = "Oberon's Bulle"

    ... you lost your Animikii. It shouldn't matter -how- fast or soon after OD you WS'd. The typo was the culprit because GS couldn't re-equip the proper ammo at WS precast.
    Code:
    	sets.precast.WS['Last Stand'] = {ammo=gear.WSbullet}
    Your WS bullet could've been named, "elephant poop" and you'd have the same result.

    I still think a hard-check for ammo isn't a bad idea.
    Code:
    special_QDbullet = S{'Animikii Bullet','Omphalos Bullet'}
    
    -- Don't allow shooting or weaponskilling with ammo reserved for quick draw and stop losing Hurkan Bullets!
    if spell.type ~= 'CorsairShot' then 
    	if special_QDbullet:contains(player.equipment.ammo) then
    		add_to_chat(104, 'Dont lose your special ammo!  Cancelling.')
    		eventArgs.cancel = true
    		return
    	elseif bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
    		add_to_chat(104, 'No ammo will be left for Quick Draw.  Cancelling.')
    		eventArgs.cancel = true
    		return
    	end
    end

  3. #2543
    Sea Torques
    Join Date
    Nov 2007
    Posts
    694
    BG Level
    5
    FFXI Server
    Asura

    I lost it to Wildfire, though.

    I tested multiple times with other bullets, if I hit my weaponskill and Quick Draw macros at nearly the same time, I lose a QD bullet.


    e: Also that code wouldn't let me do anything, because for some reason it wouldn't return me to normal gear after quickdraw, and other macros would cancel because of it.


    e2: I should also say this and the includes make sure i'm switched back to ranged gear after I fire off quick draw. So even if it couldn't switch me to Oberon's, I'd still be on my regular bullet since that's defined in my Ranged set that I am switched back to after taking an action. Here's the inlcudes file: http://pastebin.com/QexKfn7V

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

    Change your play stile and don't do that...

    Gs need time to do the checks.. So even if you have a code that protects you from that, won't work if you do 2 actions too fast.

    And midaction() or something like that might be the solution but it doesn't always work and might lock you for few secs

  5. #2545
    Sea Torques
    Join Date
    Nov 2007
    Posts
    694
    BG Level
    5
    FFXI Server
    Asura

    I don't normally do that, it was a mistake and I misclicked and then it was gone. I'm watching myself now but now that I know it's possible, I find myself checking to make sure my bullet is still there after every WS, no matter how deliberately I space out quick draw and wildfire.

  6. #2546
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Quote Originally Posted by Suteru View Post
    I don't normally do that, it was a mistake and I misclicked and then it was gone. I'm watching myself now but now that I know it's possible, I find myself checking to make sure my bullet is still there after every WS, no matter how deliberately I space out quick draw and wildfire.
    I found always coding in removing the bullet before and after I shoot tended to be the safest route for me. Slight delay needed but bullet protection was worth it. So in precast removed ammo then added the needed ammo depending on shot and in aftercast removed ammo again. No matter if I run out of ammo it always checked and double checked before shooting in the spellcast days.

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

    I just removed code from GearSwap that was causing problems and doing something that didn't make sense, but I'm almost entirely certain there was a purpose for it at some time. Can you guys please keep a lookout for weird behavior and tell me if you notice something?

  8. #2548
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Did the midaction fix get pushed out?

  9. #2549
    BG Content
    Join Date
    Jul 2007
    Posts
    22,359
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah. Please report any midaction failures that you find on my tracker:
    https://github.com/Byrth/Lua/issues

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

    I need some guidance with the following lines

    Code:
    function buff_change(name,gain)
    	if name:startswith('Aftermath') and gain == false then
    		something happens
    	end
    end
    I used this code assuming that the event of Lv2 overwriting Lv1 or Lv3 overwriting Lv2/1 wouldn't have procced a loss in the Buff_change function.
    I read in the description that it worked only when you were really losing a buff and not when it was getting overwritten.
    Appearently it's not like that and with the above lines if a higher level AM overwrites a lover level, then "something happens" line procs.
    How can I address this in a simple way?

  11. #2551
    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
    I need some guidance with the following lines

    Code:
    function buff_change(name,gain)
    	if name:startswith('Aftermath') and gain == false then
    		something happens
    	end
    end
    I used this code assuming that the event of Lv2 overwriting Lv1 or Lv3 overwriting Lv2/1 wouldn't have procced a loss in the Buff_change function.
    I read in the description that it worked only when you were really losing a buff and not when it was getting overwritten.
    Appearently it's not like that and with the above lines if a higher level AM overwrites a lover level, then "something happens" line procs.
    How can I address this in a simple way?
    hmmm you know you can check for "Aftermath: Lv.1" "Aftermath: Lv.2" "Aftermath: Lv.3", the problem would be Lv1 overwriting lv.1

    EDIT: I had this in mind to work with, not sure if this can give you any idea
    Code:
    if spell.name == "empy/mythic ws" then
    if buffactive["Aftermath: Lv.1"] then
          if player.tp >= 1000 and player.tp < 2000 then
                 -- AM lv. 1 overwrite lv.1
          if player.tp >= 2000 and player.tp < 3000 then
                 -- AM lv. 2 overwrite lv.1
    elseif buffactive["Aftermath: Lv.2"] or buffactive["Aftermath: Lv.3"] then 
          if player.tp >= 1000 and player.tp < 2000 then
                 -- nothing happens, cant overwrite
          if player.tp >= 2000 and player.tp < 3000 then
                 -- just nothing happens
    elseif player.tp = 3000 and not buffactive["Aftermath: Lv.3"] then
                 -- AM lv. 3 
    end

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

    Lv1 overwriting Lv1 shouldn't proc gain to false, since it's the same buff overwriting the same buff, so in theory it should work in that case.
    How would you code the lv2 overwriting lv1 and Lv3 overwriting lv2/lv1 situations?
    My brain just entered guru meditation* atm D:
    Basically I would need to parse when an Aftermath wears off (gain == false) AND another Aftermath is not active. But how can I do this second part? "not Buffactive[Aftermath]" will produce bad results I'm afraid.



    *only the old people will remember this "Guru meditation" was an error/reset situation of the Amiga computers ;D

  13. #2553
    Old Merits
    Join Date
    Sep 2008
    Posts
    1,125
    BG Level
    6
    FFXI Server
    Leviathan

    trying to include reive necklace into motenten's files with the following, but it doesn't seem to be working:

    Code:
    sets.buff['Reive Mark'] = {neck="Ygnas's Resolve +1"}
    Code:
    function customize_melee_set(meleeSet)
    	if state.Buff.Migawari then
    		meleeSet = set_combine(meleeSet, sets.buff.Migawari)
    	end
    	if state.Buff.Doomed then
    		meleeSet = set_combine(meleeSet, sets.buff.Doomed)
    	end
    	if state.Buff['Reive Mark'] then
    		meleeSet = set_combine(meleeSet, sets.buff['Reive Mark'])
    	end
    	return meleeSet
    end

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

    Did you ever actually set state.Buff['Reive Mark'] anywhere?

    Actually, that's not a good use of the state.Buff table. You're not activating the Reive Mark with a JA, it just shows up. So, better to check buffactive['Reive Mark'] instead.

  15. #2555
    Old Merits
    Join Date
    Sep 2008
    Posts
    1,125
    BG Level
    6
    FFXI Server
    Leviathan

    yeah i honestly have no idea how, just tried to follow what other examples were already present and hoped it might work.

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

    Ok please allow me to further explain my AM "issue".
    I "stole" Motenten's function from Mote_Utility and customized it a bit.
    It works perfectly.

    It's just that I started using the variable "info.aftermath.duration" to check if AM is up or not and generate different behaviours in other parts of my Lua.
    To make this work, I had to add a Function buff_change where I check for Aftermath wearing off, and when it does the "info.aftermath.duration" field gets reset to "0".

    It all works smoothly, it's exactely like I wanted it to be.
    My only problem is in the situation of an AM of higher level overwriting an AM of lower level (when lv1 overwrites lv1 it's all fine).
    When this happens function buff_change behaves like the lower level one "expired" and so "Gain" goes to "false" and it resets my "info.aftermath.duration" to 0.
    I just want to avoid this.



    I could go another way, like the one you suggest JSH, but I used "function buff_change" instead of "buffactive" for that old reason I found out discussing with you guys (i.e. that buffactive checks are sometimes a bit "slower" because of server<>client communication so sometimes it could happen that you just received a buff but buffactive doesn't see it immediately, and viceversa with the expiring of buffs)

  17. #2557
    BG Content
    Join Date
    Jul 2007
    Posts
    22,359
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Err... typically you'll lose a buff -> gain a buff. So you should do info.aftermath.duration = 0 and then info.aftermath.duration = whatever the new tier of AM's duration is, right?

    If you are having problems with ordering (sometimes gain -> lose) then you should store the aftermath level and only reset info.aftermath.duration to 0 if the buff lost is equal to the current buff level.

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

    The parts I took from Mote get launched one in Precast and one in Aftercast respectively, ONLY when WS == Mordant Rime AND player.main == Carnwenhan.
    They're perfect that way.
    The only thing I needed to add was a way to reset info.aftermath.duration to 0 when AM wears off (normally it gets reset to 0 only when the custom function gets launched, i.e. when Mordant Rime gets used)
    And I've done that with a Buff_change function, this one

    Code:
    function buff_change(name,gain)
    	if name:startswith('Aftermath') and gain == false then
    		info.aftermath.duration = 0
    		add_to_chat(053,' impostato aftermath duration su zero')
    	end
    end
    It works, except the Overwrite situations I mentioned.
    I should probably add a futher "If".
    After checking for gain == false, proceed with another one "If no_other_AM_is_up then", and only at that point put the "info.aftermath.duration = 0" line
    My problem is HOW can I perform this second check? Clearly, for the reasons mentioned before, I cannot use buffactive because it wouldn't be reliable, so... what do I do? I add a new variable or something?

    If anybody is curious, here's the customized functions I originally took from Mote.
    Spoiler: show
    Code:
    function custom_aftermath_timers_precast()
    	info.aftermath.duration = 0
    	info.aftermath.level = math.floor(player.tp / 1000)
    	if info.aftermath.level == 0 then
    		info.aftermath.level = 1
    	end
    	-- nothing can overwrite lvl 3
    	if buffactive['Aftermath: Lv.3'] then
    		return
    	end
    	-- only lvl 3 can overwrite lvl 2
    	if info.aftermath.level ~= 3 and buffactive['Aftermath: Lv.2'] then
    		return
    	end
                          
    	if info.aftermath.level == 1 then
    		info.aftermath.duration = 270
    	elseif info.aftermath.level == 2 then
    		info.aftermath.duration = 120
    	else
    		info.aftermath.duration = 180
    	end
    end
    
    function custom_aftermath_timers_aftercast()
    	if info.aftermath.duration > 0 then
    		local aftermath_name = 'Aftermath: Lv.'..tostring(info.aftermath.level)
    		send_command('timers d "Aftermath: Lv.1"')
    		send_command('timers d "Aftermath: Lv.2"')
    		send_command('timers d "Aftermath: Lv.3"')
    		send_command('timers c "'..aftermath_name..'" '..tostring(info.aftermath.duration)..' down abilities/00027.png')
    	end
    end

  19. #2559
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Ehr... the "add_to_chat" line was a dummy line I added only to bugtest and see when it was getting activated. It's not really necessary, I kept it there only for testing.

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

    I'd say you're misusing the info.aftermath.duration variable. Also, I'm not sure it should ever actually work, since info.aftermath is reset to an empty table after the aftercast() function is complete (if you changed that, then there are other potential bugs introduced).

    How I would do it:

    Add state var:
    Code:
    state.Buff.Aftermath = buffactive['Aftermath: Lv.1'] or buffactive['Aftermath: Lv.2'] or buffactive['Aftermath: Lv.3'] or false
    Track in buff_change:
    Code:
    function job_buff_change(buff, gain)
        if buff:startswith('Aftermath') then
            state.Buff.Aftermath = gain
        end
    end
    Within the custom_aftermath_timers_aftercast() function, just before clearing the info.aftermath table, you can set the state var to true:
    Code:
            state.Buff.Aftermath = true
            info.aftermath = {}
        end

    The buff_change check will set the state var to false during a buff overwrite, but that should immediately be followed by setting it back to true when the 'new' aftermath is pushed through.

Page 128 of 302 FirstFirst ... 78 118 126 127 128 129 130 138 178 ... LastLast

Similar Threads

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