If Spell Fizzles

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

SirCheese
orc pawn
orc pawn
Posts: 13
Joined: Tue Sep 28, 2004 8:02 pm
Location: Washington DC

If Spell Fizzles

Post by SirCheese » Tue Sep 28, 2004 8:03 pm

Im new to this so dont flame me to bad...

Im trying to find a code where if a spell fizzles it will re cast it.

2nd) is there a url where u can make donations?

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Tue Sep 28, 2004 9:47 pm

You could do something like:

Code: Select all

#event Fizzle "Your Spell Fizzles"

Sub Event_Fizzle
/return ${Bool[True]}


Sub Main
   :FizzleLoop
   /cast "Strike of Solusek"
   /delay 5
   /doevents Fizzle
   /if (${Macro.Return}) /goto :FizzleLoop
/return 

To answer your second question, you can make donations through this page:
http://www.macroquest2.com/main.php?p=donate

Alternately, I would look into using Spell_Routines.inc. Very good include file that handles most spell casting events.

You could then do something like

Code: Select all

/call Cast "Strike of Solusek"
to accomplish the same thing.

SirCheese
orc pawn
orc pawn
Posts: 13
Joined: Tue Sep 28, 2004 8:02 pm
Location: Washington DC

Post by SirCheese » Wed Sep 29, 2004 1:19 am

Thank you so much the Spell_routines.inc worked awsome.


I am also trying to figure out how to determine when a mob dies.

I have a mage and i send his pet in at a %. I want some varset's to reset when the mob dies. Is this doable?

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Wed Sep 29, 2004 2:24 am

You could look for experience messages, similiar to my example of looking for Fizzles.

Alternately, you could see if your target disappears.

Even better, you could have an int called something like CurrentMobID.

Example (untested might have a minor typo or whatnot):

Code: Select all

Sub Main
    /declare CurrentMobID int local

    /assist <person to assist goes here>

   | because Assist pulls info from the server, you might want to have a delay long enough for you to finish aquiring the target
    /delay 5

    /varset CurrentMobID ${Target.ID}

   :YetAnotherLoop
       |Do some stuff here
   /if (${Spawn[${CurrentMobID}].Type.Equal["NPC"]}) /goto :YetAnotherLoop

/return
The example doesn't need to have the mob targeted or see an experience message in order to tell that the spawn has changed to a corpse (or poofed for that matter). The instant the spawn with whatever ID is no longer an NPC (dead or poofed) the loop will discontinue. You could probably apply this concept to your code in one way or another.