spellcast.mac - updated

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

Moderator: MacroQuest Developers

Xegonite
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 12, 2003 10:43 pm

Subroutine Main wasn't found

Post by Xegonite » Thu Oct 16, 2003 3:01 am

I copy and pasted this. Each time i try and start the macro i get ..

Ending macro: Subroutine Main wasn't found.

I am fairly new ... wtf am i doing wrong?

Thanks in advance

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Thu Oct 16, 2003 3:04 am

Looks like it was missed in the coding. the mac should start

Sub Main

blah blah blah
Blakbelt

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Thu Oct 16, 2003 4:45 am

This is just a casting routine to include in a larger macro.
- Plazmic

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

Post by NobodyImportant » Sun Nov 02, 2003 8:50 pm

There is just 1 problem with this Sub, when it casts.. and doesnt get interupted prematurely, it doesnt re-cast.. it would be to much strain on my brain to try an explain why.
But here is the fix, been working for me.


Code: Select all

:WaitCast 
     /if "$char(casting)"=="TRUE" { 
       /delay 1 
       /goto :WaitCast 
     } 
  /delay 5
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
The reason i thought this fix was necesary is i code alot of macs for alot of diffrent things.
And if for instance a cleric is casting DA, while getting beat on, finishes casting, gets interupted but doesnt re-cast, /bye.

User avatar
operat0r
RTFM, then ask again
Posts: 61
Joined: Thu Aug 28, 2003 2:04 am

keepaway

Post by operat0r » Sat Feb 14, 2004 2:59 am

the "SpellCast.inc
| This will cast a spell reliably for you... "

wont really work when your getting smacked by a mob .. :shock:

check the link for updated code ...

Code: Select all

Sub KeepAway
/if $char(class)!="druid" /return  | check your a druid before running 
   :Loop 
/echo keepaway 
/face $target(heading) 
/if Combatstatus==0 /return 
/if n $target(distance)<40 { 
[color=red]/sendkey down up [/color]
/delay 8s 
} 
/if n $target(distance)>120 { 
[color=red] /sendkey up up [/color]
/do events 
/return 
} 
      /delay 0 
   /if "$target()"=="TRUE" /goto :Loop 
/return 
with love moron #6895423686

tranze204
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Mar 02, 2004 6:26 pm

Can Someone update this MAC

Post by tranze204 » Sat Apr 03, 2004 11:02 am

Hey Can someone update this mac to work with the latest patch or just tell me what to add and remove inorder to update it myself...i love this mac and the other macs for spell casting out there dont seem to work as well as this one...Thanx alot ( PLEASE HELP ME OUT)

PhrostByte911
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 06, 2004 8:39 pm

Changes for new MQ

Post by PhrostByte911 » Sun Apr 04, 2004 4:49 pm

I'm at work so I can't test this, if it doesn't work plz post the error msg.

Code: Select all

** CAST_OUTOFMANA 
** CAST_OUTOFRANGE 
** CAST_CANNOTSEE 
** CAST_STUNNED 
** CAST_RESISTED 
** 
** New Vars Modification 
** Plazmic's no globals needed version 
**| 

|Oct 9, 2003 - Updated to work with new vars and $char(casting) - gf 
|Oct 11, 2003 - switched some logic, removed defines - gf 
|Oct 15, 2003 - Item support added by EqMule
|April 4, 2004 - Edited to use new MQ2 System 


#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,Item)] 
  /if n $char(gem[,"@SpellName")==0 /return CAST_UNKNOWNSPELL 

  :StartCast 
  /call ClearReturnValue 
  /if n $char(gem[,"@SpellName")<0 { 
     /delay 0 
     /goto :StartCast 
  } 
  /if $defined(Item)==TRUE { 
    /cast item ["@SpellName"] 
  } else /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 "$return"=="CAST_RESTART" /goto :StartCast 
     /if "$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 

PhrostByte911
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 06, 2004 8:39 pm

Post by PhrostByte911 » Sun Apr 04, 2004 7:21 pm

Returns aren't working, fixing them now.

~Phrost~

PhrostByte911
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 06, 2004 8:39 pm

Post by PhrostByte911 » Sun Apr 04, 2004 8:23 pm

Been messing with it and haven't got it to work. If you do, more power to yah, gluck.

~Phrost~

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Mon Apr 05, 2004 3:11 am

One question...

WHY?

Snippits section.
SpellCast.inc

Tried. Tested. True.

Currently converting it over to new data types....should be released shortly after testing is complete.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!