;-----------------------------------------------------------------------------------------------
; tell.iss Version 2.0 Updated: 11/08/07
;
; Description:
; ------------
; Plays a .wav file when a tell is recieved.
; You can change the sound that is played by changeing the last line.
; I have included 2 sound files (Intercom.wav, Phaser.wav)
; 8 - Says
; 9 - Shouts
; 15 - Group Chat
; 16 - Raid Chat
; 18 - Guild Chat
; 26 - NPC to Player
; 28 - Tells
; 32 - OOC
; 34 - All Custom CHannel Names - Name in Channel Name Variable
;-----------------------------------------------------------------------------------------------
function main()
{
;attach the event to an atom
Event[EQ2_onIncomingChatText]:AttachAtom[EQ2_onIncomingChatText]
while (1)
{
waitframe
}
}
;when event is sent out by ISXEQ2 this will get called
atom(script) EQ2_onIncomingChatText(int ChatType, string Message, string Speaker, string ChatTarget, string SpeakerIsNPC, string ChannelName)
{
switch ${ChatType}
{
;make sure this is not your character sending the tell
if ${Speaker.NotEqual[${Me.Name}]}
{
case 8
break
case 9
break
case 15
break
case 16
break
case 26
case 28
call PlaySound "${LavishScript.CurrentDirectory}/sounds/intercom.wav"
break
case 32
break
case 18
break
case default
break
}
}
}
function PlaySound(string Filename)
{
System:APICall[${System.GetProcAddress[WinMM.dll,PlaySound].Hex},Filename.String,0,"Math.Dec[22001]"]
}
;Always clean up atoms at the end of script
function atexit()
{
Event[EQ2_onIncomingChatText]:DetachAtom[EQ2_onIncomingChatText]
}