Calculations

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

Moderator: MacroQuest Developers

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Calculations

Post by BadBoy » Sun Sep 29, 2002 12:03 pm

How do you do calculations in code? like for the mana, /mana=/echo Current Mana: $char(mana,cur) -- Max Mana: $char(mana,max), I want it to read something like: /g $char(mana,cur) / $char(mana,max) * 100, so i dont have to keep typing it out.

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Sun Sep 29, 2002 12:29 pm

/g $char(mana,pct)

:)

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Post by DeathSpiral » Sun Sep 29, 2002 12:31 pm

If you are looking for your current mana percent, you actually want $char(mana,pct). IE, to answer a group mana check...

Code: Select all

/alias /mr /gsay $char(mana,pct)m
when ever you /mr after that....

Code: Select all

You tell the group, 'XXm'
Or whatever the output is for telling the group.
I am orc pawn, hear me yell for centurians...

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

thx

Post by BadBoy » Sun Sep 29, 2002 12:38 pm

thx