mIRC Home    About    Download    Register    News    Help

Print Thread
#142413 18/02/06 02:10 AM
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
on *:TEXT:sd *:#:{
if ($me == $botname) {
/describe $chan *Slowly kills $nick $+ !*
}
}

The corrent code answers:

*Slowly kills NAME!*

If they type SD TEXT TEXT

How do you code it to respond:

*Slowly kills TEXT TEXT* instead of name?

Thanks!

#142414 18/02/06 02:12 AM
Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
Code:
on *:TEXT:sd *:#:{ 
  if ($me == $botname) {
    describe $chan *Slowly kills $iif($1-,$ifmatch,$nick) $+ !*
  }
}


try that

Last edited by Jigsy; 18/02/06 02:13 AM.

What do you do at the end of the world? Are you busy? Will you save us?
#142415 18/02/06 02:13 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Replace $nick with $2 (or $3, $4, etc. depending on which TEXT you actually want displayed)

#142416 18/02/06 02:23 AM
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
Thanks for the replies. I got it to work, with the help of you all's codes.

on *:TEXT:sd *:#:{

if ($me == $botname) {

describe $chan *Slowly kills $iif($2-,$ifmatch,$10) $+ !*

}

}

Is the final result.

#142417 18/02/06 02:31 AM
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
The previous code gave an error on entering a room.

So I fixed it with:

on *:TEXT:sd *:#:{
if ($me == $botname) {
describe $chan *Slowly kills $iif($2-,$ifmatch,$3) $+ !*
}
}

#142418 18/02/06 02:42 AM
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
Is there a way to welcome somebody when they enter the room?

I am pretty sure there is but:

on *:TEXT:* joined *:#:{
if ($me == $botname) {
/msg $chan WB $nick $+ !
}
}

Is not working.

Never mind.

I found a good link for a welcome message:

https://forums.mirc.com/s...true#Post148733

Last edited by FireDivine; 18/02/06 02:51 AM.
#142419 18/02/06 02:58 AM
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
I got it to work with:

on *:JOIN:#:{
if ($me == $botname) {
/msg $chan WB $nick
}
}

#142420 18/02/06 06:49 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
The code you had was logicialy flawed, becuase you always had to have a $2 anyway sd * means there must be a $2

Code:
on *:TEXT:sd*:#:{
  if ($me == $botname) {
    if ($1 == sd) { describe $chan *Slowly kills $iif($len($2-),$2-,$nick) $+ !* }
  }
}


* match to sd* so SD on its own works or SD <something> works
* make sure the first word was SD becuase it catches SDBLAHhetc as well.
* in the $iif check the lenth of $2- rather than what it is since a few values well produce false conditions
* reinserted $nick where u put $3 for some reason


Link Copied to Clipboard