CTCP Sound für Nettalk
Mit /sound USER FILENAME [TEXT]
können CTCP Sound Nachrichten versendet werden. Der Empfänger braucht ebenfalls dieses Script um die Nachrichten mit Nettalk zu empfangen.
#NewScriptBegin RemoteSounds Dim WaveFilePath Sub Load() 'Bitte entsprechend anpassen: WaveFilePath = "C:\WINDOWS\Media\" MakeShortcut "", "sound", "/call RemoteSounds.SendWPlay $1 $2 :$>2", 2 'Beispiele für Contextmenü-Shortcuts: MakeShortcut "tada", "", "/call RemoteSounds.SendWPlay $1 tada.wav", 0 MakeShortcut "playstart", "", "/call RemoteSounds.SendWPlay $1 start.wav", 0 End Sub Sub SendWPlay(Dest, FileName, Text) PlayS GetVal(FrontConID, 5), FileName, Text SendText Chr(1) & "SOUND " & FileName & " " & Text & Chr(1), FrontConID, Dest End Sub Sub PlayS(Nick, FileName, Text) if lcase(Right(FileName,4)) <> ".wav" Then FileName = FileName & ".wav" if len(Text)=0 Then Print "- " & Nick & " plays " & FileName, 0, valcClientMsg else Print "- " & Nick & " " & Text & " (" & FileName & ")", 0, valcClientMsg end if PlayWave WaveFilePath & FileName End Sub Sub Serv_CTCP(CtcpType, Text, Nick, ConnID) if CtcpType = "sound" Then i=InStr(1,Text," ") if i=0 then i=len(Text)+1 PlayS Nick, Left(Text,i-1), Mid(Text, i+1) SkipEvent end if End Sub
Sie befinden sich hier: start » nettalk » scripting » remotesounds