Author Topic: Can I leash it on a client?  (Read 3991 times)

May 02, 2015, 06:42:09 am
Read 3991 times

NarubiaN

  • *
  • Information
  • Newbie
  • Posts: 4
    • View Profile
Can I leash it on a client?
« on: May 02, 2015, 06:42:09 am »
I'm experiencing some weird anti-physics hack-ish stuff when I run the bot through the standalone, hoping leashing it to a client will help. Also, there is no way to move the guy.. Creative survival nothing matters.. He just stands there even though he broke the blocks below him and I hit him. Is there any workaround for those? Also, I'd love to leash it on a client for full control over the bot

May 06, 2015, 04:41:28 pm
Reply #1

woder

  • *****
  • Information
  • Newbie
  • Administrator
  • Posts: 20
    • View Profile
Re: Can I leash it on a client?
« Reply #1 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.

May 07, 2015, 08:42:37 pm
Reply #2

NarubiaN

  • *
  • Information
  • Newbie
  • Posts: 4
    • View Profile
Re: Can I leash it on a client?
« Reply #2 on: May 07, 2015, 08:42:37 pm »
Umm.. This is awkward lol.. I dunno how to export to JAR, I just run the thing through the console.. The DC error it gives is

Exception in thread "T1" java.lang.NullPointerException
   at me.woder.bot.EntityTracker.getNameUUID(EntityTracker.java:94)
   at me.woder.network.SpawnPlayer12.read(SpawnPlayer12.java:18)
   at me.woder.network.NetworkHandler.forwardPacket(NetworkHandler.java:150)
   at me.woder.network.NetworkHandler.readUncompressed(NetworkHandler.java:108)
   at me.woder.network.NetworkHandler.readData(NetworkHandler.java:81)
   at me.woder.bot.Client.startBot(Client.java:252)
   at me.woder.bot.Client.startBot(Client.java:191)
   at me.woder.bot.ThreadMainLoop.run(ThreadMainLoop.java:22)
   at java.lang.Thread.run(Thread.java:745)

Also, I wrote a single method that doesn't work, even though it seems written just fine.

This methods makes a list of blocks in between 2 locations:

    public List<Block> makeList(Location l1, Location l2)
    {
        int x1=l1.getBlockX();
        int y1=l1.getBlockY();
        int z1=l1.getBlockZ();
        int x2=l2.getBlockX();
        int y2=l2.getBlockY();
        int z2=l2.getBlockZ();
        List<Block> list=new ArrayList<Block>();
        for (int i=x1;i<x2;i++)
            for (int n=z1;n<z2;n++)
                for (int f=y1;f<y2;f++)
                {

                        if (c.world.getBlock(i, f, n) != null)
                        {
                            list.add(c.world.getBlock(i, f, n));

                        }
                }
    return list;
    }



And this one is supposed to mine them out:

   public void clean(Location l1, Location l2) {
        Location temp=null;
        List<Block> list = makeList(l1, l2);
        for (int i = 0; i < list.size(); i++) {

            temp=list.get(i).getLocation();
            if (!temp.inRange(c.location,5))
                c.move.runPathing(c.location, temp.fakeY(c.location.getY()), 100); //Run to the point you wanna dig, but keep your Y factor
            c.world.digBlock(temp.getBlockX(), temp.getBlockY(), temp.getBlockZ(), (byte) 1);

        }

    }



May 08, 2015, 12:50:05 pm
Reply #3

woder

  • *****
  • Information
  • Newbie
  • Administrator
  • Posts: 20
    • View Profile
Re: Can I leash it on a client?
« Reply #3 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.

May 08, 2015, 02:26:23 pm
Reply #4

NarubiaN

  • *
  • Information
  • Newbie
  • Posts: 4
    • View Profile
Re: Can I leash it on a client?
« Reply #4 on: May 08, 2015, 02:26:23 pm »
I tried play.minecraftsmp.org;25565 and mc.frostrealms.com;25565 (I might have the addresses wrong right now but that's how I login to these using my client).
I did try on localhost aswell, shot the same error with the same disconnect after a while behaviour.
My code, instead of walking around breaking blocks, only breaks one block beneath the bot and then he just stands there idle
« Last Edit: May 10, 2015, 04:05:47 pm by NarubiaN »

May 13, 2015, 05:55:37 pm
Reply #5

woder

  • *****
  • Information
  • Newbie
  • Administrator
  • Posts: 20
    • View Profile
Re: Can I leash it on a client?
« Reply #5 on: May 13, 2015, 05:55:37 pm »
Hello, I would just like to let you know that I am currently working on this.

May 13, 2015, 06:14:39 pm
Reply #6

woder

  • *****
  • Information
  • Newbie
  • Administrator
  • Posts: 20
    • View Profile
Re: Can I leash it on a client?
« Reply #6 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 build.torchbot.net and you should be good. Please test your code now just to make sure it wasn't actually the same problem.

December 19, 2018, 06:13:09 am
Reply #7

Pattaxoxo

  • *
  • Information
  • Newbie
  • Posts: 7
    • View Profile
Re: Can I leash it on a client?
« Reply #7 on: December 19, 2018, 06:13:09 am »
that looks a lot like a network problem, are you running localhost with vanilla?

หวยออนไลน์บาคาร่า

January 30, 2019, 09:33:44 am
Reply #8

punsikorn

  • *
  • Information
  • Newbie
  • Posts: 2
    • View Profile
Re: Can I leash it on a client?
« Reply #8 on: January 30, 2019, 09:33:44 am »
Right so starting with the error, that looks a lot like a network problem, are you running localhost with vanilla?
gclub slot

March 25, 2019, 09:37:12 am
Reply #9

Giacosmos

  • *
  • Information
  • Newbie
  • Posts: 2
    • View Profile
Re: Can I leash it on a client?
« Reply #9 on: March 25, 2019, 09:37:12 am »
Simplification of the design so that the effect is that we get the facts straight and do not be afraid to have false information.