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 85

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
[Help] WriteString
Results 1 to 5 of 5

Thread: [Help] WriteString

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    17

    Cool [Help] WriteString

    :huh:
    Code:
        Public Function WriteString(ByVal address As Long, ByVal str As String) As Boolean
            Dim processHandle As IntPtr = OpenProcess(PROCESS_READ_WRITE_QUERY, 0, Tibia_Hwnd)
            For i As Integer = 0 To Len(str) - 1
                WriteProcessMemory(processHandle, address + i, Asc(Mid(str, i + 1, 1)), 1, 0)
            Next
            Return 0
        End Function
    Code:
      Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
            Dim gotox = Memory_ReadLong(&H613BB4)
        
    
            WriteString(gotox, 3703)
    
    
        End Sub

  2. #2
    Senior Member
    Join Date
    Oct 2009
    Location
    Poland, Świebodzin
    Posts
    233

    RE: [Help] WriteString

    Try to write it as integer value instead of string (without increasing your address value). Also you have to set your battle list value "isWalking" to 1.

    Regards, Czepek!

  3. #3
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    RE: [Help] WriteString

    try this for writing string
    [code=vbnet]
    Public Function WriteString(ByVal address As Long, ByVal value As String) As Boolean
    Dim encoding As New System.Text.ASCIIEncoding()
    Dim bytesWritten As IntPtr
    Dim bytes As Byte() = encoding.GetBytes(value + Chr(0))
    Return WriteProcessMemory(ProcessHandle, address, bytes, bytes.Length, bytesWritten)
    End Function
    [/code]

    But gotoAddress is a 4bytes integer value so try

    [code=vbnet]
    Public Function WriteInt(ByVal address As Long, ByVal value As Integer) As Boolean
    Dim bytesWritten As IntPtr
    Dim bytes As Byte() = BitConverter.GetBytes(value)
    Return WriteProcessMemory(ProcessHandle, address, bytes, bytes.Length, bytesWritten)
    End Function
    [/code]

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

    RE: [Help] WriteString

    Go to this thread: http://www.tpforums.org/forum/thread-9038-page-6.html

    Download the attachment on my post, look at the WinAPI.vb file

  5. #5
    Junior Member
    Join Date
    Nov 2011
    Posts
    17

    RE: [Help] WriteString

    resolved :]

Posting Permissions

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