Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - woder

Pages: [1] 2
Got a problem? Seek help here / Re: Headless Operation on Linux
« on: November 05, 2018, 08:20:49 pm »

In fact, as you've noticed, the actual operation of the bot is GUI only. The output that is shown in the console is actually the debug output and nothing is listening on the console input.

I can look into implementing this, depending how much work it is.

Plugin help and tutorials / Re: Plugins Failed to load.
« on: April 12, 2018, 03:40:24 pm »
Learning material can be found on

Let me know if you need more,


Obviously I'm a bit late here but; I am willing to help you with this if you still want to.

I'm looking into updating everything for newer versions so if you are still interested in this please let me know as it would be fairly trivial to implement.

- Woder


Glad to see you are getting good use out of this, I should specify however that the server does not accept client text formatting. What this means is that the server gets to chose the colours and all that, the client has to just send raw text. (I believe this is done for security)

If you have any more questions don't be afraid to ask.

Got a problem? Seek help here / Re: where is bot 3.0
« on: March 30, 2016, 02:45:45 pm »
Hello, version 1.0 is the latest version.

At our build server over at you can simply download the latest version and there you will find a version that supports 1.9.

The bot will attempt to use the vanilla login process, that is tell the server "hey my name is <name>" then the server goes "cool, prove it" then it sends the "key" if you will to prove it. Now if by "cracked" you mean that the server is in offline mode, yeah it will work just fine but if cracked means that the account isn't real then no it might not work.

Plugin help and tutorials / Re: Can I create plugins in Java?
« on: June 28, 2015, 03:13:36 pm »
Java plugins are not supported by default simply because I couldn't figure out how to load java classes in without breaking all the rest of the code. Feel free to modify the actual core though if you want to change things not possible in JS.

Got a problem? Seek help here / Re: Can I leash it on a client?
« on: May 13, 2015, 06:14:39 pm »
Alright, the null issue has been fixed. This was caused by the server sending player names that don't actually exist. (such as "Tab#1529", not a player and thus does not have a UUID). Just download the latest build off of and you should be good. Please test your code now just to make sure it wasn't actually the same problem.

Got a problem? Seek help here / Re: Can I leash it on a client?
« on: May 13, 2015, 05:55:37 pm »
Hello, I would just like to let you know that I am currently working on this.

Got a problem? Seek help here / Re: Can I leash it on a client?
« on: May 08, 2015, 12:50:05 pm »
Right so starting with the error, that looks a lot like a network problem, are you running localhost with vanilla?

As for the code that doesn't work, does it throw an error?  Does it stop working after a while? I need to know what is actually going on in order to help here.

Got a problem? Seek help here / Re: Can I leash it on a client?
« on: May 06, 2015, 04:41:28 pm »
Him not moving when you break a bot under him is 100% a bug. The functionality of falling was a added a while ago and if its not working for you I would ask you provide error logs along with the output to the command line.

Here is a rather extensive explanation on how to do this if you don't know how.
It is very easy to get the output of the console, simply start a terminal (start->cmd under windows) and navigate to the folder containing the java jar using the "cd" command like this:
I keep my jar in C:\Users\woder\Torchbot so I will do cd "C:\Users\woder\Torchbot" and then run java -jar Torchbot.jar (please make sure the jar name matches what the file is called!)

Then paste any errors here. The reason it is important is very very often the errors with Torchbot are related to miss-configured settings files.

Hello! And welcome to torchbot!
I'm glad you like it, as for the bugs, I would like details if you could possibly share them as locally my tests have not shown any of the things you have mentioned. As for the network protocol... I'm not going to go out and say it is complete for it isn't, but it should be functional as the only issue that should be there is the lack of certain packets.

Physics are in the work and currently he supports what I consider to be the most important aspect of the physics; falling. If you are having problems with this please let me know what kind of issues exactly as I would love to help you and possibly even correct issues if they are present in the code.


Hello, this error is a server sided error that is because your username contains a "]" a square bracket.

Plugin help and tutorials / [1.0] Official tutorial
« on: March 02, 2015, 01:14:47 am »
Hello! Today we will be learning how to program your first plugin!.

