[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]  trigger delay in the middle of the trigger
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

trigger delay in the middle of the trigger

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


Posted by 223kazin   (3 posts)  [Biography] bio
Date Thu 26 Jun 2008 02:27 AM (UTC)
Message
I can't seem to figure this out for the life of me(Not very script savvy). What I'm trying to do is make a multi-line trigger and have a delay go off in the middle of it.
Example:

unload clip from rifle
(wait 1.5 seconds) put clip into backpack
get clip from belt
load clip into rifle.

I'm not entirely sure if this is possible, I've been digging around for a while now and have yet to come up with anything.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 26 Jun 2008 03:08 AM (UTC)
Message
See http://mushclient.com/faq point 25.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by 223kazin   (3 posts)  [Biography] bio
Date Reply #2 on Thu 26 Jun 2008 06:11 AM (UTC)
Message
Gah...I must be doing something wrong, I can't get this to work. No matter how I script it I always get an error after closing the script window to test it our. Chances are it's some miniscule, stupid reason that I'm overlooking completely.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 26 Jun 2008 07:38 AM (UTC)
Message
Please copy the trigger and paste it here. See:

http://mushclient.com/copying

Please copy the error message and paste it here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by 223kazin   (3 posts)  [Biography] bio
Date Reply #4 on Thu 26 Jun 2008 03:50 PM (UTC)
Message
Send ("put e-clip in backpack")
wait.time 1
get e-clip from belt
load e-clip into k-1

[string "Script file"]:33: bad argument #1 to 'module' (string expected, got nil)
stack traceback:
[C]: in function 'module'
[string "Script file"]:33: in main chunk

I loaded up the wait.lua script but just can't seem to figure it out.. As I've said, I know almost nothing about scripting, sadly. Thanks for your help Nick, it's really appreciated.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Fri 27 Jun 2008 05:01 AM (UTC)
Message
You didn't exactly copy and paste the trigger as I asked, or I would be seeing <trigger> in your reply. Please follow that link to do that.

As for your code, in the FAQ the example was:


wait.time (1)
Send ("get food bag")


You have:


wait.time 1
get e-clip from belt
load e-clip into k-1


You don't have brackets around the 1, and the other stuff needs to be "sent". So the very least it would need to be is:


wait.time (1)
Send ("get e-clip from belt")
Send ("load e-clip into k-1")


However without seeing your whole script, there might be more problems.

Please paste the whole trigger, it makes it easier to help.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


5,851 views.

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]