Ir para conteúdo

Featured Replies

Postado

Olá pessoal, apartir do update 9.1, a Cipsoft botou um novo sistema, que agora os programadores precisam pegar a base do endereço para o seu bot funcionar perfeitamente em computadores com sistemas operacionais Windows 7 e Windows Vista.

Bom, foi um sistema falho...

Declare nas uses:

PsAPI
Declare a função necessaria para pegar a base do endereço:
function GetTibiaBaseAddress(ProcessID: Cardinal): Pointer;

var

  Modules: Array of HMODULE;

  cbNeeded, i: Cardinal;

  ModuleInfo: TModuleInfo;

  ModuleName: Array [0 .. MAX_PATH] of Char;

  PHandle: THandle;

begin

  Result := nil;

  SetLength(Modules, 1024);

  PHandle := OpenProcess(PROCESS_QUERY_INFORMATION + PROCESS_VM_READ, FALSE,

    ProcessID);

  if (PHandle <> 0) then

    begin

	  EnumProcessModules(PHandle, @Modules[0], 1024 * SizeOf(HMODULE),

	    cbNeeded);

	  SetLength(Modules, cbNeeded div SizeOf(HMODULE));

	  for i := 0 to Length(Modules) - 1 do

	    begin

		  GetModuleBaseName(PHandle, Modules[i], ModuleName, SizeOf(ModuleName)

		    );

		  if AnsiCompareText('Tibia.exe', ModuleName) = 0 then

		    begin

			  GetModuleInformation(PHandle, Modules[i], @ModuleInfo, SizeOf

				  (ModuleInfo));

			  Result := ModuleInfo.lpBaseOfDll;

			  CloseHandle(PHandle);

			  Exit;

		    end;

	    end;

    end;

end;
Declare as variaveis:
  PH: THandle;

  PID, Thid: Dword;

  Offset: Integer;

  TibiaH: THandle
Declare a função para ler os endereços de memoria:
function ReadInteger(Address: Integer): Integer;

var

  value: Integer;

  ler: Dword;

begin

  Thid := GetWindowThreadProcessId(TibiaH, @PID);

  PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);

  ReadProcessMemory(PH, Ptr(Address), @value, 4, ler);

  Result := value;

end;
Declare a função para pegar o ProcessID:
function ProcessID: Integer;

begin

  TibiaH := FindWindow('TibiaClient', nil);

  Thid := GetWindowThreadProcessId(TibiaH, @PID);

  PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);

  Result := PID;

end;
Pronto, agora já podemos burlar o sistema da Cipsoft. Agora um simples exemplo de como você deve usar: Declare as consts:
const

  adrXOR = $7ADFD0;

  adrMyHP = $943000;

  adrMyMana = $7AE024;
Agora, declare a função para retornar o Health do seu character:
function PlayerHealth: Integer;

var

  HP: Integer;

  uXor: Integer;

begin

  Offset := Integer(GetTibiaBaseAddress(ProcessID));

  HP := ReadInteger((adrMyHP + Offset) - $400000);

  uXor := ReadInteger((adrXOR + Offset) - $400000);

  Result := HP xor uXor;

end;
Função para pegar a Mana do seu character:
function PlayerMana: Integer;

var

  Mana: Integer;

  uXor: Integer;

begin

  Offset := Integer(GetTibiaBaseAddress(ProcessID));

  Mana := ReadInteger((adrMyMana + Offset) - $400000);

  uXor := ReadInteger((adrXOR + Offset) - $400000);

  Result := Mana xor uXor;

end;
Vou deixar como o meu .pas ficou:

Qualquer duvida, só postar.

{ ---------------------------

    Feito por Kimoszin

    www.TibiaKing.com

---------------------------- }


unit uMain;


interface


uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, PsAPI, StdCtrls;


type

  TForm1 = class(TForm)

    lbHealth: TLabel;

    Button1: TButton;

    lbMana: TLabel;

    procedure Button1Click(Sender: TObject);

    private

    public

  end;


var

  Form1: TForm1;

  { Variaveis }

  PH: THandle;

  PID, Thid: Dword;

  Offset: Integer;

  TibiaH: THandle;


implementation


{$R *.dfm}


{ Endereços de Memoria Tibia 9.53 }

const

  adrXOR = $7ADFD0;

  adrMyHP = $943000;

  adrMyMana = $7AE024;


{ Função para ler números (Int)eiros }

function ReadInteger(Address: Integer): Integer;

var

  value: Integer;

  ler: Dword;

begin

  Thid := GetWindowThreadProcessId(TibiaH, @PID);

  PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);

  ReadProcessMemory(PH, Ptr(Address), @value, 4, ler);

  Result := value;

end;


{ Função para pegar o número do processo do Tibia }

function ProcessID: Integer;

begin

  TibiaH := FindWindow('TibiaClient', nil);

  Thid := GetWindowThreadProcessId(TibiaH, @PID);

  PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);

  Result := PID;

end;


{ Função para pegar o endereço base do Tibia }

function GetTibiaBaseAddress(ProcessID: Cardinal): Pointer;

var

  Modules: Array of HMODULE;

  cbNeeded, i: Cardinal;

  ModuleInfo: TModuleInfo;

  ModuleName: Array [0 .. MAX_PATH] of Char;

  PHandle: THandle;

begin

  Result := nil;

  SetLength(Modules, 1024);

  PHandle := OpenProcess(PROCESS_QUERY_INFORMATION + PROCESS_VM_READ, FALSE,

    ProcessID);

  if (PHandle <> 0) then

    begin

	  EnumProcessModules(PHandle, @Modules[0], 1024 * SizeOf(HMODULE),

	    cbNeeded);

	  SetLength(Modules, cbNeeded div SizeOf(HMODULE));

	  for i := 0 to Length(Modules) - 1 do

	    begin

		  GetModuleBaseName(PHandle, Modules[i], ModuleName, SizeOf(ModuleName)

		    );

		  if AnsiCompareText('Tibia.exe', ModuleName) = 0 then

		    begin

			  GetModuleInformation(PHandle, Modules[i], @ModuleInfo, SizeOf

				  (ModuleInfo));

			  Result := ModuleInfo.lpBaseOfDll;

			  CloseHandle(PHandle);

			  Exit;

		    end;

	    end;

    end;

end;


{ Função que retornar o Health(Vida) do personagem }

function PlayerHealth: Integer;

var

  HP: Integer;

  uXor: Integer;

begin

  Offset := Integer(GetTibiaBaseAddress(ProcessID));

  HP := ReadInteger((adrMyHP + Offset) - $400000);

  uXor := ReadInteger((adrXOR + Offset) - $400000);

  Result := HP xor uXor;

end;


{ Função que retornar a Mana do personagem }

function PlayerMana: Integer;

var

  Mana: Integer;

  uXor: Integer;

begin

  Offset := Integer(GetTibiaBaseAddress(ProcessID));

  Mana := ReadInteger((adrMyMana + Offset) - $400000);

  uXor := ReadInteger((adrXOR + Offset) - $400000);

  Result := Mana xor uXor;

end;


procedure TForm1.Button1Click(Sender: TObject);

begin

{ Modo de usar }

  lbHealth.Caption := 'Health: ' + IntToStr(PlayerHealth);

  lbMana.Caption := 'Mana: ' + IntToStr(PlayerMana);

end;


end.

Editado por Kimoszin (veja o histórico de edições)

  • Respostas 23
  • Visualizações 4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 2 weeks later...
  • 3 weeks later...
  • 1 month later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo