$group()

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

rowdan
orc pawn
orc pawn
Posts: 16
Joined: Wed Feb 05, 2003 4:57 pm
Location: el cajon
Contact:

$group()

Post by rowdan » Thu Jan 29, 2004 4:30 am

i was woundering if there is a way to check a group members hp percent useing some thing like $goup(), curently i have been useing

/press f2
/echo $target(hp,pct)



any ideas on how to use a variable?

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Post by Gumby » Thu Jan 29, 2004 6:19 am

/declare GroupMemberID global (or local whatever)
/varset GroupMemberID $group(x) | X is spot in group, 1-5 for mates

Two things you can do from here:

1) /tar id @GroupMemberID /echo $target(hp,pct)

2) /echo $spawn(@GroupMemberID,hp,pct).

It's been beaten into me though I've never tried it, that the $spawn method for checking health isn't always accurate for this and for something as critical as a solid healing routine... Never tried it myself but I'm inclined to believe him at least until I give it a shot in rewriting my druid, so test thoroughly imo.

G

Brambo
orc pawn
orc pawn
Posts: 19
Joined: Thu Dec 18, 2003 4:08 am

Post by Brambo » Thu Jan 29, 2004 6:22 am

$group(#) will give you the spawn id for the respective groupmembers, combine it with $spawn(id,hp,pct) to make:

Code: Select all

$spawn($group(#),hp,pct)
N.B. This only works if the grouped player is in the same zone.