mIRC Home    About    Download    Register    News    Help

Print Thread
#170991 17/02/07 08:08 PM
J
jaredmt
jaredmt
J
i just want a simple bot. Would i be allowed to create my own for my specific channel?

I'd like to make the bot so it says certain things in response to certain words. (ex: lets say it responds to hi. If i said "hi guys whats up?" the bot would respond saying "hellow name" )
I might want to make it do other things too later. Like games or puzzles or something. so if you could teach me how to make a bot that does that stuff, that would be great

#171013 18/02/07 01:33 AM
S
SICORPS
SICORPS
S
its pretty simple all you need to do is copy your mirc file into a new directory since you whant to create a bot. run 2 mirc at the same time connect it to the same server and then read the mIRC help file

/help on text

see this file for a bot exemple: scrps.mrc

if you need a bot for your channel try : www.scrps.org

Last edited by SICORPS; 18/02/07 01:34 AM.
#171014 18/02/07 01:37 AM
T
Trixar_za
Trixar_za
T
Are you allowed to make one for your own channel? Probably... Depends on the network's rules, but most don't mind. Just check in with an IRCop to be safe wink

As for a simple response bot, then the TEXT trigger will be your best friend smile.

Like in your hi example:

Copy and paste the following under the remote tab in your script editor

Code:
on *:TEXT:*hi*:#:{ msg # hi $nick | halt }


Ok, that may need some breaking down.

on *:TEXT:*hi*:#: <------ Basically it looks for the word "hi" anywhere(coz *[star] is a wild card) in the TEXT that other users type. Currently it is on # channel, meaning the channel it is triggered on... which is bad if your in more than one channel. So I would make that the same as your channel name say #Zen ;P.

{ msg # hi $nick | halt } <---- Ok now this is what happens when the word "hi" is found in the other users' TEXT. It will send a msg to the current channel( make the # the same as the above channel :P) and says hi to $nick, which is the scripts way of getting the person's nickname. So say Jack01 said Hi all, the bot would respond with "Hi, Jack01".

In scripting it's always a good idea to use brackets ( {} ) and always remember for every one you open { you must have a closing bracket }. Simple right? Yeah, and you have NO idea how many times ppl forget it... including me :P

Ok this is like a very simple example, but it works.

Hope this helps you out a bit... and if you need more examples give me a shout.

#171040 18/02/07 04:04 PM
T
Trixar_za
Trixar_za
T
Nice bot SICORPS, I checked it out just now smile

Might be a bit complicated for a newbie though, but a piece of scripting art smile

#171308 22/02/07 04:26 PM
S
sk8board181
sk8board181
S
lol i know what u mean about on *:TEXT:*hi*:#:{ msg # hi $nick | halt } i put in on mine and i said hi to like everyone who spoke smile

#171326 22/02/07 10:11 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Using *hi* is a bad idea for a trigger because "hi" can be in a LOT of different words. At the very least, you would want to use hi* instead of *hi* because that at least requires that the line/word starts with "hi" so it doesn't trigger on something like "this is fun."

Beyond that, there are various ways you can limit the script so that it is less likely to respond to the wrong thing. It just depends what you're doing and how you want it to work.

Riamus2 #171335 22/02/07 11:24 PM
Joined: Jan 2007
Posts: 1,155
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,155
try

on *:text:hi *:#:{ }

DJ_Sol #171340 22/02/07 11:46 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Were you replying to me or the other person? If it was to me, I knew that and pointed it out... just without a coded example. If it was to the other person, just ignore this post. laugh


Link Copied to Clipboard