Possible Bug

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Possible Bug

Post by driftinsupra » Wed Sep 10, 2003 7:19 pm

I am not sure if I am just an idiot or not or something changed. The script used to run perfectly but since the last patch now it just crashes me to desktop:

Code: Select all

Sub Cast
  /if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL 
  :StartCast 
  /if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0" 
  /cast $char(gem,"$p0") 
  /varset CastTimer $int($spell("$p0",casttime)*10+$spell("$p0",recoverytime)*10) 
  /varset CastStatus CAST_SUCCESS 
  :WaitCast 
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
     /if n $CastStatus==CAST_RESTART /goto :StartCast 
     /if n $CastStatus>=CAST_RESTART /return $CastStatus 
  /if n $CastTimer>0 /goto :WaitCast 
  /varset CastTimer 0 
  /return CAST_SUCCESS 

Sub WaitForRefresh 
   :LoopWaitForRefresh 
      /delay 0 
   /if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh 
   /return



Sub Event_Fizzle 
   /varset CastStatus CAST_RESTART 
   /return 

Sub Event_Interrupt 
   /varset CastStatus CAST_RESTART 
   /return 

Sub Event_Recover 
   /varset CastStatus CAST_RESTART 
   /delay 5 
   /return 

Sub Event_Standing 
   /varset CastStatus CAST_RESTART 
   /stand 
   /return 

Sub Event_Collapse 
   /varset CastStatus CAST_RESTART 
   /return 

Sub Event_OutOfMana 
   /varset CastStatus CAST_OUTOFMANA 
   /return 

Sub Event_OutOfRange 
   /varset CastStatus CAST_RESTART 
   /return 

Sub Event_NoLOS 
   /varset CastStatus CAST_CANNOTSEE 
   /return 

Sub Event_Stunned 
   /varset CastStatus CAST_STUNNED 
   /return 

Sub Event_Resisted 
   /varset CastStatus CAST_RESTART
   /return
It crashes me to desktop as soon as I am just about to cast a spell so my guess is it is occuring somewhere is here:

Code: Select all


Sub WaitForRefresh 
   :LoopWaitForRefresh 
      /delay 0 
   /if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh 
   /return
If it is me thaty is an idiot then just post and tell me and I can move on with my life. Otherwise I would appreciate knowing I am not as big of an idiot as first though and that there is somethign wrong with mq still.
Last edited by driftinsupra on Wed Sep 10, 2003 9:12 pm, edited 2 times in total.

Shocks
a ghoul
a ghoul
Posts: 101
Joined: Tue Feb 18, 2003 3:26 pm
Contact:

Same here.

Post by Shocks » Wed Sep 10, 2003 9:03 pm

$char(gem,spellname) is whats causing my client to crash. Only when it is in the first em slot...
Last edited by Shocks on Sun Sep 14, 2003 10:08 am, edited 4 times in total.

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Wed Sep 10, 2003 9:13 pm

I think it might have something to do with this

$char(gem,"$p0")<0

although when I do a /echo $char(gem,"any spell here") I does give me the gem number, as soon as I get rd of that line my script works.

mongo
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Jun 22, 2003 7:52 pm

having the same problem too

Post by mongo » Wed Sep 10, 2003 9:30 pm

I'm not crashing to desktop, but /memspell works fine at chat window, but in a script, I get "No such spell set exists. Usage:/memspellset <index | partial name>"

Code: Select all

sub main
   /memspell 1 gate
   /memspell 2 "complete healing"
/return

Shocks
a ghoul
a ghoul
Posts: 101
Joined: Tue Feb 18, 2003 3:26 pm
Contact:

Same with memspell

Post by Shocks » Sun Sep 14, 2003 10:11 am

Usage:/memspellset <index | partial name> Is what I get when my macro trys to mem a spel from my script.

When I do it from prompt I get nada.