Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Builder Bot


  • Please log in to reply
505 replies to this topic

#1

InsideInside

Posted 13 July 2010 - 01:05 AM

Well, since kingnerd is being kingprocrastinator on releasing his bot, I figured I'd release mine.

This bot is meant either for helping with server administration (ie: backup/restore) or for personal use for accelerating & automating monotonous tasks (like digging holes) giving you more time to get creative.

Things the bot can do:
* Draw lines
* Draw cuboids (solid 2D or 3D areas). This means that you can draw cuboids out of blocks (ie: brick) or you can draw negative cuboids (ie: air) to flatten areas, etc.
* Copy & Paste 2D or 3D areas of the map from one part of the map to another, or due to how a chunk of the map is saved to your computer, to other servers.
* Backup & Restore parts of the map. You can selectively restore part of the map to say.. backup12, and then another part of the map to backup13.
* Sponge an area of the map by placing sponges every 5 blocks in 3 dimensions. Doesn't work the best right now since it won't place sponges inside of objects and so won't completely erase all of the water. Works somewhat with .restore in that you first place sponges with .sponge and then .restore them away.
* Erase blocks of a certain type from an area. This is what I'm using to get rid of sponges at the moment if I don't have an area .backup'd.

Example:
Long (9 minute) rambling video of me showing the features all the while spastically flailing the mouse around to induce seizures in the viewers. :

sgG_t88Kzqs

.drawline @0:15
.goaway @1:00
.cuboid @1:05
.sponge @2:05
.erase @2:55
.copy @ 3:20
.paste @ 3:50
.backup @ 5:10
.restore @ 6:00
unflooding water & lava via .restore @ 6:40

Features not shown:
.reset -- for when you mess up placing the brown mushroom to define a cuboid
.abort -- for when you want the bot to immediately stop what it's doing.



Where to get the bot:


Download or check out (with svn) all of the files from here
Save them as something with the .py extension, install the dependencies, run it with python.

or

If you're a fan of downloading .exes from strangers on the internet, I then give you this file:

Insidebot in .exe form. Unzip it and then put it into a folder and then run bot2.exe



Manual Installation (if not using the .exe):

You need to have the following installed on your computer:

Once you have all of those installed, you can lunch the bot from the command line. Just follow the onscreen directions.

Configuring the bot:
Limiting who can use the bot:
Create a users.txt file in the same directory as the script with the name of one allowed user per line. If the users.txt file does not exist, then anyone can use the bot. If it exists, then only the people named can use the bot.

Configuring some bot settings:

Open up the bot.py file with notepad and then at the very top, where it says 'User Configuration Section', you can edit some variables. Each variable has a little blurb next to it as to what it does. Do not change anything under the user configuration section part. I won't help you if you do :P

