|
Neros Newbie
Joined: 03 Jun 2003 Posts: 6 Location: Denmark
|
Posted: Sun Aug 31, 2003 4:32 pm
Using a . after a variable |
Hello.
Sometimes when I am bounty hunting I need to go though more of the same type of mob in the same room. I'm trying to make an alias that does this. This is what I've done.
#ALIAS lm {
#VAR i %2
#WHILE (@i <> 0) {
look @i .%1
#add i -1
}
}
If I type lm owl 3, this will be the output.
look 3 .owl
look 2 .owl
look 1 .owl
I need to have it output the following
look 3.owl
look 2.owl
look 1.owl
But how do I more the . without the variable i thinking that it's suddenly an array variable? |
|
|
|
Neros Newbie
Joined: 03 Jun 2003 Posts: 6 Location: Denmark
|
Posted: Sun Aug 31, 2003 5:12 pm |
Typical. After a few hours looking and trying to figure it out, you post your problem. A little while after you solve it yourself.
I made it work this way, and it's even shorter.
#ALIAS lm {#LOOP %2 {look %{i}.%1}}
command ex.
lm owl 3
will output
look 1.owl
look 2.owl
look 3.owl |
|
|
|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Sun Aug 31, 2003 5:12 pm |
I <i>think</i> ths will work...
#ALIAS lm {
#VAR i %2
#WHILE (@i <> 0) {
look @{i}.%1
#add i -1
}
}
Edit: Oh, I see you got yer problem done... Lol. You postedit whie I was typing my answer |
|
|
|
|
|