 |
Al Newbie
Joined: 05 Jul 2005 Posts: 5
|
Posted: Sat Jan 26, 2013 8:53 pm
sending #walk commands from an array |
Hi,
I am trying to write a script that will let me move around an area in a set path (using an array).
Having a few issues - firstly, if I try typing @arrayname.1 into the command line, then that is sent to the mud (obviously not doing much!)
I got around that by creating an alias called movenow which just sends @arrayname.1 - that seems to work fine for any normal directions that I put into the array, however if @arrayname.1 is a #walk command, it ends up sending #walk directly to the mud, instead of making me speedwalk to the room I want.
Is there a way to get CMud to parse whatever comes out of the array, so that I can use it to fire aliases or other commands? I want to make the first element in the array a command to get me to the area I want, and the last element to get me home again, using speedwalks.
If this isn't clear, let me know and I will attempt to clarify.
Thanks
Al |
|
|
|
 |
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Jan 26, 2013 10:58 pm |
You'll need to use #execute.
|
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jan 27, 2013 12:36 am |
Keep in mind that with #execute and #execwin, there's usually always a better way.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Al Newbie
Joined: 05 Jul 2005 Posts: 5
|
Posted: Sun Jan 27, 2013 8:40 pm |
Perfect, thanks!
That is the command I was looking for, assuming I can't think of a better way!
Al |
|
|
|
 |
|
|
|