mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
to a remote code?

My main chatting id is: FireDivine, my bot is FDBot.

I am trying to make it so that if someone typed cookie:

on *:TEXT:cookie:#:{
/describe $chan *Gives you a cookie*
}

Only FDBot would respond and not both FDBot and FireDivine.

Any ideas?

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
The simplest method is to run the bot using a sepearte instance of mirc, that only it has the scripts of the bot in.

if u must run both users using the same mirc you well need to code in whcih nick is ment to respond to the command
Code:
on *:TEXT:cookie:#:{
  if ($me == FDBot) {
    describe $chan *Gives you a cookie*
  }
}



***

if yoiu are going to do that may i suggest this, you have located in one remote script a alias called BOTNAME as follows
Code:
alias botname return FDBot


then any commands only the bot should function can have this...
Code:
on *:TEXT:cookie:#:{
  if ($me == $botname) {
    describe $chan *Gives you a cookie*
  }
}


This well allow you to change the name of the bot (if u wished to) in one place, and that well effect all scripts for the bot only.

Joined: Feb 2006
Posts: 47
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Feb 2006
Posts: 47
Thanks, that worked.


Link Copied to Clipboard