Item Search
     
BG-Wiki Search
Page 123 of 302 FirstFirst ... 73 113 121 122 123 124 125 133 173 ... LastLast
Results 2441 to 2460 of 6036

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

  1. #2441
    BG Content
    Join Date
    Jul 2007
    Posts
    22,353
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Err... the latter is more accurate. Equipment window will miss things.

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

    Quote Originally Posted by Byrthnoth View Post
    Err... the latter is more accurate. Equipment window will miss things.
    i have seen both miss gearswap

    equipwindow:
    misses fast gearchanges(like when your doing JA'S)

    show_swaps:
    will sometimes say a piece of gear is swapped but it actually is not (i know this for a fact w=because of my sleep buff gear change, this one is so random that it might take 100 swaps to show when the gear does not change)
    here is my sleep buff code

    Code:
    sets.sleep = {neck="Opo-opo Necklace",back="Aries Mantle"} 
    function buff_change(name,gain)
    	sleepset(name,gain)
    end
    function sleepset(name,gain)
    	if name == "sleep" then
    		if gain then
    			enable("neck","back")
    			equip({neck="Opo-opo Necklace",back="Aries Mantle"})
    			disable("neck","back","main","sub","range","ammo")
    		else
    			enable("neck","back","main","sub","range","ammo")
    			equip(sets[player.status])
    		end
    	end
    end
    function midcast(spell)
    	gearchang_stopper(spell)
    end
    function aftercast(spell)
    	gearchang_stopper(spell)
    	equip(sets[player.status])
    end
    function gearchang_stopper(spell)
    	if buffactive['sleep'] then
    		return
    	end
    end

  3. #2443
    BG Content
    Join Date
    Jul 2007
    Posts
    22,353
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    showswaps should print out the set just before the equip packets are sent, so if the gear doesn't swap then the server is rejecting the attempt to swap gear for some reason.

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

    is there a way to add to a list
    i.e
    Code:
    mylist = {}
    
    if not mylist:contains(spell.name) then
    	if -- check something then
    	--do something
    	elseif --check something then
    	--do something
    	else
    	--add spell name to the list of spells (this is what i need to figure out)
    	end
    else
    --do something
    end
    this way i can build a list of things dynamically while gearswap is running

    would it be something like or something els
    mylist = mylist + ["spell.name"]

  5. #2445
    BG Content
    Join Date
    Jul 2007
    Posts
    22,353
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah.

    Mylist = L{}

    Mylist:append(spell.name)

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

    Quote Originally Posted by Byrthnoth View Post
    Yeah.

    Mylist = L{}

    Mylist:append(spell.name)
    cool thx

  7. #2447
    RIDE ARMOR
    Join Date
    Feb 2014
    Posts
    11
    BG Level
    1

    Quote Originally Posted by JSHidaka View Post
    try in pretarget?... I have something like that.. the only 2 difference are that I use it under "function pretarget(spell)" and that I dont use mote's lua...
    I wanted to say a (very) late thank you for this and the link to your GearSwap for BRD - between that and the pretarget hint I was able to get something working in Mote's LUA. It has served me well for a few months now!

    I do seem to run into the Pianissimo-loop issue sometimes, though. To me, it always seems to happen if Pianissimo tries to fire (whether via auto-Pianissimo or pressing it manually) but is unable to go off due to either having just finished a spell and not enough time has passed yet for another action, OR Pianissimo itself is not back up yet and is still waiting on recast. If Pianissimo attempts to fire under either of these conditions, I almost always end up in the Pianissimo-loop.

    Anyways, there are a lot of helpful people in this thread, and I think that is awesome ^^b.

  8. #2448
    E. Body
    Join Date
    Jan 2009
    Posts
    2,086
    BG Level
    7
    FFXI Server
    Quetzalcoatl

    I don't really use gearswap, but this is a gear question, and I'm actually not quite sure which way to turn, I would test it myself but the way the naakual gear augments work atm, I'm not quite sure i have the time.

    On RDM, atm I nuke my Tier 2 spells in Artsieq Cap with +7 INT & +20 MAB augment. I finally grabbed a Buremete Hat and tested the 2 of them while doing Hurkan last night. Artsieq Cap with the augment was doing 2404 Stone II unresisted to Hurkan with my current gear, when i swapped to Buremte Hat with no augments I was doing 2385. The difference between the two is +35 Magic Damage vs +2 INT/+20 MAB. Considering how much Magic Damage is on the Buremte Hat and it still came out a little under the Artsieq Cap I'm kind of up in there air atm whether to get the +8 INT augment or the +4 Magic Damage augment, based on the numbers I saw my gut is leaning towards the +8 INT augment, but trying to get some verification before I choose. Is there anyone that knows mathematically which augment would be better on ilvl targets?

  9. #2449
    E. Body
    Join Date
    Jan 2009
    Posts
    2,086
    BG Level
    7
    FFXI Server
    Quetzalcoatl

    Also those numbers were before gain int. +25 int boosted that by another 220ish damage

  10. #2450
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Can cast_delay be dynamically changed after its been set? IE

    if not buffactive[x] then
    cast_delay(1.5)
    command
    end

    if not buffactive[y] then
    cast_delay(3)
    command
    end
    Or will I need to calculate all the delays first that are needed and then set that?

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

    Quote Originally Posted by kenshyn View Post
    Can cast_delay be dynamically changed after its been set? IE

    if not buffactive[x] then
    cast_delay(1.5)
    command
    end

    if not buffactive[y] then
    cast_delay(3)
    command
    end
    Or will I need to calculate all the delays first that are needed and then set that?
    Code:
    	if not buffactive[x] then
    		cast_delay(1.5)
    	elseif not buffactive[y] then
    		cast_delay(3)
    	end
    or more likely like this

    Code:
    	if buffactive[a] then
    		cast_delay(3)
    	elseif buffactive[b] then
    		cast_delay(1.5)
    	end
    the second one will only add the cast delay if a specific buff is active

    or you could do it this way

    Code:
    	local castpause = 0
    	if not buffactive[x] then
    		castpause = 1.5
    	end
    	if not buffactive[y] then
    		castpause = 3
    	end
    	cast_delay(castpause)
    if you wanted to add up the cast delays you would do it like this
    Code:
    	local castpause = 0
    	if not buffactive[x] then
    		castpause + 1.5
    	end
    	if not buffactive[y] then
    		castpause + 3
    	end
    	cast_delay(castpause)
    but if you want to change the cast_delay that was set during pretarget and precast after precast as far as i know you cant

  12. #2452
    New Merits
    Join Date
    Apr 2010
    Posts
    228
    BG Level
    4

    Could someone help me with ws variables? I know it don't look like the best method, but for example when I Fudo at 3000 tp I would like it to use my Fudo variable with Flame pearl or else use the normal Fudo variable which has my moonshades. And this bit of code errors out. Here's the whole function I have.
    Code:
    function precast(spell,action)	
    		if spell.type == 'WeaponSkill' then
    			equip(sets.WS)							
    		elseif spell.name == "Tachi: Kaiten" then
                    equip(sets.Kaiten[Kaiten_Set_Names[Kaiten_Index]])	
    		elseif spell.name == "Tachi: Rana" then
                    equip(sets.Rana[Rana_Set_Names[Rana_Index]])
    		elseif spell.name == "Tachi: Fudo" and (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
                    equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]])									
    			end
    		elseif spell.name == "Tachi: Shoha" and (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
                    equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]])
    			end
    
    			
    		elseif spell.type == "Ninjutsu" then
    			if string.find(spell.english,'Utsusemi') then
    				if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
    					cancel_spell()
    					add_to_chat(167, spell.english .. ' Canceled: [3+ Images]')
    					return
    			else
    				equip(sets.precast.Utsusemi)
    			end
    			else
    				equip(sets.precast.FastCast)
    		end
    		elseif spell.type == "JobAbility" then
                if sets.JA[spell.english] then
                    equip(sets.JA[spell.english])
                end
    		elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
    			cast_delay(0.2)
    			send_command('cancel Sneak')        
        	end	
    end

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

    Quote Originally Posted by Sithel View Post
    Could someone help me with ws variables? I know it don't look like the best method, but for example when I Fudo at 3000 tp I would like it to use my Fudo variable with Flame pearl or else use the normal Fudo variable which has my moonshades. And this bit of code errors out. Here's the whole function I have.
    Code:
    function precast(spell,action)	
    		if spell.type == 'WeaponSkill' then
    			equip(sets.WS)							
    		elseif spell.name == "Tachi: Kaiten" then
                    equip(sets.Kaiten[Kaiten_Set_Names[Kaiten_Index]])	
    		elseif spell.name == "Tachi: Rana" then
                    equip(sets.Rana[Rana_Set_Names[Rana_Index]])
    		elseif spell.name == "Tachi: Fudo" and (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
                    equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]])									
    			end
    		elseif spell.name == "Tachi: Shoha" and (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
                    equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]])
    			end
    
    			
    		elseif spell.type == "Ninjutsu" then
    			if string.find(spell.english,'Utsusemi') then
    				if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
    					cancel_spell()
    					add_to_chat(167, spell.english .. ' Canceled: [3+ Images]')
    					return
    			else
    				equip(sets.precast.Utsusemi)
    			end
    			else
    				equip(sets.precast.FastCast)
    		end
    		elseif spell.type == "JobAbility" then
                if sets.JA[spell.english] then
                    equip(sets.JA[spell.english])
                end
    		elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
    			cast_delay(0.2)
    			send_command('cancel Sneak')        
        	end	
    end
    change your code to this
    Code:
    function precast(spell,action)	
    	if spell.type == 'WeaponSkill' then
    		if spell.name == "Tachi: Kaiten" then
    			equip(sets.Kaiten[Kaiten_Set_Names[Kaiten_Index]])	
    		elseif spell.name == "Tachi: Rana" then
    			equip(sets.Rana[Rana_Set_Names[Rana_Index]])
    		elseif spell.name == "Tachi: Fudo" then
    			if (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
    				equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Fudo[Fudo_Set_Names[Fudo_Index]])									
    			end
    		elseif spell.name == "Tachi: Shoha" then
    			if (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
    				equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]],{ear1="Flame Pearl"})
    			else
    				equip(sets.Shoha[Shoha_Set_Names[Shoha_Index]])
    			end
    		else
    			equip(sets.WS)
    		end
    	end
    	if spell.type == "Ninjutsu" then
    		if string.find(spell.english,'Utsusemi') then
    			if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
    				cancel_spell()
    				add_to_chat(167, spell.english .. ' Canceled: [3+ Images]')
    				return
    			else
    				equip(sets.precast.Utsusemi)
    			end
    		else
    			equip(sets.precast.FastCast)
    		end
    	end
    	if spell.type == "JobAbility" then
    		if sets.JA[spell.english] then
    			equip(sets.JA[spell.english])
    		end
    	end
    	if spell.english == 'Spectral Jig' and buffactive.Sneak then
    		cast_delay(0.2)
    		send_command('cancel Sneak')        
    	end	
    end
    the reason for this is with this code
    Code:
    if spell.type == 'WeaponSkill' then
    	equip(sets.WS)
    elseif spell.name == "Tachi: Kaiten" then
    sence the first line says if spell.type == 'WeaponSkill' and the next check is elseif spell.name == "Tachi: Kaiten" it will always go to the first one because its going to always be a WeaponSkill

    so after the first check it will never check any of these rules if its a ws
    Code:
    elseif spell.name == "Tachi: Kaiten" then
    elseif spell.name == "Tachi: Rana" then
    elseif spell.name == "Tachi: Fudo" and (player.tp > 2999 or buffactive.Sekkanoki or (player.tp > 1999 and buffactive.Hagakure)) then
    elseif spell.name == "Tachi: Shoha"

  14. #2454
    New Merits
    Join Date
    Apr 2010
    Posts
    228
    BG Level
    4

    Thanks dlsmd! When and where to put if and elseif tags always confuses me. Thanks for explaining it though, it makes more sense now seeing it.

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

    Quote Originally Posted by Sithel View Post
    Thanks dlsmd! When and where to put if and elseif tags always confuses me. Thanks for explaining it though, it makes more sense now seeing it.
    it works like this
    if -- first thing you want to check
    elseif --the second -> last thing you want to check
    else --if the above checks dont match then do this

    now if you have it always works like this
    Code:
    if
    	if
    	elseif
    	else
    	end
    elseif
    	if
    	elseif
    	else
    	end
    else
    	if
    	elseif
    	else
    	end
    end
    if you want to do some reading here http://www.lua.org/pil/1.html

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

    Regarding buffactive:

    It is my understanding that the buff packet is kind of slow, both for gaining a buff and losing a buff, so that the buff_change() event can be an unreliable indicator of your actual state. The accepted way of getting around this is to set a flag in aftercast and remove it when you gain the buff. Then compare, for example, buffactive['Sneak Attack'] or sneak_attack_boolean, etc. when applying gear. I remember reading a conversation where someone discussed using this to avoid the following type of situation: if you use sneak attack, land a melee hit, and then weapon skill, you may occasionally weapon skill in sneak attack equipment despite no longer having the buff. However, since the buff loss packet lags, wouldn't this cause buffactive['Sneak Attack'] to remain true after the buff had worn, causing the error to persist? Am I correct that, while the method does ensure that buffs are correctly marked as present, it does not necessarily ensure that they haven't already worn?

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

    Yeah, that method favors false positives. In general, though, you're either using SA and stacking it with a WS or you're using SA solo because you don't have enough TP for a WS (and thus won't be WSing immediately), so in practice it shouldn't matter unless you fuck up.

  18. #2458
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Cool Thanks dlsmd! Yeah I was just curious if it was possible or if I have to add the extra code thank...

  19. #2459
    Salvage Bans
    Join Date
    Oct 2007
    Posts
    771
    BG Level
    5

    Another question Any way to determine if your busy casting or shooting range or weaponskilling so I can cancel spells if busy?

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

    Quote Originally Posted by kenshyn View Post
    Another question Any way to determine if your busy casting or shooting range or weaponskilling so I can cancel spells if busy?
    yes
    for jobs with a pet if you want to not change gear when a pet does something use this

    Code:
    	if midaction() or pet_midaction() then
    		cancel_spell()
    		return
    	end
    for nonpet jobs or when you do not care if a pet is doing something use this

    Code:
    	if midaction() then
    		cancel_spell()
    		return
    	end
    this needs to be at the top of your percast
    if you do not want to cancel the spell just remove the line cancel_spell()

Page 123 of 302 FirstFirst ... 73 113 121 122 123 124 125 133 173 ... LastLast

Similar Threads

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