[c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
gamer931215 - 05.01.2012
Like the title says
i kind a... scripted the minecraft client protocols in a api i am going to release soon (not here though since it isnt SA-MP)
Preview:
[ame]http://www.youtube.com/watch?v=0F0XmCTcje8[/ame]
Would be pretty wicked to do this for sa-mp as well, although i think some people wont be very happy with this i guess...
UPDATE!
I decided to upload the alpha api after a few requests,
please note that this api can
NOT receive any packets properly yet!
Also remember that this is the
SA-MP forum! I do NOT provide any help/support for this and please do not post topics about this on the sa-mp forum, that is not where this topic was intended for! This topic was meant as "showoff" my api on the Everything/Nothing topic, i added the downloadlink as a extra for the interested people. So this is
NOT a official release!.
So the only thing you can do with this is:
* Connect and Authenticate on non-protected servers
* Send commands and chat messages
How to use:
- Make a tcpclient and let it connect to a minecraft server
- Declare the api and use
.setClient(yourclient) to define the client you used in the api
- Use
.handshake(string username); to make the first connection attempts (returns true when succeed and false when failed)
- use
.RequestLogin(string username) to make the login attempt (returns true when succeed and false when failed)
- Now the tricky/unfinished part:
Make a loop and let it check if there are packages received to read, use
.update() when there are packages available, this function is unfinished, bugged and NOT able to receive/update any packages yet!, (this because it doesnt 'split' the packages properly yet, because java merges packages i will have to receive and split each package which i didnt found a proper method for!) but it is needed to avoid getting kicked due to timeouts!
Example:
pawn Code:
while (true)
{
if (client.Available > 0)
{
m.Update();
}
System.Threading.Thread.Sleep(100); //wait 100ms to avoid the app from freezing on slower machines
}
Extra functions:
.SendChatMessage(string message)
Download:
http://solidfiles.com/d/3b3ca8f393/
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) - T0pAz - 05.01.2012
Well done. Is it TCP or UDP?
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
gamer931215 - 05.01.2012
Quote:
Originally Posted by T0pAz
Well done. Is it TCP or UDP?
|
Tcp
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) - T0pAz - 05.01.2012
Quote:
Originally Posted by gamer931215
Tcp
|
TCP synchronization would be a disaster for it's performance. So, keep TCP in chat engine and other things on UDP.
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
gamer931215 - 05.01.2012
Quote:
Originally Posted by T0pAz
TCP synchronization would be a disaster for it's performance. So, keep TCP in chat engine and other things on UDP.
|
Minecraft synchronisation is a disaster anyway since java is merging packages, also i dont know if i have a choise since the minecraft protocol is all tcp...
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) - T0pAz - 05.01.2012
Quote:
Originally Posted by gamer931215
Minecraft synchronisation is a disaster anyway since java is merging packages, also i dont know if i have a choise since the minecraft protocol is all tcp...
|
Nope buddy, no game synchronization can be made with TCP. Minecraft uses both UDP and TCP.
http://www.minecraftforum.net/topic/...p-port-closed/
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
SourceCode - 05.01.2012
I saw something like this before, But isn't it usless? Great job btw, Background music?(forgot it)
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
KingHual - 05.01.2012
Ugh... If the only thing the bot can do is chat, TCP connection is better. But if you want to make him move and stuff, srsly, use UDP...
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
Lorenc_ - 05.01.2012
Epic memory hacking, repped for that. All your creations are awesome! Send me a pm when you release it :P
Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient) -
[P4] - 05.01.2012
Quote:
Originally Posted by gamer931215
Would be pretty wicked to do this for sa-mp as well, although i think some people wont be very happy with this i guess...
|
I'm not into this, and dunno what it can do, but I've seen something like this for SA-MP already^^
Nice job tho