Register forum user name Search FAQ

Gammon Forum

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 ➜ VBscript ➜ Speaking MUD text

Speaking MUD text

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


Pages: 1  2 

Posted by Thellasian   (9 posts)  Bio
Date Reply #15 on Thu 16 Apr 2009 05:13 PM (UTC)
Message
Hmm, how about this. Is it possible to create a trigger that sends a specific line that the server sends me to a different window in MUSH. and set the plugin to only run on that second window? So that when it sees (Web): on the screen it sends over to Window 2..and then the Reader reads it from that screen only?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #16 on Fri 17 Apr 2009 10:55 AM (UTC)
Message
I suppose, but I think this sounds like more work than simply making a trigger that speaks the lines you want, and omit the line that speaks everything that comes in.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Thellasian   (9 posts)  Bio
Date Reply #17 on Sat 18 Apr 2009 01:00 AM (UTC)
Message
hmm. The pulgin doesnt like to see lines that do not include the trigger file. Any line entered brings up a error....
Top

Posted by Thellasian   (9 posts)  Bio
Date Reply #18 on Sat 18 Apr 2009 01:18 AM (UTC)
Message
fixed it..new error:
[string "Trigger: "]:1: '=' expected near '<eof>'


New Script:


</plugin>

<!-- Triggers -->

<aliases>
<alias script="togglespeaking" match="jfw" enabled="y" group="speech" omit_from_command_history="y" omit_from_log="y" omit_from_output="y" sequence="100">
</alias>
</aliases>

<triggers>
</triggers>

<!-- Script -->


<script>
<![CDATA[

dim sapiobject
dim speak 'do we want to speak?


sub toggleSpeaking (name, line, wc)
if speak = 1 then
speak = 0
sapiobject.Speak "sapi auto speak off.", 1
else
speak = 1
sapiobject.Speak "sapi auto speak on.",1
end if
end sub

sub OnPluginInstall
set sapiobject = CreateObject("SAPI.SpVoice")
sapiobject.Speak "sapi speaker is ready to rock!",1
speak = 1
end sub


sub OnPluginBroadcast (msg, id, name, text)
if msg = 222 then
sapiobject.Speak "%1",1
end if
end sub
]]>
</script>


</muclient>



Trigger:

<triggers>
<trigger
enabled="y"
ignore_case="y"
match="Web"
regexp="y"
send_to="12"
sequence="100"
>
<send>%0</send>
</trigger>
</triggers>


I believe the only prob is telling the trigger WHAT to send...so did %0 to send the whole line to the Sapi program. but thats when the errors appear. it no longer speaks all the time which is what I wanted....
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #19 on Sun 19 Apr 2009 11:22 AM (UTC)
Message
You are sending what the MUD sent to script, which will generate script errors. You want to send something like:


sapiobject.Speak "%1",1


- 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.


86,615 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.