Question on spellcasting trainer...

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Xecros
a lesser mummy
a lesser mummy
Posts: 54
Joined: Tue Apr 22, 2003 9:24 am

Question on spellcasting trainer...

Post by Xecros » Sat Aug 30, 2003 9:16 pm

I'm writing a script to practice spell casting. I have one question so far...

When i have my script cast a spell, does macroquest pause at that line until spellcasting is done, or do i need to write in a delay equal to the spell casting time?

Thank you!
Xecros

Consilium
Contributing Member
Contributing Member
Posts: 100
Joined: Wed Oct 02, 2002 10:42 pm

need the delay

Post by Consilium » Sat Aug 30, 2003 9:31 pm

/delay equal to spell casting time

im just a newb though I may be wrong
-SH
+Student
digitalsavior.com

Xecros
a lesser mummy
a lesser mummy
Posts: 54
Joined: Tue Apr 22, 2003 9:24 am

Post by Xecros » Sun Aug 31, 2003 1:45 am

Thats what i figured, i just wasn't sure....

Thank you again! :D

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Sun Aug 31, 2003 12:54 pm

Or you can do a check versus $char(gem,xxx), technically that would be the right way since using delay it's affected by lag (screen and connection). Both ways work fine tho :)

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Post by Shin Noir » Thu Sep 04, 2003 9:25 pm

hehe if you're having probs with this, this code should be really easy.

Code: Select all

sub main
:Looper
/if $char(mana,pct)<20 {
/if $char(state)==STAND /sit
} else {
/if $char(state)!=STAND /stand
 /cast 1
  /delay 35
}
 /goto :Looper
/return
1 is spell gem 1, you can change that to whichever you're practicing, also change 35 to however long the delay is for your spell.
type
/endm
to stop <shrugs> should work ya?

EDIT: Valerian likes code brackets.

User avatar
Curious
a ghoul
a ghoul
Posts: 88
Joined: Wed Aug 27, 2003 5:19 am

Post by Curious » Fri Sep 05, 2003 5:18 am

Code: Select all

:Loop
/cast "Training Spell Name here"
/delay $calc($spell("Training Spell Name here",mycasttime)*10)
/delay $calc($spell("Training Spell Name here",recasttime)*10)
/goto :Loop
Haven't had a chance to test it, but it should work. The better way would be:

Code: Select all

:Loop1
/cast "Training Spell Name here"
:Loop2
/doevents
/if n $char(gem,"Training Spell Name here")<1 /goto :Loop2
/goto :Loop1
Of course, neither of these are complete macros ... you'd have to figure out how to add them into your existing macros. Should be a place to start though.