mIRC Home    About    Download    Register    News    Help

Print Thread
Can you help me on this screen clearer? #27339 01/06/03 12:34 AM
Joined: May 2003
Posts: 10
L
LeperMessiah Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: May 2003
Posts: 10
on 1:TEXT:!clear:#:if ($nick == LeperMessiah) { /msg $chan Clearing... | /clear } | else { /msg $chan You are not my owner }

Can you tell me what's wrong with this? Here is a rundown of what I want it to do.

In any channel, when I (My nickname is LeperMessiah. My script's name is different.) type !clear, I want my script to check if my name is LeperMessiah. If it is, he says "Clearing..." then clears the screen. If it is not me, I want him to message the channel saying "You are not my owner."

But this code is not working..Can anyone tell me what the code should look like? grin

Re: Can you help me on this screen clearer? #27340 01/06/03 01:05 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Code:
on *:TEXT:!clear:#:{
  if ($nick == LeperMessiah) { msg $chan Clearing... | !clear # }
  else { msg $chan You are not my owner }
}

Re: Can you help me on this screen clearer? #27341 01/06/03 08:43 AM
Joined: May 2003
Posts: 10
L
LeperMessiah Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: May 2003
Posts: 10
Ack, still doesn't work.

Re: Can you help me on this screen clearer? #27342 01/06/03 09:09 AM
Joined: May 2003
Posts: 21
X
Xc0n Offline
Ameglian cow
Offline
Ameglian cow
X
Joined: May 2003
Posts: 21
It should work..


-
Xc0n
Re: Can you help me on this screen clearer? #27343 01/06/03 09:09 AM
Joined: Dec 2002
Posts: 339
F
FunChatter Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
Try this one...
Code:
  
on *:TEXT:!clear:#:{  
if ($nick == LeperMessiah) { msg $chan Clearing... | [color:red]/[/color]clear # }  
else { msg $chan You are not my owner }
}

Re: Can you help me on this screen clearer? #27344 01/06/03 10:51 AM
Joined: May 2003
Posts: 10
L
LeperMessiah Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: May 2003
Posts: 10
I already edited that !clear part that should be /clear.

No luck..

Re: Can you help me on this screen clearer? #27345 01/06/03 11:10 AM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
how do you test it?

/help on text
Note: You can't test out these events by typing text to yourself. They can only be initiated by someone else saying something in a channel or in a private message.

Last edited by theRat; 01/06/03 11:11 AM.

Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Can you help me on this screen clearer? #27346 01/06/03 12:37 PM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Use on INPUT instead, if you want to do this in your own mIRC.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: Can you help me on this screen clearer? #27347 01/06/03 03:11 PM
Joined: May 2003
Posts: 2
D
Devo Offline
Bowl of petunias
Offline
Bowl of petunias
D
Joined: May 2003
Posts: 2
/clear only works on your own screen, so if you have it on a bot you will not see any effect other than it saying 'Clearing'. Neophyte's suggestion is probably what you want to do, as that way you clear your own screen!

Re: Can you help me on this screen clearer? #27348 01/06/03 04:19 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
I put !clear and not clear in case you had a 'clear' alias. the ! makes mIRC use its own command in preference to an alias of the same name. Note that as Devo said, this would clear BOTS chanel window and not yours.

Re: Can you help me on this screen clearer? #27349 03/06/03 11:54 AM
Joined: May 2003
Posts: 10
L
LeperMessiah Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: May 2003
Posts: 10
I've already figured out the problem.

And by the way, I was on a different screen saying it to my IRC so it would clear itself when it's lagging. So I needed an on TEXT event. Anyway, like I said I found the problem and it works now. The problem was I had Vincula on and "Show User's Colors" was checked, and IRC adds that control+K thing to the beginning of the incomming text if you put it in remote. So I wasn't sending "!clear", I was sending "[]1,0!Clear"