Code Monkey home page Code Monkey logo

twistedbot's People

Contributors

lukleh avatar vgel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

twistedbot's Issues

Failed to verify username

Love what you are doing.

I have proxy pointed to a live online server and the bot is pointed to the proxy.
It connects but i get the failed to verify username error, i get this even if i set the option --username to my username or without the option.

Running on linux.

Command to start bot:
python bot.py --botemail [email protected] --botpass mypassword --log2file --serverhost localhost --serverport 1338 --botname MYNAME --use_encryption

Command to start proxy:
python proxy.py --serverhost SERVERIP --serverport 25565 --log2file --proxyport 1338

Bot:
03:22:19.982493 [CORE EVENT] Server kicked me out with message: Failed to verify username!
03:22:19.982831 [WORLD] Shutdown

Proxy:
03:22:19.151932 [SERVER] Starting encryption
03:22:19.152027 [CLIENT] Starting encryption
03:22:19.152735 [CLIENT] id 205 client statuses
status: 0
03:22:19.981817 [SERVER] id 255 disconnect/kick
message: Failed to verify username!
03:22:19.984072 [CLIENT] Lost connection from client: Connection was closed cleanly.

What can do, not really sure how to move on or how to fix this.
Im sure everything is correct in the command line im using to load both applications.
Is this common?

edit:

To clarify, i can connect to the server normally without the message using both normal and custom clients.
My accounts are paid online accounts.

Some sort of chat filter?

I want to use this on a real server and to do that, I don't want messages spamming up global chat. It would be nice to be able to install (via code) some sort of ChatFilter class where you could redirect chat messages to be /tell [Players] msg.

I've already forked the repository for some other things, so if this would be useful to the main repo I'll code it and make a pull request.

[QUESTION] On login packet

Is there some function somewhere in the code that will allow me to send a packet (using make_packet?) to the server once I have logged in?

Thanks

Outdated client!

How would I go about adding support for new minecraft snapshots?

Server kicked me out with message: Outdated server!

I updated to the latest Craftbukkit Development build (1.4.7-R1.1) to try to circumvent this error. Unfortunately, it didn't help.

I have no trouble with connecting from multiple clients of new (and relatively new) versions.

Is this an issue with the version being sent/accepted by TwistedBot or is this message legitimate?

When I type:

python ./bot.py --serverhost 192.168.0.11

Here's the output:

03:38:52.402203 [-] Start logging
03:38:52.457013 [BLOCKS] registered 159 blocks
03:38:52.464399 [ITEMS] registered 263 items
03:38:52.529823 [RECIPES] registered 27 recipes
03:38:52.529934 [RECIPES] know how to brew 0 items
03:38:52.529979 [RECIPES] know how to mob kill 0 items
03:38:52.530018 [RECIPES] know how to craft 17 items
03:38:52.530056 [RECIPES] know how to smelt 3 items
03:38:52.530131 [RECIPES] know how to mine 9 items
03:38:52.546298 [MAIN] terminal chat available
03:38:52.546564 [PROTOCOL] Started connecting...
03:38:52.547282 [PROTOCOL] Connected!
03:38:52.548014 [PROTOCOL] sending Handshake
03:38:52.577646 [PROTOCOL] Server kicked me out with message: Outdated server!
03:38:52.577937 [WORLD] Shutdown

Thanks.

Not exactly an issue

Any chance you could add some short documentation about the "collect" and "drop" commands to the README.md? I have spent the last hour reading source code and have yet to figure out how to use the two. Thanks!

btw i changed my github username from minecrafttakeover to this.

Proxy needs pycrypto module. [Documentation]

In XUbuntu 12.10 I ran into an error while trying to run:

pypy ./proxy.py

It would return an error complaining about a missing Module (AES). After some quick searching, it turns out I needed to have the pycrypto module on my system.

Special note: After installing; I was still unable to get this to work with pypy. I had to resort to just using the standard CPython Interpreter:

python ./proxy.py

I believe this dependency should probably be mentioned in the documentation. Others running in to this problem may benefit by using CPython instead of pypy as well.

Some blocks wrongfully have inventory_avoid

