Skip to content
General Chat Talk

My Script Sounds

A TG007 community discussion started by JOhnson.

Discussion 14 posts
Page 1 of 1
Open
Topic #13844 · 14 published posts · 2,944 views

:oops: I dont know how to asking this ... but I will try ... iv a basic away / back in my script which is in popups menu bar

Set Away
.On:/away $$ 
.Off:/away

 

now iv got sounds in my script for most things i.e join / leave / kick / Op but iv added two more to the little sound snippet away / back ... but for some reason they wont work ... can someone let me know where im going wrong please ... as always nais tuke = thank you for any help or an arrow to point me in the right direction and please dont make it to hard for me to understand :D

 

 

menu channel {
  -
  Sounds
  .On:enable #Sounds
  .Off:disable #Sounds
}

#Sounds on
on *:Op:*:{ splay Op.wav }
on *:Join:*:{ splay join.wav }
on *:Part:*:{ splay leave.wav }
on *:kick:*:{ splay kick.wav }
on *:away:*:{ splay away.wav }
on *:back:*:{ splay back.wav }

Do you have them in the same directory as the script or mIRC.exe? You're better off specifying exactly where they are so that there are no mistakes. If, for example, the script is called sounds.mrc and the sounds are in the same location use:

splay $scriptdirjoin.wav

The last time I used $scriptdir and $mircdir you didn't need a back slash (\) but it's straight-forward if you do need to add it.

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.

:oops: I dont know how to asking this ... but I will try ... iv a basic away / back in my script which is in popups menu bar
Set Away
.On:/away $$ 
.Off:/away

 

now iv got sounds in my script for most things i.e join / leave / kick / Op but iv added two more to the little sound snippet away / back ... but for some reason they wont work ... can someone let me know where im going wrong please ... as always nais tuke = thank you for any help or an arrow to point me in the right direction and please dont make it to hard for me to understand :D

 

 

menu channel {
  -
  Sounds
  .On:enable #Sounds
  .Off:disable #Sounds
}

#Sounds on
on *:Op:*:{ splay Op.wav }
on *:Join:*:{ splay join.wav }
on *:Part:*:{ splay leave.wav }
on *:kick:*:{ splay kick.wav }
on *:away:*:{ splay away.wav }
on *:back:*:{ splay back.wav }

 

If I'm not mistaken I think you can pick up on aways from using raw numeric events. It's been a long time, and I forgot what those numerics are right now, but my advice is to use the following code to get the numerics when someone goes away, or comes back...

 

Edit: the numerics are 306 for away, and 305 for unaway...

raw *:*: {
  if ($numeric == 306) splay away.wav
  elseif ($numeric == 305) splay back.wav
}

 

:oops: the code you see is in remote and an old friend of the forum helped me with this code .... takaharu_ if I tried your code where do I put it ? remote or alias ? and nais tuke for your help ..... Warrior124 ... is that code to be put into remote ? and again nais tuke to you and all fella for your help ... im off to try then both out :D ... if the codes work I will ask you later why the op / join / leave / and kick works :P and the away and back dont :P

 

 

 raw *:*: {
  if ($numeric == 306) splay away.wav
  elseif ($numeric == 305) splay back.wav
}

You can just place the code exactly as shown into any script, and it will work. This code only works if you go away, or come back. However, it won't work if others go away, and come back. :)

Raw 821 and 822 is also a popular away/return raw event.

You'd have it exactly where you currently have it:

menu channel {
  -
  Sounds
  .On:enable #Sounds
  .Off:disable #Sounds
}

alias soundscript { echo -a The sounds script is in: $scriptdir }

#Sounds on
on *:Op:*:{ splay $scriptdirOp.wav }
on *:Join:*:{ splay $scriptdirjoin.wav }
on *:Part:*:{ splay $scriptdirleave.wav }
on *:kick:*:{ splay $scriptdirkick.wav }
on *:away:*:{ splay $scriptdiraway.wav }
on *:back:*:{ splay $scriptdirback.wav }
#Sounds end

With the above code you can find out where the script is located so you can put the sounds in the same directory. Just type /soundscript and it will tell you the folder where it's located. If you would prefer to put the sounds in a sub folder just add the folder in between as thus: $scriptdirsounds\Op.wav

 

So, type /soundscript into your status window, navigate to the displayed folder, copy the sounds to that folder then see if the script works.

Edited Jan 12, 2010 8:17 AM by takaharu_

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.

takaharu_ 1st of all thank you for your help ... iv looked at your snippet and added it to the sound.mrc I have in remote ... iv also got a folder in my mirc main directory called sounds and in that folder is all the wav sounds ... iv tryed it out now none of the other sounds work so iv gone back to the other snippet that I had in remote before .... I cant understand why the other sounds i.e Op/ Join/Leave/kick work but the "away and back" dont work ? Im confused and im wondering if its the "away snippet" that is the problem even though it sets the script away and back ? .... also Warrior124 iv tried your snippet out and all and that doesnt work for me but again thank you for your help as well :D

Try this...

 

menu channel {
  -
  Sounds
  .On:enable #Sounds
  .Off:disable #Sounds
}

#Sounds on
on *:Op:*:{ splay $shortfn($findfile($nofile($mircexe),Op.wav,1)) }
on *:Join:*:{ splay $shortfn($findfile($nofile($mircexe),join.wav,1)) }
on *:Part:*:{ splay $shortfn($findfile($nofile($mircexe),leave.wav,1)) }
on *:kick:*:{ splay $shortfn($findfile($nofile($mircexe),kick.wav,1)) }
raw *:*: {
  if ($numeric == 306) || ($numeric == 822) splay $shortfn($findfile($nofile($mircexe),away.wav,1))
  elseif ($numeric == 305) || ($numeric == 821) splay $shortfn($findfile($nofile($mircexe),back.wav,1))
}

:lmaojump: nais tuke = thank you Warrior124 fella that works a treat on all the sounds even if someone comes into the room and goes into there cup it does it :D

I think the last part of code can be shortened a bit:

if ($istok(306 822,$numeric,32))
if ($istok(305 821,$numeric,32))

:lmaojump: nais tuke = thank you Warrior124 fella that works a treat on all the sounds even if someone comes into the room and goes into there cup it does it :D

 

No problem, lol. :)

 

Isn't $nofile($mircexe) the same as $mircdir or has that changed?

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.

With the new versions of mirc they mainly install into your C:\Users\... directory for Windows 7, and somewhere else in Windows Vista as well as the directory you choose to install to. However, the mirc.ini file will more than likely not be in the directory you have chosen, and therefore the $mircdir will not be accurate. $mircdir/$scriptdir will refer to the directory the mirc.ini file is located in. $nofile($mircexe) refers to the directory the current mirc.exe is being run in.

Edited Jan 13, 2010 2:22 AM by Warrior124