Spellcast Question

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Spellcast Scripting » Other » Spellcast question
Spellcast question
 Bismarck.Ihina
Offline
サーバ: Bismarck
Game: FFXI
user: Ihina
Posts: 3187
By Bismarck.Ihina 2013-04-23 23:29:36  
I posted this on BG, with no response, so I'm hoping someone here can help me out. I'll just copy/paste my question directly.

This has been bothering me for a bit, so I'm hoping spellcast can help me fix it. Accuracy seems relevant now(Legion aside), so I'm finding myself in situations where I'm not capped on accuracy.

One way to solve this problem is to make multiple sets with varying degrees of accuracy, but the problem I have with that is that I'll have to readjust every set every time I gain any new piece of gear. I'm wondering if there's something else spellcast can do for me.

At the moment, I know that spellcast can identify which piece of gear is currently equipped using [if equipmain="blahblah"]. My question is, is it possible to now use that equipment's name as a variable?

Basically, I want to dynamically change my tp set as I fight without manually adjusting my xml.

Say, I'm fighting Mob_A and my parser tells me I'm at 80% accuracy. I want to be able to open up my menu, switch out a few pieces of gear, then trigger spellcast to use what I currently have equipped as my new tp set. Is there any way for me to do that?


I imagine if it was possible, it would look something like this

Quote:
<if spell="some_absurd_spell_a_melee_would_never_use">
<var cmd="set tphead (current_head)"/>
<var cmd="set tpneck (current_neck)"/>
<var cmd="set tplear (current_lear)"/>
<var cmd="set tprear (current_rear)"/>
....
</if>

Then have your tp set as:
Code
<set name="tp">
	<head>$tphead</head>
	<neck>$tpneck</neck>
	<lear>$tplear</lear>
	<rear>$tprear</rear>
	.....
</set>


Many thanks in advanced.
 Leviathan.Arcon
VIP
Offline
サーバ: Leviathan
Game: FFXI
user: Zaphor
Posts: 657
By Leviathan.Arcon 2013-04-23 23:57:00  
That should work. The correct variables are %EquipHead (which is currently equipped headpiece), %EquipNeck, and so on.

See this for a full reference, particularly the variables section. Scroll down until you get to "Equipment Variables".
 Quetzalcoatl.Hidegger
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Hidegger
Posts: 130
By Quetzalcoatl.Hidegger 2013-04-24 00:57:22  
something like this would be how I would set it up if I were going to use a fake spell to activate the changes

<sets>
<set name="engaged">
<gear/>
</set.
<set name="Acc1"
<gear/>
</set>
<set name="Acc2"
<gear/>
</set>
</sets>
<variables>
<var name="EngagedAcc">1<var>
</variables>
<rules>
<if status="engaged">
<if advanced='"$EngagedAcc" == "1"'>
<action type="equip" when="engaged|aftercast" set="engaged"/>
</if>
<elseif advanced='"$EngagedAcc" == "2"'>
<action type="equip" when="engaged|aftercast" set="Acc1"/>
</elseif>
<elseif advanced='"$EngagedAcc" == "3"'>
<action type="equip" when="engaged|aftercast" set="Acc2"/>
</elseif>
</if>
<if skill="SummoningMagic">
<if spell="Ifrit">
<action type="var" cmd="set EngagedAcc 1" />
</if>
<elseif spell="Shiva">
<action type="var" cmd="set EngagedAcc 2" />
</elseif>
<elseif spell="Titan">
<action type="var" cmd="set EngagedAcc 3" />
</elseif>
</if>
</rules>
*edit*
for better viewing
 Sylph.Hitetsu
Offline
サーバ: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2013-04-24 01:42:42  
Code xml
<?xml version="1.0" ?>
<!-- 
    ===================================================
					BLM spellcast
				  Hitetsu of Sylph
						22-03-2011
    ===================================================
    -->
<spellcast xmlns:xi="http://www.w3.org/2001/XInclude">
    <config
        RequireVersion="2.30"
        debug="false"
        />

		
<variables>
	<var name="Head1">None</var>
	<var name="Head2">None</var>
</variables>
<sets>
	<group name="Main" default="yes">
		<set name="Head1">
			<head>$head1</head>
		</set>
		
		<set name="Head2">
			<head>$head2</head>
		</set>
	</group>
</sets>
<rules>

	<if spell="Trigger0">
		<addtochat color="121">Head: %EquipHead => Putting in Variable!</addtochat>
		<var cmd="set Head1 %EquipHead" />
		<addtochat color="121">Head1=$Head1</addtochat>
	</if>
	<elseif spell="Trigger1">
		<addtochat color="121">Head: %EquipHead => Putting in Variable!</addtochat>
		<var cmd="set Head2 %EquipHead" />
		<addtochat color="121">Head2=$Head2</addtochat>
	</elseif>

</rules>
</spellcast>



Quick test I threw together while I was on BLM.

Seems to be working for me.
 Bismarck.Ihina
Offline
サーバ: Bismarck
Game: FFXI
user: Ihina
Posts: 3187
By Bismarck.Ihina 2013-04-24 09:30:34  
Many thanks, guys. It worked.
Log in to post.