Check to mem routine please help a total noob

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Check to mem routine please help a total noob

Post by Fuergrissa » Sun Dec 14, 2003 9:23 am

ok i want to check to see if i need to /book during a macro to summon food and drink can anyone help me with this routine please.

Sub check_mana
:med
/if n $char(mana,pct)<10 /goto :sit
/if n $char(mana,pct)==100 /goto :nomed
/return

:sit
/if "$char(state)"=="SIT" /goto :med
/book
/goto :med
/return

:nomed
/stand
/delay 10
/goto :loop (main routine)
/return

Thank you for any assistance in advance

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun Dec 14, 2003 3:12 pm

If I understand what you are trying to do, which appears to be med to full if you are less than 10% mana...

Code: Select all

Sub Main

   /call check_mana

/endmacro

Sub check_mana
     /if n $char(mana,pct)==100 /goto :finished
     /if n $char(mana,pct)<10 { 
        /if "$char(state)"!="SIT" /sit
        /book 
        :med 
        /if n $char(mana,pct)<100 /goto :med
     }
   :finished
/return

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Sun Dec 14, 2003 4:47 pm

thats perfect thank you :)