|
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Thu Sep 17, 2009 5:15 am
need help with Role Call |
ok i have 4 chars
my leader tank is going to say role call and the other chars all respond here.
it comes in on 3 different lines
what i want to do is if they don't all answer have my mage run a macro called gather party which teleports him to the leader then summons the other 2 chars.
You say: role call
> << Night >> here
<< Memphis >> here
<< Trixen >> here
some times it looks like this some times there are other lines of text between the responses.
Thanks for any help. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Sep 17, 2009 4:29 pm |
The approach I would take is to do this.
1. Make a list of every one in your party
2. Just before role call make a copy of that list
3. Trigger the role call and remove each member from the temp copy
4. If after roll call the temp copy is not empty, call you macro to gather the party. |
|
_________________ Asati di tempari! |
|
|
|
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Fri Sep 18, 2009 8:08 pm ok now what |
i did what you suggested and it works marvelous. i create string list and add all the names then call role and delete everyone who answers.
how to i then get the vaules out of the array of unknown length and stop when i am done?
i would think that i need to look at the first index and summon that person then delete them then ????
is there a command that will check the array to see if its empty? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Fri Sep 18, 2009 10:49 pm |
#DELITEM varnamewithoutthe@ member
#IF (@arrayname) {will return true if it has any value other than 0} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Liath Novice
Joined: 25 Aug 2009 Posts: 38
|
Posted: Sat Sep 19, 2009 8:17 am |
could also use #WHILE (@arrayname >0) {dostuff}
|
|
|
|
Posideon Beginner
Joined: 06 Feb 2005 Posts: 26
|
Posted: Sun Sep 20, 2009 4:00 pm |
You could also use %numitems(@arrayname) to check the size, and to look at first index then access it and delete it use the %pop() function. Does exactly what you want.
|
|
|
|
|
|