Specifc Timing of Aliases?

Posted by HealingFlame on Thu 01 Jun 2006 02:20 PM — 7 posts, 27,765 views.

USA #0
I tried to do a search on here 'alias timing' or 'timing of alias' and 'alias' but nothing came up talking about alais timing.

What I really would like is to have and alias, to do a specifc command, ie:
if i type:
c1
the Alias would:
kick
then wait 2 seconds
punch
then wait 2 seconds
swipe
then wait 2 seconds
jab

Upto about 7 different actions about 2-3 seconds apart.
Is there anyway to have an alias do this? I just cant seem to get the timing physically with my finger to time it every 2-3 second so an Alias would help.
I don't think a script would be neccesary to do this, does it?
Triggers arent allowed on the mud so I cant use thoes, and scripts persey arent legal either, but if all it does is the commands without it calling a trigger then it should be fine, cause it would still be an alias cuase the only eway to initate it is for myself to type the command in.

Please and thank you.
-HF
Australia #1
With Lua scripting and timers enabled,

<aliases>
  <alias
   match="c1"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Send("kick")
DoAfter(2,"punch")
DoAfter(4,"swipe")
DoAfter(6,"jab")</send>
  </alias>
</aliases>


Add further
DoAfter(seconds,"command")
as necessary.

http://www.gammon.com.au/scripts/function.php?name=DoAfter
USA #2
LOL No wonder i couldnt find it is called Doafter not Alias Timing LOL... ok cool thank you I apprecaite it.

Amended on Fri 02 Jun 2006 08:24 AM by HealingFlame
USA #3
I thought it did work perefectly but then it doesnt.
Is there something else I need to add? Cause it only does the first command, then even set at .1 the second and third and fouth never went off.

Am i doing something wrong? This is what i have...

<aliases>
<alias
match="c1"
enabled="y"
send_to="12"
sequence="100"
>
<send>Send("healstrike")
DoAfter (1, "palm")
DoAfter (2, "slap")
DoAfter (3, "punch")</send>
</alias>
</aliases>

Now this should work I looked at the website you gave me, and I noticed a space after DoAfter, and I added that, dont think that was the problem anyways.
But it still only calls the first on 'Healstrike' and send it to the world.

Is the thing supposed to be DoAfter Send(1, "palm")...
Nope doesnt work.
None of the other scripts funtionality wise dont work either. It is odd really. Meaning Python, VB, perl, JS, thoes ones dont work either when i switch them, so I went back to LUA, and still didnt work.

Can anyone maybe give some suggestions on maybe why this isnt working?
Australia Forum Administrator #4
DoAfter is implemented by making temporary timers (things that appear in the Timer configuration).

If you have turned off all timers then you will experience those symptoms.

Check Timer configuration, make sure timers are enabled.
USA #5
Oh well that maeks sense, didnt say anything like that in that help file page one above...

Great help file mind you... maybe adding that into there will maybe solve problems and me asking like the moron iam.

Thank you Nick I do appreciate it.
And that worked. Enableing the timers them selves made it work.

Thank you again.

And thank you Cino for that help too. I do appreciate it.

-HF
Australia Forum Administrator #6
Well, the help page says that it makes a timer, however I have added an extra paragraph to warn that DoAfter will not work if timers are disabled.