Auto-Shoot

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Spellcast Scripting » Other » Auto-Shoot
Auto-Shoot
Offline
Posts: 16
By Toxiccreep 2013-07-25 04:04:04
Link | Quote | Reply
 
I had a hard time finding a way to automatically range-attack...
After a while it got very irritating.

At any rate, I took a bit of xml code from someone else and tweaked it just a tad, should work just fine. Shoot one range attack and it won't stop until your target is dead, or you untarget it (Once the delay is up..)

This is intended for skillups and leveling RNG, that's really about it. I suppose you could use it on anything though, as long as you want to repeatedly range attack over and over. Don't expect it to be a practical part of any end-game macro.

Variables:
<var name="AutoRA">0</var>
<var name="AutoRADelay">1.5</var>

Rules:
<if advanced="("$AutoRA"="1")">
<aftercastdelay delay="$AutoRADelay" />
<command when="aftercast">input /ra <t></command>
</if>
<if SpellTargetType="Monster" spell="ranged">
<var cmd="set AutoRA 1" />
</if>
<elseif spell="ranged">
<var cmd="set AutoRA 0" />
<cancelspell />
</elseif>
<if spell="Dancing Chains">
<var cmd="set AutoRA 1" />
<changespell spell="Ranged" />
<command when="aftercast">input /ra <t></command>
</if>


Lastly, a barebones-ish XML with the auto-shoot inside of it.
Edit: You may have to tweak some of the delay settings, obviously, it depends what weapon you're using. The delay settings were tweaked to whatever I was using.

Use /ja "Dancing Chains" <t> - To autoshoot,
or /raw /shoot <t> - to single shot.
Code
<?xml version="1.0" encoding="UTF-8"?>
<spellcast>
   <config RequireVersion="2.11" showGearSwaps="false" Debug="false" />
   <variables>
      <var name="AutoRA">0</var>
      <var name="AutoRADelay">1.5</var>
   </variables>
   <sets>
      <group Name="RNG" Default="Yes">
         <set name="Idle">
            <ammo>Iron Arrow</ammo>
         </set>
         <set name="Ranged" />
      </group>
   </sets>
   <rules>
      <!--Autosets-->
      <if Status="Engaged">
         <action type="equip" when="aftercast" set="Idle" />
      </if>
      <else>
         <action type="equip" when="aftercast" set="Idle" />
      </else>
      <!--End Autosets-->
      <if advanced="("$AutoRA"="1")">
         <aftercastdelay delay="$AutoRADelay" />
         <command when="aftercast">input /ra <t></command>
      </if>
      <if SpellTargetType="Monster" spell="ranged">
         <var cmd="set AutoRA 1" />
      </if>
      <elseif spell="ranged">
         <var cmd="set AutoRA 0" />
         <cancelspell />
      </elseif>
      <if spell="Dancing Chains">
         <var cmd="set AutoRA 1" />
         <changespell spell="Ranged" />
         <command when="aftercast">input /ra <t></command>
      </if>
      <if spell="ranged" TargetDistanceLT="24.9">
         <precastdelay delay="0.5" />
         <equip when="midcast" set="Ranged" />
         <aftercastdelay delay="6" />
      </if>
   </rules>
</spellcast>[s][/s]
 Cerberus.Mindi
Offline
Server: Cerberus
Game: FFXI
user: Mindi
Posts: 600
By Cerberus.Mindi 2013-07-25 05:05:25
Link | Quote | Reply
 
Not sure how/if it works, but i saw there is an auto-RA Add-On for windower 4 one can download. I never tried it, just throwing it here.
Offline
Posts: 16
By Toxiccreep 2013-07-25 05:37:45
Link | Quote | Reply
 
That's actually the very reason I worked on this, It didn't work for me, and when i googled the error I saw many other users had the same problem. Someone supposedly developed an unofficial fix for it, I tried to use that as well, and it crashed me.

Thanks for the input, though!

Anyway, give it a shot sometime if you feel like it, let me know if it works alright for you.
necroskull Necro Bump Detected! [251 days between previous and next post]
 Leviathan.Frotaut
Offline
Server: Leviathan
Game: FFXI
user: Frotaut2
Posts: 278
By Leviathan.Frotaut 2014-04-02 16:11:36
Link | Quote | Reply
 
gives error on line 25
Log in to post.