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
➜ DoAfterSpecial
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Biermann
(2 posts) Bio
|
Date
| Wed 20 Aug 2008 09:41 AM (UTC) |
Message
| oke, i'm trying to ake something work....but it won't work :(
i made a trigger and then put this in the send area and selected send to script
DoAfterSpecial (5 ,'Sound ("receive.wav")',sendto.script)
basically what i want it to do is this:
after i hit an alias in the game, it executes some commands, then the last command will trigger this one shot timer to give me a ring after some time so i get a reminder to run the alias another time
any help would be nice :) | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 20 Aug 2008 10:05 AM (UTC) |
Message
| First, let's get our terminology right. You said "i made a trigger" then "after i hit an alias in the game". A trigger fires when stuff arrives from the MUD. An alias fires when you type something. Which is it?
Next, I would check to see if the file was right - perhaps you need a full pathname. Try :
DoAfterSpecial (5 ,'check (Sound ("receive.wav"))',sendto.script)
This will report an appropriate error message if the Sound function fails. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Biermann
(2 posts) Bio
|
Date
| Reply #2 on Wed 20 Aug 2008 10:55 AM (UTC) |
Message
| ah yes, well, with alias i ment something in the mud self. The discworld mud supports alias' and to simplify things. Mine goes 'grab x from pack, perform action y, say all done'
i would like the trigger to fire on You say: all done
Basically my goal is to just waste my skill points on commands with one long alias. Then wait x seconds so the skill points have recharged and trigger a sound so i am informed i can redo the alias once more.
i checked if the sound command worked by just putting
Sound ("receive.wav")
in the send form.
This worked (i copied the audio files to the mushclient folder)
using the check just deliver me this
[string "Trigger: "]:1: attempt to call global 'check' (a nil value)
stack traceback:
[string "Trigger: "]:1: in main chunk | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Wed 20 Aug 2008 09:25 PM (UTC) |
Message
| The function "check" was added into MUSHclient itself in recent versions. If it isn't there, try this:
require "check"
DoAfterSpecial (5 ,'check (Sound ("receive.wav"))',sendto.script)
You could try it out on the command line. Make sure you have "/" set as the scripting prefix and then just type:
/DoAfterSpecial (5 ,'Sound ("receive.wav")',sendto.script)
Then see if you hear anything in 5 seconds. Make sure timers are enabled as DoAfterSpecial actually creates a temporary timer.
Also, these timers won't fire if you aren't connected to the MUD, so if you are just testing, test when you are connected.
I am a bit concerned about not using a pathname. The "current pathname" can change if you browse for a plugin or something. Probably better to force the use of the MUSHclient .exe pathname, if that is where you put the files:
DoAfterSpecial (5 ,'Sound (GetInfo (66) .. "receive.wav")',sendto.script)
|
- 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.
12,107 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top