Fight Chaos IRC Game Bot v1.1 by OkIDaN --------------------------------------- Updated Readme File ======================================= Released: Feb 17, 2005 Webpage: http://okidan.binaryshadow.org/ ======================================= ======================================= 1. THE GAME - 1.1 What is Fight Chaos? - 1.2 What are the main goals of the game? 2. INSTALLING AND CONFIGURING THE GAME - 2.1 Requirements & Technical Stuff - 2.2 How do I install the package? - 2.3 How do I configure the bot and start the game? 3. THE BOT - 3.1 How do I communicate with the bot? - 3.2 What are the available commmands? - 3.3 The Fight - 3.4 The Training - 3.5 Administration - 3.6 Additional Commands - 3.7 Additional Info 4. IN ADDITION - 4.1 Version history and changes - 4.2 Things to be done - 4.3 Contact Info - 4.4 Thanks - 4.5 Copyright ======================================= 1. THE GAME =========== 1.1 What is Fight Chaos? ------------------------ Fight Chaos is an IRC game inspired by combats.ru. The game is totally controlled by FCBot, the main file of this package. The bot simply creates a virtual fighting and training environment in its channel. Once created you own the personage (fighter) and improve it by training, ie using additional points earned in the fights. It stores the data for every registered user on its local computer. 1.2 What are the main goals of the game? ---------------------------------------- - Fighting and improving your fighter and being the best. - Having fun. 2. INSTALLING AND CONFIGURING THE GAME ====================================== 2.1 Requirements & Technical Stuff ---------------------------------- Fight Chaos bot (FCBot) is written in perl. So it is a fully platform-independent standalone application. To run fc.pl you will need a Perl interpreter. Windows users can get one from http://activestate.com/products/activeperl/. Unix OS's usually come with perl installed, but if you dont have one, then you can download and install it from http://www.perl.com/. The package is ususally about 15 Mbs. So you won't wait long. The code was written for Perl 5. It is better to place the code on a fast server. Multitasking isn't implemented yet, so, many simultaneous requests can cause a nice lag. 2.2 How do I install the package? --------------------------------- Simple. Just follow these steps: - Get the .zip file from one of these URLs: http://okidan.binaryshadow.org/fc10.zip http://www.freewebs.com/okidan/fc10.zip - Unzip the file to the accordingly named directory - Make sure you have these files: fc.pl : the bot freadme.wri : the readme file Additional files and folders that you will have: usrdata : the directory where data about registered users will be stored suggestions.txt : the suggestions file log.txt : the log file banned.txt : the lucky users 2.3 How do I configure the bot and start the game? -------------------------------------------------- Simple. Just follow these steps: - Open the bot file (fc.wri) in any text editor (for ex. notepad) - Find the configurations part at the beginning of the file and do the following changes: - Modify the $god variable to contaion your nick, or the nick of the user that will have full access to the bot and will be able to communicate with it online. For example, if your nickname is MyNick the line should look like: $god="MyNick"; - Modify the $privileged_users variable to contain the nickname(s) of the one(s) that should have access to some of the privileges commands of the bot. If they are more than one then put the ":" sign between them. For ex., if users Imanop and Love_is_blue must be privileged then the line would look like: $privileged_users="Imanop:Love_is_blue"; - Modify the $IRCserver variable to contain the address of the server you are joining (for ex., irc.efnet.org) - Modify the $IRCport variable if the port on which the IRC daemon resides is other than 6667 (it probably wont be) - Modify the $IRCchannel variable to contain the name of the channel it will reside in (better to leave it unmodified) - Modify the $FCBot_Password variable to contain the password of FCBot, after you have registered its nickname. (Read 3 items below) - Now that you have finished configuring the file and saved it, you need to do the following things before starting the bot: - Get on the IRC server and register the $IRCchannel if not modified (ie, if its #FightChaos). To register you should paste the following command: '/msg chanserv register #FightChaos password description' to your IRC clients input field. This should register the #FightChaos channel, or any other channel of your choice that is in the $IRCchannel variable. It will also make you the founder. - Register the nickname 'FCBot' by changing your nick to FCBot and typing '/msg nickserv register password your@email.com'. Remember the password and modify the $FCBot_Password line in fc.pl accordingly. - Now that the channel is created you have to set an auto-op for the nickname 'FCBot'. It is usually done by this command: '/msg chanserv aop #FightChaos add FCBot'. This command will make FCBot a privileged user in the channel, so that whenever it joins, it has administrative access to the channel. NOTE: It is better not to give out aops, ops or hops to anyone in the channel except the $god and FCBot. - If you have finished doing all of the above steps you can launch the bot from the command line (shell). Before launching you will have to 'chmod +x' the fc.pl file on unix systems. After that just run the file: 'perl fc.pl' (for background use on unix systems, ie to let it function on a remote server, just add the '&' character to the end of the command, like 'perl fc.pl &'). 3. THE BOT ========== 3.1 How do I communicate with the bot? -------------------------------------- By typing commands to it on IRC. Now, let suppose you have followed all of the steps written above and the bot just joined the #FightChaos channel on the IRC server. You will have to open your IRC client and login on the IRC server as usual. You won't be able to join the #FightChaos channel becaue the bot just changed the channel mode to +i (ie, invite only). You will have to login to the game (by registering first). So, at this point the only communication way is PMing the bot. Type '/query FCBot !help' to get help or '/query FCBot !register' to register. Then after registering you can !login with the password that you have just set. After logging in you can communicate with the bot in either the PM window you are in or the channel (PM is preferable though). For the list of all of the commands supported, type !cmd. To get help on each command type '!help command_name', where command_name is without the '!' sign. 3.2 What are the available commmands? ------------------------------------- Type !cmd in FCBot's PM window to get the list of available commands. General commands: !help, !cmd, !intro, !google, !suggest, !register, !login. Commands available after login: !fight, !fightyes, !accept, !deny, !surrender, !train, !stats, !top, !hit, !hithelp, !declarewin, !invite, !logout, !changepass, !fightlist, !readme, !changes, !me. Privileged commands: !gentop, !votemode, !tell, !raw, !disc, !ban, !unban. To get help on each command, type !help . 3.3 The Fight ------------- Now, lets suppose you have logged in and another person has also logged in. To start the fight you will have to challenge your opponent first. This is done by '!fight Nick'. Now, if Nick accepts your challenge (s)he has to type !accept. Oterhwise !deny. After Nick accepts your challenge the fight starts. I would strongly recommend everyone to read the output of !hithelp command before starting a fight. You can't challenge an opponent if: - He is not logged in. - He is fighting atm. - He is already challenged by another person. - He is much weaker (your real life is 1.7 times as of him) - He is much stronger (his real life is 1.7 times as of yours) You can't accept (deny) a challenge if: - The opponent has already logged out. - The challenge has elapsed. (A challenge elapses in 60 seconds, if not responded) - The opponent has been challenged by another person and is fighting. The reason I have listed these below is that I really am not sure if the scheme is not buggy. I have tested it many times, but anyway, if you find a bug please see [4.3]. I will appreciate your notification very much. So, the fight has started. These are the commands available only durin the fight: !hit, !surrender, !declarewin. Hit is the main command you are going to use. The syntax is: !hit : - will hit the opponent in the target spot and - will defend your given defense spots during the opponent's next hit The spots are : face (100%), neck (90%), chest (85%), groin (85%), arms (80%) and legs (80%) In the panranthesis are the damage percentages in respect to face. Here are the examples of the usage of !hit command: !hit arms : legs groin -> will hit opponents chest and defend your legs and groin for opponent's next hit. !hit a : l g -> the same thing as above (syntax supports abbreviations) !hit f : c c -> will attack opponent's face and multi-defend your chest. Will increase your defensive power two times during opponent's next hit, but only if the opponent hits your chest. Note: do not give type the !hit command in the channel, for known purposes. And it is generally preferable to type any commands in PM. Hits are made by turn. First turn is chosen randomly, and the defense spots of the opposite side are also set randomly. Each successul hit will reduce the health of the opponent. When any of the opponents reach 0 the fight is over and the winner is the opposite side. Right after the fight your character starts healing, in 10 minutes your character will usually gain all its health. But you don't have to wait for it, you can start a new fight anytime after your health reaches 50% of your real life. Additional points are given based on the levels (real life indicators) of both sides. If you win a stronger opponent, you get 5 points (opponent gets 1 point), if equal then 4 (opponent gets 2), if weaker - 3 (opponent gets 2). You have to use this points to train your character. 3.4 The Training ---------------- You can train your character by earning additional points in fights. Syntax is: !train Skill indicator has to be one of these: power, accuracy, speed. Points shouldnt be more than your additional points. An example: !train power 4 -> Will increase your character's power +4 (of course, if you have those 4 additional points) After successful training your stats will be displayed. 3.5 Administration ------------------ Administrator, ie the $god, has to have full physical or remote access to the files installed and created during the game. Here is the list of commands available only to $god: !tell -> Will announce anything in the channel. !raw -> Will send any raw text to the server. This way you can send irc commands to the server. !disc -> Will disconnect the bot from server and end the execution of the program. !gentop -> Will generate the toplist of all players. It is done automatically each 5 minutes. !ban Nickname For_Hours Reason -> Will log out and ban the user from logging in for estimated time (in hours), and set the given reason. !unban Nickname -> Will remove Nickname from the banlist. If you think any of the above commands should be shared with privileged users, please type !suggest . This command has to send the suggestion to the remote FCBot server too (since ver. 1.2). If it doesn't, or if you prefer to disable this feature, please send your suggestions file from time to time to my email address (see [4.3]). Commands available both to privileged users and the $god: !votemode on Question?:Answer1:Answer2:etc -> Will create a virtual voting environment in the channel. To vote, type !. !votemode off -> Will turn off the voting process and print out the results. Privileged users can invite anyone to the channel, normal users can invite only logged in users. Additionally, the bot won't ban $god from service if it detects flooding, even if it reports it does. 3.6 Additional Commands ----------------------- These are additional commands of FCBot: !google - Will search Google for given term and display specified number of results (up to 10). !votemode - See 3.5 (privileged users only) 3.7 Additional Info ------------------- - FCBot has anti-flood protection. If you try to flood the bot, or even accidentally pass to it a few times any request it understands, you will get a service ban for a few minutes, get kicked from the channel and thus, automatically logged out (which will declare your opponent the winner, if you were in a fight). - Bot is logging important requests and events, so, keep in mind that abuse or misuse of a function of FCBot can result not only in a service ban for a few minutes, but also a permanent ban. - Bot is mostly non case sensitive (!hit command IS) - It will ban the cheater from service for 18 hours if it detects more than one logins from one hostname. 4. IN ADDITION ============== 4.1 Version history and changes ------------------------------- Version 1.1: released - Feb 17, 2005 - Implemented encryption (hashing) of stored passwords - Security and anti-cheating enhancements - Logging process improved - Many minor modifications, additions and feature improvements - A bug fix: initial defense spots of the first hit receiver in a fight weren't being set correctly. Version 1.0: released - Feb 7, 2005 - No changes 4.2 Things to be done --------------------- These are the main goals for the next releases: - Implement multitasking - Implement !watch command that will let others watch the fight - Create varying hit texts, ie fight themes - Improve the suggestion feature - Minor modifications 4.3 Contact Info ---------------- If you have discovered a bug (miscoding), or you have discovered a weak side of the algorithms used in this game, or you have a nice idea what would be good to implement in the next version please e-mail me at: okidan@gmail.com, okidan@yandex.ru. It will be very much appreciated. If you can't configure the bot to run properly I can help you personally. You can find me on irc.tddirc.net in either #HackerLounge or #FightChaos channel. You are welcome to come to our supreme league of players on #FightChaos channel. To join the channel you have to register first. Type /query FCBot !register. 4.4 Thanks ---------- I want to thank all of the users of #HackerLounge channel on irc.tddirc.net who helped me during the first public test of the bot which was held in the #FightChaos channel on the same server. Additionally, I want to thank Larry Wall and Randall Schwartz for being who they are. 4.5 Copyright ------------- Fight Chaos IRC Game is copyrighted to Okidan, as well as Fight Chaos IRC Game Bot. You can modify and distribute the code as long as you dont touch the headers in fc.wri which state that this code was written by me, and include this readme file (without touching the copyright in any way).