1. <?xml version="1.0" ?>
  2. <spellcast>
  3.     <config AutoLoadXML="true" />
  4.   <variables>
  5.     <var name="WType">Bow</var>
  6.     <var name="UShot">N</var>
  7.     <var name="Barrage">Normal</var>
  8.     <var name="BrgAmmo">Antlion Arrow</var>
  9.   </variables>
  10.  
  11.     <sets>
  12.         <group name="RNG" default="yes">
  13.       <set name="RapidSnap">
  14.         <head>Sylvan Gapette +2</head>
  15.         <neck>Sylvan Scarf</neck>
  16.         <lear>Volley Earring</lear>
  17.         <rear>Clearview Earring</rear>
  18.         <body>Sylvan Caban +2</body>
  19.         <hands>Alruna's Gloves</hands>
  20.         <lring>Rajas Ring</lring>
  21.         <rring>Jalzahn's Ring</rring>
  22.         <back>Sylvan Chlamys</back>
  23.         <waist>Impulse belt</waist>
  24.         <legs>Entois trousers</legs>
  25.         <feet>Sylvan Bottln. +2</feet>
  26.       </set>
  27.      
  28.       <set name="Idle" baseset="RapidSnap">
  29.        
  30.       </set>
  31.       <set name="Idle Bow" baseset="Idle">
  32.         <ammo>Demon Arrow</ammo>
  33.       </set>
  34.       <set name="Idle XBow" baseset="Idle">
  35.         <ammo>Holy Bolt</ammo>
  36.       </set>
  37.       <set name="Idle Gun" baseset="Idle">
  38.         <ammo>Silver Bullet</ammo>
  39.       </set>
  40.  
  41.       <set name="Shooting Bow Normal" baseset="RapidSnap">
  42.         <hands>Syl. Glvltte. +1</hands>
  43.         <waist>Crudelis Belt</waist>
  44.         <legs>Sylvan Bragues +2</legs>
  45.       </set>
  46.       <set name="Shooting Bow Barrage" baseset="Shooting Bow Normal">
  47.         <hands>Htr. Bracers +1</hands>
  48.         <back>Libeccio Mantle</back>
  49.         <legs>Mirador Trousers</legs>
  50.         <feet>Sylvan Bottln. +2</feet>
  51.       </set>
  52.      
  53.       <set name="Shooting XBow Normal" baseset="RapidSnap">
  54.         <hands>Praeda Gauntlets</hands>
  55.         <feet>Praeda Sabatons</feet>
  56.         <waist>Crudelis Belt</waist>
  57.         <legs>Htr. Braccae +1</legs>
  58.       </set>
  59.       <set name="Shooting XBow Barrage" baseset="Shooting XBow Normal">
  60.         <hands>Htr. Bracers +1</hands>
  61.         <back>Libeccio Mantle</back>
  62.         <legs>Mirador Trousers</legs>
  63.         <feet>Sylvan Bottln. +2</feet>
  64.       </set>
  65.      
  66.       <set name="Shooting Gun Normal" baseset="RapidSnap">
  67.         <waist>Crudelis Belt</waist>
  68.       </set>
  69.       <set name="Shooting Gun Barrage" baseset="Shooting Gun Normal">
  70.         <hands>Htr. Bracers +1</hands>
  71.         <back>Libeccio Mantle</back>
  72.         <legs>Mirador Trousers</legs>
  73.         <feet>Sylvan Bottln. +2</feet>
  74.       </set>
  75.      
  76.       <set name="Sidewinder" baseset="WS Base">
  77.         <ammo>Antlion Arrow</ammo>
  78.       </set>
  79.       <set name="Arching Arrow" baseset="WS Base">
  80.         <ammo>Antlion Arrow</ammo>
  81.       </set>
  82.       <set name="Empyreal Arrow" baseset="WS Base">
  83.         <ammo>Antlion Arrow</ammo>
  84.       </set>
  85.       <set name="Refulgent Arrow" baseset="WS Base">
  86.         <ammo>Antlion Arrow</ammo>
  87.       </set>
  88.       <set name="Jishnu's Radiance">
  89.         <ammo>Antlion Arrow</ammo>
  90.         <head>Aias Bonnet</head>
  91.         <neck>Flame Gorget</neck>
  92.         <lear>Flame Earring</lear>
  93.         <rear>Clearview Earring</rear>
  94.         <body>Loki's Kaftan</body>
  95.         <hands>Syl. Glvltte. +1</hands>
  96.         <lring>Rajas Ring</lring>
  97.         <rring>Airy Ring</rring>
  98.         <back>Cuchulain's Mantle</back>
  99.         <waist>Flame Belt</waist>
  100.         <legs>Byakko's Haidate</legs>
  101.         <feet>Scout's Socks</feet>
  102.       </set>
  103.       <set name="Slug Shot" baseset="WS Base">
  104.       </set>
  105.       <set name="Blast Shot" baseset="WS Base">
  106.       </set>
  107.       <set name="Detonator" baseset="WS Base">
  108.       </set>
  109.       <set name="Trueflight" baseset="WS Base">
  110.       </set>
  111.       <set name="Numbing Shot" baseset="WS Base">
  112.       </set>
  113.      
  114.       <set name="WS Base">
  115.         <head>Sylvan Gapette +2</head>
  116.         <neck>Breeze Gorget</neck>
  117.         <lear>Volley Earring</lear>
  118.         <rear>Flame Earring</rear>
  119.         <body>Sylvan Caban +2</body>
  120.         <hands>Syl. Glvltte. +1</hands>
  121.         <lring>Rajas Ring</lring>
  122.         <rring>Spiral Ring</rring>
  123.         <back>Sylvan Chlamys</back>
  124.         <waist>Crudelis Belt</waist>
  125.         <legs>Mirador Trousers</legs>
  126.         <feet>Sylvan Bottln. +2</feet>
  127.       </set>
  128.      
  129.         </group>
  130.     </sets>
  131.  
  132.     <rules>
  133.         <if mainjob="RNG">
  134.       <!-- RULES FOR RNG -->
  135.  
  136.       <if spell="Barbed Crescent"> <!-- dummy spell to check whether the $WTYpe variable is appropriate -->
  137.         <cancelspell/>
  138.         <!--<command>input /echo Barbed Crescent interrupt</command>-->
  139.         <if EquipRange="Harrier +2">
  140.           <command>sc var set WType Bow</command>
  141.           <command>input /echo BOW TYPE SET</command>
  142.         </if>
  143.         <elseif EquipRange="Moros Crossbow">
  144.           <command>sc var set WType XBow</command>
  145.           <command>input /echo XBOW TYPE SET</command>
  146.         </elseif>
  147.         <else>
  148.           <command>sc var set WType Gun</command>
  149.           <command>input /echo GUN TYPE SET</command>
  150.         </else>
  151.         <return />
  152.       </if>
  153.      
  154.       <command when="engaged|idle|aftercast|resting">Dancing Chains</command>
  155.      
  156.       <if spell="Dancing Chains">
  157.         <!-- all variables check/recheck here-->
  158.         <!--<action type="command">input /echo *Dancing chains interrupt*</action>-->
  159.         <cancelspell />
  160.         <if mode="AND" notBuffActive="Barrage" advanced='"$Barrage"=="Barrage"'>
  161.           <command>sc var set Barrage Normal</command>
  162.         </if>
  163.         <equip set="Idle $WType"/>
  164.         <return />
  165.       </if>
  166.      
  167.       <!-- General ranged attack rule -->
  168.       <if spell="ranged">
  169.         <castdelay delay=".1"/> <!-- in case of area lag, this delay is needed. For no lag area, this delay can be close to 0-->
  170.         <equip when="precast" set="RapidSnap"/>
  171.         <if advanced='"$Barrage"=="Barrage"'>
  172.           <command>input /echo barrage on, Changing ammo to $BrgAmmo</command>
  173.           <action type="equip" when="precast">
  174.             <ammo>$BrgAmmo</ammo>
  175.           </action>
  176.         </if>
  177.         <action type="command" when="precast">input /echo RapidSnap set</action>
  178.        
  179.         <midcastdelay delay=".6"/> <!--how long after initating ranged attack before switching to stp/-enmity gear?-->
  180.         <equip when="midcast" set="Shooting $WType $Barrage"/>
  181.         <action type="command" when="midcast">input /echo $WType $Barrage shooting set</action>
  182.        
  183.         <aftercastdelay delay="3.2" /> <!-- how long since intiating ranged attack you will swap back the idle gear-->
  184.         <!--<equip when="after" set="Idle $WType"/>-->
  185.       </if>
  186.      
  187.       <!-- Bounty Shot rule -->
  188.       <if spell="Bounty Shot">
  189.         <command>input /echo Bounty Shot, locking hands to Sylvan Glovelettes +1</command>
  190.         <equip>
  191.           <hands lock="yes">Syl. Glvltte. +1</hands>
  192.         </equip>
  193.       </if>
  194.  
  195.       <!-- Barrage Rule -->
  196.       <if spell="Barrage">
  197.         <!--<command>input /echo Activating Barrage, set barrage var to Barrage</command>-->
  198.         <command>sc var set Barrage Barrage</command>
  199.        
  200.         <!-- Set the barrage ammo appropriately, this could be further improvise -->
  201.         <if advanced='"$WType"=="Bow"'>
  202.           <command>sc var set BrgAmmo Antlion Arrow</command>
  203.         </if>
  204.         <elseif advanced='"$WType"=="XBow"'>
  205.           <command>sc var set BrgAmmo Darksteel Bolt</command>
  206.         </elseif>
  207.         <else>
  208.           <command>sc var set BrgAmmo Silver Bullet</command>
  209.         </else>
  210.       </if>
  211.  
  212.       <!-- Sharpshot Rule -->
  213.       <if spell="Sharpshot">
  214.         <command>input /echo Activating Sharpshot, swapping to Htr. Braccae +1</command>
  215.         <action type="equip" when="precast">
  216.           <legs>Htr. Braccae +1</legs>
  217.         </action>
  218.       </if>
  219.      
  220.       <!-- Abilities: Weaponskills -->
  221.       <if type="WeaponSkill">
  222.         <castdelay delay="0.05" />
  223.        
  224.           <if Spell="Sidewinder|Arching Arrow|Empyreal Arrow|Refulgent Arrow|Jishnu*">
  225.             <if buffactive="Unlimited Shot">
  226.               <command>input /echo Unlimited Shot is active</command>
  227.               <command>input /echo Swapping to Aeolus Arrow</command>
  228.  
  229.               <action type="equip" when="precast">
  230.                 <ammo>Aeolus Arrow</ammo>
  231.               </action>
  232.               <action type="equip" when="aftercast">
  233.                 <ammo>remove</ammo>
  234.               </action>
  235.              
  236.             </if>
  237.             <command>input /echo WS : %Spell, Changing to %Spell setup</command>
  238.             <equip when="precast" set="%Spell" />
  239.           </if>
  240.        
  241.           <elseif Spell="Slug shot|Blast Shot|Detonator|Trueflight|Numbing Shot">
  242.             <if mode="AND" buffactive="Unlimited Shot" EquipRange="Moros Crossbow">
  243.               <command>input /echo Unlimited Shot is active</command>
  244.               <command>input /echo Swapping to Gld.Msk.Bolt</command>
  245.  
  246.               <action type="equip" when="precast">
  247.                 <ammo>Gld.Msk. Bolt</ammo>
  248.               </action>
  249.               <action type="equip" when="aftercast">
  250.                 <ammo>remove</ammo>
  251.               </action>
  252.              
  253.             </if>
  254.             <command>input /echo WS : %Spell, Changing to %Spell setup</command>
  255.             <equip when="precast" set="%Spell" />
  256.           </elseif>
  257.        
  258.           <else>
  259.             <command>input /echo random WS, setting to WS base set</command>
  260.             <equip when="precast" set="WS Base" />
  261.           </else>
  262.       </if>
  263.      
  264.         </if><!--main job RNG rules ends here-->
  265.     </rules>
  266. </spellcast>
  267.