Public Macros Help with Netheal
Reply
Help with Netheal
Hello

I'm playing on peq, with the UF Maudigan MQ2 release....And i'm quite a macro newbie
I'm trying to enhance an old HealBot macro found a mq2 forum.

It basically have your healer target a fixed list of characters, and if their HP is below 70%, heal them.

The drawback is that it has your healer target every memeber every seconds, and it makes me crazy

So i'm trying to plug the macro with NetHeal to check my toons hp without targeting them.

I have something like that

Macro
More +

:healtoon1
/if (${NetHeal[toon1].PctHPs}<70)  {
        /echo "toon1 heal"
        /target toon1
        /goto :healtoon
   } else {
goto :healtoon2
}

:healtoon2
/if (${NetHeal[toon2].PctHPs}<70)  {
        /echo "toon2 heal"
        /target toon2
        /goto :healtoon
   }
:healtoonX
...


So here is my prob.Sometimes my toon2 or toon3 or toon4 are not loaded, or not in the zone.
As soon as the macro try to parse (${NetHeal[dead_or_missing_toon].PctHPs}<70)
it catches a NULL, and seems like it behaves as if NULL<70 (it goes into the :healtoon part. So well my macro is looping

My question is, how can you trap a regular expression for a NULL return, and check that NULL return ?
something like (and this exemple doesn't work, i tried it) :

/if (${NetHeal[toon2].PctHPs}<70) && (${NetHeal[toon2].ID}.NotEqual[NULL]

thanks !
Sun May 08, 2011 4:55 am
Fast reply from my phone.

Use netbots to check if in zone first. I would assume your heal routine is making a range check.

If in zone I would skip the /target and instead /call healroutine NetBots[toon].ID
_________________
Sorvani
Sun May 08, 2011 7:37 am
Senior Project Member
thanks, i found what i wanted

/if (${NetBots[Blumblum].Name.Equal[NULL]})

it catches the NULL perfectly, somehow i didn't manage to do it with NETHEAL (or maybe i had a wrong syntax)

I noted your point with checking the toon range, it's a good point, i'll check the TLO to see which one can give me the information (damned wiki, it's not that easy to find information & examples)

thanks !
Sun May 08, 2011 9:12 am
This is how you check distance for a spell.
Macro
More +
/if (${Spawn[Bloom].Distance3D} <= ${Spell[HealSpell].MyRange}) /call HealRoutine


Here is a simple loop to loop through netbots.
Macro
More +
| an example of looping through all the toons on your EQBCServer with NetBots
Sub Main
        /delcare i int local 0
        /declare Toons string local ${NetBots.Client}
        /declare ToonName string local
        /declare HealSpell string local Holy Light

        :CheckAgain
        /for i 1 to ${NetBots.Counts}
                | dump the toon name into a variable to make coding easier
                /varset ToonName ${Toons.Arg[${i}, ]}
                | now check whatever criteria you need, in this example Toon is in zone and in range of the heal spell
                /if (${NetBots[${ToonName}].InZone} && ${Spawn[${ToonName}].Distance3D} <= ${Spell[${HealSpell}].MyRange}) {
                        | since your heal routine is currently expecting a target to already be aquired let's get the target
                        /target ID ${NetBots[$ToonName].ID}
                        /delay 1s ${Target.ID}==${NetBots[$ToonName].ID}
                        | check that I actually have the target before going into the routine.
                        /if (${Target.ID}==${NetBots[$ToonName].ID}) /call HealRountine
                }
        }
        /goto :CheckAgain
/return

_________________
Sorvani
Sun May 08, 2011 9:47 am
Senior Project Member
wow, this is way ahead of what i'm able to code myself for the moment

thanks sorvani, i'll use that
Sun May 08, 2011 10:39 am
I try to avoid loops as much as possible in my macros
Macro
More +

/declare HealAt int local 30

/if (${NetWorst.Request[radius100 pc hp${HealAt} all]} > 0) {
    /worsttarget pc all hp${HealAt}
    /call HealRoutine
}

This will target the character with the lowest HP% as long as they're below 30%
Sat May 28, 2011 3:21 pm
How would it get set up to array the class? I would like to set this up but exclude class warrior.

Macro
More +

/declare x int local
  /for x 1 to 12
         
        /varset NetBotsArray${x} ${NetBots.Client.Token[${x}, ]}

  /next x
/return


My thinking is i could declare the classes and then filter that way using in the same for loop:
Macro
More +

/varset NetBotsArrayClass${x} ${NetBots.Client.Token[${x}, ]}
Fri May 24, 2013 6:32 am
Listen to This Guy
/if (${NetWorst.Request[pc all83 war82 pal82 group radius90]}>0) /casting "Word of Vivification"
Fri May 24, 2013 6:43 pm
Listen to This Guy
Public Macros Help with Netheal
Reply