User Name
Password

Go Back   Planetarion Forums > Planetarion Related Forums > Planetarion Discussions

Reply
Thread Tools Display Modes
Unread 29 Jan 2009, 18:48   #1
Devlin
Registered User
 
Join Date: Apr 2002
Posts: 122
Devlin has a spectacular aura aboutDevlin has a spectacular aura aboutDevlin has a spectacular aura about
Post Galaxy DC Bot

I know there are various bots capable of doing this, but I decided to take on the challenge of writing my own. I've decided to put it here for anyone who wants it incase you don't trust alliance bots to not spy on your gal. Plus, I don't see the need in being stingy with it anyways. I've tested it out with 60 calls and it didn't flood out, but I'm not sure how many more than that it can handle without flooding.

I ask only that you don't remove the header at the top that gives me credit for the work. Also, feel free to edit the code to improve or add to it, but if you do so please upload it to a new pastebin and put the code here for others to enjoy your modifications. The bot is fairly basic right now, because I didn't feel like investing too much time in a bot for what will be my last round of PA under this name or any other. It doesn't parse galaxy status pastes, so you have to add calls manually. It also doesn't keep track of ETAs. If anyone feels like undertaking these tasks please feel free, but as mentioned above please share your work with the rest of the community as I have.

It's a mIRC bot, so to install it just press ALT+R in mirc and paste all of the code into the remotes window. Verify you have remotes turned on by doing the command [/remotes on] in a channel or status window. Finally, do the command [/set %chan #yourgalchannel] so the bot knows where to accept commands from After that you can type !help for a list of commands.

Here's the help file so you can get a preview of what it does before trying it:

To add a defcall (arguments in red brackets are required): !addcall [planet #] [attacker coords] [attacker race] (shipclass) (status) (bcalc)
To delete a defcall: !delcall [id#]
To edit a defcall: !editcall [planet|coords|race|class|status|bcalc] [new info]
To list calls: !calls
To reset the defcall system: !resetcalls

mIRC Galaxy DC Bot: http://pastebin.com/m3dabb5bc

PS: Sorry, I have a bad habit of not commenting my code

Also, here is my inc reporting script. It works off slash commands rather that functioning as a bot though it wouldnt be hard to turn it into one: http://pastebin.com/m40619adf

Last edited by Devlin; 1 Feb 2009 at 14:22.
Devlin is offline   Reply With Quote
Unread 30 Jan 2009, 21:25   #2
DigitalZero
Round 1er
 
Join Date: May 2001
Location: PA, USA
Posts: 133
DigitalZero is on a distinguished road
Re: Galaxy DC Bot

Devlin! #1 rule in programming is to COMMENT EVERYTHING
__________________
-------------
DigitalZero in a Digital World

Round 1 - 6: NewDawn
- 3,4,5 - ND HC
Round 7: NeMeSiS
Round 8,9: ND..then retired
Round 12: return to PA. NewDawn
Round 13 - Present: NewDawn, 35+ HC.

PA-Radio!!!
DigitalZero is offline   Reply With Quote
Unread 31 Jan 2009, 22:25   #3
Devlin
Registered User
 
Join Date: Apr 2002
Posts: 122
Devlin has a spectacular aura aboutDevlin has a spectacular aura aboutDevlin has a spectacular aura about
Re: Galaxy DC Bot

Quote:
Originally Posted by DigitalZero View Post
Devlin! #1 rule in programming is to COMMENT EVERYTHING
Heh well I didnt plan on having other people looking at the code when I wrote it. It's all very self explanatory to me. But honestly, if you don't understand what the code does you should give up any notion of editing it and just stick to copying and pasting it
Devlin is offline   Reply With Quote
Unread 1 Feb 2009, 15:44   #4
ellonweb
Registered User
 
Join Date: Nov 2008
Posts: 401
ellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant futureellonweb has a brilliant future
Re: Galaxy DC Bot

Quote:
Originally Posted by DigitalZero View Post
Devlin! #1 rule in programming is to COMMENT EVERYTHING
Good code shouldn't need comments.
ellonweb is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 10:23.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2002 - 2018