mIRC Homepage
Posted By: no_brain how to say hello if that is not me - 11/01/04 10:29 AM
Code:
 on 1:JOIN:#channel: if (-mynick = nick-) {/msg #channel Hi!} else{/msg #channel Hi $nick !}


Is there a variable for my nick?
Posted By: bunar Re: how to say hello if that is not me - 11/01/04 12:27 PM
$me
Posted By: no_brain Re: how to say hello if that is not me - 11/01/04 01:35 PM
Thanx

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


Whats wrong?
Quote:
#MANGAPIX Unknown command
Posted By: module Re: how to say hello if that is not me - 11/01/04 01:46 PM
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.
Posted By: qwerty Re: how to say hello if that is not me - 11/01/04 01:49 PM
Pretty close:
Code:
ON !*:JOIN:#mangpix:msg # Hi
The ! event prefix prevents yourself from triggering the event.
Posted By: no_brain Re: how to say hello if that is not me - 11/01/04 02:32 PM
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! }
} 
Posted By: KingTomato Re: how to say hello if that is not me - 11/01/04 06:49 PM
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!
© mIRC Discussion Forums