AE Stun

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

AE Stun

Post by LordGiddion » Mon Nov 03, 2003 1:02 pm

A friend of mine asked for this, hope it's useful - totally untested let me know if you use it.

Code: Select all

|AE stun loop
|Usage /macro ae Spell1 Spell2
|example /macro ae "color skew" "Color shift"
|You need to have the spells you want to use mem'd before activating the macro


#Event CastFizzle "Your spell fizzles!" 
#Event CastInterrupt "Your spell is interrupted."
#Turbo 500

Sub Main
   /declare StunArray Array2
   /declare SpellCount global
   /declare CurrCast global
   /declare NextCast global
   /declare DurationCalc global
   /declare ShortRange global
   /declare CastTimer timer
   /declare DurationTimer timer
   /varset DurationTimer 0
   /varset CastTimer 10m
   
   /if $defined(Param0)==FALSE { 
      /echo Usage: /macro ae <SpellName1> <SpellName2>... 
      /endmacro 
   } 
   /varset SpellCount 0 
   /varset ShortRange 9000
   :SpellLoop 
   /if $defined(Param$int(@SpellCount))==TRUE { 
      /varset StunArray($int(@SpellCount),0) "@Param$int(@SpellCount)"
      /varset StunArray($int(@SpellCount),1) $spell("@Param$int(@SpellCount)",Durration)
      /varset StunArray($int(@SpellCount),2) $spell("@Param$int(@SpellCount)",CastTime)
      /if n @ShortRange>$spell("@Param$int(@SpellCount)",Range) /varset ShortRange $spell("@Param$int(@SpellCount)",Range) 
      /varadd SpellCount 1
      /goto :SpellLoop 
   } 
   /varsub SpellCount 1 
   /varset CurrCast 0
   /varset NextCast 0
   :StunLoop
      /if n @DurationTimer<=0 /call CastSpell
      /if n @CastTimer<=0 {
         /varadd NextCast 1
         /if n @NextCast>@SpellCount /varset NextCast 0
         
         /varset DurationCalc @StunArray(@CurrCast,1)
         /varsub DurationCalc @StunArray(@NextCast,1)
         
         /varset DurationTimer @DurationCalcs
         /varset CastTimer 10m
         /varset CurrCast @NextCast
      }
      /target npc radius @ShortRange
      /doevents
   /if $target()=TRUE /:goto :StunLoop
/return

Sub CastSpell
   /if n $char(gem,"@StunArray(@CurrCast,0)")>1 {
      /cast "@StunArray(@CurrCast,0)"
      /varset CastTimer @StunArray(@CurrCast,1)s
   }
/return

Sub Event_CastFizzle
   /delay 5
   /call CastSpell
/return

Sub Event_CastInterrupt
   /delay 5 
   /call CastSpell
/return
Edit: Changed the durration calc to adjust for casttime on next spell, Spell should now cleanly chain going off just as last one expires.

NobodyImportant
a lesser mummy
a lesser mummy
Posts: 46
Joined: Sun Nov 02, 2003 8:42 pm

Post by NobodyImportant » Mon Nov 03, 2003 1:32 pm

Well, i havent used or tested this mac, but it seems to me rather than having to run a bunch of tests, you could just use Plazmic's spellcast mac, and make a much simpler mac.

Code: Select all

#include Spellcast.mac

Sub Main
:start
/call Cast "Color Slant"
/call Cast "Color Shift"
/goto :start
/return
Or, if you only wanted to cast the AE stun a certain ammnt of times

Code: Select all

#include Spellcast.mac

Sub Main
/for AEstun 0 to <insert number of times you want to cast>
/call Cast "Color Slant"
/call Cast "Color Shift"
/next AEstun
/return
Now because Enchanter stun cast times are so fast, there could be a problem with this.
You might get the "Recovery time not yet met" error, if you do get that, a simple /delay should fix it right up. just a though I had while reading this.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Mon Nov 03, 2003 2:37 pm

The issue is timing, chain casting as fast as possible is easy to write but blows all your mana. This casts the new spell as soon as the old one is wearing off MUCH more mana effecient.

apollo5145
orc pawn
orc pawn
Posts: 26
Joined: Wed Feb 25, 2004 8:14 pm

Post by apollo5145 » Sun Mar 14, 2004 3:08 pm

Unless you have the skill to guarentee no fizzles, chain casting is alot safer because it covers fiz.