Gear Swap - Numeric Variable

Eorzea Time
 
 
 
言語: JP EN FR DE
日本語版のFFXIVPRO利用したい場合は、上記の"JP"を設定して、又はjp.ffxivpro.comを直接に利用してもいいです
users online
フォーラム » Windower » General » Gear Swap - numeric variable
Gear Swap - numeric variable
 Shiva.Paulu
Offline
サーバ: Shiva
Game: FFXI
user: Paulu
Posts: 776
By Shiva.Paulu 2016-10-11 13:13:13  
Is there a way to set a numeric variable that can be updated through macro.

Example: variable called outfit. Initialize to 0. Then have a macro line one: console gs outfit 1
Macro line two: /ma "Bomb Toss" <t>


Then in The gear swap...
Precast if spell = bomb toss
If outfit == 1 then equip goblin costume
Else ....
Offline
By Verda 2016-10-11 15:13:28  
You could do that with self commands, something like this should work, haven't tested the code but will put you on the right track.
Code
function user_setup()
	send_command('bind ^numpad1 gs c change_outfit 1')
	send_command('bind ^numpad2 gs c change_outfit 2')
	send_command('bind ^numpad3 gs c change_outfit 3')

	sets.goblin = {
		head="Goblin head",
		body="Goblin body",
	}
end

function job_post_precast(spell, action, spellMap, eventArgs)
	if spell.english == "Bomb Toss" then
		if outfit_num ==1 then
			send_command('input /lockstyleset 4') --put your goblin out fit into a lockstyle
			-- OR you can do this --
			send_command('gs equip sets.goblin')
		end
	end
end

outfit_num = 0
function job_self_command(cmdParams, eventArgs)
	if cmdParams[1] =="change_outfit" then
		outfit_num = cmdParams[2]
	end
end




And to put it in your macro it'd be:
//console gs c change_outfit 1
 Asura.Crevox
Offline
サーバ: Asura
Game: FFXI
user: Crevox
Posts: 365
By Asura.Crevox 2016-10-11 15:16:31  
Alternatively, you can bind a function to a hotkey that can increment the variable for you.

This was commonly used in Mote's libraries for different gearing states such as "PDT" and "Accuracy" to equip different sets.
 Shiva.Paulu
Offline
サーバ: Shiva
Game: FFXI
user: Paulu
Posts: 776
By Shiva.Paulu 2016-10-11 15:24:16  
Thank you. I think I'll try the command route. So since you're both active in the smn forums I'll share what I'm trying to do. I want to modify a lua to ignore pet midcast and execute gear swaps based on time rather than reading pet status. I have bad gs lag when inside instances, vag, legion(ambu), and even solo in salvage. I believe it's server side because it's not normal lag. I end up executing some BP in delay gear or perp gear, and it's driving me nutty....
[+]
 Asura.Crevox
Offline
サーバ: Asura
Game: FFXI
user: Crevox
Posts: 365
By Asura.Crevox 2016-10-11 15:29:50  
Shiva.Paulu said: »
Thank you. I think I'll try the command route. So since you're both active in the smn forums I'll share what I'm trying to do. I want to modify a lua to ignore pet midcast and execute gear swaps based on time rather than reading pet status. I have bad gs lag when inside instances, vag, legion(ambu), and even solo in salvage. I believe it's server side because it's not normal lag. I end up executing some BP in delay gear or perp gear, and it's driving me nutty....

That's strange. I only have something like that happen if I try to use the Blood Pact more than once, or if I spam way too hard in Astral Conduit. (I still need to develop an Astral Conduit state so I can be sure this never happens)

What you're doing will probably work, but it makes me wonder if your Gearswap or something else is causing the issue.
Offline
By Verda 2016-10-11 15:34:26  
That'd be really useful imo. You could try setting
Code
eventArgs.handled = 1

in job_pet_midcast and job_post_pet_midcast (as safety)

then in you job_aftercast have something like this:
Code
function job_aftercast(spell, action, spellMap, eventArgs)
	if spell.type=="BloodPactRage" then
		eventArgs.handled=true
		send_command('wait 1.3;gs equip sets.BloodPactRage;wait .3;gs equip sets.idle')
	end
	if spell.type=="BloodPactWard" then
		eventArgs.handled=true
		send_command('wait 1.3;gs equip sets.BloodPactWard;wait .3;gs equip sets.idle')
	end
end

Though there'd be many ways to try and achieve that and you'd need thorough testing, good luck :)

Asura.Crevox said: »
What you're doing will probably work, but it makes me wonder if your Gearswap or something else is causing the issue.
My GS I posted in the smn subforum locks out the idle set swaps between the bloodpact precast and the pet midcast because of similar issues and I've heard many other smn have similar issues. Also in ambu sometimes I get the weird lag he is talking about and use the wrong gear at the wrong time.