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
Tutorial Requests! - Page 11
Page 11 of 23 FirstFirst ... 91011121321 ... LastLast
Results 101 to 110 of 222

Thread: Tutorial Requests!

  1. #101
    Senior Member
    Join Date
    Apr 2007
    Posts
    314

    Tutorial Requests!

    Well if you don't understand it are you sure you know the basics? I mean there are pretty much info and very simple exampled in the C++ forums nowadays.

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

    Tutorial Requests!

    Quote Originally Posted by Martijn
    I would like to learn how to make a bot or w/e also, but when I read tutorials they start posting hard scripts which I dont even know where to place them or how to use them or what ever!

    So, a explanation from the beginning would be nice, how everything works and so on.

    In C++ please..
    So you want C++ tutorial? http://www.intap.net/~drw/cpp/ for example :P

  3. #103

    Tutorial Requests!

    Yeah, I think I master the basics.

  4. #104
    Senior Member
    Join Date
    Apr 2007
    Posts
    314

    Tutorial Requests!

    Martijn: If you know the basics it's pretty simple. All you have to do is find a tibia window and open its process. Then there are 2 functions you need to know basically. ReadProcessMemory and WriteProcessMemory. What you do is find an address (which you can find on these forums) and then read/write to it.

    I wrote some simple code here and commented it, I suggest you go through it carefully line by line and you will see it's actually very easy. Don't let unknown functionnames scare you, to be honest I almost don't even remember how to use these functions. I've just written classes to handle everything for me and now I don't need to bother with this stuff anymore.

    Code:
    #include <windows.h>
    
    int main()
    {
    // First get a window handle to a Tibia window, this way you will get the handle of the Tibia you opened last
    HWND TibiaWindow = FindWindow("tibiaclient", NULL);
    
    // Now we will get the process id by using the function beneith and store it in pid
    DWORD pid;
    GetWindowThreadProcessId(TibiaWindow, &pid);
    
    // Last thing we do is open the process
    HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
    
    // TIBIA_PLAYER_LEVEL is the address in Tibias memory where it stores th players level
    const int TIBIA_PLAYER_LEVEL			=	0x00613B60;
    
    // We will save the players level in the variable nLevel
    int nLevel = 0;
    
    // So lets do the actual reading using ReadProcessMemory
    // It takes 5 parameters, the process handle, the address, a variable to store the results in, how many bytes to read and a 5th I'm not sure about right now
    ReadProcessMemory(hProcess, (LPVOID)TIBIA_PLAYER_LEVEL, &nLevel, 4, NULL);
    
    // So now we have the players level in the variable nLevel, lets add 200 to it
    // We dont actually change the level here, it's done when we write the new level to Tibia
    nLevel += 200;
    
    // As you see it works pretty much the same
    WriteProcessMemory(hProcess, (LPVOID)TIBIA_PLAYER_LEVEL, &nLevel, 4, NULL);
    
    // Lastly close the process handle
    CloseHandle(hProcess);
    
    return 1;
    }

  5. #105

    Tutorial Requests!

    Quote Originally Posted by Grob
    Martijn: If you know the basics it's pretty simple. All you have to do is find a tibia window and open its process. Then there are 2 functions you need to know basically. ReadProcessMemory and WriteProcessMemory. What you do is find an address (which you can find on these forums) and then read/write to it.

    I wrote some simple code here and commented it, I suggest you go through it carefully line by line and you will see it's actually very easy. Don't let unknown functionnames scare you, to be honest I almost don't even remember how to use these functions. I've just written classes to handle everything for me and now I don't need to bother with this stuff anymore.

    Code:
    #include <windows.h>
    
    int main()
    {
    // First get a window handle to a Tibia window, this way you will get the handle of the Tibia you opened last
    HWND TibiaWindow = FindWindow("tibiaclient", NULL);
    
    // Now we will get the process id by using the function beneith and store it in pid
    DWORD pid;
    GetWindowThreadProcessId(TibiaWindow, &pid);
    
    // Last thing we do is open the process
    HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
    
    // TIBIA_PLAYER_LEVEL is the address in Tibias memory where it stores th players level
    const int TIBIA_PLAYER_LEVEL			=	0x00613B60;
    
    // We will save the players level in the variable nLevel
    int nLevel = 0;
    
    // So lets do the actual reading using ReadProcessMemory
    // It takes 5 parameters, the process handle, the address, a variable to store the results in, how many bytes to read and a 5th I'm not sure about right now
    ReadProcessMemory(hProcess, (LPVOID)TIBIA_PLAYER_LEVEL, &nLevel, 4, NULL);
    
    // So now we have the players level in the variable nLevel, lets add 200 to it
    // We dont actually change the level here, it's done when we write the new level to Tibia
    nLevel += 200;
    
    // As you see it works pretty much the same
    WriteProcessMemory(hProcess, (LPVOID)TIBIA_PLAYER_LEVEL, &nLevel, 4, NULL);
    
    // Lastly close the process handle
    CloseHandle(hProcess);
    
    return 1;
    }

    Thanks I will play around with your script a little, I am not sure what it exactly does thought, I will try to find out

  6. #106

    Tutorial Requests!

    can we get a tutorial or some source as howto private message in visual basic 6 ive got the packet and ive got a function sent to me but i cant get them to work lol so a tutorial or source would be amazing thannks

  7. #107
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    Tutorial Requests!

    Quote Originally Posted by Mooki
    can we get a tutorial or some source as howto private message in visual basic 6 ive got the packet and ive got a function sent to me but i cant get them to work lol so a tutorial or source would be amazing thannks
    This is what I use and it works:
    Code:
    Public Function PrivateMessage(CharacterTo As String, Text As String)
    Dim ProcessID As Long
    Dim PacketBuffer() As Byte
    ReDim PacketBuffer(9 + Len(CharacterTo) + Len(Text))
    
    Dim X As Long
    
    GetWindowThreadProcessId MainTibiaClient, ProcessID
    
        PacketBuffer(0) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 1)
        PacketBuffer(1) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 2)
        PacketBuffer(2) = &H96
        PacketBuffer(3) = &H4
        PacketBuffer(4) = Len(CharacterTo)
        PacketBuffer(5) = &H0
        For X = 1 To Len(CharacterTo)
            PacketBuffer(X + 5) = Asc(Mid(CharacterTo, X, 1))
        Next X
        PacketBuffer(Len(CharacterTo) + 6) = LongToByte(Len(Text), 1)
        PacketBuffer(Len(CharacterTo) + 7) = LongToByte(Len(Text), 2)
        For X = 1 To Len(Text)
            PacketBuffer(Len(CharacterTo) + 7 + X) = Asc(Mid(Text, X, 1))
        Next X
    
        SendPacket ProcessID, PacketBuffer
    End Function
    And call it like this:
    Code:
    PrivateMessage "Mooki", "Hello!"
    Hope that helps,
    Jo3

  8. #108
    Senior Member
    Join Date
    May 2007
    Posts
    448

    Tutorial Requests!

    i downloaded packet.dll for 8.2, put it in the same folder as my project. i copied you're private message function and called it, nothing happens for a reason, this is what i added


    Code:
    Private Declare Sub SendPacket Lib "packet.dll" (ByVal ProcessID As Long, ByRef Packet() As Byte, Optional ByVal Encrypt As Byte = True, Optional ByVal SafeArray As Byte = True)
    from packet.dll vb example

    Code:
    Public Function PrivateMessage(CharacterTo As String, Text As String)
    Dim ProcessID As Long
    Dim PacketBuffer() As Byte
    ReDim PacketBuffer(9 + Len(CharacterTo) + Len(Text))
    
    Dim X As Long
    
    GetWindowThreadProcessId Tibia_Hwnd, ProcessID
    
        PacketBuffer(0) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 1)
        PacketBuffer(1) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 2)
        PacketBuffer(2) = &H96
        PacketBuffer(3) = &H4
        PacketBuffer(4) = Len(CharacterTo)
        PacketBuffer(5) = &H0
        For X = 1 To Len(CharacterTo)
            PacketBuffer(X + 5) = Asc(Mid(CharacterTo, X, 1))
        Next X
        PacketBuffer(Len(CharacterTo) + 6) = LongToByte(Len(Text), 1)
        PacketBuffer(Len(CharacterTo) + 7) = LongToByte(Len(Text), 2)
        For X = 1 To Len(Text)
            PacketBuffer(Len(CharacterTo) + 7 + X) = Asc(Mid(Text, X, 1))
        Next X
    
        SendPacket ProcessID, PacketBuffer
    End Function
    you're pm function(except for MainTibiaClient that i changed to Tibia_Hwnd.


    Code:
    Private Sub Command1_Click()
    PrivateMessage "playername", "Hello!"
    End Sub
    thats how i called it



    any ideas?

  9. #109
    Senior Member
    Join Date
    Jun 2007
    Posts
    334

    Tutorial Requests!

    This this dude:
    Code:
    Public Function PrivateMessage(CharacterTo As String, Text As String)
    Dim ProcessID As Long
    Dim PacketBuffer() As Byte
    ReDim PacketBuffer(8 + Len(CharacterTo) + Len(Text))
    
    Dim X As Long
    
    GetWindowThreadProcessId Tibia_Hwnd, ProcessID
    
        PacketBuffer(0) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 1)
        PacketBuffer(1) = LongToByte((Len(CharacterTo) + (Len(Text)) + 6), 2)
        PacketBuffer(2) = &H96
        PacketBuffer(3) = &H4
        PacketBuffer(4) = Len(CharacterTo)
        PacketBuffer(5) = &H0
        For X = 1 To Len(CharacterTo)
            PacketBuffer(X + 5) = Asc(Mid(CharacterTo, X, 1))
        Next X
        PacketBuffer(Len(CharacterTo) + 6) = LongToByte(Len(Text), 1)
        PacketBuffer(Len(CharacterTo) + 7) = LongToByte(Len(Text), 2)
        For X = 1 To Len(Text)
            PacketBuffer(Len(CharacterTo) + 7 + X) = Asc(Mid(Text, X, 1))
        Next X
    
        SendPacket ProcessID, PacketBuffer
    End Function

  10. #110
    Senior Member
    Join Date
    May 2007
    Posts
    448

    Tutorial Requests!

    got it to work already, thanks tho

Posting Permissions

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