|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu May 22, 2008 9:42 pm
broken alias? |
it only seems to work when i type go telgoran but go jungle and go help are defunct... in other words, when i type the former, it does the command, but when i do the two latter, it does nothing. what am i missing? =**[
Code: |
<alias name="go" id="293">
<value>#IF (%1 = "telgoran") {#2 n;#6 e;s;#2 e;s;#2 e;s;#18 e;#4 s;#4 e;#2 s;#4 e;#4 n;#3 e;n;w;n;emote has arrived!}
#IF (%1 = "jungle") {#2 n;#6 e;#5 s;emote has arrived!}
#IF (%1 = "help") {#WINDOW {misc} {%ansi( white) AutoWalk Commands and Locations};#WINDOW {misc} {%ansi( white) ~[telgoran~] - Telgoran};#WINDOW {misc} {%ansi( white) ~[jungle~] - Jungle}}</value>
</alias> |
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri May 23, 2008 2:55 am |
Why not use #SWITCH instead of all these #IFs? Change it to:
Code: |
#ALIAS go {#SWITCH (%1) ("telgoran") {commands here} ("jungle") {commands here} ("help") {commands here}} |
It looks cleaner and should have no problems with jungle and help. However, unless you put a fail command at the end, if you typo something, it won't return anything.
Charneus |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri May 23, 2008 1:21 pm |
The original code works for me, I don't know why it isn't for you. I could make some other suggestions to make the code look nicer, but it should work fine as it is.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Fri May 23, 2008 2:05 pm |
i wonder if i have something else that might be affecting this command? i'm gonna try the #switch that does look very much cleaner, that... and i think it'll be replacing a TON of my #if's statements... LoL
|
|
|
|
|
|