Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <!-- Last modified: 12/27/2013 9:31:32 AM -->
- <!-- IMPORTANT -->
- <!--
- This include, and the xmls based on it, make use of new custom trigger spells
- from the "radsources" resources. Current updated resources should include these
- in the standard client. If things don't appear to be working, check that first.
- -->
- <!-- REQUIRED -->
- <!-- The following include entries must be imported for this include to be properly functional. -->
- <!-- Vars section:
- ConfigurationVars (required)
- UtilityVars (required)
- RecastDurations (if using RecastWarnings)
- ElementalStaves (if using ElementalStaffRules or FastCastCalculations) [also: BlmSchGeo variants of them]
- FastCastVars (if using FastCastCalculations)
- ElementalGear (if using ObiRingCape-*)
- -->
- <!-- Sets section:
- The following groups are used by xmls derived from this include:
- Common - Default group that will be used for all sets that don't have a more specific group.
- BasicJAs - BasicJA group is for gear sets designed to enhance JAs used on self or other players,
- that won't vary by Area.
- BasicMagic - BasicMagic group is for magic casting that won't vary by area, such as cures and
- enhancing magic.
- FastCast - Fast Cast sets customized per spell category.
- $Area (or other designation) subgroups:
- Outside-Melee - Melee is for TP sets (melee or ranged).
- Outside-Actions - Actions is for offensive JA-type actions (weaponskills, jumps, steps, etc).
- Outside-Magic - Magic is for offensive magic (nukes, enfeebling, etc).
- The Outside-* groups can be customized for situational gear (eg: capped haste, during 2hr, in Abyssea, etc.).
- Use another prefix for them to do so (eg: HighHaste-Melee).
- -->
- <!-- Rules section:
- UniversalTriggerRules - The fundamental include that this Include file is based around.
- -->
- <!-- Notes:
- <addtochat color="12"></addtochat> - This color triggers the /tell chime.
- -->
- <includes xmlns="http://www.windower.net/spellcast/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.windower.net/spellcast/ spellcastIncludeRules.xsd">
- <!-- ******************* Rules ******************* -->
- <!-- Make sure things like basic area and status are set as soon as possible. -->
- <include name="RunFirstUpdate">
- <if advanced='"$FirstUpdate"="No"'>
- <var cmd="set FirstUpdate Yes" />
- <addtochat>Ran first update.</addtochat>
- <if commandprefix="/trigger">
- <command>$UpdateCommand;wait 0.5;input /ma %spell %spellTargetRaw</command>
- </if>
- <else>
- <command>$UpdateCommand;wait 0.5;input %commandprefix %spell %spellTargetRaw</command>
- </else>
- <!-- Class binds -->
- <!-- On first run, will execute these to bind - and = keys to custom commands. -->
- <!-- Set the values per job xml, use defaults, or set to "None" to not use them. -->
- <!-- Ctrl-= -->
- <if advanced='"$ClassBindCtrlEqual"="None"'>
- <command>unbind ^=</command>
- </if>
- <elseif advanced='"$ClassBindCtrlEqual"!="Ignore"'>
- <command>bind ^= $ClassBindCtrlEqual</command>
- </elseif>
- <!-- Alt-= -->
- <if advanced='"$ClassBindAltEqual"="None"'>
- <command>unbind !=</command>
- </if>
- <elseif advanced='"$ClassBindAltEqual"!="Ignore"'>
- <command>bind != $ClassBindAltEqual</command>
- </elseif>
- <!-- Ctrl+- -->
- <if advanced='"$ClassBindCtrlDash"="None"'>
- <command>unbind ^-</command>
- </if>
- <elseif advanced='"$ClassBindCtrlDash"!="Ignore"'>
- <command>bind ^- $ClassBindCtrlDash</command>
- </elseif>
- <!-- Alt+- -->
- <if advanced='"$ClassBindAltDash"="None"'>
- <command>unbind !-</command>
- </if>
- <elseif advanced='"$ClassBindAltDash"!="Ignore"'>
- <command>bind !- $ClassBindAltDash</command>
- </elseif>
- <!-- Ctrl+` -->
- <if advanced='"$ClassBindCtrlTilde"="None"'>
- <command>unbind ^`</command>
- </if>
- <elseif advanced='"$ClassBindCtrlTilde"!="Ignore"'>
- <command>bind ^` $ClassBindCtrlTilde</command>
- </elseif>
- <!-- Alt+` -->
- <if advanced='"$ClassBindAltTilde"="None"'>
- <command>unbind !`</command>
- </if>
- <elseif advanced='"$ClassBindAltTilde"!="Ignore"'>
- <command>bind !` $ClassBindAltTilde</command>
- </elseif>
- <cancelspell />
- <return />
- </if>
- </include>
- <!-- Do not use rules if level 50 or lower. -->
- <include name="LevelRequirement">
- <if notmainjoblvlgt="50">
- <return />
- </if>
- </include>
- <!-- These stop any gear changes if you're unable to take particular actions. -->
- <include name="ReturnRules">
- <!-- The bug that required this should be fixed -->
- <if spelltargetraw="<st*">
- <return />
- </if>
- <!-- Allow manipulation of equipment sets while under adverse effects.
- Do not perform restriction checks on any trigger actions. -->
- <if nottype="Trigger">
- <if status="dead">
- <!-- Can't do anything if you're dead -->
- <addtochat>DEAD!</addtochat>
- <return />
- </if>
- <!-- Clean transportation. -->
- <!-- Do not change gear if spell is a transport spell used on self (Warp II/Retrace on others is fine). -->
- <elseif spell="Warp|Warp II|Retrace|Teleport*|Recall*" SpellTargetType="Self">
- <return />
- </elseif>
- <elseif status="Event">
- <!-- Don't attempt gear swaps during events (talk with NPC, etc) -->
- <return />
- </elseif>
- <elseif BuffActive="Sleep|Petrification|Stun|Terror|Charm">
- <!-- Ignoring Illusion|Egg|Costume -->
- <addtochat color="28">Cannot act.</addtochat>
- <return />
- </elseif>
- <elseif BuffActive="Silence|Mute|Omerta">
- <if type="*Magic|BardSong|Ninjutsu">
- <addtochat color="28">Silenced.</addtochat>
- <return />
- </if>
- </elseif>
- <elseif BuffActive="Amnesia|Impairment">
- <if type="Weaponskill|JobAbility|Scholar|PetCommand|BloodPact*|CorsairRoll|CorsairShot">
- <addtochat color="28">Amnesiad.</addtochat>
- <return />
- </if>
- </elseif>
- <elseif type="PetCommand|BloodPact*" PetIsValid="false">
- <addtochat color="28">No valid pet.</addtochat>
- <return />
- </elseif>
- <elseif spell="Ranged">
- <if advanced='%spellTargetDistance > 24.9'>
- <addtochat color="28">Out of range.</addtochat>
- <return />
- </if>
- </elseif>
- <elseif type="Weaponskill">
- <!-- <if SpellTargetDistanceGT="12.0">
- <cancelspell />
- <addtochat color="28">Too far away, foo'!</addtochat>
- <return />
- </if> -->
- <!-- <if mode="OR" TPLT="80" advanced='%SpellTargetDistance > $WSDistance'>
- <cancelspell />
- <addtochat color="28">%spell cancelled: TP or distance.</addtochat>
- <return />
- </if> -->
- </elseif>
- </if>
- </include>
- <!-- area variable rule -->
- <include name="AreaRules">
- <!-- Determine general area, as some give access to special gear, or differences in approach to gearing. -->
- <if BuffActive="Voidwatcher">
- <var cmd="set Area Voidwatch" />
- <var cmd="set IdleArea Field" />
- </if>
- <elseif BuffActive="Allied Tags">
- <var cmd="set Area Campaign" />
- <var cmd="set IdleArea Field" />
- </elseif>
- <elseif BuffActive="Visitant">
- <var cmd="set Area Abyssea" />
- <var cmd="set IdleArea Field" />
- </elseif>
- <elseif BuffActive="Reive Mark">
- <var cmd="set Area Reive" />
- <var cmd="set IdleArea Field" />
- </elseif>
- <elseif advanced='"%area"!="$LastKnownArea"'>
- <if area="*Remnants">
- <var cmd="set Area Salvage" />
- </if>
- <elseif area="Nyzul Isle|Ilrusi Atoll|Leujaoam Sanctum|Mamool Ja Training Grounds|Lebros Cavern|Periqia">
- <var cmd="set Area Assault" />
- </elseif>
- <elseif area="Cirdas*|Ceizak*|Yahse*|Foret*|Morimar*|Marjami Ravine|Yorcia*|Kamihr*|Sih Gates|Moh Gates|Dho Gates|Woh Gates">
- <var cmd="set Area Adoulin" />
- </elseif>
- <elseif area="*Legion">
- <var cmd="set Area Legion" />
- </elseif>
- <else>
- <var cmd="set Area Outside" />
- </else>
- <!-- Define idle set based on town or elsewhere -->
- <if area="Ru'Lude Gardens|Nashmau|Tavnazian Safehold|Port*|Bastok*|Windurst*|*San d'Oria|*Jeuno|*Whitegate|*Adoulin|Selbina|Mhaura|Norg" notarea="Dynamis*|*[S]">
- <var cmd="set IdleArea Town" />
- </if>
- <else>
- <var cmd="set IdleArea Field" />
- </else>
- <var cmd="set LastKnownArea %area" />
- </elseif>
- <!-- Default group will always be "Common". This just sets a var that can be used to
- specify individual equip groups. -->
- <if advanced='Regex("$Options.AreaGroups", "$Area")'>
- <var cmd="set GroupArea $Area" />
- </if>
- <else>
- <var cmd="set GroupArea Outside" />
- </else>
- </include>
- <!-- spell Cancel Rules -->
- <include name="SpellCancel">
- <if spell="Sneak" BuffActive="Sneak" SpellTargetType="Self">
- <midcastdelay delay="1" />
- <command when="midcast">cancel 71</command>
- </if>
- <elseif spell="Spectral Jig" BuffActive="Sneak">
- <command when="precast">cancel 71</command>
- </elseif>
- <elseif spell="Monomi*" BuffActive="Sneak">
- <midcastdelay delay="2.5" />
- <command when="midcast">cancel 71</command>
- </elseif>
- <elseif spell="Utsusemi: Ichi" buffactive="Copy Image*" NotBuffActive="Silence|Mute|Omerta|Obliviscence">
- <if NotBuffActive="Copy Image (3)|Copy Image (4)">
- <midcastdelay delay="2.5" />
- <command when="midcast">cancel 66</command>
- <command when="midcast">cancel 446</command>
- </if>
- <else>
- <cancelspell />
- <return />
- </else>
- </elseif>
- <elseif spell="Stoneskin" BuffActive="Stoneskin">
- <midcastdelay delay="2.8" />
- <command when="midcast">cancel 37</command>
- </elseif>
- </include>
- <!-- Lock various slots when using particular gear. -->
- <include name="EquipmentLockRules">
- <if equipmain="$TrialWeapon">
- <changelock slot="main|sub|range" when="All" lock="true" />
- </if>
- <if equiprange="$PullWeapons|Soulgauger*">
- <changelock slot="range|ammo" when="All" lock="true" />
- </if>
- <if equipfeet="Powder Boots|Sprint Shoes">
- <changelock slot="feet" when="All" lock="true" />
- </if>
- <if equiphead="Reraise Hairpin">
- <changelock slot="head" when="All" lock="true" />
- </if>
- <if equipneck="Reraise Gorget|Sanctus Rosary|Lavalier|Lavalier +1">
- <changelock slot="neck" when="All" lock="true" />
- </if>
- <if equiplear="Reraise Earring">
- <changelock slot="lear" when="All" lock="true" />
- </if>
- <if equiprear="Reraise Earring">
- <changelock slot="rear" when="All" lock="true" />
- </if>
- <if equiplring="Emperor Band|Novennial Ring">
- <changelock slot="lring" when="All" lock="true" />
- </if>
- <if equiprring="Emperor Band|Novennial Ring">
- <changelock slot="rring" when="All" lock="true" />
- </if>
- <!-- Only test for teleport stuff in town to avoid tons of unneeded checks. -->
- <if advanced='"$IdleArea"="Town"'>
- <if equiphead="Maat's Cap|Star Cap|Moogle Cap|Nomad Cap|Laurel Crown">
- <changelock slot="head" when="All" lock="true" />
- </if>
- <if equipneck="Federation Stable Scarf|Kingdom Stable Collar|Republic Stable Medal">
- <changelock slot="neck" when="All" lock="true" />
- </if>
- <if equiplear="Duchy Earring|Empire Earring|Federation Earring|Republic Earring|Kingdom Earring|Nashmau Earring|Mhaura Earring|Selbina Earring|Norg Earring|Rabao Earring|Reraise Earring|Raising Earring|Kocco's Earring|Mamool Ja Earring">
- <changelock slot="lear" when="All" lock="true" />
- </if>
- <if equiprear="Duchy Earring|Empire Earring|Federation Earring|Republic Earring|Kingdom Earring|Nashmau Earring|Mhaura Earring|Selbina Earring|Norg Earring|Rabao Earring|Reraise Earring|Raising Earring|Kocco's Earring|Mamool Ja Earring">
- <changelock slot="rear" when="All" lock="true" />
- </if>
- <if equiplring="Tavnazian Ring|Olduum Ring|Mea Ring|Dem Ring|Holla Ring|Vahzl Ring|Yhoat Ring">
- <changelock slot="lring" when="All" lock="true" />
- </if>
- <if equiprring="Tavnazian Ring|Olduum Ring|Mea Ring|Dem Ring|Holla Ring|Vahzl Ring|Yhoat Ring">
- <changelock slot="rring" when="All" lock="true" />
- </if>
- <if equipbody="Tidal Talisman">
- <changelock slot="body" when="All" lock="true" />
- </if>
- </if>
- </include>
- <!-- Handle universal toggle and cycle triggers -->
- <!-- This is a REQUIRED include. -->
- <include name="UniversalTriggerRules">
- <if type="Trigger">
- <if skill="ControlTrigger">
- <cancelspell />
- <!-- Handle various types of resets. -->
- <if spell="Reset">
- <if SpellTargetRaw=".Defense">
- <var cmd="set MagicalDefense None" />
- <var cmd="set PhysicalDefense None" />
- <if status="Engaged">
- <var cmd="set Movement None" />
- </if>
- <addtochat>PDT/MDT reset.</addtochat>
- </if>
- <elseif SpellTargetRaw="SteppedDefense">
- <if advanced='"$MagicalDefense" != "None"'>
- <var cmd="set MagicalDefense None" />
- <addtochat>Magical Defense reset.</addtochat>
- </if>
- <elseif advanced='"$PhysicalDefense" != "None"'>
- <var cmd="set PhysicalDefense None" />
- <addtochat>Physical Defense reset.</addtochat>
- </elseif>
- </elseif>
- <elseif SpellTargetRaw="All|Full">
- <var cmd="set Movement None" />
- <var cmd="set MagicalDefense None" />
- <var cmd="set PhysicalDefense None" />
- <var cmd="set FightingMode Offense" />
- <var cmd="set AttackMode Normal" />
- <var cmd="set FightingFocus Normal" />
- <var cmd="set WSMode Default" />
- <var cmd="set CastingMode Normal" />
- <addtochat>All modes reset.</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Physical*">
- <var cmd="set PhysicalDefense None" />
- <addtochat>Physical Defense reset.</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Casting*">
- <var cmd="set CastingMode Normal" />
- <addtochat>Casting Mode reset.</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Magical*">
- <var cmd="set MagicalDefense None" />
- <addtochat>Magical Defense reset.</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Debug">
- <var cmd="set Debug 0" />
- <addtochat>Debug off.</addtochat>
- </elseif>
- </if>
- <elseif spell="Update">
- <if SpellTargetRaw="WSDistance">
- <if TargetType="Monster">
- <var cmd="set WSDistance %TargetDistance" />
- <addtochat>Distance Variable: $WSDistance</addtochat>
- </if>
- <else>
- <addtochat>Invalid target for weaponskill distance.</addtochat>
- </else>
- </if>
- <elseif SpellTargetRaw="Debug">
- <var cmd="set Debug 1" />
- <addtochat>Debug active.</addtochat>
- </elseif>
- </elseif>
- </if>
- <elseif skill="ElementalTrigger">
- <!-- MDT elemental triggers. Other elemental triggers handled per job. -->
- <if SpellTargetRaw="MDT|Resist">
- <cancelspell />
- <var cmd="set MagicalDefElement %SpellElement" />
- <if advanced='"$MagicalDefense" != "None"'>
- <var cmd="set MagicalDefense $MagicalDefMode-$MagicalDefElement" />
- </if>
- <addtochat>Magical Defense Element: $MagicalDefElement ($MagicalDefMode)</addtochat>
- </if>
- </elseif>
- <elseif skill="CombatTrigger">
- <cancelspell />
- <!-- Customize these in the job xmls:
- IdleMode/CycleIdleMode
- RestingMode/CycleRestingMode
- -->
- <!-- Physical and magical defense modes -->
- <if spell="PhysicalDefense">
- <!-- Handle changes in physical defense -->
- <if SpellTargetRaw=".Off">
- <var cmd="set PhysicalDefense None" />
- <addtochat>Physical Defense: $PhysicalDefense</addtochat>
- </if>
- <elseif SpellTargetRaw=".On">
- <var cmd="set PhysicalDefense PhysDef-$PhysicalDefMode" />
- <if advanced='"$SwapPDTMDT"="Yes"'>
- <var cmd="set MagicalDefense None" />
- </if>
- <addtochat>Physical Defense: $PhysicalDefense</addtochat>
- </elseif>
- <elseif SpellTargetRaw=".Toggle">
- <if advanced='"$PhysicalDefense" = "None"'>
- <var cmd="set PhysicalDefense PhysDef-$PhysicalDefMode" />
- <if advanced='"$SwapPDTMDT"="Yes"'>
- <var cmd="set MagicalDefense None" />
- </if>
- </if>
- <else>
- <var cmd="set PhysicalDefense None" />
- </else>
- <addtochat>Physical Defense: $PhysicalDefense</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Mode:*|PDT|Evasion|Shield|Defense|Reraise|HP|Custom">
- <if SpellTargetRaw="PDT|*:PDT" advanced='Regex("$Options.DefenseModes", "PDT")'>
- <var cmd="set PhysicalDefMode PDT" />
- </if>
- <elseif SpellTargetRaw="Evasion|*:Evasion" advanced='Regex("$Options.DefenseModes", "Evasion")'>
- <var cmd="set PhysicalDefMode Evasion" />
- </elseif>
- <elseif SpellTargetRaw="Shield|*:Shield" advanced='Regex("$Options.DefenseModes", "Shield")'>
- <var cmd="set PhysicalDefMode Shield" />
- </elseif>
- <elseif SpellTargetRaw="Reraise|*:Reraise" advanced='Regex("$Options.DefenseModes", "Reraise")'>
- <var cmd="set PhysicalDefMode Reraise" />
- </elseif>
- <elseif SpellTargetRaw="HP|*:HP" advanced='Regex("$Options.DefenseModes", "HP")'>
- <var cmd="set PhysicalDefMode HP" />
- </elseif>
- <elseif SpellTargetRaw="Defense|*:Defense" advanced='Regex("$Options.DefenseModes", "Defense")'>
- <var cmd="set PhysicalDefMode Defense" />
- </elseif>
- <elseif SpellTargetRaw="Custom|*:Custom" advanced='Regex("$Options.DefenseModes", "Custom")'>
- <var cmd="set PhysicalDefMode Shield" />
- </elseif>
- <else>
- <addtochat>Unknown or invalid mode: [%spellTargetRaw]</addtochat>
- <return />
- </else>
- <if advanced='"$PhysicalDefense" != "None"'>
- <var cmd="set PhysicalDefense PhysDef-$PhysicalDefMode" />
- </if>
- <addtochat>Physical Defense Mode: $PhysicalDefMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw=".Cycle">
- <!-- Order: PDT > Evasion > Defense > Shield > Custom [Counter isn't used] -->
- <if advanced='Regex("PDT", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "Evasion")'>
- <var cmd="set PhysicalDefMode Evasion" />
- </if>
- <elseif advanced='Regex("PDT|Evasion", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "Defense")'>
- <var cmd="set PhysicalDefMode Defense" />
- </elseif>
- <elseif advanced='Regex("PDT|Evasion|Defense", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "Shield")'>
- <var cmd="set PhysicalDefMode Shield" />
- </elseif>
- <elseif advanced='Regex("PDT|Evasion|Defense|Shield", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "Reraise")'>
- <var cmd="set PhysicalDefMode Reraise" />
- </elseif>
- <elseif advanced='Regex("PDT|Evasion|Defense|Shield|Reraise", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "HP")'>
- <var cmd="set PhysicalDefMode HP" />
- </elseif>
- <elseif advanced='Regex("PDT|Evasion|Defense|Shield|Reraise|HP", "$PhysicalDefMode") AND Regex("$Options.DefenseModes", "Custom")'>
- <var cmd="set PhysicalDefMode Custom" />
- </elseif>
- <else>
- <var cmd="set PhysicalDefMode PDT" />
- </else>
- <if advanced='"$PhysicalDefense" != "None"'>
- <var cmd="set PhysicalDefense PhysDef-$PhysicalDefMode" />
- </if>
- <addtochat>Physical Defense Type: $PhysicalDefMode</addtochat>
- </elseif>
- <else>
- <!-- Default: Turn on -->
- <var cmd="set PhysicalDefense PhysDef-$PhysicalDefMode" />
- <addtochat>Physical Defense: $PhysicalDefense</addtochat>
- </else>
- </if>
- <elseif spell="MagicalDefense">
- <!-- Turn Magical Defense on and off -->
- <if SpellTargetRaw=".On">
- <var cmd="set MagicalDefense $MagicalDefMode-$MagicalDefElement" />
- <if advanced='"$SwapPDTMDT"="Yes"'>
- <var cmd="set PhysicalDefense None" />
- </if>
- <addtochat>Magical Defense: $MagicalDefense</addtochat>
- </if>
- <elseif SpellTargetRaw=".Off">
- <var cmd="set MagicalDefense None" />
- <addtochat>Magical Defense: $MagicalDefense</addtochat>
- </elseif>
- <elseif SpellTargetRaw=".Toggle">
- <if advanced='"$MagicalDefense" = "None"'>
- <var cmd="set MagicalDefense $MagicalDefMode-$MagicalDefElement" />
- <if advanced='"$SwapPDTMDT"="Yes"'>
- <var cmd="set PhysicalDefense None" />
- </if>
- </if>
- <else>
- <var cmd="set MagicalDefense None" />
- </else>
- <addtochat>Magical Defense: $MagicalDefense</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Mode:*|MDT|Resist">
- <if SpellTargetRaw="MDT|*:MDT">
- <var cmd="set MagicalDefMode MDT" />
- </if>
- <elseif SpellTargetRaw="Resist|*:Resist">
- <var cmd="set MagicalDefMode Resist" />
- </elseif>
- <addtochat>Magical Defense Mode: $MagicalDefMode ($MagicalDefElement)</addtochat>
- </elseif>
- <elseif SpellTargetRaw=".Cycle|.Reverse">
- <if advanced='"$MagicalDefMode" = "MDT"'>
- <var cmd="set MagicalDefMode Resist" />
- </if>
- <else>
- <var cmd="set MagicalDefMode MDT" />
- </else>
- <addtochat>Magical Defense Mode: $MagicalDefMode ($MagicalDefElement)</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Element:*">
- <if SpellTargetRaw="*:Fire">
- <var cmd="set MagicalDefElement Fire" />
- </if>
- <elseif SpellTargetRaw="*:Earth|*:Stone">
- <var cmd="set MagicalDefElement Earth" />
- </elseif>
- <elseif SpellTargetRaw="*:Water">
- <var cmd="set MagicalDefElement Water" />
- </elseif>
- <elseif SpellTargetRaw="*:Air|*:Aero|*:Wind">
- <var cmd="set MagicalDefElement Wind" />
- </elseif>
- <elseif SpellTargetRaw="*:Ice">
- <var cmd="set MagicalDefElement Ice" />
- </elseif>
- <elseif SpellTargetRaw="*:Lightning|*:Thunder">
- <var cmd="set MagicalDefElement Thunder" />
- </elseif>
- <elseif SpellTargetRaw="*:Light">
- <var cmd="set MagicalDefElement Light" />
- </elseif>
- <elseif SpellTargetRaw="*:Dark">
- <var cmd="set MagicalDefElement Dark" />
- </elseif>
- <elseif SpellTargetRaw="*:Any|*:None">
- <var cmd="set MagicalDefElement Any" />
- </elseif>
- <elseif SpellTargetRaw="*:All">
- <var cmd="set MagicalDefElement All" />
- </elseif>
- <else>
- <addtochat>Unknown Magical Defense element: [%spellTargetRaw]</addtochat>
- <return />
- </else>
- <addtochat>Magical Defense Element: $MagicalDefElement</addtochat>
- </elseif>
- <else>
- <!-- Default: Turn on -->
- <var cmd="set MagicalDefense $MagicalDefMode-$MagicalDefElement" />
- <addtochat>Magical Defense: $MagicalDefense</addtochat>
- </else>
- </elseif>
- <!-- Offensive and Defensive modes -->
- <!-- spellTargetRaw will be analyzed to determine which aspect of combat is being set,
- and how.
- Modes:
- Offense (general fighting mode)
- Defense (general fighting mode)
- WS (focus for weaponskills separate from standard focus)
- -->
- <elseif spell="CombatMode">
- <if SpellTargetRaw="Kite|Kite:*">
- <if SpellTargetRaw="*:Off">
- <var cmd="set KiteMode None" />
- </if>
- <elseif SpellTargetRaw="*:Toggle">
- <if advanced='"$KiteMode"="Kite"'>
- <var cmd="set KiteMode None" />
- </if>
- <else>
- <var cmd="set KiteMode Kite" />
- </else>
- </elseif>
- <else>
- <var cmd="set KiteMode Kite" />
- </else>
- <addtochat>Kiting: $KiteMode</addtochat>
- </if>
- <elseif SpellTargetRaw="Offense:*">
- <!-- Var to convert SpellTargetRaw to a valid value -->
- <var cmd="set TempMode None" />
- <if SpellTargetRaw="Offense:Normal">
- <var cmd="set TempMode Normal" />
- </if>
- <elseif SpellTargetRaw="Offense:Att|Offense:Attack">
- <var cmd="set TempMode Att" />
- </elseif>
- <elseif SpellTargetRaw="Offense:Acc|Offense:Accuracy">
- <var cmd="set TempMode Acc" />
- </elseif>
- <elseif SpellTargetRaw="Offense:MaxAcc|Offense:MaxAccuracy">
- <var cmd="set TempMode MaxAcc" />
- </elseif>
- <elseif SpellTargetRaw="Offense:Str">
- <var cmd="set TempMode Str" />
- </elseif>
- <elseif SpellTargetRaw="Offense:Crit">
- <var cmd="set TempMode Crit" />
- </elseif>
- <elseif SpellTargetRaw="Offense:LowDmg">
- <var cmd="set TempMode LowDmg" />
- </elseif>
- <else>
- <var cmd="set TempMode Normal" />
- </else>
- <if advanced='Regex("$Options.OffenseModes", "$TempMode")'>
- <var cmd="set OffenseMode $TempMode" />
- </if>
- <else>
- <addtochat>$TempMode is unavailable.</addtochat>
- </else>
- <addtochat>Offense Mode: $OffenseMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Defense:*">
- <!-- Var to convert SpellTargetRaw to a valid value -->
- <var cmd="set TempMode None" />
- <if SpellTargetRaw="Defense:Eva|Defense:Evasion">
- <var cmd="set TempMode Evasion" />
- </if>
- <elseif SpellTargetRaw="Defense:Shield">
- <var cmd="set TempMode Shield" />
- </elseif>
- <elseif SpellTargetRaw="Defense:Counter">
- <var cmd="set TempMode Counter" />
- </elseif>
- <elseif SpellTargetRaw="Defense:PDT">
- <var cmd="set TempMode PDT" />
- </elseif>
- <elseif SpellTargetRaw="Defense:Defense">
- <var cmd="set TempMode Defense" />
- </elseif>
- <elseif SpellTargetRaw="Defense:Reraise">
- <var cmd="set TempMode Reraise" />
- </elseif>
- <elseif SpellTargetRaw="Defense:HP">
- <var cmd="set TempMode HP" />
- </elseif>
- <elseif SpellTargetRaw="Defense:Custom">
- <var cmd="set TempMode Custom" />
- </elseif>
- <else>
- <var cmd="set TempMode Normal" />
- </else>
- <if advanced='Regex("$Options.DefenseModes", "$TempMode")'>
- <var cmd="set DefenseMode $TempMode" />
- </if>
- <else>
- <addtochat>$TempMode is unavailable.</addtochat>
- </else>
- <addtochat>Defense Mode: $DefenseMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="WS:*|Weaponskill:*">
- <!-- Var to convert SpellTargetRaw to a valid value -->
- <var cmd="set TempMode None" />
- <if SpellTargetRaw="*:Acc|*:Accuracy">
- <var cmd="set TempMode Accuracy" />
- </if>
- <elseif SpellTargetRaw="*:Att|*:Attack">
- <var cmd="set TempMode Attack" />
- </elseif>
- <elseif SpellTargetRaw="*:Mod">
- <var cmd="set TempMode Mod" />
- </elseif>
- <elseif SpellTargetRaw="*:Crit">
- <var cmd="set TempMode Crit" />
- </elseif>
- <else>
- <var cmd="set TempMode Default" />
- </else>
- <if advanced='Regex("$Options.WSModes", "$TempMode")'>
- <var cmd="set WSMode $TempMode" />
- </if>
- <else>
- <addtochat>$TempMode is unavailable.</addtochat>
- </else>
- <addtochat>Weaponskill Focus: $WSMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Cycle(*)">
- <if SpellTargetRaw="*(Offense)">
- <!-- Order: Normal > Acc > MaxAcc > Att > Crit > Str > LowDmg > Custom -->
- <if advanced='Regex("Normal", "$OffenseMode") AND Regex("$Options.OffenseModes", "Acc")'>
- <var cmd="set OffenseMode Acc" />
- </if>
- <elseif advanced='Regex("Normal|Acc", "$OffenseMode") AND Regex("$Options.OffenseModes", "MaxAcc")'>
- <var cmd="set OffenseMode MaxAcc" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|MaxAcc", "$OffenseMode") AND Regex("$Options.OffenseModes", "Att")'>
- <var cmd="set OffenseMode Att" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|MaxAcc|Att", "$OffenseMode") AND Regex("$Options.OffenseModes", "Crit")'>
- <var cmd="set OffenseMode Crit" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|MaxAcc|Att|Crit", "$OffenseMode") AND Regex("$Options.OffenseModes", "Str")'>
- <var cmd="set OffenseMode Str" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|MaxAcc|Att|Crit|Str", "$OffenseMode") AND Regex("$Options.OffenseModes", "LowDmg")'>
- <var cmd="set OffenseMode LowDmg" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|MaxAcc|Att|Crit|Str|LowDmg", "$OffenseMode") AND Regex("$Options.OffenseModes", "Custom")'>
- <var cmd="set OffenseMode Custom" />
- </elseif>
- <else>
- <var cmd="set OffenseMode Normal" />
- </else>
- <addtochat>Offense Mode: $OffenseMode</addtochat>
- </if>
- <elseif SpellTargetRaw="*(Defense)">
- <!-- Order: Normal > Evasion > PDT > Shield > Counter > Custom -->
- <if advanced='Regex("Normal", "$DefenseMode") AND Regex("$Options.DefenseModes", "Evasion")'>
- <var cmd="set DefenseMode Evasion" />
- </if>
- <elseif advanced='Regex("Normal|Evasion", "$DefenseMode") AND Regex("$Options.DefenseModes", "PDT")'>
- <var cmd="set DefenseMode PDT" />
- </elseif>
- <elseif advanced='Regex("Normal|Evasion|PDT", "$DefenseMode") AND Regex("$Options.DefenseModes", "Shield")'>
- <var cmd="set DefenseMode Shield" />
- </elseif>
- <elseif advanced='Regex("Normal|Evasion|PDT|Shield", "$DefenseMode") AND Regex("$Options.DefenseModes", "Reraise")'>
- <var cmd="set DefenseMode Reraise" />
- </elseif>
- <elseif advanced='Regex("Normal|Evasion|PDT|Shield|Reraise", "$DefenseMode") AND Regex("$Options.DefenseModes", "HP")'>
- <var cmd="set DefenseMode HP" />
- </elseif>
- <elseif advanced='Regex("Normal|Evasion|PDT|Shield|Reraise|HP", "$DefenseMode") AND Regex("$Options.DefenseModes", "Counter")'>
- <var cmd="set DefenseMode Counter" />
- </elseif>
- <elseif advanced='Regex("Normal|Evasion|PDT|Defense|Shield|Reraise|HP|Counter", "$DefenseMode") AND Regex("$Options.DefenseModes", "Custom")'>
- <var cmd="set DefenseMode Custom" />
- </elseif>
- <else>
- <var cmd="set DefenseMode Normal" />
- </else>
- <addtochat>Defense Mode: $DefenseMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="*(WS)|*(Weaponskill)">
- <!-- Order: Default > Acc > Att > Mod > Crit -->
- <if advanced='Regex("Default", "$WSMode") AND Regex("$Options.WSModes", "Acc")'>
- <var cmd="set WSMode Acc" />
- </if>
- <elseif advanced='Regex("Normal|Acc", "$WSMode") AND Regex("$Options.WSModes", "Att")'>
- <var cmd="set WSMode Att" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|Att", "$WSMode") AND Regex("$Options.WSModes", "Mod")'>
- <var cmd="set WSMode Mod" />
- </elseif>
- <elseif advanced='Regex("Normal|Acc|Att|Mod", "$WSMode") AND Regex("$Options.WSModes", "Crit")'>
- <var cmd="set WSMode Crit" />
- </elseif>
- <else>
- <var cmd="set WSMode Default" />
- </else>
- <addtochat>Weaponskill Focus: $WSMode</addtochat>
- </elseif>
- </elseif>
- <elseif SpellTargetRaw="Toggle(Kite)">
- <if advanced='"$KiteMode"="Kite"'>
- <var cmd="set KiteMode None" />
- </if>
- <else>
- <var cmd="set KiteMode Kite" />
- </else>
- <addtochat>Kite Mode: $KiteMode</addtochat>
- </elseif>
- </elseif>
- <!-- Casting modes (abstract concepts, not explicit sets) -->
- <elseif spell="CastingMode">
- <if SpellTargetRaw="Cycle(STAL)">
- <if advanced='"$STALMode"="stal"'>
- <var cmd="set STALMode stpt" />
- </if>
- <elseif advanced='"$STALMode"="stpt"'>
- <var cmd="set STALMode stpc" />
- </elseif>
- <else>
- <var cmd="set STALMode stal" />
- </else>
- <addtochat>Targetting Mode: $STALMode</addtochat>
- </if>
- <elseif SpellTargetRaw="SetTarget(STAL)">
- <var cmd="set STALMode stal" />
- <addtochat>Targetting Mode: $STALMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="SetTarget(STPT)">
- <var cmd="set STALMode stpt" />
- <addtochat>Targetting Mode: $STALMode</addtochat>
- </elseif>
- <elseif SpellTargetRaw="SetTarget(STPC)">
- <var cmd="set STALMode stpc" />
- <addtochat>Targetting Mode: $STALMode</addtochat>
- </elseif>
- <else>
- <if SpellTargetRaw="NM|Resistant">
- <var cmd="set TempMode Resistant" />
- </if>
- <elseif SpellTargetRaw="AOEBurn">
- <var cmd="set TempMode AOEBurn" />
- </elseif>
- <elseif SpellTargetRaw="Dire">
- <var cmd="set TempMode Dire" />
- </elseif>
- <elseif SpellTargetRaw="Speed">
- <var cmd="set TempMode Speed" />
- </elseif>
- <elseif SpellTargetRaw="Enmity">
- <var cmd="set TempMode Enmity" />
- </elseif>
- <elseif SpellTargetRaw="Proc">
- <var cmd="set TempMode Proc" />
- </elseif>
- <elseif SpellTargetRaw="Normal|Reset">
- <var cmd="set TempMode Normal" />
- </elseif>
- <if advanced='Regex("$Options.CastingModes", "$TempMode")'>
- <var cmd="set CastingMode $TempMode" />
- </if>
- <else>
- <addtochat>$TempMode is unavailable.</addtochat>
- </else>
- <addtochat>Casting Mode: $CastingMode</addtochat>
- </else>
- </elseif>
- <elseif spell="CycleCastingMode">
- <!-- Order: Normal > Resistant > AOEBurn > Speed > Enmity > Dire -->
- <if advanced='Regex("Normal", "$CastingMode") AND Regex("$Options.CastingModes", "Resistant")'>
- <var cmd="set CastingMode Resistant" />
- </if>
- <elseif advanced='Regex("Normal|Resistant", "$CastingMode") AND Regex("$Options.CastingModes", "AOEBurn")'>
- <var cmd="set CastingMode AOEBurn" />
- </elseif>
- <elseif advanced='Regex("Normal|Resistant|AOEBurn", "$CastingMode") AND Regex("$Options.CastingModes", "Speed")'>
- <var cmd="set CastingMode Speed" />
- </elseif>
- <elseif advanced='Regex("Normal|Resistant|AOEBurn|Speed", "$CastingMode") AND Regex("$Options.CastingModes", "Enmity")'>
- <var cmd="set CastingMode Enmity" />
- </elseif>
- <elseif advanced='Regex("Normal|Resistant|AOEBurn|Speed|Enmity", "$CastingMode") AND Regex("$Options.CastingModes", "Dire")'>
- <var cmd="set CastingMode Dire" />
- </elseif>
- <elseif advanced='Regex("Normal|Resistant|AOEBurn|Speed|Enmity|Dire", "$CastingMode") AND Regex("$Options.CastingModes", "Proc")'>
- <var cmd="set CastingMode Proc" />
- </elseif>
- <else>
- <var cmd="set CastingMode Normal" />
- </else>
- <addtochat>Casting Mode: $CastingMode</addtochat>
- </elseif>
- </elseif>
- <elseif skill="GenericTrigger">
- <if SpellTargetRaw="Test">
- </if>
- <elseif SpellTargetRaw="Check">
- <cancelspell />
- <addtochat>Current base TP set: TP-$TPWeapon-$OffenseMode-$DefenseMode</addtochat>
- </elseif>
- </elseif>
- <elseif skill="Trigger">
- <if Spell="Trigger1">
- <!--
- /ma Trigger1 Cycle(Step)
- /ma Trigger1 Cycle(AltStep)
- /ma Trigger1 Cycle(UseAltStep)
- /ma Trigger1 Cycle(SelectStepTarget)
- /ma Trigger1 Step
- /ma Trigger1 StepT
- Note: You can change the trigger number if you like. Make sure to update the rules as well.
- Also: "/ma Trigger" currently resolves to "/ma Trigger1", so you can use that without the
- number unless/until they actually fix it in Spellcast.
- Cycle(Step) and Cycle(AltStep) rotate through the available steps, like your example.
- UseAltStep determines whether or not to use the alternate step. Default is No, but you can
- set a different default in each job xml.
- SelectStepTarget determines whether the default target is the normal <t>, or <stnpc> (which I
- use in Dynamis for hitting mobs I'm not engaged to). Default is No, but you can set a different
- default in each job xml.
- The Step command uses the currently defined step. Using StepT forces it to use the <t>
- target instead of SelectStepTarget.
- I'd probably set up binds like:
- bind ^= input /ma Trigger1 Cycle(Step)
- bind != input /ma Trigger1 Cycle(AltStep)
- And set the UseAltStep and SelectStepTarget values to defaults I expect to keep (or put them
- in macros on my dustbin palette, as the number of bind options is pretty limited).
- -->
- <if SpellTargetRaw="Step|StepT">
- <if status="engaged">
- <if advanced='"$$CurrentStepStep"="Quick"'>
- <changespell spell="Quickstep" />
- </if>
- <elseif advanced='"$$CurrentStepStep"="Box"'>
- <changespell spell="Box Step" />
- </elseif>
- <elseif advanced='"$$CurrentStepStep"="Stutter"'>
- <changespell spell="Stutter Step" />
- </elseif>
- <elseif advanced='"$$CurrentStepStep"="Feather"'>
- <changespell spell="Feather Step" />
- </elseif>
- <else>
- <addtochat>Unknown step: $$CurrentStepStep</addtochat>
- </else>
- <if advanced='"$UseAltStep"="Yes"'>
- <if advanced='"$CurrentStep"="Main"'>
- <var cmd="set CurrentStep Alt" />
- </if>
- <else>
- <var cmd="set CurrentStep Main" />
- </else>
- </if>
- <if SpellTargetRaw="StepT">
- <changetarget target="<t>" />
- </if>
- <elseif advanced='"$SelectStepTarget"="Yes"'>
- <changetarget target="<stnpc>" />
- </elseif>
- <else>
- <changetarget target="<t>" />
- </else>
- </if>
- <else>
- <addtochat color="112">Insufficient TP or not engaged.</addtochat>
- </else>
- </if>
- <elseif SpellTargetRaw="Cycle(Step)">
- <if advanced='"$MainStep"="Quick"'>
- <var cmd="set MainStep Box" />
- </if>
- <elseif advanced='"$MainStep"="Box"'>
- <var cmd="set MainStep Stutter" />
- </elseif>
- <elseif advanced='"$MainStep"="Stutter"' MainJob="Dnc">
- <var cmd="set MainStep Feather" />
- </elseif>
- <else>
- <var cmd="set MainStep Quick" />
- </else>
- <addtochat>Main Step: $MainStep</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Cycle(AltStep)">
- <if advanced='"$AltStep"="Quick"'>
- <var cmd="set AltStep Box" />
- </if>
- <elseif advanced='"$AltStep"="Box"'>
- <var cmd="set AltStep Stutter" />
- </elseif>
- <elseif advanced='"$AltStep"="Stutter"' MainJob="Dnc">
- <var cmd="set AltStep Feather" />
- </elseif>
- <else>
- <var cmd="set AltStep Quick" />
- </else>
- <addtochat>Alt Step: $AltStep</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Cycle(UseAltStep)">
- <if advanced='"$UseAltStep"="No"'>
- <var cmd="set UseAltStep Yes" />
- </if>
- <else>
- <var cmd="set UseAltStep No" />
- </else>
- <addtochat>Use Alt Step: $UseAltStep</addtochat>
- </elseif>
- <elseif SpellTargetRaw="Cycle(SelectStepTarget)">
- <if advanced='"$SelectStepTarget"="No"'>
- <var cmd="set SelectStepTarget Yes" />
- </if>
- <else>
- <var cmd="set SelectStepTarget No" />
- </else>
- <addtochat>Select step target: $SelectStepTarget</addtochat>
- </elseif>
- </if>
- </elseif>
- </if>
- </include>
- <!-- Define the general weaponskill set based on certain vars. -->
- <!-- Define which weaponskill mode to use. -->
- <include name="DefineWeaponskillSet">
- <if spell="$MagicalWS">
- <var cmd="set WSSet WS-%spell" />
- </if>
- <else>
- <if advanced='"$Use-WSMode" != "None"'>
- <var cmd="set TempMode $Use-WSMode" />
- </if>
- <else>
- <if advanced='"$WSMode"="default"'>
- <if advanced='"$OffenseMode"="Acc" OR "$OffenseMode"="MaxAcc"' notspell="$SingleHitWS">
- <var cmd="set TempMode Acc" />
- </if>
- <elseif spell="$CritWS" BuffActive="Blood Rage">
- <var cmd="set TempMode Crit" />
- </elseif>
- <elseif mode="OR" advanced='"$OffenseMode"="Str" OR "$OffenseMode"="Crit"'
- BuffActive="Berserk|Last Resort|Attack Boost|Building Flourish|Chaos Roll">
- <var cmd="set TempMode Mod" />
- </elseif>
- <elseif BuffActive="Voidwatcher">
- <var cmd="set TempMode Att" />
- </elseif>
- <else>
- <var cmd="set TempMode Att" />
- </else>
- </if>
- <else>
- <var cmd="set TempMode $WSMode" />
- </else>
- </else>
- <if advanced='Regex("$TempMode", "$Options.WSModes")'>
- <var cmd="set WSSet WS-%spell-$TempMode" />
- </if>
- <else>
- <var cmd="set WSSet WS-%spell-Att" />
- </else>
- </else>
- <if advanced='$Debug=1'>
- <addtochat>WS Set: $WSSet</addtochat>
- </if>
- </include>
- <!-- Change to appropriate gear set at proper times. -->
- <include name="HandleEquippingGear">
- <!-- INCLUDE ONLY AFTER [BaseLayer/BaseGroup/AdditionalSets] HAS BEEN DEFINED BY YOUR JOB RULES. -->
- <if advanced='$Debug=1'>
- <addtochat>Base Layer: $BaseLayer @ $BaseGroup</addtochat>
- <addtochat>Additional: $AdditionalSets</addtochat>
- </if>
- <!-- After all calculations are done, if the spellcast was run due to a Trigger action,
- just equip the specified gear and return. -->
- <if type="Trigger">
- <equip setgroup="$BaseGroup" set="$BaseLayer" />
- <equip set="$AdditionalSets" />
- <return />
- </if>
- <if type="JobAbility|WeaponSkill|Step|Waltz|Flourish*|Scholar|CorsairShot">
- <aftercastdelay delay="0.4" />
- </if>
- <if status="resting">
- <equip when="all" set="Resting-$RestMode" />
- </if>
- <elseif spell="Autoset">
- <equip when="idle|engaged" setgroup="$BaseGroup" set="$BaseLayer" />
- <equip when="idle|engaged" set="$AdditionalSets" />
- <return />
- </elseif>
- <else>
- <!-- Aftercast equipment resolution deferred. Avoid up-front lag
- from doing these calculations now.
- Change to <equip> line if you want to test current direct lag.
- <equip setgroup="$BaseGroup" set="$BaseLayer" />
- <equip set="$AdditionalSets" /> -->
- <!-- If using FastCast rules, set aftercast based on the calcuated timing. -->
- <if advanced='"$UseFastCastAftercast"="Yes"'>
- <command when="midcast">wait $FCCastTime; $UpdateAftercast</command>
- </if>
- <else>
- <command when="aftercast">$UpdateAftercast</command>
- </else>
- </else>
- </include>
- <!-- Handle evaluation of sets and equipping gear at aftercast time slot
- instead of doing all the work before the requested action. Helps
- reduce lag effects. -->
- <include name="ChangeGearAftercast">
- <if type="Trigger" spell="Update" SpellTargetRaw=".Aftercast">
- <cancelspell />
- <if notstatus="Dead|Event">
- <equip setgroup="$BaseGroup" set="$BaseLayer" />
- <equip set="$AdditionalSets" />
- </if>
- <return />
- </if>
- </include>
- <!-- White mage spells which are cast using <stal> will, if STALMode is
- set to 'stpt', get converted to <stpt> or <stpc>. -->
- <include name="ConvertSTALTargets">
- <if type="WhiteMagic" SpellTargetRaw="<stal>" advanced='"$STALMode"!="stal"'>
- <changetarget target="<$STALMode>" />
- </if>
- </include>
- <!-- Elemental Staff Rules -->
- <include name="ElementalStaffRules">
- <!-- If we're running this in an XML that's performed fast cast calculations,
- we need to account for certain timings. -->
- <if Advanced='"$UseFastCastAftercast"="Yes"'>
- <if skill="ElementalMagic">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <if spell="Burn|Frost|Choke|Rasp|Shock|Drown">
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- <else>
- <if advanced='"$CastingMode" = "Proc"'>
- <equip when="$EquipSpellGear">
- <main>$Staff-Proc-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="$EquipSpellGear">
- <main>$Staff-Dmg-%SpellElement</main>
- <sub>Wizzan Grip</sub>
- </equip>
- </else>
- </else>
- </if>
- <elseif skill="HealingMagic" spell="Cure*|Cura*">
- <equip when="$EquipSpellGear">
- <main>$Staff-Cures</main>
- </equip>
- </elseif>
- <elseif skill="EnfeeblingMagic">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </elseif>
- <elseif type="BardSong">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <if spelltargettype="MONSTER|NPC">
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- </elseif>
- <elseif skill="DivineMagic">
- <if spell="Banish*|Holy*">
- <equip when="precast|midcast">
- <main>$Staff-Dmg-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </elseif>
- <elseif skill="DarkMagic">
- <if Spell="Stun">
- <equip when="precast|midcast">
- <main>Apamajas II</main>
- </equip>
- </if>
- <else>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </elseif>
- </if>
- <else>
- <!-- Default if no fast cast calculations done. -->
- <if skill="ElementalMagic">
- <if spell="Burn|Frost|Choke|Rasp|Shock|Drown">
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- <else>
- <if advanced='"$CastingMode" = "Proc"'>
- <equip when="precast|midcast">
- <main>$Staff-Proc-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="precast|midcast">
- <main>$Staff-Dmg-%SpellElement</main>
- <sub>Wizzan Grip</sub>
- </equip>
- </else>
- </else>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- </if>
- <elseif skill="HealingMagic" spell="Cure*|Cura*">
- <equip when="precast|midcast">
- <main>$Staff-Cures</main>
- </equip>
- </elseif>
- <elseif skill="EnfeeblingMagic">
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </elseif>
- <elseif type="BardSong">
- <if spelltargettype="MONSTER|NPC">
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </elseif>
- <elseif skill="DivineMagic">
- <if spell="Banish*|Holy*">
- <equip when="precast|midcast">
- <main>$Staff-Dmg-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </elseif>
- <elseif skill="DarkMagic">
- <if Spell="Stun">
- <equip when="precast|midcast">
- <main>Apamajas II</main>
- </equip>
- </if>
- <else>
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </else>
- </elseif>
- </else>
- </include>
- <!-- Elemental Staff Rules for Blm/Sch/Geo, since they use different vars once
- Soothsayer/Atinian Staff comes into play. -->
- <include name="BlmSchGeoElementalStaffRules">
- <!-- If we're running this in an XML that's performed fast cast calculations,
- we need to account for certain timings. This also filters out this
- section for non-spell activity, as fast cast calculations are assumed
- for Blm/Sch/Geo. -->
- <if Advanced='"$UseFastCastAftercast"="Yes"'>
- <if skill="ElementalMagic">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <if spell="Burn|Frost|Choke|Rasp|Shock|Drown">
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- <else>
- <!-- Determine low-tier vs high-tier breakdown. -->
- <!-- T1/Ga1/Helix/Ra1 always use low tier set. -->
- <if Spell="Stone|Water|Aero|Fire|Blizzard|Thunder|*ga|*helix|*ra">
- <var cmd="set SpellTier LowTier" />
- </if>
- <!-- T4/T5/Ra2/Ga3/Ja/AM/AM2 is always high tier set. -->
- <elseif Spell="* IV|* V|*ja|*ga III|Quake*|Flood*|Tornado*|Flare*|Freeze*|Burst*|*ra II">
- <var cmd="set SpellTier HighTier" />
- </elseif>
- <!-- With Atinian, T2/T3/Ga2 are low tier -->
- <elseif Spell="* II|* III">
- <var cmd="set SpellTier LowTier" />
- </elseif>
- <!-- Any undefined get put in low tier. -->
- <else>
- <var cmd="set SpellTier LowTier" />
- </else>
- <if advanced='$Debug=1'>
- <addtochat>Debug: %Spell = $SpellTier</addtochat>
- </if>
- <!-- In proc mode, always use the proc weapon. -->
- <if advanced='"$CastingMode" = "Proc"'>
- <equip when="$EquipSpellGear">
- <main>$Weapon-Proc</main>
- </equip>
- </if>
- <!-- In resistant mode, always use the acc weapons. -->
- <elseif advanced='"$CastingMode" = "Resistant"'>
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </elseif>
- <!-- In speed mode, always use the speed weapons. -->
- <elseif advanced='"$CastingMode" = "Speed"'>
- <equip when="$EquipSpellGear">
- <main>$Staff-Speed-%SpellElement</main>
- </equip>
- </elseif>
- <!-- In Adoulin (including reives), always assume you need the acc of the low tier staff. -->
- <elseif advanced='"$Area" = "Adoulin" || "$Area" = "Reive"'>
- <equip when="$EquipSpellGear">
- <main>$Staff-Dmg-LowTier-%SpellElement</main>
- </equip>
- </elseif>
- <!-- Normal (or any other) mode, uses standard damage staff, with tier specification. -->
- <else>
- <equip when="$EquipSpellGear">
- <main>$Staff-Dmg-$SpellTier-%SpellElement</main>
- </equip>
- </else>
- </else>
- </if>
- <elseif skill="HealingMagic" spell="Cure*|Cura*">
- <equip when="$EquipSpellGear">
- <main>$Staff-Cures</main>
- </equip>
- </elseif>
- <elseif skill="EnfeeblingMagic">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <if Spell="Sleep*|Repose|Bind|Gravity|Break*">
- <equip when="$EquipSpellGear">
- <main>$Staff-Speed-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </elseif>
- <elseif type="BardSong">
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <if spelltargettype="MONSTER|NPC">
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </if>
- </elseif>
- <elseif skill="DivineMagic">
- <if spell="Banish*|Holy*">
- <equip when="precast|midcast">
- <main>$Staff-Dmg-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="precast|midcast">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </elseif>
- <elseif skill="DarkMagic">
- <if Spell="Stun">
- <equip when="precast|midcast">
- <main>$Staff-Speed-%SpellElement</main>
- </equip>
- </if>
- <else>
- <if NotAdvanced='Regex("$Staff-FastCastAmt-%SpellElement", "^[$]")'>
- <if Advanced='$FastCastTierActual > 0'>
- <equip when="precast">
- <main>$Staff-FastCast-%SpellElement</main>
- </equip>
- </if>
- </if>
- <!-- Drain/Aspir always use the speed weapons. Anything else can just use Acc. -->
- <if Spell="Drain|Aspir*">
- <equip when="$EquipSpellGear">
- <main>$Staff-Speed-%SpellElement</main>
- </equip>
- </if>
- <else>
- <equip when="$EquipSpellGear">
- <main>$Staff-Acc-%SpellElement</main>
- </equip>
- </else>
- </else>
- </elseif>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Elemental Magic.
- Assumed to be imported in after check for skill="ElementalMagic" has
- already been done. -->
- <include name="ObiRingCape-ElementalMagic">
- <if notspell="Burn|Frost|Choke|Rasp|Shock|Drown">
- <if element="%DayElement|%WeatherElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="$EquipSpellGear">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="$EquipSpellGear">
- <back>Twilight Cape</back>
- </equip>
- </if>
- <if element="%DayElement" notelement="Light|Dark" advanced='"ZodiacRing"!="0"'>
- <equip when="$EquipSpellGear">
- <rring>Zodiac Ring</rring>
- </equip>
- </if>
- </if>
- </if>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Healing Magic.
- Assumed to be imported in after check for skill="HealingMagic" has
- already been done. -->
- <include name="ObiRingCape-HealingMagic">
- <if element="%DayElement|%WeatherElement" spell="Cure*|Cura*">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="$EquipSpellGear">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="$EquipSpellGear">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Divine Magic.
- Assumed to be imported in after check for skill="DivineMagic" has
- already been done. -->
- <include name="ObiRingCape-DivineMagic">
- <if element="%DayElement|%WeatherElement" spell="Banish*|Holy*">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="$EquipSpellGear">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="$EquipSpellGear">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Quick Draw.
- Assumed to be imported in after check for type="CorsairShot" has
- already been done. -->
- <include name="ObiRingCape-CorsairShot">
- <if notelement="Light|Dark">
- <if element="%DayElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="precast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"ZodiacRing"!="0"'>
- <equip when="precast">
- <rring>Zodiac Ring</rring>
- </equip>
- </if>
- </if>
- </if>
- <elseif element="%WeatherElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="precast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- </if>
- </elseif>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Ninjutsu.
- Assumed to be imported in after check for type="Ninjutsu" has
- already been done. -->
- <include name="ObiRingCape-Ninjutsu">
- <if spell="Katon*|Hyoton*|Huton*|Doton*|Suiton*|Raiton*">
- <if element="%DayElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="midcast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"ZodiacRing"!="0"'>
- <equip when="midcast">
- <rring>Zodiac Ring</rring>
- </equip>
- </if>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="midcast">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- <elseif element="%WeatherElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <if spell="Katon*|Hyoton*|Huton*|Doton*|Suiton*|Raiton*">
- <equip when="midcast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="midcast">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- </elseif>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Blue Magic.
- Assumed to be imported in after check for skill="BlueMagic" has
- already been done. -->
- <include name="ObiRingCape-BlueMagic">
- <if element="%DayElement">
- <if spell="*Whisker|*Grudge|Thermal*|Mind Blast|Regurg*|Ice Break|Leaf*|Thunderbolt|Dark Orb">
- <if advanced='"ZodiacRing"!="0"'>
- <equip when="midcast">
- <rring>Zodiac Ring</rring>
- </equip>
- </if>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="midcast">
- <back>Twilight Cape</back>
- </equip>
- </if>
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="midcast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- </if>
- </if>
- </if>
- <elseif element="%WeatherElement">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <if spell="*Whisker|*Grudge|Thermal*|Mind Blast|Regurg*|Ice Break|Leaf*|Thunderbolt|Dark Orb">
- <equip when="midcast">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="midcast">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- </elseif>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Dark Magic.
- Assumed to be imported in after check for skill="DarkMagic" has
- already been done. -->
- <include name="ObiRingCape-DarkMagic">
- <if element="%DayElement|%WeatherElement" spell="Drain*|Aspir*|Kaustra">
- <if NotAdvanced='Regex("$Obi-%SpellElement", "^[$]")'>
- <equip when="$EquipSpellGear">
- <waist>$Obi-%SpellElement</waist>
- </equip>
- <if advanced='"$TwilightCape"!="0"'>
- <equip when="$EquipSpellGear">
- <back>Twilight Cape</back>
- </equip>
- </if>
- </if>
- </if>
- </include>
- <!-- Swapping in Obi/Zodiac Ring/Twilight Cape when using Rune Fencer.
- Assumed to be imported in after check for spell="Lunge" has
- already been done. -->
- <include name="ObiRingCape-Runes">
- <if BuffActive="$Rune-%DayElement">
- <if NotAdvanced='Regex("$Obi-%DayElement", "^[$]")'>
- <equip when="midcast">
- <waist>$Obi-%DayElement</waist>
- </equip>
- </if>
- </if>
- <elseif BuffActive="$Rune-%WeatherElement">
- <if NotAdvanced='Regex("$Obi-%WeatherElement", "^[$]")'>
- <equip when="midcast">
- <waist>$Obi-%WeatherElement</waist>
- </equip>
- </if>
- </elseif>
- </include>
- <!-- Automatically generate notifications when buffs are about to wear off (15 second warning). -->
- <!-- MUST include RecastDurations in vars section. -->
- <include name="RecastWarnings">
- <if skill="EnhancingMagic">
- <if spell="Enlight">
- <var cmd="set Buff-Duration 120" />
- </if>
- <elseif spell="Haste|Phalanx|Phalanx II|Temper|Reprisal|En*">
- <var cmd="set Buff-Duration 180" />
- </elseif>
- <elseif spell="Refresh II|Refresh">
- <var cmd="set Buff-Duration 150" />
- </elseif>
- <elseif spell="*Spikes">
- <var cmd="set Buff-Duration 140" />
- </elseif>
- <else>
- <!-- Anything else we don't want to give warnings for. -->
- <var cmd="set Buff-Duration 0" />
- </else>
- <if advanced='$Buff-Duration > 0'>
- <!-- Account for rdm stuff that extends durations -->
- <if mainjob="Rdm">
- <var cmd="setcalc BuffDurationMult 100 + ($EstoqueurCape*10) + ($EstoqueurFeet*10)" />
- <if BuffActive="Composure">
- <if SpellTargetType="SELF">
- <var cmd="setcalc BuffDurationMult $BuffDurationMult * 3" />
- </if>
- <elseif SpellTargetType="PLAYER">
- <var cmd="setcalc BuffDurationMult $BuffDurationMult + $EstoqueurSetBonus" />
- </elseif>
- </if>
- <var cmd="setcalc Buff-Duration $Buff-Duration * $BuffDurationMult / 100" />
- </if>
- <elseif mainjob="Sch">
- <var cmd="setcalc BuffDurationMult 100" />
- <if mode="OR" BuffActive="Perpetuance" advanced='"$PerpFlag"="Yes"'>
- <!-- 2.5x duration for Perpetuance with AF3+2 hands. -->
- <var cmd="setcalc BuffDurationMult 200 + (25 * $SchPerpHands)" />
- </if>
- <var cmd="setcalc Buff-Duration $Buff-Duration * $BuffDurationMult / 100" />
- </elseif>
- <var cmd="setcalc Warn-Duration $Buff-Duration - 15" />
- <command when="Aftercast">wait $Warn-Duration;input /echo ~~~~~~~~~~ [%spell] <%SpellTargetName> wearing off in 15 sec. ~~~~~~~~~~</command>
- </if>
- </if>
- <elseif type="Samba">
- <if mainjob="Dnc">
- <var cmd="set Buff-Duration 120" />
- </if>
- <else>
- <var cmd="set Buff-Duration 90" />
- </else>
- <var cmd="setcalc Warn-Duration $Buff-Duration - 15" />
- <command when="Aftercast">wait $Warn-Duration;input /echo [%spell] ~~~~~~~~~ Wearing off in 15 sec.</command>
- </elseif>
- <elseif mode="or" skill="EnfeeblingMagic|DivineMagic|BlueMagic|Singing" type="CorsairShot">
- <if Spell="Sleep|Sleepga|Light Shot|Sheep Song">
- <var cmd="set Buff-Duration 60" />
- </if>
- <elseif Spell="Sleep II|Sleepga II|Repose|Dream Flower|Soporific|Yawn">
- <var cmd="set Buff-Duration 90" />
- </elseif>
- <elseif Spell="Foe Lullaby|Horde Lullaby">
- <var cmd="set Buff-Duration 36" />
- </elseif>
- <elseif Spell="Foe Lullaby II|Horde Lullaby II">
- <var cmd="set Buff-Duration 72" />
- </elseif>
- <elseif Spell="Break">
- <var cmd="set Buff-Duration 30" />
- </elseif>
- <else>
- <var cmd="set Buff-Duration 0" />
- </else>
- <if advanced='$Buff-Duration > 0'>
- <var cmd="inc SleepOrder" />
- <if advanced='$Buff-Duration > 40'>
- <var cmd="setcalc Warn-Duration $Buff-Duration - 30" />
- <command when="Aftercast">wait $Warn-Duration;input /echo [%spell] <%spellTargetName> ($SleepOrder) wearing off in 30 sec.</command>
- </if>
- <var cmd="setcalc Warn-Duration $Buff-Duration - 10" />
- <command when="Aftercast">wait $Warn-Duration;input /echo [%spell] <%spellTargetName> ($SleepOrder) wearing off in 10 sec.;spellcast var dec SleepOrder</command>
- </if>
- </elseif>
- </include>
- <!-- Code for handling calculating how fast spells can be cast, and what
- amount of fast cast gear is valid to use with them. -->
- <include name="FastCastCalculations">
- <var cmd="set UseFastCastAftercast Yes" />
- <if BuffActive="Nightingale" skill="Singing">
- <var cmd="set FastCastTierActual 0" />
- <var cmd="set EquipSpellGear Precast" />
- <var cmd="setcalc FCCastTime 1.5" />
- <var cmd="set FastCastCategory Singing" />
- </if>
- <elseif mode="OR" BuffActive="Spontaneity|Chainspell" advanced='"$SpontTime"="Precast"'>
- <var cmd="set FastCastTierActual 0" />
- <var cmd="set EquipSpellGear Precast" />
- <var cmd="setcalc FCCastTime 1.5" />
- <var cmd="set FastCastCategory %skill" />
- </elseif>
- <elseif type="WhiteMagic|BlackMagic|BardSong|Ninjutsu">
- <!-- Determine the spell category. -->
- <if type="Geomancy">
- <!-- Geomancy spells don't have a %skill value... -->
- <var cmd="set FastCastCategory Geomancy" />
- </if>
- <elseif spell="Cure*|Cura*">
- <var cmd="set FastCastCategory Cure" />
- </elseif>
- <else>
- <var cmd="set FastCastCategory %skill" />
- </else>
- <!-- Determine the maximum fast cast we can use such that cast time is
- not less than 1 second (or adjust this value as desired).
- EG: Cast time of 2.5 seconds would be 1/2.5 = 0.4, and calculate
- out to a FastCastRatioLimit of 60 (ie: 60% fast cast would be
- the max we could use before falling below the 1 second threshold). -->
- <var cmd="setcalc FastCastRatioLimit 100 - (int)((1 / %CastTime) * 100)" />
- <!-- Spells with cast time less than our baseline don't need further calculations. -->
- <if advanced='$FastCastRatioLimit > 0'>
- <!-- Make sure we keep the limit at cap. -->
- <if advanced='$FastCastRatioLimit > 80'>
- <var cmd="set FastCastRatioLimit 80" />
- </if>
- <!-- Total up all the baseline fast cast values -->
- <var cmd="set MinFastCast 0" />
- <if BuffActive="Caster's Roll">
- <!-- 20% on 11 Roll + 10% with AF3+2 legs.
- Assuming worst (best) case for the purposes of which set to choose. -->
- <var cmd="setcalc MinFastCast $MinFastCast + 30" />
- </if>
- <if BuffActive="Ionis" advanced='"$Area"="Adoulin"'>
- <var cmd="setcalc MinFastCast $MinFastCast + 3" />
- </if>
- <!-- Buff given by a Rune Fencer using Vallation or Valliance with Inspiration merits. -->
- <!-- General recommended value is 5/5 merits, so assuming 50% here. -->
- <if BuffActive="Fast Cast">
- <var cmd="setcalc MinFastCast $MinFastCast + 50" />
- </if>
- <if MainJob="Rdm">
- <var cmd="setcalc MinFastCast $MinFastCast + 30" />
- </if>
- <elseif SubJob="Rdm">
- <var cmd="setcalc MinFastCast $MinFastCast + 15" />
- </elseif>
- <if skill="ElementalMagic">
- <!-- Assuming level 99 Blm; can adjust this if you want to account for different levels/trait tiers. -->
- <if MainJob="Blm">
- <var cmd="setcalc MinFastCast $MinFastCast + 30" />
- </if>
- <elseif MainJob="Geo">
- <!-- Geo only gets the first tier; an assumed value for now. -->
- <var cmd="setcalc MinFastCast $MinFastCast + 10" />
- </elseif>
- </if>
- <if MainJob="Whm">
- <!-- Cure cast time: merits. -->
- <if advanced='"$FastCastCategory" = "Cure"'>
- <var cmd="setcalc MinFastCast $MinFastCast + 20" />
- </if>
- <!-- Divine Benison -->
- <!-- Assume level 99 and AF3 pants. Can add Yagrush values if applicable. -->
- <elseif spell="Erase|Sacrifice|*na">
- <var cmd="setcalc MinFastCast $MinFastCast + 60" />
- </elseif>
- </if>
- <!-- If min fast cast is past our limit, skip further calculations and just return tier 0. -->
- <if advanced='$FastCastRatioLimit < $MinFastCast'>
- <var cmd="set FastCastTierActual 0" />
- <var cmd="set EquipSpellGear Precast" />
- <var cmd="setcalc FCCastTime 1.5" />
- </if>
- <else>
- <!-- Adjust for calculations that happen after fast cast (Arts and Pianissimo) -->
- <var cmd="set AfterFCMultiplier 0" />
- <if BuffActive="Light Arts|Addendum: White">
- <if type="WhiteMagic">
- <if BuffActive="Celerity">
- <var cmd="set AfterFCMultiplier 0.5" />
- </if>
- <else>
- <var cmd="set AfterFCMultiplier 0.1" />
- </else>
- </if>
- <elseif type="BlackMagic">
- <var cmd="set AfterFCMultiplier -0.2" />
- </elseif>
- </if>
- <elseif BuffActive="Dark Arts|Addendum: Black">
- <if type="BlackMagic">
- <if BuffActive="Alacrity">
- <var cmd="set AfterFCMultiplier 0.5" />
- </if>
- <else>
- <var cmd="set AfterFCMultiplier 0.1" />
- </else>
- </if>
- <elseif type="WhiteMagic">
- <var cmd="set AfterFCMultiplier -0.2" />
- </elseif>
- </elseif>
- <elseif BuffActive="Pianissimo" skill="Singing">
- <var cmd="set AfterFCMultiplier 0.5" />
- </elseif>
- <!-- AfterFCMultiplier can be used to modify our effective
- FastCastRatioLimit value. EG: If the limit is 60 (ie: lowest cast time
- of 40% original), a white magic spell under Light Arts would
- reduce the limit by 10%, to 54. -->
- <var cmd="set BestFC $MinFastCast" />
- <if advanced='$FastCastGear-$FastCastCategory > 0'>
- <var cmd="setcalc BestFC $BestFC + $FastCastGear-$FastCastCategory" />
- </if>
- <else>
- <var cmd="setcalc BestFC $BestFC + $FastCastGear-General" />
- </else>
- <if advanced='$BestFC > 80'>
- <var cmd="set BestFC 80" />
- </if>
- <if advanced='$AfterFCMultiplier != 0'>
- <var cmd="setcalc AfterFCReduction (int)((100-$BestFC) * $AfterFCMultiplier + 0.01)" />
- </if>
- <else>
- <var cmd="set AfterFCReduction 0" />
- </else>
- <var cmd="setcalc FastCastGearLimit $FastCastRatioLimit - $AfterFCReduction" />
- <!-- If FC reduction puts us within 7.5% of the min fast cast amount,
- consider it tier 0. Otherwise continue. -->
- <if advanced='$FastCastRatioLimit < ($MinFastCast + 7.5)'>
- <var cmd="set FastCastTierActual 0" />
- <var cmd="set EquipSpellGear Precast" />
- <var cmd="setcalc FCCastTime 1.5" />
- </if>
- <else>
- <!-- OK, our limit is above the min fast cast. Subtract out the min to
- determine how much needs to be used for this spell. -->
- <var cmd="setcalc FastCastGearLimit $FastCastRatioLimit - $MinFastCast - $AfterFCReduction" />
- <!-- First reduce to increments of 5. -->
- <var cmd="setcalc FastCastTierActual ((int)($FastCastGearLimit / 5))*5" />
- <!-- Only use increments of 10 below 60%.
- Since the 5% increments have to be above X5%, round up. -->
- <if advanced='$FastCastTierActual < 60'>
- <var cmd="setcalc FastCastTierActual ((int)(($FastCastGearLimit+5) / 10))*10" />
- </if>
- <!-- Tier max is 80 -->
- <if advanced='$FastCastTierActual > 80'>
- <var cmd="set FastCastTierActual 80" />
- </if>
- <var cmd="set EquipSpellGear Midcast" />
- <var cmd="setcalc FCCastTime (((%CastTime * (100-$BestFC)) / 100) + 1)" />
- </else>
- </else>
- </if>
- <else>
- <!-- Low cast time spells get pushed here automatically. -->
- <var cmd="set FastCastTierActual 0" />
- <var cmd="set EquipSpellGear Precast" />
- <var cmd="setcalc FCCastTime 1.5" />
- </else>
- </elseif>
- <else>
- <var cmd="set UseFastCastAftercast No" />
- </else>
- <if advanced='$Debug=1 and "$UseFastCastAftercast"="Yes"'>
- <addtochat>FastCast Spell Category: $FastCastCategory</addtochat>
- <addtochat>FastCast: FastCastAmt = $MinFastCast + $AfterFCReduction + ($FastCastGear-$FastCastCategory | $FastCastGear-General)</addtochat>
- <addtochat>FastCast: Tier=$FastCastTierActual (Spell Limit=$FastCastRatioLimit, Gear Limit=$FastCastGearLimit), Actual=$BestFC, spell=%CastTime, Aftercast=$FCCastTime</addtochat>
- </if>
- </include>
- <!-- Proc rules exclusive to blm for testing spell procs. -->
- <!-- Staff choice is already handled in Staffs include. -->
- <include name="TestProcRules">
- <!-- Turn on: //castingmode proc
- Turn off: //castingmode proc.off
- Set element: //firetrigger proc (or whichever element~trigger)
- Cast spell: //anyelementtrigger proc-t3
- //anyelementtrigger proc-t4
- //anyelementtrigger proc-ga3
- //anyelementtrigger proc-AM
- //anyelementtrigger proc-brd
- -->
- <if spell="CastingMode" SpellTargetRaw="Proc*">
- <cancelspell />
- <return />
- <if BuffActive="Visitant|Voidwatcher">
- <if SpellTargetRaw="*.off|*:off">
- <var cmd="set CastingMode Normal" />
- </if>
- <elseif SpellTargetRaw="*.toggle|*:toggle">
- <if advanced='"$CastingMode"="Proc"'>
- <var cmd="set CastingMode Normal" />
- </if>
- <else>
- <var cmd="set CastingMode Proc" />
- </else>
- </elseif>
- <else>
- <var cmd="set CastingMode Proc" />
- </else>
- </if>
- <else>
- <var cmd="set CastingMode Normal" />
- </else>
- <addtochat>CastingMode=$CastingMode, Procelement=$ProcElement</addtochat>
- <return />
- </if>
- <!-- In Abyssea, do spell conversion -->
- <elseif BuffActive="Visitant">
- <if type="Trigger" skill="ElementalTrigger">
- <if NotElement="None|Any|All" SpellTargetRaw="Proc">
- <var cmd="set ProcElement %spellElement" />
- <addtochat>CastingMode=$CastingMode, Procelement=$ProcElement</addtochat>
- <cancelspell />
- <return />
- </if>
- <elseif spell="AnyElementTrigger" advanced='"$CastingMode"="Proc"'>
- <var cmd="set Procspell None" />
- <if SpellTargetRaw="Proc-T3">
- <var cmd="set Procspell $T3-$ProcElement" />
- </if>
- <elseif SpellTargetRaw="Proc-T4">
- <var cmd="set Procspell $T4-$ProcElement" />
- </elseif>
- <elseif SpellTargetRaw="Proc-Ga3">
- <var cmd="set Procspell $T-G3-$ProcElement" />
- </elseif>
- <elseif SpellTargetRaw="Proc-AM">
- <var cmd="set Procspell $T-AM-$ProcElement" />
- </elseif>
- <elseif SpellTargetRaw="Proc-Brd">
- <var cmd="set Procspell $T-Brd-$ProcElement" />
- </elseif>
- <else>
- <addtochat>Unknown Proc: [%SpellTargetRaw]</addtochat>
- </else>
- <if advanced='"$Procspell" != "None"'>
- <changespell spell="$Procspell" />
- <changetarget target="<t>" />
- </if>
- <addtochat>Test spell ($Procspell): %spell > %spellTarget</addtochat>
- </elseif>
- </if>
- </elseif>
- </include>
- <!-- Trigger to notify the user at a user-specified interval from the
- time the trigger is used.
- Use trigger77 for public /party notifications.
- Use trigger78 for private notifications that include the /tell chime.
- Syntax (for a 5 minute/300 second timer):
- /ma trigger77 300
- -->
- <include name="RespawnTimer">
- <if type="Trigger">
- <!-- Trigger 77 for /party notifications -->
- <if spell="Trigger77">
- <!-- Validate input duration -->
- <if advanced='Regex("%spellTargetRaw", "^\d+$")'>
- <!-- Basic warning at full duration -->
- <addtochat color="12">~~~~ Starting public respawn timer @ %time: %spellTargetRaw seconds.</addtochat>
- <command>wait %spellTargetRaw;input /p Respawn time <call12></command>
- <!-- Additional warning when one minute remaining -->
- <var cmd="setcalc Warn-Duration %spellTargetRaw - 60" />
- <if advanced='$Warn-Duration > 0'>
- <command>wait $Warn-Duration;input /p One minute warning <call14></command>
- </if>
- </if>
- <else>
- <addtochat>Invalid timer duration: %SpellTargetRaw</addtochat>
- </else>
- </if>
- <!-- Trigger 78 for private notifications -->
- <elseif spell="Trigger78">
- <!-- Validate input duration -->
- <if advanced='Regex("%spellTargetRaw", "^\d+$")'>
- <!-- Basic warning at full duration -->
- <addtochat color="12">~~~~ Starting private respawn timer @ %time: %spellTargetRaw seconds.</addtochat>
- <command>wait %spellTargetRaw;input /ma Trigger80 0</command>
- <!-- Additional warning when one minute remaining -->
- <var cmd="setcalc Warn-Duration %spellTargetRaw - 60" />
- <if advanced='$Warn-Duration > 0'>
- <command>wait $Warn-Duration;input /ma Trigger80 60</command>
- </if>
- </if>
- <else>
- <addtochat>Invalid timer duration: %spellTargetRaw</addtochat>
- </else>
- </elseif>
- <!-- Custom notification code for /tell chime messages. -->
- <elseif spell="Trigger80">
- <if spelltargetraw="0">
- <addtochat color="12">~~~~ Respawn timer is up (%time).</addtochat>
- </if>
- <else>
- <addtochat color="12">~~~~ One minute warning for respawn timer (%time).</addtochat>
- </else>
- </elseif>
- </if>
- </include>
- </includes>
Add Comment
Please, Sign In to add comment