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
Basic reading
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Basic reading

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    Basic reading

    Hello,
    I was looking for error in my script but withaud results. Im not sure what is wrong. I copied address from this forum. So here is my script for reading in which serwer player is logged in:
    [code=delphi]
    function RPMS(Address: Integer): String;
    var
    A: LongWord;
    B: array [1..255] of byte;
    C: Byte;
    D, E: Cardinal;
    begin
    GetWindowThreadProcessID(FindWindow('Tibia.exe', nil), @E);
    D := OpenProcess(PROCESS_ALL_ACCESS, false, E);
    Result := '';
    ReadProcessMemory(D, Ptr(Address), @B, 32, A);
    for C := 1 to 255 do
    begin
    if ((B[C] = 0) or (B[C] = $0F)) then
    Break;
    Result := Result + Chr(B[C]);
    end;
    end;

    procedure TForm1.Button4Click(Sender: TObject);
    begin
    edit1.text := RPMS($007B7620);
    end;[/quote]
    Please help : <[/code]
    Edit: And also somebody know how to check did my monster lives? I want to make 'beep' if i will kill monster.

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    RE: Basic reading

    Anyone ? : <
    I guess every coders here have this function so anybody can answer for first question? I will try something to answer second question but only if ill have first. Please.

  3. #3

    RE: Basic reading

    You're calling FindWindow the wrong way.

    http://msdn.microsoft.com/en-us/library/ms633499%28VS.85%29.aspx

  4. #4
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    RE: Basic reading

    GetWindowThreadProcessID(FindWindow(nil, 'Tibia.exe'), @E);
    That dont work? What is caption of tibia client and how can make beeper for train that beeps when monster dies?

  5. #5
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Basic reading

    FindWindow("TibiaClient", nil) I think

  6. #6
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    RE: Basic reading

    It doesnt work in that version : /

  7. #7

    RE: Basic reading

    Would you care to explain what happens? It should work fine with Blaster's correction.

  8. #8
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    RE: Basic reading

    edit1.text shows nothing : /

  9. #9

    RE: Basic reading

    Then you should spend some time with Delphi debugger (stepping through code F4, F7, F8, watches Ctrl+F5, breakpoints) to see what your code is really doing. It's possible that FindWindow, GetWindowThreadProcessID, OpenProcess or ReadProcessMemory don't return the values that you think they would. When you know if any of them is the problem, you can add a GetLastError call to see what exactly is wrong.

  10. #10
    Junior Member
    Join Date
    Jun 2008
    Posts
    13

    RE: Basic reading

    Its working on Tibia 8.54, but no on the newest. I changed addresses, and what more should i change?

Posting Permissions

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