mIRC Home    About    Download    Register    News    Help

Print Thread
#261756 23/11/17 06:46 AM
Joined: Nov 2017
Posts: 1
J
Mostly harmless
OP Offline
Mostly harmless
J
Joined: Nov 2017
Posts: 1
i wanted to know how can i run 2 mirc bots
i tried but when i load my second bot my main bot scripts are loaded on the 2nd bot too i want both bot scripts to work separately

jaysonbarody #261757 23/11/17 08:45 AM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Well, not having any details we could only speculate. It's possible that bots could be written in a way that assumes they're the only bot loaded, causing them to interfere with another bot in several ways:

1. by blocking the other bot from seeing events it needs to see.
2. by seeing events intended intended for the other bot.
3. if both scripts use an alias given the exact same name, there are cases where one bot would be executing the other bot's alias.
4. if both bots use the same !keyword command, depending how the script is written, either 1 or both bots could see it. They often try to avoid this kind of problem by responding to commands that begin with their nick, but if you're loading them in the same server connection...

It might be possible to solve your problem by running 2 instances of mirc not sharing the same mirc.ini and probably not the same same folders. It's likely not good enough to open a 2nd server connection in the same mirc using a different nick because they would both be seeing the same list of scripts having the same events being intercepted.

maroon #261761 23/11/17 04:11 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
One such approach is to make your bot script(s) only respond to events if the connection instance is using the correct nickname; the variable $me. This way, you can use a single mIRC instance that is connected to the same network several times. The only main drawback to this is the duplication of lines appearing in your logs (a separate issue for a different day.)

Code:
On *:TEXT:*:#MyChan: {
  if ($me != FunBot) { return }
  ... bot code goes here ...
}

On *:ACTION:*:#MyChan: {
  if ($me != FunBot) { return }
  ... bot code goes here ...
}

ALIAS FunBot_Main {
  if ($me != FunBot) { return }
  ... bot code goes here ...
}


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
jaysonbarody #261763 23/11/17 05:03 PM
Joined: Jul 2006
Posts: 4,146
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,146
Hello, one good solution is to make another profile, check this link which will assist you in every step https://en.wikichip.org/wiki/mirc/virtual_profile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard