NoFizzleCast - My Favorite

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot.

Moderator: MacroQuest Developers

ionsf
a ghoul
a ghoul
Posts: 94
Joined: Wed Jan 14, 2004 10:19 pm

NoFizzleCast - My Favorite

Post by ionsf » Mon Jan 26, 2004 2:40 pm

I got this from pethunter. I think necrofarm was the first one with it..
Mad Props to Scrime, Grimjack & Mixy. Not sure which one made it originally. I'll find out and edit post if I get time.

I use this all the time.
Declare Variable.

Code: Select all

/declare FizzleFlag global 
The actual *snippet* of code.

Code: Select all

Sub NoFizzleCast 
   | make sure we dont get passed a null spell name 
   /if "@Param0"!="" { 
:NoFizzleCastStart 
      /varset FizzleFlag 0 
      /if "$char(state)"!="STAND" /stand 
      | check to make sure we have mana to cast this spell 
      /if n $char(mana,cur)<$spell("@Param0",mana) /call MedUp 
      
      /cast "@Param0" 
      /doevents Fizzle 
      
      | if we fizzled, try to cast again 
      /if n @FizzleFlag==1 /goto :NoFizzleCastStart 
   } 
/return 

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 » Thu Jan 29, 2004 7:46 am

This is exactly why I thought this would be a good idea for a new forum. I never thought to do pre-casting this way before:

Code: Select all

| check to make sure we have mana to cast this spell
      /if n $char(mana,cur)<$spell("@Param0",mana) /call MedUp
I'll have to add this to my SpellCast.inc. :) Thanks!

My SpellCast.inc is quite extensive....trying to make it all-inclusive for any class/situation. Once I'm satisfied with the results, I'll be posting it here.
[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]!!!!!!!!!

ionsf
a ghoul
a ghoul
Posts: 94
Joined: Wed Jan 14, 2004 10:19 pm

Post by ionsf » Fri Jan 30, 2004 3:44 am

Right on. Glad I was useful.


Here is the medup sub that goes with it.

Code: Select all

Sub MedUp 
:MedStart 
     /if "$char(state)"=="STAND" /sit 
     /delay 3m
     /if n $char(mana,cur)<70 /goto :MedStart 
     /if "$char(state)"!="STAND" /stand 
/return 

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Jan 30, 2004 10:09 am

Instead of

/if "$char(state)"=="STAND" /sit

you can just use /sit on and /sit off. /sit by itself is a sit/stand toggle, but specifying on or off causes it to behave the way you want.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 30, 2004 12:06 pm

Actually.. /sit on and /sit off doesn't work properly on bards because of the ability to sit and play a song. On bards if you did a /sit on and then another /sit on it would sit you down then stand you up. I'd stick with your current method (Even though it probably has no bearing on this script).

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

/sit <on><off> is wierd

Post by Preocts » Fri Jan 30, 2004 12:58 pm

/if "$char(state)"=="STAND" /sit
For some reason looked right over this flag in the manual. Makes things a lot smoother for my current macros with foraging, fishing, and what-nots. :D

From my experience with a druid: /sit, /sit on are both toggles. /sit off will stand you up but not sit you down. Unreliable from all my experience. Could be a client side issue because I've heard different reports from different people.


Very nice snippet, nabbed some nice ideas from it and now have a good combo for ldon groups. Stoopid damage shields always fizzling. I'll have to post it once I get the foraging and looting code ironed out.

edit: stoopid typos. ::sighs and looks for more coffee::

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Jan 30, 2004 1:28 pm

Eh, my few macros tend to be simple enough that I can use /sit on|off without problems. I'll have to see how /sit on behaves though. We might want to intercept it and put in our own version so it behaves correctly, i.e. /sit on will not make you stand up if you are already sitting, just won't do anything.

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 » Tue Feb 10, 2004 3:49 am

I'm using this for my sit code:

Code: Select all

   /if $char(mounted)!=TRUE /if $char(state)!="SIT" /sit
And this for my stand code:

Code: Select all

   /if $char(mounted)!=TRUE /if $char(state)!="STAND" /stand
Seems to work for me.
[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]!!!!!!!!!

Dry Leezurd
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Mar 04, 2004 11:21 am

~(_8n(|)

Post by Dry Leezurd » Thu Mar 04, 2004 11:27 am

Thanks for this - it is simple yet elegant.

Using this for my shaman i added in a area to the med sub to canni, for all your buff wench needs:


Sub MedUp
:MedStart
/if $char(mounted)!=TRUE /if $char(state)!="SIT" /sit
/delay 3s
/if n $char(hp,pct)<40 /call Quies
/if n $char(hp,pct)>40 /if n $char(mana,pct)<70 /call Canni
/if n $char(mana,cur)<70 /goto :MedStart
/if "$char(state)"!="STAND" /stand
/return


Sub Canni
/if $char(mounted)!=TRUE /if $char(state)!="STAND" /stand
/call NoFizzleCast "Cannibalize IV"
/delay 4.5s
/return


Sub Quies
/if $char(mounted)!=TRUE /if $char(state)!="STAND" /stand
/press Tab
/delay .5s
/call NoFizzleCast "Quiescence"
/delay 4.5s
/press esc
/return