Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Specifc Timing of Aliases?

Specifc Timing of Aliases?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by HealingFlame   USA  (11 posts)  Bio
Date Thu 01 Jun 2006 02:20 PM (UTC)
Message
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
Top

Posted by Cino   Australia  (17 posts)  Bio
Date Reply #1 on Thu 01 Jun 2006 03:13 PM (UTC)
Message
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
Top

Posted by HealingFlame   USA  (11 posts)  Bio
Date Reply #2 on Thu 01 Jun 2006 03:35 PM (UTC)

Amended on Fri 02 Jun 2006 08:24 AM (UTC) by HealingFlame

Message
LOL No wonder i couldnt find it is called Doafter not Alias Timing LOL... ok cool thank you I apprecaite it.

Top

Posted by HealingFlame   USA  (11 posts)  Bio
Date Reply #3 on Fri 02 Jun 2006 08:24 AM (UTC)
Message
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?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 02 Jun 2006 08:53 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by HealingFlame   USA  (11 posts)  Bio
Date Reply #5 on Fri 02 Jun 2006 04:11 PM (UTC)
Message
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
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #6 on Fri 02 Jun 2006 09:51 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,017 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.