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.
 Entire forum ➜ MUSHclient ➜ General ➜ World.DoAfter problems

World.DoAfter problems

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


Pages: 1 2  

Posted by BlueEyes   (28 posts)  Bio
Date Thu 20 Aug 2009 12:40 AM (UTC)

Amended on Thu 20 Aug 2009 01:02 AM (UTC) by BlueEyes

Message
I've tried sending this to world, execute, script etc etc and still can not seem to get it work, what am I doing wrong?


<aliases>
  <alias
   match="lazy"
   enabled="y"
   sequence="100"
  >
  <send>pilot steer n
world.doafter 5, "pilot steer n"</send>
  </alias>
</aliases>
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Thu 20 Aug 2009 12:50 AM (UTC)

Amended on Thu 20 Aug 2009 12:51 AM (UTC) by Twisol

Message
DoAfter is capitalized (like so).

EDIT: Actually, what scripting language are you using? That looks like VBscript.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #2 on Thu 20 Aug 2009 01:03 AM (UTC)
Message
I need it to be in lua so would it be

DoAfter 1, (pilot steer n)
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #3 on Thu 20 Aug 2009 01:05 AM (UTC)

Amended on Thu 20 Aug 2009 01:08 AM (UTC) by Twisol

Message
In Lua, it would be:

DoAfter(1, "pilot steer n")



Here's what I think you want:


<aliases>
  <alias
   match="lazy"
   enabled="y"
   sequence="100"
   send_to="12"
  >
    <send>
      Send("pilot steer n")
      DoAfter(5, "pilot steer n")
    </send>
  </alias>
</aliases>


Notice also that I put the plaintext command (the first line in your alias) in a Send() call, and added a send_to attribute which is the same thing as setting the Send To dropdown to Script.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #4 on Thu 20 Aug 2009 01:05 AM (UTC)
Message
line 1 is the raw text that you'd send to world.
line 2 is the script command to wrap it in a timer that you'd send to script.

do one or the other, not both. :)
Top

Posted by Sherazod   (4 posts)  Bio
Date Reply #5 on Thu 20 Aug 2009 02:10 AM (UTC)
Message
I believe

DoAfter(1, "pilot steer n")

is what you want in the field and don't forget to change the
Send to: world
into Send to: script
you will find this on the left towards the bottom.

That's what got me the first time.
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #6 on Thu 20 Aug 2009 03:03 AM (UTC)
Message
Alright I have this and it is working, now I need it to turn off and on ... how would I go about doing that?

Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #7 on Thu 20 Aug 2009 03:06 AM (UTC)
Message
What do you mean 'turn on and off'? The alias? It will only run once for every time you use it.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #8 on Thu 20 Aug 2009 03:10 AM (UTC)
Message
Alright I have a timer to send it when I have finished it which is 20 seconds now if I need to stop it while in progress how would I do that?
Top

Posted by Blainer   (191 posts)  Bio
Date Reply #9 on Thu 20 Aug 2009 03:10 AM (UTC)
Message
Template:function=EnableAlias EnableAlias

The documentation for the EnableAlias script function is available online. It is also in the MUSHclient help file.


Is this what your looking for?
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #10 on Thu 20 Aug 2009 03:20 AM (UTC)
Message
No idea... what I truly need is for this alias to continue to loop and when I need it off it disables the alias. Here is what I got so far.


<aliases> 
  <alias 
   match="lazy" 
   enabled="y" 
   send_to="12" 
   sequence="100" 
  > 
  <send> 
Send("pilot steer n") 
DoAfter(.5, "pilot steer n") 
DoAfter(1, "pilot steer n") 
DoAfter(1.5, "pilot steer n") 
DoAfter(2, "pilot steer n") 
DoAfter(2.5, "pilot steer w") 
DoAfter(3, "pilot steer w") 
DoAfter(3.5, "pilot steer w") 
DoAfter(4, "pilot steer w") 
DoAfter(4.5, "pilot steer w") 
DoAfter(5, "pilot steer s") 
DoAfter(5.5, "pilot steer s") 
DoAfter(6, "pilot steer s") 
DoAfter(6.5, "pilot steer s") 
DoAfter(7, "pilot steer s") 
DoAfter(7.5, "pilot steer e") 
DoAfter(8, "pilot steer e") 
DoAfter(8.5, "pilot steer e") 
DoAfter(9, "pilot steer e") 
DoAfter(9.5, "pilot steer e") 
</send> 
  </alias> 
</aliases>
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #11 on Thu 20 Aug 2009 03:25 AM (UTC)
Message
could I just make another quick alias that does

EnableAlias ("lazy", true)

and another that

DisableAlias ("lazy", true)
Top

Posted by Blainer   (191 posts)  Bio
Date Reply #12 on Thu 20 Aug 2009 03:28 AM (UTC)

Amended on Thu 20 Aug 2009 03:31 AM (UTC) by Blainer

Message
That would work but the alias with the commands you want to send won't loop.

Make a timer that you enable or disable from an alias.
Top

Posted by BlueEyes   (28 posts)  Bio
Date Reply #13 on Thu 20 Aug 2009 03:30 AM (UTC)
Message
would that be EnableTimer ("lazy", true) and DisableTimer("lazy, true)

?
Top

Posted by Blainer   (191 posts)  Bio
Date Reply #14 on Thu 20 Aug 2009 03:32 AM (UTC)
Message
Template:function=EnableTimer EnableTimer

The documentation for the EnableTimer script function is available online. It is also in the MUSHclient help file.

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.


57,173 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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.