Postado Julho 8, 2011 13 anos Delphi 7 naum funfa em win7 ja tentei de tudo que é maneira ;x Mas excelente tutorial man Vou ver se baixo o delphi mais novo pra ver o que dá ;x
Postado Julho 13, 2011 13 anos Ooo começei a usar hoje o Delphi to manjando 1 pokito kkk mais onde eu ponho isso ? CastSpell.Enabled.False CastSpell.Interval.700 Kick.Enabled.False Kick.Interval.60000 Food.Enabled.False Food.Interval.30000 Combobox1.Style.csDropDownList Form1.Caption 'Escolha um Nome para o Bot' Upando seu Knight level 8~50 em Thais Tibia é arte, morrer faz parte, botear é moda, ser banido é foda!
Postado Julho 13, 2011 13 anos Autor Essas sao as propriedades amigo, No CastSpell vai ter uma propriedade chamada Enabled ai vc bota ela em False e assim nas outras
Postado Julho 13, 2011 13 anos Ajuda nisso aki eu fui testar ja fiz tudo so que deu os seguinte erros : Checking project dependencies... Compiling Project1.dproj (Debug configuration) [DCC Error] Unit1.pas(64): E2003 Undeclared identifier: 'H' [DCC Error] Unit1.pas(65): E2003 Undeclared identifier: 'ThID' [DCC Error] Unit1.pas(65): E2003 Undeclared identifier: 'PID' [DCC Error] Unit1.pas(66): E2003 Undeclared identifier: 'PH' [DCC Error] Unit1.pas(155): E2029 Statement expected but 'VAR' found [DCC Error] Unit1.pas(155): E2029 ';' expected but 'VAR' found [DCC Error] Unit1.pas(165): E2029 '.' expected but ';' found [DCC Warning] Unit1.pas(166): W1011 Text after final 'END.' - ignored by compiler [DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas' Failed Elapsed time: 00:00:13.9 essas linhas : h , thid , pid , ph , var , var , ; , end ficarao 1 linha embaixo delas vermelhas Codigo usado : //Função para ler endereço de memoria do Tibia function LerInt(Address: Integer): Integer; var value:integer; ler :dword; begin H := FindWindow(nil, 'Tibia'); ThID := GetWindowThreadProcessId(H, @PID); PH := OpenProcess(PROCESS_ALL_ACCESS,FALSE,PID); ReadProcessMemory(PH, Ptr(Address), @Value, 4, Ler); Result:=value; end; É o codigo inteiro : unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) GroupBox1: TGroupBox; Label1: TLabel; Label2: TLabel; CheckBox1: TCheckBox; CheckBox2: TCheckBox; ComboBox1: TComboBox; CastSpell: TTimer; Endereço: TTimer; Kick: TTimer; Food: TTimer; Spell: TLabeledEdit; StartButton: TButton; Mana: TLabeledEdit; procedure CastSpellTimer(Sender: TObject); procedure EndereçoTimer(Sender: TObject); procedure KickTimer(Sender: TObject); procedure FoodTimer(Sender: TObject); procedure StartButtonClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} //Função para escrever na janela do Tibia function say(mensagem: string):string; var h: HWND; letra: Integer; B: Byte; begin h := FindWindow(nil, 'tibia'); for letra := 1 to Length(mensagem) do begin B := Byte(mensagem[letra]); SendMessage(h, WM_CHAR, B, 0); end; SendMessage(h, WM_CHAR, 13, 0); end; //Função para ler endereço de memoria do Tibia function LerInt(Address: Integer): Integer; var value:integer; ler :dword; begin H := FindWindow(nil, 'Tibia'); ThID := GetWindowThreadProcessId(H, @PID); PH := OpenProcess(PROCESS_ALL_ACCESS,FALSE,PID); ReadProcessMemory(PH, Ptr(Address), @Value, 4, Ler); Result:=value; end; //Função para aperta uma determinada tecla na janela do Tibia function hotkey(x :string): string; var h: HWND; i : integer; begin if x ='F1' then i := 112 else if x ='F2' then i := 113 else if x ='F3' then i := 114 else if x ='F4' then i := 115 else if x ='F5' then i := 116 else if x ='F6' then i := 117 else if x ='F7' then i := 118 else if x ='F8' then i := 119 else if x ='F9' then i := 120 else if x ='F10' then i := 121 else if x ='F11' then i := 122 else if x ='F12' then i := 123; h := FindWindow(nil, 'Tibia'); // acha a janela do tibia SendMessage(h, WM_KEYdown, i, 0); //pressiona a tecla SendMessage(h, WM_KEYUP, i, 0); //solta tecla end; procedure TForm1.StartButtonClick(Sender: TObject); begin CastSpell.Enabled := not(CastSpell.Enabled); Food.Enabled := not(Food.Enabled); Kick.Enabled := not(Kick.Enabled); if Checkbox1.checked then Kick.Enabled := true else Kick.Enabled := false; if Checkbox2.checked then Food.Enabled := true else Food.Enabled := false; if (Spell.Text <> '') and (Mana.Text <> '') then CastSpell.Enabled := true else CastSpell.Enabled := false; if (Kick.Enabled) or (Food.Enabled) or (CastSpell.Enabled) then StartButton.Caption := 'Stop' else StartButton.Caption := 'Start'; end; procedure TForm1.CastSpellTimer(Sender: TObject); begin if StrToInt(Label2.Caption) > (StrToInt(Mana.Text)) then say(Spell.text) end; procedure TForm1.EndereçoTimer(Sender: TObject); begin Label2.caption := IntToStr(Lerint($0081CE5C)); end; procedure TForm1.FoodTimer(Sender: TObject); begin hotkey(Combobox1.Text) end; procedure TForm1.KickTimer(Sender: TObject); begin Var TibiaHandle : THandle; begin TibiaHandle:=FindWindow(nil,'Tibia'); // Pega a janela do Tibia SendMessage(TibiaHandle,WM_KEYDOWN,VK_CONTROL,1); // Pressiona o Ctrl SendMessage(TibiaHandle,WM_KEYDOWN,VK_UP,1); // Pressiona a tecla para cima SendMessage(TibiaHandle,WM_KEYUP,VK_UP,1); // Libera a tecla SendMessage(TibiaHandle,WM_KEYDOWN,VK_DOWN,1); // Pressiona a tecla para baixo SendMessage(TibiaHandle,WM_KEYUP,VK_DOWN,1); // Libera a tecla SendMessage(TibiaHandle,WM_KEYUP,VK_CONTROL,1); // Libera o Ctrl end; end; end. Editado Julho 13, 2011 13 anos por EdsonJunior Tag spoiler Adicionados. (veja o histórico de edições) Upando seu Knight level 8~50 em Thais Tibia é arte, morrer faz parte, botear é moda, ser banido é foda!
Postado Julho 13, 2011 13 anos Autor Erro meu cara, esqueci de botar as variaveis globais no topcio, é so botar abaixo do Form1 : TForm1 Essas: PH : THandle; PID, ThID: DWORD; H : THandle; Topico Atualizado
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.