Help, it doesn't work:
The bot doesn't connect
Run the bot from the command line (go to start-> run, type in 'cmd.exe' into the box that pops up. On win7 (and vista?) start->[search programs and files box...] and type in cmd.exe in there.

Once that's open, navigate to the directory where you placed the bot.exe.
cd .. makes you go up a folder
cd folder_name makes you go into that folder. You can type cd fol- and then hit tab and it'll auto complete.

Once you're in the same folder as the bot.exe, just type 'bot.exe' and then the program will start up and the window won't close once it stops running. Copy/paste everything you see in that window and then paste it in a message here and I'll try to figure out what is wrong with the bot.

However, before you do that, make sure you'd typed everything in correctly.

I want to change the server or I don't want to type (or paste) the server hash
Open up (or create info.txt if it doesn't exist yet) and then write in your information in this format:
username-password-hash

Make sure to hit 'y' when it prompts you to store the information in plaintext on your computer (if you don't mind storing your minecraft password in a .txt on your computer) so you don't have to type in everything every time.

I may try to cobble together a GUI to ease this later.
I will also pipe all text to a log file for easier debugging later.

The bot gets kicked for building too fast
Edit config.py and set the build_time to be longer.

Someone else has a bot on the server and when I type ., both bots response
Edit config.py and set CMD_PREFIX to some other letter

I don't like that the bot spams so much
Edit config.py and set SILENT_MODE to True (Note the capitalization)

How do I get the bot to move between maps on multi-world servers?
Use .say to force the bot to 'say' the command and thus be moved.
ie: .say /goto map4

I don't want anyone else to use this bot.
Edit users.txt and include one name per line of the people that you want to have access to the bot.

How does .copy/.paste work?
When using .copy, define a 3D (or 2D..) area by placing mushrooms at the diagonals of this space. That area will then be copied into a .chunk file on your computer.

When pasting, .paste will paste that chunk into the server. The orientation will be the same as the original object. You can gauge where from where the bot will start pasting by looking at the (x,y,z) coordinate (if you're using WoM). The bot starts pasting at the lowest x,y,z coordinate.

In conclusion:
If you're using this bot & want more features added to it, I can see what I can do about it.

If you really end up liking this bot, then I'll just say that I haven't bought minecraft yet and well... I hear there are big changes coming to minecraft and multiplayer survival could probably benefit from a bot in one way or another ;)

Thanks JonasQ/MrScarface of the Electronum servers for buying me a copy :3 I always knew my coding would bring me lots of money and fame (*cough*).

Register or log in to remove.

#2

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 01:13 AM

InsideInside said:

* Draw cuboids (solid 2D or 3D areas). This means that you can draw cuboids out of blocks (ie: brick) or you can draw negative cuboids (ie: air) to flatten areas, etc.

I stopped reading there.
So you're basically releasing a bot to everyone that will no doubt be used by griefers to screw with servers?
Ohhh boyyy.

Still, though, for those of us who arn't pathetic little griefers, this may come in handy.
I'm watching this now.
The copy/paste thing looks pretty good.
I'm guessing it saves to your hardrive, so you could transfer buildings between servers?

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#3

InsideInside

Posted 13 July 2010 - 01:29 AM

People are gonna be dicks with or without this bot.

It's not like there aren't already bots out there that can do what mine can do... but better ;P

#4

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 01:31 AM

Well, I'm interested.
Any idea when you'll have a release? D:

EDIT: Nevermind, didn't see that code.
Gonna test it now.

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#5

InsideInside

Posted 13 July 2010 - 01:33 AM

I already put the code in the original post. I'm working on detailed instructions on how to get it up & running at the moment. But the tl;dr version: download the 4 pieces of software that the bot uses, copy & paste the code to a file bot.py (or whatever.py) and then run it & follow the onscreen instructions.

#6

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 02:04 AM

Can't seem to get mechanize set up properly.

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#7

InsideInside

Posted 13 July 2010 - 02:14 AM

Well, download the mechanize source, and then unzip it all into a directory. Next, open up the command line prompt and then browse to the directory that contains the mechanize code (cd .. makes you go up a directory, cd makes you go into that directory). Once you're in the directory with the mechanize code, type 'python setup.py install' and hopefully it works for you :D

Like I said, I'll try to get a py2exe version made or I'll try to remove some of the dependencies (for example, I don't really need numpy).

#8

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 02:23 AM

'python' is not recognized as an internal or external command,
operable program or batch file.

I'm going to guess I've done somthing horribly wrong?
I've managed to get everything apart from mechanize. >.<

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#9

dehodson
    dehodson

    Lapis Lazuli Collector

  • Members
  • 1165 posts

Posted 13 July 2010 - 03:21 AM

This looks like a very helpful bot. I, among some others I'm sure, have been spoiled by the commands available on custom servers such as mc#, d3, and icraft, and now unfortunately I can't build for shit without them. So this bot shall come in handy to me.

#10

InsideInside

Posted 13 July 2010 - 03:29 AM

MrScarface said:

'python' is not recognized as an internal or external command,
operable program or batch file.

I'm going to guess I've done somthing horribly wrong?
I've managed to get everything apart from mechanize. >.<

Well.. you could try typing this at the prompt (while you are in the folder with the mechanize/setup.py)

cmd>  c:/python26/python.exe setup.py install

(assuming you installed python2.6 to c:/python26/, which is the default.)

#11

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 02:17 PM

I decided to go for the easy_install thing, but that would'nt work either.
After a bit of searching around, I found the solution.
Add the Python26\Scripts directory to your path, then use easy_install mechanize in the cmd prompt.

Now, time to go test the bot...


EDIT: Works like a charm. 1,000,001 kudos to you.

EDIT2: Any chance of you adding some sort of "protection" for it?
Right now, everyone is able to use the bot, so people will abuse it without even setting it up. >.<

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#12

InsideInside

Posted 13 July 2010 - 04:16 PM

Ok, if you want to limit who can use the bot, create a "users.txt" file in the same directory as the bot and then add people's usernames, one per line. If the file doesn't exist, anyone can use it, if the file exists, then only the people named in the file can use it.

The file that you want is the r3.

#13

Zallist
    Zallist

    Gold Miner

  • Members
  • 363 posts
  • Location: Northern England

Posted 13 July 2010 - 04:52 PM

Heh. For some odd reason, this bot completely fails on MCZall servers.
(Jonas came into both mine and his own, and it refused to do anything the entire time)

I've not put any protection against it in code, but it fails to actually do anything.

Might be a good idea to pop into an MCZall server and run a debug test, in case it's failing to get the right packets. (or hell, I could have broke something that needs to be fixed)

#14

InsideInside

Posted 13 July 2010 - 04:57 PM

Can you give me an example of an MCZall server?

#15

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 05:01 PM

Ocean Flatgrass
The Electronum - Freebuild
There are some more out there. Look for any with [MCZ] or [McZall] in the names.

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#16

travi1997
  • Location: Iowa
  • Minecraft: travi1997
  • Xbox:Suntarr

Posted 13 July 2010 - 05:03 PM

Ontopic: cool!
Offtopic: Yeah, I always got excited about KingNerd's bot but it was never released.

Posted Image


#17

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 05:43 PM

The bot has serious hatred against doublestairs.
Won't copy them, paste them ect.

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#18

InsideInside

Posted 13 July 2010 - 06:03 PM

Well, it copies them just fine, it just doesn't know how to place them just yet. Doublestairs are special blocks that you just can't place into the game (ie: can't send a packet that says 'place double stair here' since you'll get kicked for placing in illegal block). The way to place double stairs is by placing two half-stair blocks on top of each other and I just haven't gotten around to coding that in yet.

Anyway, I've modified the bot so that it should work with MCZ servers now. Let's see what I broke with this update :|

Edit2: Should now be able to switch between maps (use .say /goto...)

#19

JonasQ
    JonasQ

    Forum/Wiki Sponsor

  • Members
  • 846 posts

Posted 13 July 2010 - 08:39 PM

Still won't work with McZall. :Turquoise:

WedTM said:

If God didn't want women to be in the kitchen, then why do they come with milk and eggs already?

Quote

2:43 AM  Animator: Ejaculation in iron pants? No underwear?

#20

InsideInside

Posted 13 July 2010 - 08:54 PM

Are you using r6?