egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

playing a sound when triggered

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tolkien
Voice


Joined: 06 Aug 2008
Posts: 14

PostPosted: Tue Aug 19, 2008 6:38 pm    Post subject: playing a sound when triggered Reply with quote

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
Back to top
View user's profile Send private message
game_over
Voice


Joined: 26 Apr 2007
Posts: 29

PostPosted: Fri Sep 19, 2008 10:45 am    Post subject: Reply with quote

I can tell you how this may happen on WINDOWS

write on your cmd this

Code:
sndrec32 /play /close C:\Windows\Media\Notify.wav


now on tcl :example:
Code:

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


on LINUX

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

Code:

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 Smile

Code:

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


same on linux
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber