mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Jan 2004
Posts: 14
Code:
 on 1:JOIN:#channel: if (-mynick = nick-) {/msg #channel Hi!} else{/msg #channel Hi $nick !}


Is there a variable for my nick?

Last edited by no_brain; 11/01/04 11:50 AM.
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
$me

Joined: Jan 2004
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Jan 2004
Posts: 14
Thanx

Code:
 on 1:JOIN:#mangapix:if (!$nick==$me){/msg #mangapix Hi $nick !}else{else{/msg #mangapix Hi!}}
 


Whats wrong?
Quote:
#MANGAPIX Unknown command

Last edited by no_brain; 11/01/04 01:37 PM.
Joined: Jan 2004
Posts: 26
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Jan 2004
Posts: 26
ON *:JOIN:#mangapix:{
if ($nick != $me) { msg # Hi }
}

OR

ON !me:JOIN:#mangpix:msg # Hi

Not sure if the second one will work. Been away from scripting for a while, heh.


It's not in the GUI, it's in the source.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Pretty close:
Code:
ON !*:JOIN:#mangpix:msg # Hi
The ! event prefix prevents yourself from triggering the event.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2004
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Jan 2004
Posts: 14
Both does not working.

I think its because the if is in that thing and the other thing is when the thing was not activated...

Is there no way for else function?

This is my way, but...

Code:
   ELSE { msg # Hi! } 



EDIT:
All O.K.
I made this:
Code:
 ON *:JOIN:#mangapix:{
  if ($nick != $me) { msg # Hi $nick ! }
  if ($nick = $me) { msg # Hi! }
} 

Last edited by no_brain; 11/01/04 02:38 PM.
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Might try:

Code:
on *:JOIN:#mangapix: {
  if ($nick == $me) /msg $chan Have no fear, $me is here!
  else /msg $chan Hello, $nick $+ !
}


EDIT:
p.s. to correct the flaws in your script, an if statement uses two ='s for a condition. example:

if (one == one)
if (a == b)

and so on. Additionally, if you are testing for one thing, and want the exact opposite, its both less typing, and faster to just use "else". example:

if (a == a) /echo -a It was the letter a!
else /echo -a It's not an a!

Last edited by KingTomato; 11/01/04 06:51 PM.

-KingTomato

Link Copied to Clipboard