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 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
NEW Packet Structures - Page 3
Page 3 of 13 FirstFirst 12345 ... LastLast
Results 21 to 30 of 129

Thread: NEW Packet Structures

  1. #21
    Administrator
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    1,274

    NEW Packet Structures

    the "Standing" correct me if im wrong but you get it by reading the map tile of where you are opening the corpse or container, and thats just the stack.. it doesnt really matter anymore i think.. in other versions, depending on what value you typed you could open containers that were hidden under other items without removing the items that are on top of it, but it seems to be fixed now..

    now the "Backpacks" one is which Slot you wanna open your backpack/container..
    they work as above..
    starts from 0..
    ._______________________
    |Backpack __________|-|□|X|
    |--------|--------|--------|--------|
    |--------|--------|--------|--------| <--------- 0
    |ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|
    |_____|_____|_____|_____|
    |Bag ______________|-|□|X|
    |--------|--------|--------|--------|
    |--------|--------|--------|--------| <--------- 1
    |ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|
    |_____|_____|_____|_____|
    |
    Dead Demon_______ |-|□|X|
    |--------|--------|--------|--------|
    |--------|--------|--------|--------| <--------- 2
    |ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|ŻŻŻŻŻ|
    |_____|_____|_____|_____|

  2. #22
    Senior Member
    Join Date
    Mar 2007
    Posts
    1,323

    NEW Packet Structures

    Seems like I have to explain that one. That was the first really hard packet I sniffed out and in that point I didn't understood the Tibia packets. The 'standing' is the wrong word. It should be StackPos or something like that. So that byte is the Corpse's position in the item stack in the tile. (See, I have corrected it in the comment!). The whole line is now fixed

  3. #23

    NEW Packet Structures

    The Logout packet structure is not working, could anyone check it?

  4. #24
    Senior Member
    Join Date
    Mar 2007
    Posts
    218

    NEW Packet Structures

    the logoutpacket is correct
    about making examples... well, that's a good idea. anyways you could make some examples too

    thanks for cooperating, feel free to edit and fix the post
    ~juapillo~

  5. #25
    Senior Member
    Join Date
    Mar 2007
    Posts
    218

    NEW Packet Structures

    oh, also could some1 stick this post and unstick the old one?

  6. #26
    Senior Member
    Join Date
    Apr 2007
    Posts
    314

    NEW Packet Structures

    If you would put the LongToByte ASM code in packet.dll and recompile it you could use the following function in C++ to call the LongToByte as well as the SendPacket function. Alternatively you can just include the LongToByte for C++ (which is easier) and remove everything else related to the packet.dll.

    The code is just dusting on my computer, I'd rather just post it somewhere so it's on the web for someone to find if they would need it.

    Code:
    /****************************/
    /* Created by Froboo, 2006. */
    /****************************/
    
    #include <windows.h> // Required for finding our tibiaclient (window handling)
    #include <stdio.h>
    
    // Declaring how the SENDPACKET and the LONGTOBYTE functions should be used
    typedef int (WINAPI *SENDPACKET)(DWORD, char*, BOOL, BOOL);
    typedef int (WINAPI *LONGTOBYTE)(long, int);
    
    // Create an instance of the functions
    SENDPACKET SendPacket = NULL;
    LONGTOBYTE LongToByte = NULL;
    
    // Creating an instance called hLib where we will store the info
    // about packet.dll
    HINSTANCE hLib;
    
    void UseItemOnFloor( int itemID, int x, int y, int z )
    {
    	// Get the address of the function so the program will jump to the right
    	// location when we make the call to it
    	LongToByte = (LONGTOBYTE)GetProcAddress(hLib, "LongToByte");
    	
    	// The packet consists of 12 bytes where 5 is always the same
    	char cPacket[12];
    	cPacket[0] = 0x0A;
    	cPacket[1] = 0x00;
    	cPacket[2] = 0x82;
    	
    	cPacket[3] = LongToByte( x, 1 ); // retrieve the first byte of x (a 5 digit number equals only 2 bytes)
    	cPacket[4] = LongToByte( x, 2 ); // retrieve the second byte of x
    	
        cPacket[5] = LongToByte( y, 1 );
    	cPacket[6] = LongToByte( y, 2 );
    	
    	cPacket[7] = z;
    	
    	cPacket[8] = LongToByte( itemID, 1 );
    	cPacket[9] = LongToByte( itemID, 2 );
    	
    	cPacket[10] = 0x01;
    	cPacket[11] = 0x03;
    
    	DWORD PID;
    	HWND hwnd = FindWindow( "tibiaclient", NULL ); // Fetch a handle to the tibia client
    	GetWindowThreadProcessId( hwnd, &PID ); // Get the process id
    	
    	SendPacket = (SENDPACKET)GetProcAddress(hLib, "SendPacket");
    	SendPacket( PID, cPacket, 1, 0 ); // Send the packet using packet.dll
    }
    
    int main()
    {
        hLib = LoadLibrary("mod_packet.dll"); // Load mod_packet.dll into hLib
        
        // If I remember correctly these are the coordinates + the id of the first ladder in rookgaard rats
    	UseItemOnFloor( 1948, 32097, 32205, 8 );
    	
    	FreeLibrary(hLib);
    	
    	return 0;
    }

  7. #27
    Senior Member
    Join Date
    Mar 2007
    Posts
    1,323

    NEW Packet Structures

    Quote Originally Posted by Juapillo
    oh, also could some1 stick this post and unstick the old one?
    Done (Msg is too short blabla..)

  8. #28
    Senior Member
    Join Date
    Apr 2007
    Posts
    314

    NEW Packet Structures

    Does anyone have the structure of the potion packet? I'm incapable of getting it my self right now.

    And sorry if it's already been posted somewhere.

  9. #29
    Administrator
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    1,274

    NEW Packet Structures

    These are the hotkey packets.. they arent explained very well in the first post.. here is how i use it
    Code:
    HOTKEY PACKET - USE AT POS X,Y,Z
    
    bPacket(0) = &H11
    bPacket(1) = &H0
    bPacket(2) = &H83
    bPacket(3) = &HFF
    bPacket(4) = &HFF
    bPacket(5) = &H0
    bPacket(6) = &H0
    bPacket(7) = &H0
    bPacket(8) = ITEMID
    bPacket(9) = ITEMID
    bPacket(10) = &H0
    bPacket(11) = X
    bPacket(12) = X
    bPacket(13) = Y
    bPacket(14) = Y
    bPacket(15) = Z
    IF TARGET = CREATURES/PLAYERS
    
    bPacket(16) = &H63 BPacket(17) = &H0 bPacket(18) = &H1
    ELSE
    bPacket(16) = GroundID bPacket(17) = GroundID bPacket(18) = &H0
    HOTKEY PACKET - USE AT CREATURE bPacket(0) = &HD bPacket(1) = &H0 bPacket(2) = &H84 bPacket(3) = &HFF bPacket(4) = &HFF bPacket(5) = &H0 bPacket(6) = &H0 bPacket(7) = &H0 bPacket(8) = Item ID bPacket(9) = Item ID bPacket(10) = ItemCount bPacket(11) = CREATURE_ID bPacket(12) = CREATURE_ID bPacket(13) = CREATURE_ID bPacket(14) = CREATURE_ID

  10. #30

    NEW Packet Structures

    Log out for FASM assembler (Win32asm)
    tested, it works
    using: logout
    Code:
    macro logout {
            call logout_
    }
    macro SendP Packet {
            invoke SendPacket,[TibiaHandle],Packet,1,0
    }
    
    
    section '.data' data readable writeable
    ...
    TibiaHandle     dd 0
    logout_packet:
            db 1,0,14h
    
    
    section '.code' code readable executable
    ...
    proc logout_
            SendP logout_packet
            ret
    endp
    
    
    section '.idata' import data readable writeable
    
    library packet,'PACKET.DLL'
    
    import packet,\
           SendPacket,'SendPacket'

Posting Permissions

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