What is VB Minebot?
VB Minebot is a program written in Visual Basic.NET to connect to, and interact with Minecraft servers.
What can VB Minebot do?
VB Minebot is under active devolopment, so this list could change soon. But here is the current feature list:
- Supports Minecraft Packet Protocol version 7
- can talk on servers via the textbox at the bottom on the programs UI.
- can change location to move around the server
- can place a block of almost any kind, in any place you would like.
- can open/close your server jail, while you are in -- or outside of your server
- Name the bot whatever you like (If verify-names is off)
- Follow any player around via !Follow (It will follow whoever types !follow)
- View online players via !Players (Only for those on admin list)
- Command Alia's for !follow, !closejail and !openjail added
- Jail blocks are now unlimited, make as many jail blocks as your heart desires!
- Make the bot say whatever you like, from in-game! just use !Say [message]
- Choose to use verify-names on, or off.
- Server bookmarks, for ease of logging on to your favorite servers
- !Spat, Spam's a specified amount of stone in the air, mainly for blob survival.
- Bot admin form, for ease of managing your bots approved users
- Remember me option so you don't have to worry about typing your login every time
- Build objects made in .txt files
- Log the chat thats going on in your server
- Follow around other players
- Parses color codes, and views them bot-side.
- Can count down to annouce an event
- Can evaluate simple expressiosns via VBScript (!eval, !eval2)
- Accepts commands from D3 server global chat
- Scripting support via VBScript. 4 examples files included. -- NEW --
- run scripts at certain events. -- NEW --
- Scripting support has been updated with events, and I fixed a few bugs around the house.
Full Commands List:
!say [message] - Makes the bot say [message]
!count [number] [message] - Makes the bot count down from [number] and then say [message]
!f [name] - Follows [name]
!build [name] - Builds from [name].txt
!xbuild [name] - builds from [name].txt
!head [0-255] - Changes the heads position to [0-255]. 128 is upside down.
!spat [number of blocks] - Spams [number of blocks] in the air, at the highest point in the map.
!eval [expression or sub] - Evaluates expression, Or runs sub from inside bot, or from script
!eval2 [expression or function] - Same as !eval, only it returns a value
!closejail / !cj - Closes the set jail blocks.
!van - Turns on vanilla build mode, so that !build and !xbuild build slower, for vanilla servers.
!info - Tells you the version of the bot.
!openjail / !oj - Opens the set jail blocks
!players - returns a list of players the bot can see.
!follow / !f - Follows whoever said !f / !follow
Use Minebot's Scripting support
Alright so this is going to be your crash course on VBScript, with a few examples here and there
That will give you the basic understanding of VBScript, as well as a reference to its built-in functions.
Now for a few more examples, you can look at the 4 files that I included in the /scripts/ folder.
Ok, so all code for the scripts *must* be placed in either a Sub, or a function. otherwise it will just run
the second that the bot loads it.
if it is placed in a sub or function, you can call the script to run, by using the !eval command.
For example, if I have a sub called pie, any admin can then run that script by typing !eval pie
The bot would then run all code in the pie sub.
This can also be done for functions. Note that all functions require parentethes for the arugements, whileas
subs are kind of touchy. sometimes they need them, other times not. How will you know? simple, it will give you an error :biggrin.gif:
If it is a function, to see the return value you may want to use !eval2 functionname
Included there is a scripting.txt file. This will show you the exposed variables, and functions that you
can use in your scripts. In the included examples you will find the most used one to be sendmessage.
which as the name implies, makes the bot send a chat message.
Notice that you *will* at one time or another come across an error of some kind, but never fear.
First google, and if you can't find an answer, THEN you can post on the minecraft forum topic for help.
Now also note that all the scripts are in .vbs files, and you can have as many subs and functions as you want per file.
Also note that any sub or function in the files can call other subs and functions from the script files.
I actually do this with the buildletters script, I call the refresh sub many times to keep the bots location updated.
You can add and delete modules from the module management window, from File > Manage Modules.
anyways thats the small crash course on how to use the scripting, enjoy and if I can make it any more clear for you
Use the Jail Open/Close feature
This function is -- as I see it, moderately hard to set up.
But once it IS set up, it is a nice feature to have.
This allows you to delete/place as many blocks as you want with the press of a button / type of a command.
You can set as many as you want.
First, you will need to goto your jail, on normal minecraft (or the WoM Client, whichever you prefer)
then delete out your blocks, and open a notepad, or something simular.
on the Minebot, goto extra > Dev Mode or press alt + E + D, This will enable devoloper mode.
Then, place the blocks back, it doesn't matter what material they are, we will make them adminium soon.
for each of the blocks you place, you should get something like this:
Got Change @ -3328,19456,-17664
for each block you place. This is the X,Y,Z position of the block you just placed.
once you have this for all of the blocks you wish to place, you can turn off dev mode.
(Same way you turned it on)
Now open up the Set Jail dialog. (Extra > Set Jail, or Alt + E + S)
You will now have 1 row of X,Y,Z boxes.
For each of the blocks positions you have, enter the X, Y, Z into the boxes, then press the + button.
When you are done, press the Done button, and your jail blocks will be set.
From here on out you may press the open or close jail button on the extra menu to open or close the jail.
Using the Command Based Open/Close Jail function
For obvious reasons, the commands !openjail and !Closejail cannot be left unprotected.
So, in the file menu, you will see an option, "Admins list"
Using this, you can set the list of autorized users that can use the above commands.
to enable umby24 and Inaba to access the command, you would press 'Add Admin' then Inaba
Then add admin again, then umby24
(Not case sensitive)
once you have added the admins, X out the form
then the program will add all the users listed, to the autorized users list.
Now any of the autorized users may type !Openjail or !Closejail in chat to open/close the jail.
(Or !oj , !Cj )
Again, as with the !openjail and !Closejail commands, this command will only work for those added
to the bot's admin list. But, whoever types !Follow (So long they are on the playerlist on the left)
will automatically be followed around by the bot.
(You can also type !f)
Also, new in 2.2, you may type !f [name] to make the bot follow around [name]
So if I wanted to make it follow RonJoe around, I would type
and it would start following him around.
This command will make your bot say something. for example, to make your bot say "Hello" you would type (from your minecraft client):
Also, there is some advanced usage of it, This is only if the server your on supports it (Because many servers block it, or even kick the bot)
But, it can be used in a D3 server, you can use color codes in your !say message.
so, for example, if you did
The bot would reply hello, in red text.
This command will spam stone in the air, and was made to be used for blob survival games in D3 Servers.
To use, simply type !spat [number of blocks]
for example, !Spat 128 would spam (if your lucky) 128 blocks of stone in the air.
Using !Build or !Xbuild
Once you have prepared a file with the correct data in it that will allow the bot
to build, simply type !build [name of text file WITHOUT extention]
This also supports sub-folders of the folder the bot is placed in.
so, for example, if I were to type
it would open the text file pie.txt in the same directory as the Minebot.exe
then it would parse it, and build it at the bots current location
you could also do
if you had the pie.txt in a sub-folder named objects.
See the included pie.txt and minebot.txt for how to use the .txt files to build
New in 2.2, with the same usage, is !Xbuild
Using Chat Logging
There is no in-game command to begin logging, to begin logging you must do so from
the bots user-interface.
It is under the menu strip at the top Extra > Start Logging and Extra > Stop logging
when the logging starts, it will begin to dump every message the bot receives into
a text file, 'Log.txt' in the same directory as the bot.
Each message will have a time and date stamp on it.
This should be pretty simple, but just in case:
!count [Number to count from] [Message to show when done]
This should accept color codes as well.
so for example:
!count 5 !SPLEEF!
would cause the bot to say this (with 1 second between each number)
FAQ Sub-section: building with .txt files
Q: The bot stops building at some point in the middle of the build. the .txt file is all there, I don't know whats wrong!
A: Check the spaces at the end of each line. each line must be the length as the width as set at the top of the .txt file. If you need to visualize this,
You may add a 'S' in place of a space, and the bot will read it just the same.
Either this, or you did not set the height/Width params correctly. Remember that it is..
or.. in other words: &[y],[x]:
Note that as of version 2.4, the bot will attempt to ignore this issue, and move on as normal.
Q: Can I add comments to my .txt files?
A: Absolutely. just make sure the line the comment is on starts with a - (Minus sign), and the bot will skip right past it.
if I can actually figure out how to parse the play.jsp url's, then it should be all of them.
My priority list is to get it working, and get it the ability to talk at first. then i will look into getting the URL's de-coded so you can just pop in a URL, enter a username, and hit connect.
After that I will look into whatever features people suggest, but most likely the ability to move around, and if can get it right (Which would probably take ALOT of work) would be to make it be a time bot, to display the time, in real time.
I'll just have to see how far it goes, and if I can get some more people who would like to help out, I could use a few extra hands..
unby24, you can't actually parse the urls, as they are an MD5 hash. instead you must get the bot to login to minecraft.net, use an HttpWebRequest and sort through the HTML to get the parameters for the Java applet. There you will find the IP and port.
Private Mod Note
Rollback Post to RevisionRollBack
Minecraft Name: KakashiSuno
I'm known as Kakashi, Kaka, KS, and the Coal Ninja =)
That can be done, I can even add in a "/Say mode" to where you type a message, and it auto adds the /say in front of it to talk as server.
But at this point, I have just worked on it for 5 hours. Non stop. and what have I accomplished? It can send messages, change location (But the location is off, and this is what i was working on, for example, if I type loaction X: 1, Y: 1, Z: 1 into the bot, it moves the bot to location (as read from the WoM Client..) 8.0, 8.0, 7.1
It can view incoming messages, But does not always pick them up.
So I could use any help that can be given..
I will give you a small tip about player locations. They are not kept the same way as block coordinates are. For example, a player and a block at 100, 100, 100, are actually in two very different locations. The block is at literal 100, 100, 100. However, player location is actually broken into 32 mini-blocks, per literal block. So, if you want to lower the player position by 1 literal block, you actually want to lower it by 32.
I've recently tried to get my copy of Botler working, and have failed miserably. Now, the reason that I want (and need) a bot for my server, is to easily open and close my jail for trusted users, when no OPs are on.
Botler does this - but again, I cant get it to work. If you could add a similar function for your bot (Build jail, open/close jail at command), I would be forever gratefull.
Oh, and the interface looks awesome. I am actually tired of dealing with CMD windows all the time.
The interface is still very rough, and changes alot so I can get things right, I will look into the location thing, though the bot does not seem to like decimal points, it just rounds them.
This bot currently connects to servers using the protocol outlined in the minepedia dev resources, but does not work if you try on a verify-names server, because it does not get the salt of the server (The log on auth code) which i currently have set as "asdf".
I can delete and set blocks, so it should not be an issue to have a open/close jail button, i will see once i can get it a bit more stable.
I am quite tired of cmd windows as well..
and thanks for the info unison, i will work with it a bit.
other than that my main issue is packet arrivals.
The come in slow sometimes and ends up to where the bot doesn't get all of them.
if the bot did get all of them, i could dump maps with no problem...
EDIT: Working on beautifying it a bit, as well as adding a few nice features.
Figured out that with the exception of block location 0,0,0, every blocks location (x, y, or z) goes up by 256.
so to place a block at 0,1,0 it would be 0,256,0
or 2,1,1 would be 512,256,256
with this i am going to add a block placing ability, and a block removing ability.
Thanks to this I am going to try and make a jail opening/closing command for the bot.
The setup for this could seem a bit complicated, so i will include a readme in the next release.
The locations are a bit different, I am using the type short for the location x,y,z coordinates, but each 1 block for location, is equal to 8. (as shown from the WoM Client), as well as being equal to a very rough 8 actual blocks.
-- Added disconnect, reconnect options
-- added ability to change the bots name
-- Added ability to open/close jail by means of button from program, or command in-game, up to 4 blocks.
-- Added ability to set every kind of block.
-- Color codes are stripped to clean up the chat
-- Added Devolper mode, to show the more technical stuff such as block changes when enabled.
-- Added a readme.txt to the main zip file on sourceforge to explain how to use.