help with a health macro...

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

help with a health macro...

Post by gingertips » Tue Jul 23, 2002 7:13 am

(( edit: L124RD likes code brackets ))

im using 2 other chars to powerlevel my main one. i only have enough monitors to display the main powerleveler and the char im powerleveling.

the 2nd powerleveller I will use to provide backup heals & buffs, but as i cannot see health status, im thinking of including a health status line in the macro - in the event of their health dropping to less than 80%, then it sends a tell to my main char to say IM LOSING HEALTH & i can then either get it to succor automatically, or just end macro and wait for me to use kvm switch and take manual action.

Heres what im thinking of including into my customised druid script - does it look ok?

Code: Select all

   /if n $hp(pct)<80 /goto SubAlert

SubAlert
/tell <yourcharacterhere> my healths less than 80%, help!
 
My question is where in my script is best places to put these lines & I guess I also need additional /return lines as well. Also, how often would it poll the health status - do i need to specify how often to check it?

Heres druid script i use (modified from one from this forum!)

Code: Select all

#include SpellSub.mac 
#include routines.mac 
#chat tell 

Sub Main 
    :loop  
      /doevents  
    /goto :loop 
/return 

Sub Event_Chat 
   /stand 
   /target $p1 
   /if $p2~~"heal" /call HealSub 
   /if $p2~~"DS" /call  DSSub 
   /if $p2~~"DD" /call DDSub 
   /if $p2~~"Regen" /call RegenSub 
   /if $p2~~"Succor" /call SuccorSub 
   /if $p2~~"lower" /call LowerSub 
   /if $p2~~"snare" /call SnareSub 
   /if $p2~~"root" /call RootSub 
   /if $p2~~"come" /call GoTarget 
   /if $p2~~"self" /call SelfBuff 
   /if $p2~~"go home" /call GoHome 
   /delay 15 
   /sit 
/return 

Sub HealSub 
   /tt INC Heal for %T 
   /call SpellSub 1 5 
/return    

Sub DSSub 
    /tt INC Damage Shield for %T 
    /call SpellSub 2 5.25 
/return 

Sub DDSub 
    /assist $p1 
    /delay 5 
    /tell $p1 Casting DD against %T 
    /call SpellSub 3 6.5    
    /target $p1 
    /tt DD cast 
/return 
   
Sub RegenSub 
    /tt INC Regen for %T 
    /call SpellSub 4 8.5 
/return 

Sub SuccorSub 
    /tt Casting Succor 
    /call SpellSub 5 11.5 
/return 
    
Sub LowerSub 
    /assist $p1 
    /delay 5 
    /tell $p1 Casting Ro against %T 
    /call SpellSub 6 8.5    
    /target $p1 
    /tt Ro Cast 
/return    

Sub SnareSub 
    /assist $p1 
    /delay 5 
    /tell $p1 Ensnaring %T 
    /call SpellSub 7 5.75    
    /target $p1 
    /tt Mob ensnared 
/return 

Sub RootSub 
    /assist $p1 
    /delay 5 
    /tell $p1 Rooting %T 
    /call SpellSub 8 5.5    
    /target $p1 
    /tt Mob rooted 
/return 

Sub GoTarget 
   /stand 
   /face $p1 
   /varset v90 $target(id) 
   /tt I'm coming to you %t, no other actions possible in the next 10 Seconds 
   /varset t0 10s 
   :CloserAF 
      /if "$target(id)"!="$v90" /goto :EndAF 
      /if n $target(distance)>14 /call AutoRun 1 
      /if n $target(distance)<15 /call AutoRun 0 
      /if n $target(distance)<5 /call BackPedal 0 
      /if n $target(distance)>4 /call BackPedal 1 
      /face $p1 
      /if n $t0==0 /press esc 
   /goto :CloserAF 

   :EndAF 
   /call AutoRun 0 
/return 

Sub SelfBuff 
   /sendkey down F1 
   /sendkey up F1 
   /Call SpellSub 4 8.5
   /sendkey down F1 
   /sendkey up F1 
   /call SpellSub 2 5.25
   /target $p1
/return 

Sub GoHome 
   /sit 
   /camp desktop 
   /unload 
/return

Wally
decaying skeleton
decaying skeleton
Posts: 6
Joined: Wed Jun 26, 2002 11:18 am

Post by Wally » Tue Jul 23, 2002 1:03 pm

what I've found ouf so far is that $hp(pct) has been replaced with $char(hp,pct)

that made some of my old macro's work again.

cyberglitch
a lesser mummy
a lesser mummy
Posts: 42
Joined: Wed Jun 26, 2002 4:40 pm

Post by cyberglitch » Tue Jul 23, 2002 4:26 pm

Best place would be put the /if statement in the main loop so it's always checking on the health and if getts to a certain point then /calls. If you put it in anything else it's only going to /call if that other thing is triggered as well.