Author Topic: [IceChat 7 beta 20060521] play .wav on slap  (Read 3932 times)

r2t3

  • Newbie
  • *
  • Posts: 5
[IceChat 7 beta 20060521] play .wav on slap
« on: May 27, 2006, 10:46:28 AM »
Thank you Morio for providing this script-
Code: [Select]
Sub ONACTION(Message,Channel,Nickname,Host,ServerNumber)                                     
  Message = Ucase(Message)     
  if Instr(Message," MORIO ") then   
     If instr(Message,"HITS") or instr(Message,"SLAPS") then   
       SendCommand "/describe " & Channel & " dodges ", ServerNumber                                     
    end if   
  end if   
End Sub

My question is, how would I play a wave file, on slap rather than a sending text message?
I have tried-
Code: [Select]
SendCommand "C:\Program Files\IceChat7\creep.wav" and
Code: [Select]
SendCommand C:\Program Files\IceChat7\creep.wav Where "C:\Program Files\IceChat7\creep.wav" is the path to the .wav file.

Also, in IceChat7 how do you load scripts into the engine?  If I remember correctly that had to be done in IceChat5.  Thanks.


Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: [IceChat 7 beta 20060521] play .wav on slap
« Reply #1 on: May 27, 2006, 11:19:28 AM »
To play a WAV file, you dont send the filename as the command, you need to use the /play command.

In the Application Data\IceChat7 folder is a folder called "Wavs". Place your WAV files there. Then the command would be as follows.
Code: [Select]
SendCommand "/play wavfile.wav"

If you have the file in a different folder, then you just provide the full path to the file (if you do not have it in the WAVS folder)
The IceChat God

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: [IceChat 7 beta 20060521] play .wav on slap
« Reply #2 on: May 27, 2006, 11:35:09 AM »
To load files into the Script Engine in version 7, you open up the IceChat Editor (CTRL-S) and go to the Scripts Tab.
The IceChat God

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: [IceChat 7 beta 20060521] play .wav on slap
« Reply #3 on: May 28, 2006, 12:43:42 AM »
I changed the script so it should work for anyone without having to change the nick.
Code: [Select]
Sub ONACTION(Message,Channel,Nickname,Host,ServerNumber)                                     
  DodgeNick = UCase(GetIdentifier("$me"))
  Message = Ucase(Message)     
  if Instr(Message,DodgeNick) then   
     If instr(Message,"HITS") or instr(Message,"SLAPS") then   
       SendCommand "/describe " & Channel & " dodges ", ServerNumber                                     
    end if   
  end if   
End Sub
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein