math on the /if line?

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

math on the /if line?

Post by OldNecro » Mon Feb 10, 2003 5:48 am

can I do this:

/if (hp,cur)< ((hp,max)-900) /goto blah

?

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

I dunno

Post by Malachi » Mon Feb 10, 2003 9:45 am

I dunno, and I also dunno why you'd wanna do that.... why not:

Code: Select all

 /if n $char(hp,pct)<100 /goto 
only change the 100 to whatever you wanted, like....70 or someting?

/shrug

~malachi
~Oh danny boy, the pipes the pipes are calling.~

lifewolf
a ghoul
a ghoul
Posts: 143
Joined: Fri Oct 18, 2002 6:29 pm

Post by lifewolf » Mon Feb 10, 2003 11:03 am

Put math problems in $calc()

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Mon Feb 10, 2003 3:50 pm

well, since a person doesn't have the same number of hp at all times, based on other people's buffs and whatnot, and my lifetap over time heals about 900 points after the effect of lich is removed, it needs to check the actual max HP less 900 on the fly to account for those changes to keep me as close to full health as possible. Using a percentage would cause varied results and only work perfectly in once specific instance.

kazan
a lesser mummy
a lesser mummy
Posts: 36
Joined: Wed Sep 04, 2002 6:56 pm

Post by kazan » Mon Feb 10, 2003 6:42 pm

/if n $char(hp,cur)<$calc(char(hp,max)-900) /call lifetap