[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  World.DoAfter problems
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

World.DoAfter problems

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


Pages: 1 2  

Posted by BlueEyes   (28 posts)  [Biography] 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>
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] 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)
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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. :)
[Go to top] top

Posted by Sherazod   (4 posts)  [Biography] 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.
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] 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?

[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] 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?
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] 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?
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] 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>
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] 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)
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] 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.
[Go to top] top

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

?
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] 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.

[Go to top] 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.


13,006 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] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]