Grass, Mycelium, active redstone lamps, the various ores, etc. can be picked up with silk touch or gotten in creative, so shouldn't be inventory_avoid. This is an issue because items.py line 1204 crashes trying to get the names of inventory_avoid items if they are picked up.

My feeling on how this should be fixed is inventory_avoid items should always be registered, since you can get them anyways (you don't want ops able to crash your bot out with /give on accident, or purpose), and may want them.

Full traceback:

18:42:52.688696 [-] Unhandled Error
    Traceback (most recent call last):
      File "/home/jon/Dropbox/prog/TwistedBot/libs/twisted/python/context.py", line 81, in callWithContext
        return func(*args,**kw)
      File "/home/jon/Dropbox/prog/TwistedBot/libs/twisted/internet/selectreactor.py", line 151, in _doReadOrWrite
        why = getattr(selectable, method)()
      File "/home/jon/Dropbox/prog/TwistedBot/libs/twisted/internet/tcp.py", line 215, in doRead
        return self._dataReceived(data)
      File "/home/jon/Dropbox/prog/TwistedBot/libs/twisted/internet/tcp.py", line 221, in _dataReceived
        rval = self.protocol.dataReceived(data)
    --- <exception caught here> ---
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/factory.py", line 125, in dataReceived
        self.parse_stream(bytestream)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/factory.py", line 136, in parse_stream
        self.packet_iter(self.packets)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/factory.py", line 147, in packet_iter
        self.process_packet(packet)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/factory.py", line 155, in process_packet
        f(payload)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/factory.py", line 214, in p_collect
        self.event.on_collect.fire(collected_eid=c.collected_eid, collector_eid=c.collector_eid)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/eventregister.py", line 20, in fire
        handler(*args, **kwargs)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/plugins/core/protocol_events.py", line 92, in on_collect
        self.world.inventories.collect_action(collected_eid=collected_eid, collector_eid=collector_eid)
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/inventory.py", line 222, in collect_action
        self.item_collected_count[itemstack.name] += itemstack.count
      File "/home/jon/Dropbox/prog/TwistedBot/twistedbot/items.py", line 1204, in name
        return self.item.name if self.common else self.item.get_name(self.meta)
    exceptions.AttributeError: 'NoneType' object has no attribute 'get_name'

Problem while respawning.

When the bot is killed on the server, it crashes while trying to respawn. This is the error:
'Bot' object has no attribute 'send_packet'

The problem is that in the file botentity.py, there is no function called send_packet in that class.

Complete log:
19:27:33.317127 [BOT_ENTITY] Chat: twistedbot was slain by jell_e105
19:27:33.345123 [BOT_ENTITY] current health -5 food 20 saturation 5.0
19:27:34.348532 [-] Unhandled Error
Traceback (most recent call last):
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(_call.args, *_call.kw)
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
--- ---
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/jm/Documenten/TwistedBot-master/twistedbot/tools.py", line 27, in
d.addCallback(lambda ignored: fn(_args, *_kwargs))
File "/home/jm/Documenten/TwistedBot-master/twistedbot/botentity.py", line 448, in do_respawn
self.send_packet("client statuses", {"status": 1})
exceptions.AttributeError: 'Bot' object has no attribute 'send_packet'

19:27:34.406262 [-] Unhandled error in Deferred:
19:27:34.406359 [-] Unhandled Error
Traceback (most recent call last):
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(_call.args, *_call.kw)
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
--- ---
File "/home/jm/Documenten/TwistedBot-master/libs/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/jm/Documenten/TwistedBot-master/twistedbot/logbot.py", line 13, in exit_on_error
sys.exit(1)
exceptions.SystemExit: 1

19:27:34.437509 [PROTOCOL] Connection lost, reason: Connection to the other side was lost in a non-clean fashion: Connection lost.

Some Issues with 1.8

I can't seem to connect to 1.8.1 servers with this. It says something like "Cannot connect to %IP INSERTED HERE% Reason: Connection was ended cleanly." Also, I think the authentication has changed making the --onlinemode tag useless ATM either due to the new UUIDs or the fact they changed some links n' stuff. I am seeing how I can fix these issues manually, but for now, just wanted to make an official issue report.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.