mIRC Homepage
Posted By: King Join Message - 23/01/13 02:49 PM
i made this simpls code but i got 1 problem

Code:
on *:join:#: {  msg $chan Welcome $nick to Crazy Channel.
}


but when my bot join #Crazy Channel he will Welcome Himself smirk

i want like when Bot join Any Channel this Message Come "Hyper is Back"

And when Any user join Channel then this message Come "Welcome $nick to Crazy Channel"

Can Anyone help me to make this?? And there is Any limit in mIRC Remote Section? cuz i put a big script in it but that script won't work. i put total 1000 line in Remote Section. how to solve this problem?
Posted By: sparta Re: Join Message - 23/01/13 03:46 PM
Code:
on *:join:#: {
 if ($nick != $me) { 
 msg $chan Welcome $nick to Crazy Channel.
 }
}

And i have 1500+ lines in one file of remote, so your problem are somwhere else, not in a limit of remote.
Posted By: 5618 Re: Join Message - 23/01/13 05:11 PM
Code:
on me:*:JOIN:#:msg $chan Hyper is Back
on !*:JOIN:#Crazy:msg $chan Welcome $nick to Crazy Channel.

or...
Code:
on *:JOIN:#:{
  if ($nick == $me) msg $chan Hyper is Back
  elseif ($chan == #Crazy) msg $chan Welcome $nick to Crazy Channel.
}
Posted By: sparta Re: Join Message - 23/01/13 06:24 PM
You should use { }.
Code:
on me:*:JOIN:#:{ msg $chan Hyper is Back }
on !*:JOIN:#Crazy:{ msg $chan Welcome $nick to Crazy Channel. }

on *:JOIN:#:{
  if ($nick == $me) { msg $chan Hyper is Back }
  elseif ($chan == #Crazy) { msg $chan Welcome $nick to Crazy Channel. }
}
Posted By: 5618 Re: Join Message - 23/01/13 06:27 PM
No you should not. They are completely unnecessary the way you use them. They are only necessary for multi-line scripts.
Posted By: sparta Re: Join Message - 23/01/13 07:11 PM
People told me when i started that i should use them. So i use them. =)
Posted By: Tomao Re: Join Message - 23/01/13 10:53 PM
Whoever told you so was a wise one. It's a good habit to use the curly brackets. They help to minimize potential errors from happening.
Posted By: Riamus2 Re: Join Message - 24/01/13 11:14 AM
Yeah, there are things that are sometimes necessary and sometimes not, like {}'s. It saves headaches if you are just in the habit of always using them even when they aren't needed. Otherwise, you have a greater chance of writing a large script and forgetting them when they are needed and then wasting a lot of time debugging the script.

In the end, that's a personal preference and is up to the individual. Personally, I make things multiline most of the time anyhow. It means more lines, but I just think it's easier to read that way. About the only time I do anything that uses {}'s on a single line are error message/validations. Again, it's just a preference and can be done either way.
Posted By: King Re: Join Message - 24/01/13 01:06 PM
thx for ur reply guys
© mIRC Discussion Forums