mIRC Home    About    Download    Register    News    Help

Print Thread
/splay problem playing same .wav #151920 23/06/06 01:28 PM
Joined: Jul 2005
Posts: 13
W
wonder Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Jul 2005
Posts: 13
I created a script where when you insert a certain word and it plays a .wav file and replaces the word with a different one. There are 52 .wav files and it picks a certain one but if I do one combination which triggers to play the wav file, the next one (totally different combination) plays the same .wav file. But if I do that last combination again it plays the correct wave file.. for example

I insert v35, it l plays gs.wav
I insert v12 that it supposed to play alf.wav put plays gs.wav
I insert v12 again and it correctly plays alf.wav

does anyone know how to fix this? I'm on the recently updated mirc

Re: /splay problem playing same .wav #151921 23/06/06 02:02 PM
Joined: May 2006
Posts: 93
Taggnostr Offline
Babel fish
Offline
Babel fish
Joined: May 2006
Posts: 93
post the code

Re: /splay problem playing same .wav #151922 23/06/06 06:36 PM
Joined: Jul 2005
Posts: 13
W
wonder Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Jul 2005
Posts: 13
It's a fun script that replaces quick chat commands from call of duty two to play the actual sound file =o
Code:
on *:INPUT:*:{
  if (v1 isin $1-) || (v2 isin $1-) || (v3 isin $1-) {
    /vcmdsound
    haltdef
    set %soundorgtext $1-
    var %omgtheinput = $1-
    var %omgtheinput = $replace(%omgtheinput,v11,11Follow me!)
    var %omgtheinput = $replace(%omgtheinput,v12,11Move in!)
    var %omgtheinput = $replace(%omgtheinput,v13,11Fall back!)
    var %omgtheinput = $replace(%omgtheinput,v14,11Move in!)
    var %omgtheinput = $replace(%omgtheinput,v15,11Suppressing fire!)
    var %omgtheinput = $replace(%omgtheinput,v16,11Attack left flank!)
    var %omgtheinput = $replace(%omgtheinput,v17,11Attack right flank!)
    var %omgtheinput = $replace(%omgtheinput,v18,11Hold this position!)
    var %omgtheinput = $replace(%omgtheinput,v21,11Enemy spotted!)
    var %omgtheinput = $replace(%omgtheinput,v22,11Enemy down!)
    var %omgtheinput = $replace(%omgtheinput,v23,11I'm in position!)
    var %omgtheinput = $replace(%omgtheinput,v24,11Area secure!)
    var %omgtheinput = $replace(%omgtheinput,v25,11Grenade!)
    var %omgtheinput = $replace(%omgtheinput,v26,11Sniper!)
    var %omgtheinput = $replace(%omgtheinput,v27,11Need reinforcements!)
    var %omgtheinput = $replace(%omgtheinput,v28,11Hold your fire!)
    var %omgtheinput = $replace(%omgtheinput,v31,11Yes Sir!)
    var %omgtheinput = $replace(%omgtheinput,v32,11No Sir!)
    var %omgtheinput = $replace(%omgtheinput,v33,11I'm on my way.)
    var %omgtheinput = $replace(%omgtheinput,v34,11Sorry.)
    var %omgtheinput = $replace(%omgtheinput,v35,11Great shot!)
    var %omgtheinput = $replace(%omgtheinput,v36,11Took long enough!)
    var %omgtheinput = $replace(%omgtheinput,v37,11Are you crazy?)
    msg $active %omgtheinput
  }
}
alias vcmdsound {
  ;German
  if (v11 isin %soundorgtext) && (%soundlang == german) { /splay -w skip | /splay $mircdirGerman\follow_me.wav }
  if (v12 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\move_in.wav }
  if (v13 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\fall_back.wav }
  if (v14 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\supressing_fire.wav }
  if (v15 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\attack_left_flank.wav }
  if (v16 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\attack_right_flank.wav }
  if (v17 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\hold_this_position.wav }
  if (v18 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\regroup.wav }
  if (v21 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\enemy_spotted.wav }
  if (v22 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\enemy_down.wav }
  if (v23 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\im_in_position.wav }
  if (v24 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\area_secure.wav }
  if (v25 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\grenade.wav }
  if (v26 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\sniper.wav }
  if (v27 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\need_reinforcements.wav }
  if (v28 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\hold_your_fire.wav }
  if (v31 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\yes_sir.wav }
  if (v32 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\no_sir.wav }
  if (v33 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\im_on_my_way.wav }
  if (v34 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\sorry.wav }
  if (v35 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\great_shot.wav }
  if (v36 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\took_long_enough.wav }
  if (v37 isin %soundorgtext) && (%soundlang == german) { /splay $mircdirGerman\are_you_crazy.wav }
}  

the %soundlang continues to olther languages but I decided to leave it out beacuse it's the same script repeated with one word changed

Last edited by wonder; 23/06/06 06:37 PM.
Re: /splay problem playing same .wav #151923 23/06/06 07:32 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on *:INPUT:*:{

if (v1 isin $1-) || (v2 isin $1-) || (v3 isin $1-) {

/vcmdsound move this to the end of the first section
you are calling the alias before setting the "v number" whjich is why it works the Second time

haltdef

set %soundorgtext $1-

var %omgtheinput = $1-
<--- here is ok is my guess
var %omgtheinput = $replace(%omgtheinput,v37,11Are you crazy?)

<--- here is ok too
msg $active %omgtheinput

}
<--- here is OK too
}