Castgem.mac

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

Moderator: MacroQuest Developers

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Castgem.mac

Post by bob_the_builder » Fri Oct 10, 2003 11:47 am

Code: Select all

| castgem.mac 10/11/03 
|  Spell Practice by m0nk
|  Revised by Bio_War and Spectre  
| /macro castgem # 

#turbo 
#Event NoMana    "Insufficient Mana to cast this spell" 
#Event Sitting   "You must be standing to cast a spell." 
#Event Recovered "You haven't recovered yet..." 
#Event BusyCast  "You can't use that command while casting..." 

Sub Main 
   /if $defined(@Param0)<1 { 
      /echo Usage: /macro castgem # 
      /endmacro 
   } 
   /declare Gem1 global 
   /declare Gem2 global 
   /varset Gem1 @Param0 
   /varset Gem2 "$char(gem,@Gem1)" 
   /stand 
   /call Loop 
/return 

Sub Loop 

   :Loop 
   /doevents 
   /if n $char(gem,"@Gem2")<0 /goto :Loop 
   :CheckCursor 
   /delay 0s 
   /if $cursor()==TRUE { 
      |/click left auto 
      /autoinv 
      /delay 1s 
      /goto :CheckCursor 
   } 
   /cast @Gem1 
   /goto :Loop 
/return 

Sub Event_NoMana 
   /sit off 
   /sit on 
   :Med 
   /delay 30s 
   /if n $char(mana,pct)<90 /goto :Med 
   /stand 
/return 

Sub Event_Sitting 
   /stand
EDIT - Updated working castgem.mac
Last edited by bob_the_builder on Sat Oct 11, 2003 1:28 pm, edited 2 times in total.

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

Post by bzt » Sat Oct 11, 2003 3:51 am

I get the message that I do not have that spell memed. What do I need to change so that this works for me?

Thanks

Bio_War
a lesser mummy
a lesser mummy
Posts: 36
Joined: Sun Sep 29, 2002 1:03 pm

not working here either

Post by Bio_War » Sat Oct 11, 2003 11:05 am

I get the same message

Bio_War