[-]
Shout:
Click Refresh to load shouts.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alarms Text to Speach
02-03-2010, 12:49 AM (This post was last modified: 02-03-2010 12:55 AM by klusbert. Edit Reason: )
Post: #1
Alarms Text to Speach
Okey all you know how tibiabot ng alarms sounds, it's realy efective compared with blackd alarm system with only 2 sounds.

So if you want to add ngs alarm type to your bot, you can use this simple code.

Code:
Sub Alarm(ByVal text As String)
        Dim SAPI
        SAPI = CreateObject("SAPI.spvoice")
        SAPI.Speak(text)
    End Sub

So if you call this sub direct from a button and don't run it in a new thread, your application will get stuck untill the message have been said.

So here is how you solve this.

From a Button you use this:

Code:
Dim t As New Threading.Thread(AddressOf Alarm)
        t.Start(TextBox1.Text)

And if you wan't the message looping you can simple call it directly from a threadtimer(important otherwise it will get your app stucked).
Code:
If CheckBox1.Checked andalso playeronscreen Then
            Alarm(TextBox1.Text)
End If

Some good mesage you can use:
I tried this on windows 7 so dont know how good the messages will be on your OS. But you can easly find that out.

- g m detected
- low health
- default message
- private message
- low cap
- diss connected
- player attack
- P K on screen
-etc etc

[Image: 979555_1.png]
Find all posts by this user
Quote this message in a reply
Post Reply 



Contact UsTProgrammingReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication