|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 3:32 pm
Sending fulle name |
I posted this in the general forum...
Before I upgraded to the beta, I had a few alias in the system folder that would replace the
open %1 :: open w, open e, open n, open s
that the mapper sent with
open west, open east, open north, open south
I have been looking over the help files, and the configuration settings in the mapper, but I have not found any hints on how to expand the directions n,e,s,w to north east south and west. I tried replacing the macros with the #KEY function but this did not affect the mapper. Where should I move the alias too, or what is the correct way to handle this? |
|
_________________ <Clever text here> |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Sep 21, 2010 4:45 pm |
#SWITCH (%1)
(n) {open north}
(s) {open south}
(e) {open east}
(w) {open west} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 5:08 pm |
So that did not work either. So on the map there is a door, lets say to the east. As I am walking east I get to the room with the door, and by default when I try to move past the door by hitting either e on the keyboard, or 3 on the numpad, cmud sends to the mud is "open e". This does not work for my mud, I need it to send "open east". I entered the above code
into the command prompt as
#SWITCH (%1) (n) {open north}
(s) {open south}
(e) {open east}
(w) {open west}
But that did not affect the command being send from cmud to my mud. |
|
_________________ <Clever text here> |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 21, 2010 5:35 pm |
No, he means you need to create an Alias, just like you did before. Go into the Settings Editor and create an alias called "open". Then paste the above #SWITCH into the script field for the Alias. Here is the XML you can copy and paste into the settings editor:
Code: |
<alias name="open" id="31">
<value>#SWITCH (%1)
(n) {~open north}
(s) {~open south}
(e) {~open east}
(w) {~open west} </value>
</alias> |
(You need the ~ to prevent an infinite script loop)
Or you can show us your original alias and we can help you fix it to make it work. But nothing should have changed with your alias in the new mapper. |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 6:16 pm |
I must be missing a step somewhere I have the alias set up in my system folder
Code: |
<alias name="open %1" id="139">
<value>#SWITCH (%1)
(n) {~open north}
(s) {~open south}
(e) {~open east}
(w) {~open west}</value>
</alias> |
However this does not affect anything.
On the map the room to the right is blocked by a door: cmud sends "open e" still.
I pulled up the debugger to check, and it does not look like commands sent from the mapper, trigger aliases?
The alias that used to work is the same as what you made mostly, but without the %1
Code: |
<alias name="open e" id="9">
<value>open east</value>
</alias>
|
Something that interests me even if i manually type open e, the alias is not firing. Do I need a trigger of some type for this to work? |
|
_________________ <Clever text here> |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 21, 2010 7:20 pm |
Alias names cannot have spaces in them. The fact that your alias worked in the past was a bug. You can simulate your old alias using a #ONINPUT command input trigger which will match the entire command line.
I looked more into this and it seems that the alias *is* being called by the mapper, but the %1 argument is not being set. Not sure why, but I'm checking more into this. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 21, 2010 7:21 pm |
Code: |
<alias name="open %1" id="139">
<value>#SWITCH (%1)
(n) {~open north}
(s) {~open south}
(e) {~open east}
(w) {~open west}</value>
</alias> |
No, that is wrong. You do NOT put %1 in the alias name. The alias name should just be "open". |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 7:46 pm |
Sorry, The reason that I did it that way was the not including the %1 results in
ERROR: Syntax error in Alias: open : illegal token: (n) {~open north} |
|
_________________ <Clever text here> |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Sep 21, 2010 9:16 pm |
#ALIAS open($exit) {
#SWITCH ($exit)
(n) {~open north}
(s) {~open south}
(e) {~open east}
(w) {~open west}
} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 9:31 pm |
First thank you for taking so much time to help me with this problem. Now the alias works when I type for example open n, it sends open north, but when I'm walking and and there is a door north, nothing is sent from the mapper anymore? I opened up the debugger and here is the result.
(with alias on)
0.0048 |
0.2765 | a Kingdoms |The door is closed.
0.0020 | f Kingdoms | Pattern: The door is closed.
0.0021 | n Kingdoms | Exec Trigger "The door is closed."
0.0029 | f Kingdoms | Pattern: The door is closed.
0.0021 | n Kingdoms | Exec Trigger "The door is closed."
0.0017 | f Kingdoms | Pattern: %1 closed : (%1="The door is")
0.0019 | n Kingdoms | Exec Trigger "%1 closed"
3.9032 | k Kingdoms | Loc "Kingdoms" changed from "2197" to "2198"
(with the alias off)
0.0018 |
0.2080 | a Kingdoms | The door is closed.
0.0025 | f Kingdoms | Pattern: The door is closed.
0.0034 | n Kingdoms | Exec Trigger "The door is closed."
0.0018 | f Kingdoms | Pattern: The door is closed.
0.0020 | n Kingdoms | Exec Trigger "The door is closed."
0.0018 | f Kingdoms | Pattern: %1 closed "The door is")
0.0102 | n Kingdoms | Exec Trigger "%1 closed"
The Alias
Code: |
<alias name="open" id="139">
<value>#SWITCH (%1) (n) {~open north}
(s) {~open south}
(e) {~open east}
(w) {~open west}</value>
</alias>
|
I had to move (n) {~open north} to the same line as the switch to stop the previous error.[/quote] |
|
_________________ <Clever text here> |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 21, 2010 10:06 pm |
As I said, the mapper appears to have a bug and does not send the exit direction argument. Should be fixed in the next update.
The alias *is* being called. In the Script Debugger window you need to turn on the "Show all script executions" message to see it fire. It's just not getting sent the argument. |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Sep 21, 2010 10:14 pm |
Understood =)
Again thank you for your help.
**Issue has been resolved with the 3.29 update. |
|
_________________ <Clever text here> |
|
|
|
|
|