DoAfterSpecial

Posted by Biermann on Wed 20 Aug 2008 09:41 AM — 4 posts, 15,176 views.

#0
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 :)
Australia Forum Administrator #1
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.
#2
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
Australia Forum Administrator #3
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)