YAST - Yet another spell trainer.

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

Moderator: MacroQuest Developers

Spectre
orc pawn
orc pawn
Posts: 21
Joined: Tue Sep 02, 2003 10:31 am

Post by Spectre » Sat Oct 11, 2003 4:55 pm

Okay, I had a chance to come home and test. This setup worked fine for me...

Save the following code into a file called spells.mac:

Code: Select all

#event Fizzle "Your spell fizzles!" 
#event Interrupt "Your casting has been interrupted!" 
#event Interrupt "Your spell is interrupted." 
#event Recover "You haven't recovered yet..." 
#event Recover "Spell recovery time not yet met." 
#event Resisted "You target resisted the " 
#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event NoLOS "You cannot see your target." 
#event Stunned "You cannot cast while stunned" 
#event Standing "You must be standing to cast a spell" 
#event Collapse "Your gate is too unstable, and collapses." 

Sub Cast(SpellName) 
  /echo attempting to cast @SpellName 
  /if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL 
  :StartCast 
  /call ClearReturnValue 
  /if n $char(gem,"@SpellName")<0 { 
     /delay 0 
     /goto :StartCast 
  } 
  /cast "@SpellName" 

  :WaitCast 
     /if "$char(casting)"=="TRUE" { 
       /delay 1 
       /goto :WaitCast 
     } 
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
     /if n "$return"=="CAST_RESTART" /goto :StartCast 
     /if n "$return"!="CAST_SUCCESS" /return "$return" 

/return CAST_SUCCESS 

Sub ClearReturnValue 
/return CAST_SUCCESS 

Sub Event_Fizzle 
/return CAST_RESTART 

Sub Event_Interrupt 
/return CAST_RESTART 

Sub Event_Recover 
   /delay 5 
/return CAST_RESTART 

Sub Event_Standing 
   /stand 
/return CAST_RESTART 

Sub Event_Collapse 
/return CAST_RESTART 

Sub Event_OutOfMana 
/return CAST_OUTOFMANA 

Sub Event_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
/return CAST_STUNNED 

Sub Event_Resisted 
/return CAST_RESISTED 
Copy the following code into sptest.mac:

Code: Select all

#turbo

#include spells.mac

Sub Main

/call Cast "@Param0"

/return
I ran this as /macro sptest "Spirit of Wolf", and it worked flawlessly.

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Sat Oct 11, 2003 5:40 pm

all I get is "attempting to cast ( spellname). but it doesnt cast it

Guest

Post by Guest » Sat Oct 11, 2003 8:13 pm

bzt wrote:all I get is "attempting to cast ( spellname). but it doesnt cast it
What spell are you attempting to cast?

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Sat Oct 11, 2003 10:07 pm

ive tried 8 different spells..some 1 word spells, some 2 word spells with the quotes..all the same.

locate corpse, disease cloud, gate, fear..etc

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

<deleted>

Post by Kaitain » Mon Oct 27, 2003 4:17 pm

<deleted>