Welcome,
Guest
Please
Login
or
Register
.
News:
Home
Forums
Help
Search
Rules
Login
Register
GTAStunting
サ
General
サ
General Discussion
サ
Computer Talk
サ
IRC channel and Bot Creating Tutorial + few scripting lessons
« previous
next »
Print
Pages: [
1
]
Author
Topic: IRC channel and Bot Creating Tutorial + few scripting lessons (Read 1842 times)
0 Members and 2 Guests are viewing this topic.
n0ah
Posts: 242
IRC channel and Bot Creating Tutorial + few scripting lessons
«
on:
May 28, 2007, 01:46:03 PM »
Heres is tutorial for mIRC channel and bot creating + few scripting lessons.
WARNING: Channel create tut is for irc.gtanet.com
You will need mIRC (get latest version here
http://mirc.com/get.html)
.
Creating a channel:
You must be registered on server if you want create a channel. (to register type
/REGISTER
password
email
eg:
/register
mypass
[email protected]
Now everytime you connect - use /identify password.
Now you need a channel. just type /join #ChannelNameYouWant
Now type
/msg
chanserv
REGISTER
#channel
password
description
(pass must be at least 5 characters long)
eg:
/msg
chanserv
REGISTER
#Moo
mypassword
This is my first Channel YAY!
The Channel is registered and you're the owner of it now.
Adding Ops and Admins:
use /cs aop #Channel add Nickname
chanserv got different functions for this, you're using the xOp system by default
you can replace the "aop" with;
vop - automatic voice, +
hop - automatic halfop, %
aop - automatic operator, @
sop - automatic protected operator, &
check out /msg ChanServ HELP AOP
Kicking and Banning:
You can do all this with bot, but this way is better.
If you want kick someone use:
/msg chanserv kick #channel nickname
If you want ban someone use:
/msg chanserv ban #channel nickname
If you want unban someone use:
/msg chanserv unban #channel nickname
There is few others options use:
/msg chanserv help
to see them all. I should explain them too, but I'm too lazy.
Running Bot:
You can try create your own bot, but for beginning I advice to download DreamBot (I used it myself) -
http://www.mircscripts.com/cgi-bin/file.php?id=854
Extract DB anywhere you want, now copy your mirc.exe file to DB directory. I advice to read dbhelp.htm, if you can't understand anything from it - well... its your lucky day, I will explain the basics.
Run mirc.exe.
something like this should apear:
*** DreamBot IRC Bot ReadMe
*** テつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキテつキ
For using DreamBot, you must first set yourself as owner.
Please follow these steps:
1. Open another IRC client (such as mIRC) and connect it to a server and join a channel.
2. Connect the bot's mIRC to the same server you connected and make it join the same channel as you (/join #channel_name_here).
3. In your IRC client (not in the bot's mIRC) type the following command:
!owner ****
4. The bot will then ask you to set a password. Setting a password allows you to login the bot when it does not recognize your host/IP. When it does, you don't need to login. The login command has the following format: /msg botnick login <username> <password>. Please note that your username is the nick you had when you set yourself as owner.
5. Then type !commands in the channel window to see a list of available commands.
6. Now please configure your bot the way you like using 'Configuration...' in the DreamBot 5.1 menu or press F2.
7. That's about all, enjoy DreamBot! For more information, please read the documentation that came with the bot (press F1).
Connect (with your mIRC, not bot) same server, join same channel and type
!owner ****
then set password.
btw press F2 for settings window. Type /commands for command list. Read dbhelp.htm for all available commands, options.
First Command:
Now when you know then basics, time for your first command.
Create Folder named scripts (I named my folder "porno", but you should use "scripts"). then create commands.txt (you can create one file and put all cmds in it you can create file for each command, it don't matter)
Now here is simple command:
[codebox]on *:text:!command:#: { msg $chan Hello World }[/codebox]
Now lets see what it does:
on *:text:!command:#:
isnt hard to understand. It checks if command you typed = command that goes after text:
You can use this without !. So if we would change it to: on
*:text:command:#:
It will work with word "command" without !. Lets look at this: *:text:!command
*
:#:
* after !command means that symbols that goes after !command will be ignored. eg: if you type !commandBLEBLE bleble will be ignored and command will work as usual command.
{ msg $chan Hello World }
MSG - means that bot sends MSG to $chan. $chan is indetifier. It means channel where command was typed. all text that goes after $chan will be sended to channel.
Since file with this command isn't in in auto loading list, you must add it to it. Open Bot mIRC window, and write /load -rs pathtoyourfile
EG: /load -rs porno/pornocmd.txt
or for your situation:
/load -rs scripts/commands.txt
Done, now command will work and file is added to autoload list.
Identifiers
MIRC Identifiers sound very technical, but its just a term for some characters that identify a value. Still sounds techie? An identifier is like a magic word that will be replaced by mIRC with whatever value it refers to.
The mIRC Identifier $me means your nickname. No matter how many times you change your nick, $me is the identifier for the current one. Wherever you use $me, mIRC will replace that identifier with your nickname.
Simple and good isn't it. The mIRC Identifiers are needed so that your scripts can find the values that may change. MIRC Identifiers are no more than that. There are many identifiers, since there are many things you may need to refer to in your scripts that can change between the time of scripting and the time of use.
Pretty much everything that you can select or change has an identifier. You can refer to the first word in any string of text ($1); the folder (directory) where you installed mIRC ($mircdir); the currently selected nicks in the nicklist ($snicks); etc.
Again, a full list of mIRC's identifiers can be found in the mIRC Help files. In this tutorial I will detail only a few examples of the most practical of the identifiers to start with.
MIRC Identifiers can be used at the command line as well as in scripts, but, for mIRC to evaluate them you must prefix the command with two '//' slashes rather than the normal one. If you only use 1 slash '/' mIRC will not convert the identifier given in an editbox to its value. This only applies to command lines - identifiers and variables are always evaluated in scripts.
NOTE: One essential thing to remember about identifiers is that they almost always will only work if there is at least one space on either side. If an identifier is not seperated by spaces from other characters in scripts then mIRC will usually fail to 'see' it. ALWAYS space identifiers from anything else in your scripts or commands.
MIRC Identifiers
$me identifies your current nick. It becomes very useful in scripting of all kinds.
$1 $2 $3 $4- identify parameters in text etc. These are both the simplest and most confusing of all identifiers since they can refer to a vast range of values. In text strings $1 is the first word, $2 is the second, and so on. Adding the dash '-' to the end means 'onwards'. So $1- equals all words from the first. $2- means from the second word onwards.
The reason for the confusion is that many things create strings which mIRC can choose the first parameter from. In popups for instance, $1 would be the nick selected in the case of nicklist popups.
With experience (or help files) you will learn what parameters mIRC will be evaluating in any given situation. This is because you are generally going to use $1 $2 etc. in very specific circumstances. You will learn about this in the scripting tutorials. For now it is enough to know that $1 means parameter 1.
$? is a very useful and powerful identifier. $? causes mIRC to prompt the user for a value to enter. You can also put your own text on the prompt. $?="Enter your name" will cause mIRC to open a dialog box that has the text 'Enter your name', a text field for you to enter your data into, and 'OK' and 'Cancel' buttons.
The $? identifier is pointless at the command line, but is invaluable in scripts to get user input. To see it in action however before the scripting tutorials just type:
//echo -s you typed: $?="type something here" in the status window editbox and enter it. Notice that the double '//' slashes are used, to make mIRC evaluate the identifiers used in the command line.
/ECHO [-adetsl][channel OR nick] <text>
The /echo command was not covered in the commands section since it is far more related to scripting than common command line useage. The /echo command causes the <text> to be displayed in your window, but not sent to anyone else.
The switches select how to display the <text> specified. If a channel/nickname isn't specified, the -s switch echoes to the status window, the -d switch echoes to the dedicated message window (if you have one), and the -a switch echoes to the currently active window.
If you specify a channel or nick, the text will be displayed in the channel window (or query window) that matches the given name. The -etl switches can still be used with a named window.
Example: /echo -tl #mIRC An echo to the #mIRC channel window
The e switch encloses the line in line separators. The t swich adds a timestamp (e.g. [11:23] ) to the echoed text. The l makes the echo highlighted.
$wavedir is the folder you specified in the options for your .wav sound files. $mididir is the folder you specified for .mid files.
$fulldate is the current date in the format: Tue Sep 07 23:51:23 1999 $date is the date in day/month/year format. To get the date in the American month/day/year format use $adate. The $time gives the time according to your system clock in Hours Minutes and Seconds. $day returns the current day e.g. Tuesday.
That is enough identifiers to give you the idea. You can find all of the mIRC Identifiers in the mIRC help files whenever you wish. Identifiers are not really all that 'techie' at all.
Even if you are not yet comfortable with identifiers in mIRC you will still be able to begin scripting. MIRC Identifiers will become crystal clear once you get to use them a little in your scripts.
Since I didn't knew how explain identifiers (I don't speak English really good), I copied it from here:
http://dooyoo-uk.tripod.com/mirc/identify.htm
WARNING
there are few dangerous (probably) pop-ups, so go ther on your own risk
More will come soon. if I made any mistakes, tell me. If you got any questions ask them, don't be shy, I don't eat humans xD
You can copy and paste it anywhere you want, but please give me credits. This small tutorial took 3 hours of my life and made me drink 8 cups of coffee.
«
Last Edit: June 07, 2007, 02:50:22 AM by n0ah
»
Logged
Aeneon
Posts: 3724
IRC channel and Bot Creating Tutorial + few scripting lessons
«
Reply #1 on:
May 28, 2007, 01:59:02 PM »
Nice tut man! Should help some of us.
IMO IRC Channel Member lists should be like:
#userNumber UserName UserStatus
Then kicking commans would be
/kick #UserNumber
Sorta like SA/VC/MP
Logged
Link
Posts: 1871
IRC channel and Bot Creating Tutorial + few scripting lessons
«
Reply #2 on:
May 28, 2007, 02:27:45 PM »
OMG this is crazy.
*Sets up an irc server and calls me j-fox* (you know the mirc god)
j/k
But i always wanted to know that kind of stuff.
Logged
n0ah
Posts: 242
IRC channel and Bot Creating Tutorial + few scripting lessons
«
Reply #3 on:
May 30, 2007, 08:34:36 AM »
I'm a little busy atm (school exams) I will add more about commands tonight or tomorow :\
Logged
Print
Pages: [
1
]
« previous
next »
GTAStunting
サ
General
サ
General Discussion
サ
Computer Talk
サ
IRC channel and Bot Creating Tutorial + few scripting lessons
Donate
SMF 2.0.19
|
SMF © 2021
,
Simple Machines
Protected by:
Forum Firewall © 2010-2014
Theme GTAStunting by:
Aj Collins
. Based on Blu-Tech by:
Mafia7
.
Hosting by:
RockstarNexus
.
Page created in 0.194 seconds with 23 queries.
SimplePortal 2.3.7 © 2008-2024, SimplePortal