a nofizzle mac?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

thepaan
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Jul 30, 2003 8:35 am

a nofizzle mac?

Post by thepaan » Sun Oct 12, 2003 10:03 am

so i'm trying to write this macro that i can have runing in a constant loop all the time that all it does is monitor to see if i fizzle and recast automatically for me.

#turbo

#event CastSpell "You begin casting"

Sub Main

Sub Event_CastSpell

/return

is what i got so far, i know thats sad but i'm not a programmer and this stuff is mind-wracking.

i cant figure out how to have it cast the last spell. i didnt see a variable for that in the manual. i DID see some other ones i thought i could use but dont quite understand how to use them.

say this string comes up in my text

You begin casting Shield of Maelin.

that is the format whenever you cast a spell so do i store it or use it like a command '$strlen' have it tell me how long it is then use that information to tell me the values to use with '$mid' so...

$strlen ("You begin casting Shield of Maelin.")

will return 35. but how to i load whatever the string may be into that line? it'd have to be a variable itself so how do i find a string in the chat and store it to a variable is what i need to know i guess. Anyways, the first 18 char you dont need and the last char you dont need. so whatver that results (35 - 19 = 16)should be used here

$mid (18,16,"You begin casting Shield of Maelin.")

where that 18 will always be 18 because the line always says that part and the last part will be the result of the previous equation.

that should return 'Shield of Maelin'

which i can then use as the spell to recast

#event NoRecovery "Spell recovery time not yet met."
#event Fizzle "Your spell fizzles!"


/sub event_NoRecovery
/cast Shield of Maelin
/return

/sub event_Fizzle
/cast Shield of Maelin
/return

or something like that.... i'd appreciate pointers tips or any type of help anyone can offer.
i should have been a gnome

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Sun Oct 12, 2003 10:15 am

Give this thread a try.

silentsong
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sun Aug 31, 2003 10:58 pm

Fizzle event

Post by silentsong » Mon Oct 13, 2003 12:37 pm

Hi,

Here is part of a spell casting macro I wrote to repeatedly cast a spell over and over. The code below you can copy into your macro to handle fizzles, you just need to write the functionality you want when the fizzle is caught. All i do is set a flag to true, and handle it in the CastSpell procedure.

THIS IS NOT THE WHOLE MACRO, BUT SHOWS YOU HOW TO HANDLE FIZZLES.


#event EvtFizzle "Your spell fizzles!"

sub Main

/declare bFIZZLE global | used as a flag
/varset bFIZZLE "FALSE"

:Loop
/doevents
/call CastSpell
/goto :Loop

/return


sub CastSpell

| Cast spell
/cast $char(gem,"@SPELLNAME")
/delay 1s | **** DELAY SEEMS TO BE NEEDED OR EVENT ISNT SEEN STRAIGHT AWAY

/doevents EvtFizzle | If a fizzle happened, run the procedure Event_EvtFizzle

| if no fizzle happened, do whatever. change to TRUE if you want reverse logic
/if @bFIZZLE=="FALSE" blah blah blah

/varset bFIZZLE "FALSE" | reset fizzle flag

/return


|
| Handle Fizzles
|
Sub Event_EvtFizzle

/varset bFIZZLE "TRUE" | set fizzle flag to true and handle in main procedure
/echo Spell fizzled so bypassing spell cast time.

/return




Hope this helps squire.

Ss.
Silentsong00