Quick Fix on Tell.iss

Justme

Active Member
This worked for me. I don't know how to write script, but did this through trial and error...

Change to the following:

Code:
	AddTrigger Tells "@speaker@ tells you, "@what@""
And for me, the sound file was in a different place so...

Code:
"${LavishScript.CurrentDirectory}/scripts/sounds/intercom.wav"
Works great now... I got the info above out of eq2afkalarm...
 

ownagejoo

Well-Known Member
One question, why would you be still using Triggers when there is an event now to get every tell/say here is a way to do it, I am editing this because I just reworte the script...here is what should work now


Code:
;-----------------------------------------------------------------------------------------------
; 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]
}
 
Last edited:

Twiddle

Active Member
Heya,

You'll have to wrap the

Code:
if ${Speaker.NotEqual[${Me.Name}]}
...around the switch - you cannot put it inside.

Besides from that - nice little script for a tutorial :-D

~
 

gp1001

Active Member
Can we get this added to SVN?

ownagejoo said:
One question, why would you be still using Triggers when there is an event now to get every tell/say here is a way to do it, I am editing this because I just reworte the script...here is what should work now


Code:
;-----------------------------------------------------------------------------------------------
; 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]
}
 
Top Bottom