Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85
Proxy and start sending packets to client.
Results 1 to 5 of 5

Thread: Proxy and start sending packets to client.

  1. #1
    Senior Member
    Join Date
    Aug 2007
    Posts
    232

    Proxy and start sending packets to client.

    Hiho, i have problem (Try to write TibiaCam to new protocol).
    I started my gameserver, i can login to it.
    When client connect to server i'm sending first
    packet to client (0A - SelfAppearpacket)

    Code:
                    NetworkMessage msg = new NetworkMessage(client);
                    msg.AddBytes("0A B0 BC 7C 01 32 00 00".ToByteArray());
                    msg.UpdateLogicalPacketHeader();
                    msg.PrepareToSend();
                    SendToSocket(socket, msg.Data, msg.Data.Length);
    Then debugs my client, after reopening i got

    unknown packet during game (Type = 226)
    (Type is changing every try to send it).


    I dont know what about it but when i try to send MessageServer with selfappear, mapdescr etc its the same debug.
    I had not that debug in Tibia 8.4.

    NOTE. Im not reading nothing from client, only im sending.

  2. #2
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    Proxy and start sending packets to client.

    Read Stepler's posts in this thread and it should answer your questions: http://www.tpforums.org/forum/showthread.php?t=2926

  3. #3
    Senior Member
    Join Date
    Aug 2007
    Posts
    232

    Proxy and start sending packets to client.

    Yep i tried.
    When i send to client unencrypted:

    Code:
    0C 00 2D 01 5F 04 06 00 1F 69 40 01 00 5D
    it doesnt reply anything. Just blocks stream.Read(), when I disconnect client by pressing abort button, it unblocks stream.Read and bytes received is all zeros.

  4. #4
    Senior Member
    Join Date
    Aug 2007
    Posts
    232

    Proxy and start sending packets to client.

    Sorry it just one small error in my code

    Code:
    "0A B0 BC 7C 01 32 00 00".ToByteArray()
    Code:
    "0A B0 BC 7C 01 32 00 00".ToByteArrayAsHex()
    NOW EVERYTHING IS OK!

  5. #5

    Proxy and start sending packets to client.

    You should probably write your byte array constants as a byte array instead of a string:

    Code:
    { 0x0A, 0xB0, 0xBC, 0x7C, 0x01, 0x32, 0x00, 0x00 }
    this way you avoid the conversion and it makes your intentions clearer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •