Jump to content


Photo

39dll not receiving packets


  • Please log in to reply
10 replies to this topic

#1 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 02:03 PM

So I am trying to make a custom Minecraft client kinda thing. But before I can start placing and removing blocks with it, I need to work out connecting to the server issues.
I connect to the server, send "handshake" packet and everything seemed to work, untill I found out that my client does not receive packets from the server. After scanning my client with WPE PRO it says the pocket is received, but the code does not seem to pick it up.

Connection to the server script:
global.Server = tcpconnect(global.ServerIP,global.ServerPort, true);
setformat(global.Server, 1);


Handshake packet script:
clearbuffer();
writebyte(02); //0x02
writebyte(00);
writebyte(06);
writestring("e");
writestring("k");
writestring("g");
writestring("a");
writestring("m");
writestring("e");
sendmessage(global.Server);


Packet receiving code:
if global.Connected=false exit;
while(1)
{
  size = receivemessage(global.Server);
  if(size < 0)break;
  if(size == 0)
  {
    print_line("[Info] Connection lost."));
    global.Connected=false;
    break;
  }
  mid = readbyte();
  switch(mid)
  {
    case 2:
      print_line("[Info] Handshake recieved.");
    break;
    
    case 255: 
      print_line("[Info] Server disconnected.");
    break;
  }
}

I've done some debugging and the receivemessage function always return 0, while WPE says its 35.
How do I fix this?

Edited by ekgame, 15 October 2011 - 02:05 PM.

  • 0

#2 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 15 October 2011 - 02:48 PM

Doesn't work i have already tried make a Minecraft server in Game Maker. 39Dll doesn't wait when for the next packet, This mushes all the packets together losing data. I used http_dll_2 for mine. It works fine with 1.7.3 as i haven't had time to update it to 1.8 or 1.9 but Game Maker is just to slow at delivering the chunk data, Game lags like ****.

Just read your making the client =P. Should be the same sort of thing but in reverse.

Edited by Mayhem Games, 15 October 2011 - 02:53 PM.

  • 0

#3 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 03:16 PM

Thanks! I guess now I've got some rewriting to do Posted Image
Yes, chunk data will be the next big challange Posted Image
  • 0

#4 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 15 October 2011 - 03:22 PM

I wish you luck :thumbsup: I might have to update my server to the latest protocol. Then you would have a GM Client and Server that would work together.
  • 0

#5 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 03:32 PM

Im currently working with 1.8.1 protocol. When Minecraft 1.9 is officially released and if I'll have a nything made till than, I'll update to 1.9

Edited by ekgame, 15 October 2011 - 03:38 PM.

  • 0

#6 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 15 October 2011 - 03:35 PM

Are you using this documentation? http://mc.kev009.com/Protocol If so we should save an offline version so that we will both have the 1.8.1 protocol because the page is updated with new versions.
  • 0

#7 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 03:39 PM

Yes, thats exacly what I am using.
The page does not answer all my question, so I scan packets being sent and received anyway.

Edited by ekgame, 15 October 2011 - 03:47 PM.

  • 0

#8 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 15 October 2011 - 03:59 PM

Make sure you read the other pages as well for example http://mc.kev009.com/Authentication
  • 0

#9 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 04:04 PM

I did, but as for authentication I am going to start with offline mode, then later add Minecraft.net authentication.
  • 0

#10 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 15 October 2011 - 04:08 PM

I found all the information i required on that main page as my server only works in offline mode :tongue: Also if you want my chunk decrypting code when you get to there you can :thumbsup:
  • 0

#11 ekgame

ekgame

    GMC Member

  • New Member
  • 169 posts

Posted 15 October 2011 - 04:11 PM

That would be great Posted Image I must, however, first solve the first big challange: spawning the entity.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users