mIRC Home    About    Download    Register    News    Help

Print Thread
#100202 10/10/04 10:00 PM
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
I want to customize a notify sound for every single nick... if he signon/signoff

Also it should have multiserver support since the most features in mIRC have multiserver support but not the notify list... frown

I know both is scriptable but i don't want to write it.


one step closer to world domination
#100203 11/10/04 11:43 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on *:NOTIFY:{
 if ($nick == nick1) { splay $mircdirwav\nick1.wav | goto end }
 if ($nick == nick2) { splay $mircdirwav\nick2.wav | goto end }

 if ($nick == nick3) { splay $mircdirwav\nick3.wav | goto end }
:end
}

and that goes to your remote.. ALT + R in mirc.. just remember to place the wav files you want to use in your mirc dir/wav/ ..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#100204 11/10/04 03:51 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
That's not multiserver, he also doesn't want a script.


New username: hixxy
#100205 11/10/04 07:54 PM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
There's no need for goto end, use if, elseif and else.

Code:
on *:NOTIFY: {
  if ($nick == Nick1) { }
  elseif ($nick == Nick2) { }
  else { }
}

#100206 16/10/04 12:35 PM
Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
As a matter of fact, it is proven that you can avoid ALL goto usage with if's and while's. Noone should ever use a goto command! It is a basic principle of structured programming. Makes scripts easier to read, understand, update etc etc...


Maybe I wake up one day to notice that all my life was just a dream!
#100207 16/10/04 03:51 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

I agree with you.

There are some exceptions though.

For example, I like using this in my RPG:
Code:
 
alias tmsg {
  var %a = $$1
  goto %a
  :A | return msgchan 
  :B | return msgteams
  :C | return msgchallenge
  :D | return msgdcctriv
  :E | return msgchat $$2
  :F | return msgnotice $$2
  %a | return Incorrect flag.
}

I prefer using goto, because that way the parser doesn't need to evaluate each if, it just goes straight to the right label, and returns the result.

Though, I do think using goto to do iterations is horrible, hehe.

Greets


Gone.

Link Copied to Clipboard