Auto determine new Tank name.

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

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:42 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.

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Mon Apr 26, 2004 5:18 pm

unknwon wrote:Anyone have an ideas about how to do this correctly.
yes. You use code brackets so it looks like this. Then someone can actually read it.

Code: Select all

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