Auto determine new Tank name.

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

unknwon
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 02, 2004 11:18 am

Auto determine new Tank name.

Post by unknwon » Mon Apr 26, 2004 2:43 pm

i`ve been trying to automatically determine a new Tank name from the list of group members, basically it checks to see if the orignal tank left the group, if so it will than check for a warrior type class from the remaining group members and use it as the assist.

he`s the code i have so far..not sure what else to try.

------------------------------------------
Sub Event_tankcheck
/if (${Spawn[@Param0].ID}==0){
/echo "Tank Gone. shoot."
/declare i local
/for i 1 to ${Group}
/if (${String["Warrior Ranger Shadow knight Paladin berserker monk"].Find[${Group[@i].Class}]}) {
/varset tankID ${Spawn[${Group[@i].Class}].ID}
}
/next i



}
/return

-------------------------------------

Anyone have an ideas about how to do this correctly.

Micro
a lesser mummy
a lesser mummy
Posts: 40
Joined: Fri Mar 12, 2004 5:56 pm

Post by Micro » Mon Apr 26, 2004 3:03 pm

You dont want to check the Spawn, because the person may leave the group but not leave the zone. In the event that any person leaves the group, you should run the routine, then make the routine place weight upon each class in order of importance.

Keep the name of the current highscore in a global
each person is checked, each class gets a rank, the higher the tank ability, the higher the rank, for example:

10 warrior
9 paladin
9 shadow
8 ranger
8 bard
7 berserker
7 monk

Keep a persons score and name, then when the loop exits, the person with the highest score is copied into the main tank variable.

unknwon
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 02, 2004 11:18 am

Post by unknwon » Tue Apr 27, 2004 6:03 am

i`m new to the MQ2param. i can`t seem to get it working, how would i get it working correct