Speaker script
Motivation
This is a small tutorial that shows you how to make your mud client read stuff with a loud an male voice. Here we will use it to read tells. It is really not that useful but it is great deal of fun =)
Checking for capabilitites.
Your computer must have Text-To-Speech installed.
To check if your computer is capable try executing this in monkeyterm.
<% set Speaker=createobject("SAPI.SpVoice") %>
If it fails try searching the web for "text-to-speech" and "createobject".
The script
Insert the following into one of your script files.
set Speaker=createobject("SAPI.SpVoice")
sub SayIt(s)
Speaker.speak cstr(s)
End sub
And test the new sub SayIt. Remember to reload the scripts from the script menu. You can test it by executing the following command
<% sayit "Hello, My name is HAL" %>
The Action
Then we have to set up an action that grabs everthing our avatar is told and sends it to the new SayIt sub.
Name: fun/saytells
Pattern: ^\w+ tells you, '(.*)'$
Command: <% sayit $1 %>
Case sensitive: yes
Simple: no
Active: yes
Any Comments? Just email us.
|