So for starters what is a plugin and how does it work?
A plugin is a piece of code that is loaded into the bot's main framework and is executed when certain things happen, with the plugin engine you can code anything from commands to fancy events
that can do loads of fun stuff such as display a message when you break a sign.

Alright, so how do I make one?
If you have never programmed before in you're life you might find this a bit difficult but I will try my best to make it simple.
So lets look at some code!
Code: [Select]
var name = "Test plugin";
function getName(){
return name;
This bit of code is where you tell the bot what the name of your plugin is, in this case the value of "name" was defined above the function, it was just assigned to a variable to make accessing it from other parts of the code easier. The getName() function is a function that you can not forget (its required).

Next up is the run function (it is run when the bot loads the plugin in)
Code: [Select]
function run(){ //this is the run function, this gets called when the bot loads the plugin, this means at start up and when the reload command is called **EXTREMELY IMPORTANT** DO NOT ever ever ever use any method here that can only work when the bot is logged in, this will cause stuff to go wrong and cause lots of problems, don't do it (an example of this would be calling; from this, BAD!
c.gui.addText("§4General commands plugin reloaded"); //add some text to the gui, the § symbol is how to tell the bot to color the text
return true; //return true to tell the bot we started up properly
This is basically just the location where you put any initialization code. In the case of this plugin we will be simply printing to the GUI that our plugin has been reloaded.
As the comment says, do not use any function that requires the bot to be logged in..

Now would be a good time to go over what this "c" thing is.
The "c" thing is actually a reference to the main class in TorchBot, its like accessing the main part of the code. This class is called "Client" and its where all the action happens inside TorchBot, if ever you want to do some really fancy stuff with the bot you can always look in the source code on github and then use c to access it. I will go over some basic ones here:
  •"Message"); - This does exactly as what it looks like, it sends a message to the chat
  • c.gui.addText("Message"); - Adds the message to the GUI
  • c.move.gotoPlayer("Name"); - This runs the pathing to attempt to go to name's location
  • c.move.gotoLocation(x,y,z);  - This runs the pathing to attempt to go to x y z position

Those are some of the more basic ones, there are lot more but we wont cover them in this guide.

Moving on to the next section of this guide, we will look at the getListener function
Code: [Select]
function getListener(){ //this function tells the bot what listeners we will be using, basically lets say we want to know when a sign gets changed, you would put "onSignUpdate" here and then create a function lower in the code called onSignUpdate() with the parameters of that event (those are listed in the tutorial). To list multiple events just seperate them with a comma NO SPACE! just a comma like bellow
return "onSignUpdate,onBlockChange"; //register onSignUpdate and onBlockChange
This function simply returns a string with all the events you want to use separated by a comma.
Here is the current event list:
Code: [Select]
/* Event list so far
     * onSpawnPlayer String playername, String uuid, int x, int y, int z, byte yaw, byte pitch, short currentitem
     * onSignUpdate int x, int y, int z, String line1, String line2, String line3, String line4
     * onBlockChange int x, int y, int z, int bid, int meta
     * onChatMessage String username, String message (NOTE; this event will often return "Unknown" as user, in that case the message will contain the user AND string)
     * onEntityEquipement int entityid, int slotnum, int itemid, int itemcount, int itemdamage
     * onEntityMove int eid, double x, double y, double z
     * onEntityMoveLook int eid, double x, double y, double z, byte yaw, byte pitch
     * onEntityTeleport int eid, double x, double y, double z
     * onHealthUpdate float health, short food, float foodsat
     * onPlayerAbilities byte flags, float flyspeed, float walkspeed
     * onPlayerPosLook double x, double y, double z, byte yaw, byte pitch, boolean onground
     * onSlotUpdate byte window, int slo, int itemid, int count, int damage
     * onTimeUpdate long age, long time
A more up to date version can be found in the class on github

Alright, so lets make a event handler. An even handler will ALWAYS be the full name of the event followed by the parameters, it should look something like this in our case, and remember, we registered two of them! Not one!
Code: [Select]
function onSignUpdate(x,y,z,l1,l2,l3,l4){ //this gets the x y z and the 4 different lines of a sign"Sign at " + x + "," + y + "," + z + " now says: " + l1 + ";" + l2 + ";" + l3 + ";" + l4); //this displays the location of the sign along with the contents, using the "c" object as we saw earlier

function onBlockChange(x, y, z, bid, meta){ //same as above"Block at " + x + "," + y + "," + z + " is now " + bid + " with meta of " + meta); //once again displays the information we gathered

So those were event handlers, they allow your plugin to react to things when certain conditions are met, such as making him yell something if someone breaks a block of diamond within 5 blocks of a specific spot. The important thing to remember with them is that they are ALWAYS declared with "function <nameOfTheEvent>(<parameters>)" where the parameters are defined either above or in the class.

Now lets make a command! These are pretty simple, start out by defining the getCommands() function like this:
Code: [Select]
function getCommand(){ //this is the function that registers the commands that your plugin will need. The format of these commands is nameofcommand;description,nameofcommand;description and so on, its important to note that there is no space between the delimiters (the commas and the semi colons) as placing a space there will cause errors
c.perms.register(1, "under"); //This registers our command with the permission handlers, more on permissions later
return "under;Prints information about the block under the bot,version;Returns the version of the bot,reload;Reloads all plugins";
To return on the c.perms.register() part, as of the time of writing this permissions are in tiers, 0 being the lowest and it just keeps climbing, every one more in the tier is an additional level of trust this person requires to use this command. In other words, the command to tell you the time should probably be 0 and the command to give your self OP should probably be much much higher, such as a 7

Now on to programming the actual command, a command handler looks like this:
Code: [Select]
function under(command){ //you can do pretty much anything in here, this should only be called in game so calling game methods should be fine
    b = c.whandle.getWorld().getBlock(c.location).getRelative(0, -1, 0);
    if (b != null) {"Block is: " + b.getTypeId() + " and its meta data is: " + b.getMetaData());
    } else {"Failed :(");
Woah! where did that all come from?? Well, its not that complicated. As we saw before, to handle an event or a command you simply need to name your function the same as that command or event, now obviously since you can't have two functions with the same name you can't call your command onSignPlace or any of the other event names, those are reserved and you WILL cause problems if you try to use them as commands. The next bit is simply a call to get the block at position -1 Y from where the bot is, this is essentially just getting the block bellow the bot. We already saw how to use "c" to access core bot functions and this is just another thing you can do with that ability, if you don't know what the Block class is just look it up on the github. There you will find all sorts information on what you can do with it (unfortunately it means reading code but I'm sure you can do it!). After that we check if it's null (basically doing a check to see if the block was loaded), and if it was we will print some information on that block and if it wasn't we will send a message showing how sad we are.

And that's it! There is nothing more to it than that, from here you can do all sorts of things.
Attached is the completed version of this plugin, please attempt to write it your self before checking the full plugin for help. Inside the plugin there is also tons of comments to help with things this guide might have missed. If you have any questions don't hesitate to ask.
Note that importing ANYTHING that is not from the java packages MUST be prefixed with Packages.
So, to import the World class from the bot you do:

This plugin allows for players to teleport around after setting waypoints.
****NOTE**** This plugin only works if the bot has the ability to use the /tp command on the server you are on!!!

To install, download the waypoints.js file and place it in the TorchBot plugins directory. If the bot is running use !reload to reload the plugins.
That's it - that was easy.

Command list:
  • !way name x y z    - Creates the waypoint name and sets you as the owner
  • !wayd name     - Deletes the waypoint name, you must be the owner!
  • !wayp name     - warps you to the waypoint name

The permissions are all set to 0 so to allow someone to use all of these commands simply allow people to have the user level 0

All waypoints are saved in the waypoints.txt file and it can  be manually modified.
Please note I can not guarantee this will work on all servers - it was made to function on vanilla and SHOULD work on all other servers too but sometimes plugins change stuff.

Pages: [1] 2