W jaki sposób napisać exp counter? Nie chcę gotowca, tylko podpowiedź.
Wersja do druku
W jaki sposób napisać exp counter? Nie chcę gotowca, tylko podpowiedź.
/\ Tak jak chciałeś, ogólne założenia.
Możesz sobie zrobić 2 buttony start i stop.
Po naciśnięciu start do zmiennej poczatkowy_exp zapisujesz aktualną ilość zdobytego doświadczenia przez gracza. Po naciśnięciu stop pobierasz aktualny exp (np.: do zmiennej aktualny_exp) i wyświetlasz (w labelu czy tam gdzie chcesz) wartość (aktualny_exp - poczatkowy_exp).
To taki najprostszy przykład, możesz też zrobić coś podobnego za pomocą timeru, który będzie aktualizował dane.
To tak w skrócie, myślę, że załapiesz o co chodzi :).
Czy mógłby mi ktoś pomóc zabrałem się za pisanie bota pod tibię 8.61
ale to co napisał yaboo nie bardzo pomogło.chciałbym dodać do mojego bota pare udogodnień np rune maker,light,spell caster,zmiane outfitów??Moje gg:10180836
zrobiłem narazie tyle:
unit Wlazelko;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
StaticText1: TStaticText;
Label1: TLabel;
Button1: TButton;
StaticText2: TStaticText;
Label2: TLabel;
Label3: TLabel;
StaticText4: TStaticText;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
const
//adresy wartosci postaci
Player_ClubPerc = $634BCC - 100;
Player_SwordPerc = $634BCC - 96;
Player_AxePerc = $634BCC - 92;
Player_DistnacePerc = $634BCC - 88;
Player_ShieldingPerc = $634BCC - 84;
Player_FishingPerc = $634BCC - 80;
Player_FistPerc = $634BCC - 104;
//koniec procenty
Player_Fist = $634BCC - 76;
Player_Club = $634BCC - 72;
Player_Sword = $634BCC - 68;
Player_Axe = $634BCC - 68;
Player_Distance = $634BCC - 60;
Player_Shielding = $634BCC - 56;
Player_Fishing = $634BCC - 52;
//koniec skile
Player_Cap = $634BCC - 36;
Player_Stamina = $634BCC - 32;
Player_Soul = $634BCC - 28;
//koniec eq
Player_ManaMax = $634BCC - 24;
Player_Mana = $634BCC - 20;
//koniec mana
Player_MagicLevelPerc = $634BCC - 16;
Player_LevelPerc = $634BCC - 12;
Player_MagicLevel = $634BCC - 8;
Player_Level = $634BCC - 4;
//koniec poziomy
Player_Experience = $634BCC;
Player_HpMax = $634BCC + 4;
Player_Hp = $634BCC + 8;
Player_ID = $634BCC + 12;
//koniec - adresy wartosci postaci
BATTLELIST_START = $634C38 + 4;
BATTLELIST_END = $634C38 + 4 + ($A8 * 250);
StepCreatures = $A8;
MaxCreatures = 250;
//koniec battlelist
DistanceId = 0;
DistanceType = 3;
DistanceName = 4;
DistanceX = 36;
DistanceY = 40;
DistanceZ = 44;
DistanceScreenOffsetHoriz = 48;
DistanceScreenOffsetVert = 52;
DistanceIsWalking = 76;
DistanceWalkSpeed = 140;
DistanceDirection = 80;
DistanceIsVisible = 144;
DistanceBlackSquare = 132;
DistanceLight = 120;
DistanceLightColor = 124;
DistanceHPBar = 136;
DistanceSkull = 148;
DistanceParty = 152;
DistanceWarIcon = 160;
DistanceIsBlocking = 164;
DistanceOutfit = 96;
DistanceColorHead = 100;
DistanceColorBody = 104;
DistanceColorLegs = 108;
DistanceColorFeet = 112;
DistanceAddon = 116;
implementation
{$R *.dfm}
// Funkcje czytające
function ReadMemInteger(Address: Cardinal): Cardinal; //Read adress:value
var
ProcId: Cardinal;
tProc: THandle;
NBR: Cardinal;
value:integer;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient', Nil), @ProcId);
tProc:= OpenProcess(PROCESS_ALL_ACCESS, False, ProcId);
ReadProcessMemory(tProc, Ptr(Address), @value, 4, NBR);
CloseHandle(tProc);
Result:=value;
end;
function MemReadString(Address: Integer): String;
var
NB : LongWord;
Temp : ARRAY [1..255] OF Byte;
I : Byte;
IDProcess, proc_ID : Cardinal;
begin
GetWindowThreadProcessID(FindWindow('TibiaClient', nil), @proc_ID);
IDProcess := OpenProcess(PROCESS_ALL_ACCESS, false, proc_ID);
Result := '';
ReadProcessMemory(IDProcess, Ptr(Address), @Temp[1], 255, NB);
for I := 1 to 255 do
begin
if ((Temp[i] = 0) or (Temp[i] = $0F)) then
Break;
Result := Result + Chr(Temp[i]);
end;
end;
// Koniec - Funkcje czytające
//battlelist czytanie
function pozycja:integer;
var
i,id_battle,id:integer;
begin
id:=readmeminteger($634BCC + 12);
for i:=1 to 149 do
Begin
id_battle:=Readmeminteger($634C38 + 4 + (i*160)-4);
if id_battle=ID then
Begin
Result :=i;
exit;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled:=true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption:=inttostr(ReadMeminteger($634BCC - 4));
label2.Caption:=inttostr(ReadMeminteger($634BCC - 8));
label3.Caption:=inttostr(ReadMeminteger($634BCC - 20));
end;
procedure MemWriteInteger(Address: Integer; buf: Integer; Length: DWORD);
var ProcID, THandle: Integer;
e: DWORD;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient', Nil), @ProcID);
THandle := OpenProcess(PROCESS_ALL_ACCESS, False, ProcID);
WriteProcessMemory(THandle, Ptr(Address), @buf, Length, e);
CloseHandle(THandle);
end;
procedure MemWriteString(Address: Integer; buf: String; Length: DWORD);
var ProcID: Integer;
THandle: hWnd;
e: DWORD;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient', Nil), @ProcID);
THandle := OpenProcess(PROCESS_ALL_ACCESS, False, ProcID);
WriteProcessMemory(THandle, Pointer(Address), PChar(buf), Length, e);
CloseHandle(THandle);
end;
procedure SendPacket(ProcessID: Cardinal; Packet: Pointer; Encrypt: Boolean; SafeArray: Boolean); stdcall; external 'packet.dll';
end.
A jak napisać bota do innego klienta niż orginalny klient Tibi, chodzi mi o własnego klienta OTS.
cheat engine - szukasz zmiennych i podstawiasz do programu. ot co
to jest taki program window-title-changer
Moglby mi ktos podac adresy do odczytania pozycji gracza z tibi 8.61? Znalazlem pare, ale okazaly sie bledne, poniewaz albo wychodzily 7-9 cyfrowe liczby albo poprostu 0.
Mam tez problem z odczytaniem nicku postaci poniewaz kiedy jestem sam na ekranie jest wszystko ok, ale kiedy na battle list pojawia sie ktos to bot wyswietla jego nick. Wydaje mi sie, ze odczytywanie nicku pod 8.61 poprostu sie zmienilo i nigdzie nie moge tego znalesc
p_Z = $644260;
p_x = p_Z+8;
p_y = p_Z+4;
Ołkej. A jest coś w stylu 'FreeProxy', żeby odczytywało pakiety z tibii 8.54? Bo Freeproxy jest do 8.4
Adresy dzialaja, ale nie wiem czy poprawnie. Wysokosc napewno tak, ale gdy sprawdzam pos w carlin to wychodzi ok 32k tak powinno byc czy trzeba cos zmienic? I co z odczytaniem nicku?
Mi działają poprawnie
A z nickiem
Zrób pętle od zera do bl_max -1
w pętli odczytaj z nr indeksu id stworka jak będzie równy twojemu id to w rezultacie daj name
Chodzi o cos takiego?Kod:for i:=0 to BattleList_MaxCreatures-1 do
Begin
if BattleList.StepCreatures=Player_Id then
??
end;
Nie wiem jak zrobic cos w miejscu "??"
Kod:for Current := 0 to BL_Max do
begin
if ( ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_ID) = Player_id ) then
begin
result:=ReadMemStr(BattleList_Start+(Current*BL_Size)+BL_Dist_Name);
end;