
Originally Posted by
Masamune
orz.... indeed i want the gear to autochange correctly when mob dies....
Does it appropriately reset to Idle when you use Leave?
For change on mob death, here's a possibility (I'll test it later):
Code:
VARS
<!-- PetBool=0 if Pet is Idle, PetBool=1 if Pet is Engaged: Boolean as it can (hopefully) be read from FFXI -->
<var Name="PetBool">0</var>
<!-- PetTrigger=your choice of unused trigger spell -->
<var Name="PetTrigger">Blizzaga V</var>
RULES
<!-- Make this the FIRST rule in your SpellCast -->
<if advanced='"$PetStatus" = "PetIdle"'>
<var cmd="set PetBool 0" />
</if>
<!-- I'm not sure if this'll work best at the top or bottom of your SpellCast - try each! -->
<if spell=%PetTrigger>
<!-- This reads from the game whether or not your pet's fighting something -->
<if advanced='"$PetStatus"=="PetEngaged" or "$PetBool"==1'>
<var cmd="set PetBool %IsInCombat" />
</if>
<action type="cancelspell" />
<if advanced='"$PetBool"==0'>
<var cmd="set PetStatus PetIdle" />
</if>
<elseif>
<var cmd="set PetStatus PetEngaged" />
</elseif>
</if>
<else>
<!-- This fires off your trigger if any other action was taken -->
<command>%PetTrigger <pet></command>
</else>
I'm not sure if that'll work - casting Blizzaga V on your pet might cause some problems. There might also be issues with not cancelling the Trigger spell immediately, but this may be required to get the correct IsInCombat value returned. Try it first, and if it doesn't work change the Trigger rule to:
Code:
<if spell=%PetTrigger>
<if advanced='"$PetStatus"=="PetEngaged" or "$PetBool"==1'>
<action type=“ChangeTarget” Target=”<pet>” />
<var cmd="set PetBool %IsInCombat" />
</if>
<action type="cancelspell" />
<if advanced='"$PetBool"==0'>
<var cmd="set PetStatus PetIdle" />
</if>
<elseif>
<var cmd="set PetStatus PetEngaged" />
</elseif>
</if>
<else>
<command>%PetTrigger</command>
</else>
The problem with this one is ChangeTarget <pet> mightn't be enough to give you an accurate IsInCombat reading.
Summary: Use the first bit of code (and make sure to include the initial rule at the TOP of your SpellCast), and shout here if it doesn't work.
I'll give this a test when I get home and see if there are other possible tweaks.