NOTE: This is written based on RC7, some changes are coming to RC8 which will change this slightly
With the addition of the new variable functionality you can finally have SpellCast handle autosets differently at different times.
One of the questions that often came up before this functionality was added was to equip different ninja gear at night, so I have decided to provide a skeleton of that functionality in the meantime till some XMLs are written with it.
One thing to note is this example relies on not only SpellCast but also AutoExec.
Basically, we want to use AutoExec to tell SpellCast to redefine out variable whenever it changes to day or night.
Example Events:
<!--Note, these will only set when SpellCast is running-->
<register id="$$$SomeIdHere$$$" event="time_6.00">sc var set NightOrDay Day;</register>
<register id="$$$SomeIdHere$$$" event="time_18.00">sc var set NightOrDay Night;</register>
In the SpellCast portion, we make use of our new custom variable when telling SpellCast the name of our autosets.
Example:
<?xml version="1.0" ?>
<!--Example of an xml which uses variables in normal and engaged sets for night and day-->
<spellcast>
<config
HideErrors="false"
NormalSet="%NightOrDay Set"
EngagedSet="%NightOrDay Set"
Debug="true"
RequiredVersion="2.11"
/>
<sets>
<group default="yes" name="Standard">
<set name="Day Set">
<!--Daytime gear goes here-->
</set>
<set name="Night Set">
<!--Nighttime gear goes here-->
</set>
</group>
</sets>
<variables>
<!--This should really be handled by autoexec. Would need to load SpellCast then-->
<!--autoexec so it could register the variable-->
<!--This is here though so the xml works reguardless of autoexec having set-->
<!-- variables up. It just might not work right ^^-->
<var name="NightOrDay">Night</var>
</variables>
<rules>
<if advanced='"%NightOrDay"=="Night"' >
<!--Note we could have used our old time range to check for nighttime-->
<!--instead of the variable with the advanced rule-->
<action type="addtochat" when="precast">We are in %NightOrDay.</action>
</if>
<else>
<!--Note we could have used our old time range to check for daytime-->
<!--instead of the variable with the advanced rule-->
<action type="addtochat" when="precast">We are in %NightOrDay.</action>
</else>
</rules>
</spellcast>