SA-MP Forums

Go Back   SA-MP Forums > Other > Everything and Nothing

Reply
 
Thread Tools Display Modes
Old 05/01/2012, 05:49 AM   #1
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,090
Reputation: 322
Default [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

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/
__________________

Thanks to Zh3r0 for this awesome signature!

Last edited by gamer931215; 05/01/2012 at 10:16 PM.
gamer931215 is offline   Reply With Quote
Old 05/01/2012, 05:51 AM   #2
T0pAz
Guest
 
Posts: n/a
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Well done. Is it TCP or UDP?
  Reply With Quote
Old 05/01/2012, 05:51 AM   #3
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,090
Reputation: 322
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Quote:
Originally Posted by T0pAz View Post
Well done. Is it TCP or UDP?
Tcp
__________________

Thanks to Zh3r0 for this awesome signature!
gamer931215 is offline   Reply With Quote
Old 05/01/2012, 05:55 AM   #4
T0pAz
Guest
 
Posts: n/a
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Quote:
Originally Posted by gamer931215 View Post
Tcp
TCP synchronization would be a disaster for it's performance. So, keep TCP in chat engine and other things on UDP.
  Reply With Quote
Old 05/01/2012, 06:01 AM   #5
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,090
Reputation: 322
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Quote:
Originally Posted by T0pAz View Post
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...
__________________

Thanks to Zh3r0 for this awesome signature!
gamer931215 is offline   Reply With Quote
Old 05/01/2012, 06:09 AM   #6
T0pAz
Guest
 
Posts: n/a
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Quote:
Originally Posted by gamer931215 View Post
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/
  Reply With Quote
Old 05/01/2012, 06:44 AM   #7
SourceCode
Huge Clucker
 
SourceCode's Avatar
 
Join Date: Aug 2011
Posts: 340
Reputation: 11
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

I saw something like this before, But isn't it usless? Great job btw, Background music?(forgot it)
SourceCode is offline   Reply With Quote
Old 05/01/2012, 09:12 AM   #8
KingHual
Banned
 
Join Date: Jun 2010
Location: Bulgaria
Posts: 2,286
Reputation: 1389
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

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...
KingHual is offline   Reply With Quote
Old 05/01/2012, 09:56 AM   #9
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1179
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Epic memory hacking, repped for that. All your creations are awesome! Send me a pm when you release it :P
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 05/01/2012, 01:25 PM   #10
[P4]
Gangsta
 
[P4]'s Avatar
 
Join Date: Sep 2010
Posts: 632
Reputation: 126
Default Re: [c#] Epic gamer being epic (Emulating minecraft client with tcpclient)

Quote:
Originally Posted by gamer931215 View Post
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
__________________
[P4] is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Epic. Simply epic. Striker_Moe Everything and Nothing 11 13/12/2009 05:31 PM
The Epic 3 sora_watson Everything and Nothing 1 04/12/2009 11:51 AM


All times are GMT. The time now is 08:09 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.