This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

playing a sound when triggered

Help for those learning Tcl or writing their own scripts.
Post Reply
t
tolkien
Voice
Posts: 14
Joined: Wed Aug 06, 2008 5:22 pm

playing a sound when triggered

Post by tolkien »

i am using this method to use triggers on my channel


set trigger1 "!whatever"
set text1 "whatver i want to say"
theres more codes in it like

bind pub $trigbind $trigger1 text-1
proc text-1 {n u h c a } {
global channelone
global channeltwo
global channelthree
global text1
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text1"
}
return 0
}



now what i want to do is when its trigger to play a sound i will host with my bot. want only for one specific trigger to play sound...

also if i wanted to add the person name of who did trigger name into wwhats displayed how would i do that
g
game_over
Voice
Posts: 29
Joined: Thu Apr 26, 2007 7:22 am

Post by game_over »

I can tell you how this may happen on WINDOWS

write on your cmd this

Code: Select all

sndrec32 /play /close C:\Windows\Media\Notify.wav
now on tcl :example:

Code: Select all

set sound "C:/Windows/Media/Notify.wav"
set playsound [exec sndrec32 /play /close $sound]
on LINUX

http://linux.about.com/library/bl/open/ ... ie5.18.htm

Code: Select all

set sound "path" 
set playsound [exec play $sound]
(just instal right packages)

if i wish my sound play whit different program on windows example on win media player :)

Code: Select all

set sound "C:/Windows/Media/Notify.wav"
set playsound [exec wmplayer.exe /play /close $sound]
same on linux
Post Reply