alias suggestion

Posted by Rob on Fri 14 Sep 2001 07:12 PM — 3 posts, 13,621 views.

#0
Okay, I'm sure you're sick and tired of me... but, I have somewhat of a request.

While triggers can't call aliases, it would be really nice if aliases could call aliases, for the following reason: (and really, the same would be true for triggers)

I asked how to insert a delay into things, and the current only way to effectively do what I want is to move everything into a script. This somewhat hampers the ability to add functionality to the client. As an example, with my wait function.. if it were frequently required, I could simply make an alias, call it /wait, pass it an argument which was a length of time, then have my other aliases, etc, call that alias to insert a pause into them. This makes it alot easier to make movement aliases (something which is required sometimes when it would take more effort then its worth to make a speedwalk). Since this is something that comes up very frequently for me, and I'm sure some others, it would be really nice. Not that I have a problem writting a script to do it, but it's annoying to have to generate speedwalks using the mapper, then pulling them out and putting them into a script, its tedious. (not to mention that _all_ my speedwalks would have to be pulled out, yikes. I would run into this problem with nearly any lpmud, most likely)

Anyways, it might not be feasible, but hey, can't blame a guy for trying :)
Australia Forum Administrator #1
How often do you need to do the wait? Can you give an example?

Turning a speedwalk into a script shouldn't be a big deal, as you can use EvaluateSpeedwalk to convert a speedwalk into commands, eg.


world.send world.EvaluateSpeedwalk ("4n3esuwdLW")


You could also make a generalised script that does a delay, and just use that when you need it.

For example:


sub DoWait (seconds, command)
World.addtimer "timer_" & world.GetUniqueNumber, 0, 0, seconds, command, 5, ""
end sub


Then if your alias script wants to go a certain number of steps, pause and then do some more, it could look like this:


sub On_MyAlias (strName, strOutput, wildcards)
world.send world.EvaluateSpeedwalk ("4n3esuwdLW")
DoWait 10, world.EvaluateSpeedwalk ("3s4e2n")
end sub


This alias would speedwalk the first set of directions, wait 10 seconds, and then do the second set.

That isn't particularly tedious to code.


Australia Forum Administrator #2
Quote:

While triggers can't call aliases, it would be really nice if aliases could call aliases, for the following reason: (and really, the same would be true for triggers)


Implemented in version 3.35 - see the release notes.