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
➜ trigger delay in the middle of the trigger
trigger delay in the middle of the trigger
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| 223kazin
(3 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 26 Jun 2008 03:08 AM (UTC) |
Message
| |
Posted by
| 223kazin
(3 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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 | Top |
|
Posted by
| 223kazin
(3 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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 | 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.
22,190 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top