|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Tue Oct 18, 2005 9:15 pm
MUDs misunderstanding the . in a sw path |
for instance in my mud . is used as a shortcut to talk on a channel
.this channel sucks for example
if I type .2n into my command line and push enter it evals out right and goes n n
but if a script sends .2n to the mud I get
You gossip, "2n"
How do I get the .2n to eval out from inside the script?
Thanks. |
|
_________________ The Seaworthy |
|
|
|
OmegaDeus Apprentice
Joined: 14 Sep 2005 Posts: 121
|
Posted: Tue Oct 18, 2005 9:41 pm |
#exec {.2n}
|
|
_________________
Look at me I've got zSKILLS |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Oct 19, 2005 1:38 am |
I believe you can change the speedwalk character in Preferences. That might be simpler, depending on how habitual you became.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Wed Oct 19, 2005 3:09 am |
actually the #exec worked well but so would have the preferences option. Thank you. Another question however is, my mud uses run 2n as its own internal SW command. What I cant get to happen is the ability to use run 3n and have the mud follow me. .3n works but its slower movement because the mud thinks your entering n 3 times manually. My ideal situation would be to be able to type in run 3n and have the zmud map follow just as if I had typed .3n. Obviously these SW's would be much much longer in actuality, I just using 3n as an example.
Any help Matt? |
|
_________________ The Seaworthy |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Oct 19, 2005 3:54 am |
The basic task is this:
#forall %pathexpand(.yourpath) {#move %i}
We just need to figure out how to work it into the speedwalking. If you use fast mode (send all commands at one time, wait for the mud to catch up), you could use a simple #oninput trigger:
#oninput {run (%a)} {#forall %pathexpand(.%1) {#move %i}} //immediately moves the blue dot to the destination room
Slowwalking will be a tiny bit more involved since you need to capture the room info and verify the move:
#oninput {run (%a)} {@Path = %pathexpand(.%1);#move %item(@path,1);#delnitem Path 1}
#trigger {room name pattern} {}
#cond {exits pattern} {#if ((@oldroom != @newroom) and %numitems(@path)) {#move %item(@path,1);#delnitem Path 1}} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Wed Oct 19, 2005 5:02 am |
I found a solution... Basicly you were on the right path but modified a bit like this...
#ALIAS {run} {~run %1;#forall %pathexpand(%1) {#MAP %i}
the only issue this ends up giving is any SW you send to the mud via script has to be wrapped in #EXEC {} to parse out right. |
|
_________________ The Seaworthy |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Oct 19, 2005 11:30 am |
not sure what you meant by sw via script, but if you meant like aliasing sewers to run 4sd, then i've never had a problem and I don't use #EXEC {}
Might I suggest this version?
The only diff is the quotation marks around the %1 (that might be why you need the #EXEC {}
#ALIAS run {~run %1;#FORALL %pathexpand("%1") {#MOVE %i}} |
|
|
|
|
|