Basic macro question.. /if

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

Moderator: MacroQuest Developers

arantius

Basic macro question.. /if

Post by arantius » Tue Aug 20, 2002 9:39 pm

Macroing emerald imbue. Trying to make it automatically stop when I don't have enough mana. Code I put is:

Code: Select all

/varset $v1 $char(mana.cur)
/if $v1<200 /goto :Done
But it seems to stop at about 2000 not 2000.

arantius

Post by arantius » Tue Aug 20, 2002 9:41 pm

Duh obvious typo. Seems to stop at 2000 not 200.

powerspike
a ghoul
a ghoul
Posts: 80
Joined: Sun Aug 11, 2002 11:40 pm
Location: Australia
Contact:

Post by powerspike » Tue Aug 20, 2002 9:41 pm

try

Code: Select all

/varset $v1 $char(mana.cur) 
/if  n $v1<200 /goto :Done 

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Tue Aug 20, 2002 11:58 pm

heh... must resist posting my macros :p


soon..

Mag

powerspike
a ghoul
a ghoul
Posts: 80
Joined: Sun Aug 11, 2002 11:40 pm
Location: Australia
Contact:

Post by powerspike » Wed Aug 21, 2002 12:23 am

resistence is fultile, you will be asimulated.

night
orc pawn
orc pawn
Posts: 24
Joined: Sat Jun 22, 2002 7:08 pm

What about this

Post by night » Wed Aug 21, 2002 12:43 am

Code: Select all

/if n $v99==999 goto:
That code is used in sempi's spellcasting skillup macro. If the argument returns 999(OOM) then the macro goes to whereever you want it to next, like sit and med.

Now my question. I want to modify this code so that instead of sitting and then using a /delay for five minutes I want the macro to continually check my mana so I can do other things while I med like fish and senseheading. The thing is what code would work to check mana? In other words if "999" equals oom to MQ then what does FM equal to?
thanks

powerspike
a ghoul
a ghoul
Posts: 80
Joined: Sun Aug 11, 2002 11:40 pm
Location: Australia
Contact:

Post by powerspike » Wed Aug 21, 2002 12:54 am

something like

Code: Select all

/if n $char(mana,pct) == 100

$char(mana,pct) is the % of mana you currently have, if it's 100 your at FM