@Yaboo
Wiesz moze jak wczytac plik za pomoca OpneDialog oraz jak go zapisac z ListBox?
Wersja do druku
@Yaboo
Wiesz moze jak wczytac plik za pomoca OpneDialog oraz jak go zapisac z ListBox?
Witam serdecznie
Mam pytanie odnośnie wyciągania adresów. Wiem jak, np wyciągnąć adres loginu/hasła , niestety nie wiem skąd wziąć przykładowo adres, gdzie jest zapisana ilość many/życia. Prosiłbym o pomoc.
Pozdrawiam, Arek.
Masz 150 życia. Szukasz 4 bajtowej wartości 150. Dostajesz hita - masz 146. W poprzednich wynikach szukasz wartości 146. I tak tak długo, aż zostanie Ci 1 lub max. kilka wyników. Potem zmieniasz każdy z nich aby odkryć który/upewnić się czy wynik to ta cyferka hp na ekranie.
Witam
Robiłem wszystko od początku według instrukcji i jak skompilowałem wystąpiły takie błędy:
ht tp://img35.imageshack.us/img35/7614/delphij.png
Proszę o pomoc.
Kurs Delphi
Program używa 5 labeli - stwórz je.
Ponadto ostatni end nie powinien kończyć się średnikiem, a kropką.
Teraz już zrozumiałem,zrobiłem wszystko według 1 części instrukcji.Ale bot nie chce odczytywać levelu itp. tylko pokazuje sie coś takiego:
htt p://img526.imageshack.us/img526/5080/delphifail.png
Prosze o poomoc.
Ten "artykuł" to moja największa życiowa porażka ;d
Weźcie się ludzie najpierw za podstawy delphi albo jakiegokolwiek inne języka a dopiero później za pisanie botów :)
Napisalem aplikacje w Delphi, ktora sama za nas dodaje wpt pod Tibie 8.54.
He, mysle ze sie przyda.
Domyslnie dodaje na 'S' czyli South
Pierw 'Enblade' pozniej 'Learn On'
i45.tinypic.com/x2o2g7.png
i49.tinypic.com/344cea1.png
speedyshare.com/files/20636679/Elf.exe
I skan
virustotal.com/pl/analisis/3e30b1d0c206d0c2fec4794c7d2785b672f0e907c2877d8730 47c687abd7a1d3-1264793166
Wiem,że źle sie za to biore ale ma ktoś adresy pamięci do Tibi 8.54?
I jak je wstawić w WriteProcessMemory.
Plz to ważne.
@Up
Czytales 1 post w tym temacie? -.-
Chyba jednak nie... Wiec preferuje abys zaczol od 1 postu krok, po kroku a dojdziesz do tego co chcesz...
Masz adresy...Cytuj:
const
//adresy postaci
Player_Experience = $635F04;
Player_Fist = Player_Experience - 76;
Player_Club = Player_Experience - 72;
Player_Sword = Player_Experience - 68;
Player_Axe = Player_Experience - 64;
Player_Distance = Player_Experience - 60;
Player_Shielding = Player_Experience - 56;
Player_Fishing = Player_Experience - 52;
Player_Cap = Player_Experience - 36;
Player_Stamina = Player_Experience - 32;
Player_Soul = Player_Experience - 28;
Player_ManaMax = Player_Experience - 24;
Player_Mana = Player_Experience - 20;
Player_MagicLevel = Player_Experience - 8;
Player_Level = Player_Experience - 4;
Player_HpMax = Player_Experience + 4;
Player_Hp = Player_Experience + 8;
Player_ID = Player_Experience + 12;
//Perc
Player_ClubPerc = Player_Experience - 100;
Player_SwordPerc = Player_Experience - 96;
Player_AxePerc = Player_Experience - 92;
Player_DistancePerc = Player_Experience - 88;
Player_ShieldingPerc = Player_Experience - 84;
Player_FishingPerc = Player_Experience - 80;
Player_MagicLevelPerc = Player_Experience - 16;
Player_LevelPerc = Player_Experience - 12;
//Perc
//Różne
Framerate = $630B34;
StepCreatures = $A8;
MaxCreatures = 250;
BATTLELIST_START = $635F70;
BATTLELIST_END = BATTLELIST_START + (StepCreatures * MaxCreatures);
Connection = $792E50; //8 - tak, 0 - nie
Map = $64A048;
//Pos
Z = $645530;
Y = Z + 4;
X = Z + 8;
//koniec - adresy postaci
//disant
Distance_ID= 0;
Distance_Type = 3;
Distance_Name= 4;
Distance_X = 36;
Distance_Y = 40;
Distance_Z = 44;
Distance_HorizScreenOffset = 48;
Distance_VertScreenOffset = 52;
Distance_Chameleon = 60;
Distance_Chameleon2 = 92;
Distance_IsWalking = 76;
Distance_Direction = 80;
Distance_Outfit = 96;
Distance_OutfitHead = 100;
Distance_OutfitBody = 104;
Distance_OutfitLegs = 108;
Distance_OutfitFeet = 112;
Distance_OutfitAddon = 116;
Distance_BlackSquare = 132;
Distance_HP = 136;
Distance_WalkSpeed = 140;
Distance_IsVisible = 144;
Distance_Skull = 148;
Distance_Party = 152;
Distance_Between_Chars = 168;
DISTANCE_LIGHT = $74;
DISTANCE_LIGHTCOLOR = $78;
//distant
A tu moje drogie napki coś dla was ale adresy musicie sami uzupełnić
Ja tam teraz wole Vb.net pozdro jak się zna delphi to nie jest problemem a programy są chyba szybszeKod:unit Tibia;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, Menus, OleCtrls, Math;
type
TChar = record
ID,X,Y,Z,Speed: Integer;
Moving,Dir,Outfit,Head,Body,Legs,Feet,Addon,Light,Light_Color,HPBar,Visible,Skull,Party,BL:Byte;
Found: Boolean;
Name:String;
end;
type
TPos = record
X,Y,Z,Tile,Stack: Integer;
end;
type
TStatus = record
Battle,Haste,Paralyze,MShield,Drunk,Energy,Fire,Poison:Boolean
end;
type
TItem = record
ID,X,Y,Z: Integer;
Count, BP, Slot: Byte;
Found: Boolean;
end;
var
Map_Start:Integer;
THandle:HWND;
IDProcess,NBR,PID:cardinal;
Gold:TItem;
Player:TChar;
Target:TChar;
SD:TItem;
UH:TItem;
MF:TItem;
MW:TItem;
SSA:TItem;
Levelspied:Boolean;
const
//Runes
SD_ID = 3155;
UH_ID = 3160;
MF_ID = 2874;
SSA_ID = 3081;
MW_ID = 3180;
//Target
Target_ID = $60EA9C;
Target_Type = $60DA9F;
Follow_ID = $60EA98;
//BattleList
Player_ID = $60EAD0;
BattleList_Start = $46A30;
BL_Dist_ID = 0;
BL_Dist_Name = 4;
BL_Dist_X = 36;
BL_Dist_Y = 40;
BL_Dist_Z = 44;
BL_Dist_Moving = 76;
BL_Dist_Dir = 80;
BL_Dist_Outfit = 96;
BL_Dist_Head = 100;
BL_Dist_Body = 104;
BL_Dist_Legs = 108;
BL_Dist_Feet = 112;
BL_Dist_Addon = 116;
BL_Dist_Light = 74;
BL_Dist_Light_Color = 78;
BL_Dist_HPBar = 136;
BL_Dist_Speed = 140;
BL_Dist_Visible = 144;
BL_Dist_Skull = 148;
BL_Dist_Party = 152;
BL_Size = 160;
BL_Max = 150;
//Status
Status_Text = $5EFD98;
Status_Time = $5EFD94;
//BP
BackPack_Start = $617000;
BP_Dist_Open = 0;
BP_Dist_Icon = 4;
BP_Dist_Name = 16;
BP_Dist_Size = 48;
BP_Dist_Items = 56;
BP_Dist_Item = 60;
BP_Dist_Item_Amount = 64;
BP_Size = 492;
BP_Item_Size = 12;
BP_Max = 16;
//Map
Map_Pointer = $61E408;
Map_Dist_TileID = 4;
Map_Dist_Count = 0;
Map_Dist_ItemID = 0;
Map_Dist_ItemData = 4;
Map_Dist_Item = 12;
Map_Size = 172;
Map_Max = 2015;
//Self
Look_ID = $766EA0;
Player_HP = $49A014;
Player_MP = $499FF8;
Player_LVL = $49A008;
Player_XP = $49A00C;
Player_Neck = $616F94;
Player_Right = $616FB8;
Player_Status = $60EA58;
//Namespy
Nop = 37008;
Namespy_1 = $4DD2D7;
Namespy_2 = $4DD2E1;
Namespy_1_Default = 19573;
Namespy_2_Default = 17013;
Levelspy_Above = $4C431C;
Levelspy_Above_Default = 7;
Levelspy_Below = $4C4324;
Levelspy_Below_Default = 2;
Levelspy_Nop = $4C4320;
Levelspy_Nop_Default = 49451;
Levelspy_Max = 7;
Levelspy_Min = 0;
RSA='1091201329673994292788609605089955415282375029027981291234687579372662914925764463307396960011106039'+
'0723088861007265581882535850342905759282762943641310856602909362821263595383668656267584972062078627'+
'9431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978'+
'566631413';
RsaAdr = $593610;
IPFirst = $5e8908;
IPFirst1= $5e8978;
IPFirst2= $5e89e8;
IPFirst3= $5e8a58;
procedure SendPacket(ProcessID: Cardinal; Packet: Pointer; Encrypt: Boolean; SafeArray: Boolean); stdcall; external 'packet.dll';
procedure WriteMemStr(Address: Integer; Value:String);
function ReadMemStr(Address: Integer): String;
procedure WriteMemInt(Address: Integer; Value: Integer);
function ReadMemInt(Address: Integer): Integer;
procedure WriteMemByte(Address: Integer; Value: Byte);
procedure WriteMemBytes(Address: Integer; Value: Integer; Bytes: Integer);
function ReadMemByte(Address: Integer): Byte;
Procedure Hook;
Function FindPlayerByID(TPlayer:TChar) : TChar;
Function FindPlayerByName(TPlayer:TChar) : TChar;
Procedure Light(Strength:Byte; Color:Byte);
Procedure WhiteText(Text:String);
procedure Packet_Shoot_XYZ(Rune:TItem; Target:TChar; Tile:TPos);
procedure Packet_Say(Text: String; SoundType: Integer);
Function FindItem(TIT:TItem): TItem;
Procedure Attack(TPlayer:TChar);
procedure Packet_Target(TPlayer:TChar);
Function Map_GetAdr: Integer;
procedure Packet_Stop;
Function Map_GetPlayerTile(MapStart:Integer;TPlayer:TChar): Integer;
Function Map_GetTileID(MapStart:Integer; Pos:TPos):TPos;
Function GetHP: Integer;
Function GetMP: Integer;
Procedure Namespy(Enabled:Boolean);
procedure Packet_Use(Item:TItem);
procedure Packet_Shoot_Rune(Rune:TItem; Target:TChar);
Procedure LevelSpyToggle(Player:TChar; Enabled:Boolean);
Procedure Packet_Move(Dir: Char);
Procedure LevelSpy(Player:TChar; Up:Boolean);
Procedure Packet_ContainerToGround(Item:TItem; Pos:TPos);
function GetStatus: TStatus;
Function Map_GetXYZ(Tile:Integer):TPos;
Function Map_AddX(TTile:TPos;Value:Integer):TPos;
Function Map_AddY(TTile:TPos;Value:Integer):TPos;
function HealParty(Health:Integer; UH:TItem):String;
procedure Packet_Move_Item(Item:TItem;Slot:Integer);
function Map_NewTileNr(TTile:TPos):TPos;
function Exp: Integer;
procedure ChangeIP(IP:String);
implementation
procedure WriteMemStr(Address: Integer; Value:String);
var
TVal : Byte;
i: integer;
begin
for i:=1 to Length(Value) do
begin
TVal:=ord(Value[i]);
WriteProcessMemory(IDProcess, Ptr(Address+i-1),@TVal,1,NBR);
if i = Length(Value) then
begin
TVal:=0;
WriteProcessMemory(IDPRocess, Ptr(Address+i),@TVal,1,NBR);
end;
end;
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;
procedure WriteMemInt(Address: Integer; Value: Integer);
begin
WriteProcessMemory(IDProcess, Ptr(Address), @Value, 4, NBR);
end;
function ReadMemInt(Address: Integer): Integer;
var
value:integer;
begin
ReadProcessMemory(IDProcess, Ptr(Address), @Value, 4, NBR);
Result:=value;
end;
procedure WriteMemByte(Address: Integer; Value: Byte);
begin
WriteProcessMemory(IDProcess, Ptr(Address), @Value, 1, NBR);
end;
procedure WriteMemBytes(Address: Integer; Value: Integer; Bytes: Integer);
begin
WriteProcessMemory(IDProcess, Ptr(Address), @Value, Bytes, NBR);
end;
function ReadMemByte(Address: Integer): Byte;
var
value:integer;
begin
ReadProcessMemory(IDProcess, Ptr(Address), @Value, 1, NBR);
Result:=value;
end;
Procedure Hook;
begin
Thandle := FindWindow('TibiaClient', nil);
GetWindowThreadProcessID(Thandle, @PID);
IDProcess := OpenProcess(PROCESS_ALL_ACCESS, false, PID);
end;
Procedure Packet_Move(Dir: Char);
var
Buffer: array [0..255] of Byte;
begin
Case Dir of
'N': Begin
Buffer[2] :=$65;
end;
'S': Begin
Buffer[2] :=$67;
end;
'E': Begin
Buffer[2] :=$66;
end;
'W': Begin
Buffer[2] :=$68;
end;
end;
Buffer[0] :=$01;
Buffer[1] :=$00;
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Say(Text: String; SoundType: Integer);
//Say Something
var
Buffer: array [0..255] of Byte;
begin
Buffer[0] := Byte(Length(Text) + 4);
Buffer[1] := $00;
Buffer[2] := $96;
Buffer[3] := SoundType;
Buffer[4] := Length(Text);
Buffer[5] := $00;
CopyMemory(@Buffer[6], @Text[1], Length(Text));
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Shoot_Rune(Rune:TItem; Target:TChar);
//Shoots Rune
var
buffer : Array[0..14] of Byte;
begin
buffer[0] := $0D;
buffer[1] := $00;
buffer[2] := $84;
buffer[3] := $FF;
buffer[4] := $FF;
buffer[5] := $00;
buffer[6] := $00;
buffer[7] := $00;
buffer[8] := Lo(Rune.ID);
buffer[9] := Hi(Rune.ID);
buffer[10] := $00;
CopyMemory(@Buffer[11],@Target.ID,4);
if Rune.ID = MF_ID then buffer[10] := $0A;
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Shoot_XYZ(Rune:TItem; Target:TChar; Tile:TPos);
var
buffer : Array[0..18] of Byte;
begin
buffer[0] := $11;
buffer[1] := $00;
buffer[2] := $83;
buffer[3] := $FF;
buffer[4] := $FF;
buffer[5] := $00;
buffer[6] := $00;
buffer[7] := $00;
buffer[8] := Lo(Rune.ID);
buffer[9] := Hi(Rune.ID);
buffer[10] := $00;
buffer[11] := Lo(Target.X);
buffer[12] := Hi(Target.X);
buffer[13] := Lo(Target.Y);
buffer[14] := Hi(Target.Y);
buffer[15] := Lo(Target.Z);
buffer[16] := $63;
buffer[17] := $00;
buffer[18] := Lo(Tile.Tile);
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Stop;
var
buffer: Array[0..2] of Byte;
begin
buffer[0] := $01;
buffer[1] := $00;
buffer[2] := $BE;
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Use(Item:TItem);
var
buffer: Array[0..11] of Byte;
begin
buffer[0] := $0A;
buffer[1] := $00;
buffer[2] := $82;
buffer[3] := $FF;
buffer[4] := $FF;
buffer[5] := Lo(Item.BP);
buffer[6] := $00;
buffer[7] := Lo(Item.Slot);
buffer[8] := Lo(Item.ID);
buffer[9] := Hi(Item.ID);
buffer[10] := Lo(Item.Slot);
buffer[11] := $00;
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Move_Item(Item:TItem;Slot:Integer);
var
buffer : Array[0..16] of Byte;
begin
buffer[0] := $0F;
buffer[1] := $00;
buffer[2] := $78;
buffer[3] := $FF;
buffer[4] := $FF;
buffer[5] := Lo(Item.BP+64);
buffer[6] := $00;
buffer[7] := Lo(Item.Slot);
buffer[8] := Lo(Item.ID);
buffer[9] := Hi(Item.ID);
buffer[10] := Hi(Item.Slot);
buffer[11] := $FF;
buffer[12] := $FF;
buffer[13] := Lo(Slot);
buffer[14] := $00;
buffer[15] := $00;
buffer[16] := Lo(Item.Count);
SendPacket(PID, @buffer, TRUE, FALSE);
end;
procedure Packet_Target(TPlayer:TChar);
//Targets a ID
var
Buffer: array [0..6] of Byte;
begin
Buffer[0] := $05;
Buffer[1] := $00;
Buffer[2] := $A1;
CopyMemory(@Buffer[3], @TPlayer.ID, 4);
SendPacket(PID, @buffer, TRUE, FALSE);
end;
Procedure Packet_ContainerToGround(Item:TItem; Pos:TPos);
var
Buffer: array [0..16] of Byte;
begin
buffer[0] := $0F;
buffer[1] := $00;
buffer[2] := $78;
buffer[3] := $FF;
buffer[4] := $FF;
buffer[5] := Lo(Item.BP+64);
buffer[6] := $00;
buffer[7] := Lo(Item.Slot);
buffer[8] := Lo(Item.ID);
buffer[9] := HI(Item.ID);
buffer[10] := Lo(Item.Slot);
buffer[11] := Lo(Pos.X);
buffer[12] := Hi(Pos.X);
buffer[13] := Lo(Pos.Y);
buffer[14] := Hi(Pos.Y);
buffer[15] := Lo(Pos.Z);
buffer[16] := Lo(Item.Count);
SendPacket(PID, @buffer, TRUE, FALSE);
end;
Function FindPlayerByID(TPlayer:TChar) : TChar;
var
Current: Integer;
begin
Result.Found:=False;
for Current := 0 to BL_Max do
begin
if ( ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_ID) = TPlayer.ID ) then
begin
Result.X := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_X);
Result.Y := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Y);
Result.Z := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Z);
Result.ID := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_ID);
Result.Speed := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Speed);
Result.Moving := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Moving);
Result.Dir := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Dir);
Result.Outfit := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Outfit);
Result.Head := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Head);
Result.Body := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Body);
Result.Legs := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Legs);
Result.Feet := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Feet);
Result.Addon := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Addon);
Result.Light := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Light);
Result.Light_Color := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Light_Color);
Result.HPBar := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_HPBar);
Result.Visible := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Visible);
Result.Skull := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Skull);
Result.Party := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Party);
Result.Name := ReadMemStr(BattleList_Start+(Current*BL_Size)+BL_Dist_Name);
Result.BL := Current;
Result.Found := True;
exit;
end;
end;
end;
Function FindPlayerByName(TPlayer:TChar) : TChar;
var
Current: Integer;
begin
Result.Found:=False;
for Current := 0 to BL_Max do
begin
if ( ReadMemStr(BattleList_Start+(Current*BL_Size)+BL_Dist_Name) = TPlayer.Name ) then
begin
Result.X := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_X);
Result.Y := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Y);
Result.Z := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Z);
Result.ID := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_ID);
Result.Speed := ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Speed);
Result.Moving := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Moving);
Result.Dir := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Dir);
Result.Outfit := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Outfit);
Result.Head := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Head);
Result.Body := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Body);
Result.Legs := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Legs);
Result.Feet := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Feet);
Result.Addon := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Addon);
Result.Light := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Light);
Result.Light_Color := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Light_Color);
Result.HPBar := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_HPBar);
Result.Visible := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Visible);
Result.Skull := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Skull);
Result.Party := ReadMemByte(BattleList_Start+(Current*BL_Size)+BL_Dist_Party);
Result.Name := ReadMemStr(BattleList_Start+(Current*BL_Size)+BL_Dist_Name);
Result.BL := Current;
Result.Found := True;
exit;
end;
end;
end;
Procedure Light(Strength:Byte; Color:Byte);
begin
WriteMemByte(BattleList_Start+(0*BL_Size)+BL_Dist_Light,Strength);
WriteMemByte(BattleList_Start+(0*BL_Size)+BL_Dist_Light_Color,Color);
end;
Procedure WhiteText(Text:String);
begin
WriteMemStr(Status_Text,Text);
WriteMemByte(Status_Time,50);
end;
Function FindItem(TIT:TItem): TItem;
var
CurrentBP:Integer;
CurrentItem: Integer;
CurrentSlot: Integer;
BPItemCount: Byte;
begin
Result.Found := False;
Result.ID := TIT.ID;
for CurrentBP := 0 to BP_Max do
begin
if ReadMemByte(BackPack_Start+(CurrentBP*BP_Size)+BP_Dist_Open)=1 then
begin
BPItemCount := ReadMemByte(BackPack_Start+(CurrentBP*BP_Size)+BP_Dist_Items);
for CurrentSlot := 0 to BPItemCount-1 do
begin
CurrentItem := ReadMemInt((BackPack_Start+(CurrentBP*BP_Size))+(CurrentSlot*BP_Item_Size)+60);
If CurrentItem = TIT.ID then
begin
Result.BP := CurrentBP;
Result.Slot := CurrentSlot;
Result.Count := ReadMemByte((BackPack_Start+(CurrentBP*BP_Size))+(CurrentSlot*BP_Item_Size)+64);
Result.Found := True;
exit;
end;
end;
end;
end;
end;
Procedure Attack(TPlayer:TChar);
begin
WriteMemInt(Target_ID,TPlayer.ID);
Packet_Target(TPlayer);
end;
Function GetHP: Integer;
begin
Result := ReadMemInt(Player_HP);
end;
Function GetMP: Integer;
begin
Result :=ReadMemInt(Player_MP);
end;
Procedure Namespy(Enabled:Boolean);
begin
if Enabled then
begin
WriteMemBytes(Namespy_1, Nop, 2);
WriteMemBytes(Namespy_2, Nop, 2);
end
else
begin
WriteMemBytes(Namespy_1, Namespy_1_Default, 2);
WriteMemBytes(Namespy_2, Namespy_2_Default, 2);
end;
end;
Procedure LevelSpyToggle(Player:TChar; Enabled:Boolean);
begin
if Enabled then
begin
WriteMemBytes(Levelspy_Nop,Nop,2);
if Player.Z <= 7 then
begin
WriteMemBytes(Levelspy_Above, 7-Player.Z,1);
WriteMemBytes(Levelspy_Below, Levelspy_Below_Default,1);
end
else
begin
WriteMemBytes(Levelspy_Above, Levelspy_Above_Default,1);
WriteMemBytes(Levelspy_Below, Levelspy_Below_Default,1);
end;
Levelspied:=True;
end
else
begin
WriteMemBytes(Levelspy_Nop,Levelspy_Nop_Default,2);
WriteMemByte(Levelspy_Above,Levelspy_Above_Default);
WriteMemByte(Levelspy_Below,Levelspy_Below_Default);
Levelspied:=False;
end;
end;
Procedure LevelSpy(Player:TChar; Up:Boolean);
var
GLevel, CLevel: Integer;
begin
If Up then
begin
If Player.Z <= 7 then GLevel:=LevelSpy_Above else GLevel:=LevelSpy_Below;
CLevel:=ReadMemByte(GLevel);
if CLevel >= Levelspy_Max then WriteMemByte(GLevel, Levelspy_Min) else WriteMemByte(GLevel, CLevel+1);
end
else
begin
If Player.Z <= 7 then GLevel:=LevelSpy_Above else GLevel:=LevelSpy_Below;
CLevel:=ReadMemByte(GLevel);
if CLevel <= Levelspy_Min then WriteMemByte(GLevel, Levelspy_Max) else WriteMemByte(GLevel, CLevel-1);
end;
end;
function Exp: Integer;
var
Level:Integer;
TTNL:Extended;
Tibia: hwnd;
TXP:Integer;
begin
TXP:=ReadMemInt(Player_XP);
Level:=ReadMemInt(Player_LVL);
TTNL:= (50 * (Level+1) * ((Level+1) * ((Level+1) / 3 - 2) + 17 / 3) - 200);
Result:=Round( TTNL-TXP );
Tibia:= FindWindow('TibiaClient',nil);
SetWindowText(tibia,pchar('ClassicaBot| Your Lv: '+inttostr(ReadMemInt(player_lvl))+ ' Exp Left: '+inttostr(Result)));
end;
function GetStatus: TStatus;
var
Status:Integer;
begin
Status:=ReadMemInt(Player_Status);
if Status >= 128 then
begin
Result.Battle:=True;
Status:=Status-128;
end;
if Status >= 64 then
begin
Result.Haste:=True;
Status:=Status-64;
end;
if Status >= 32 then
begin
Result.Paralyze:=True;
Status:=Status-32;
end;
if Status >= 16 then
begin
Result.MShield:=True;
Status:=Status-16;
end;
if Status >= 8 then
begin
Result.Drunk:=True;
Status:=Status-8;
end;
if Status >= 4 then
begin
Result.Energy:=True;
Status:=Status-4;
end;
if Status >= 2 then
begin
Result.Fire:=True;
Status:=Status-2;
end;
if Status >= 1 then
begin
Result.Poison:=True;
end;
end;
function HealParty(Health:Integer; UH:TItem):String;
var
Friend: TChar;
Current: Integer;
begin
Result:='';
for Current := 0 to BL_Max do
begin
if ( ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Party) > 2 ) then
begin
if ( ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_Visible) = 1 ) then
begin
if (ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_HPBar) < Health ) then
begin
Friend.ID:=ReadMemInt(BattleList_Start+(Current*BL_Size)+BL_Dist_ID);
Friend:=FindPlayerByID(Friend);
Packet_Shoot_Rune(UH,Friend);
Result:=Friend.Name;
exit;
end;
end;
end;
end;
end;
Function Map_GetAdr: Integer;
begin
Result:= ReadMemInt(Map_Pointer);
end;
Function Map_GetPlayerTile(MapStart:Integer;TPlayer:TChar): Integer;
var
CurrentTile,x:Integer;
begin
for CurrentTile := 0 to Map_Max do
begin
if ReadMemInt((MapStart+(CurrentTile*Map_Size))+Map_Dist_Count) > 1 then
begin
for x:= 0 to 10 do
begin
if (ReadMemInt((MapStart+(CurrentTile*Map_Size)+Map_Dist_TileID)+(x*Map_Dist_Item)+Map_Dist_ItemID)=99) then
begin
if(ReadMemInt((MapStart+(CurrentTile*Map_Size)+Map_Dist_TileID)+(x*Map_Dist_Item)+Map_Dist_ItemData)=TPlayer.ID) then
begin
Result:=CurrentTile;
exit;
end;
end;
end;
end;
end;
end;
Function Map_GetZ(Tile:Integer):Integer;
var
TVal:Extended;
begin
TVal:=Tile/(14*18);
Result:=trunc(TVal);
end;
Function Map_GetY(Tile:Integer):Integer;
var
TVal:Extended;
begin
TVal:=(Tile-Map_GetZ(Tile)*14*18)/18;
Result:=trunc(TVal);
end;
Function Map_GetX(Tile:Integer):Integer;
var
TVal:Extended;
begin
TVal:=(Tile-Map_GetZ(Tile)*14*18-Map_GetY(Tile)*18);
Result:=trunc(TVal);
end;
Function Map_GetXYZ(Tile:Integer):TPos;
begin
Result.X:=Map_GetX(Tile);
Result.Y:=Map_GetY(Tile);
Result.Z:=Map_GetZ(Tile);
end;
Function Map_AddX(TTile:TPos;Value:Integer):TPos;
var
TVar:Integer;
begin
Result:=TTile;
Result.X:=TTile.X+Value;
if (Result.X >= 0) and (Result.X <= 17) then
begin
Exit;
end
else
if Result.X < 0 then
begin
TVar:=0-Result.X;
Result.X:=18-TVar;
end
else
begin
TVar:=Result.X-17;
Result.X:=-1+TVar;
end;
end;
Function Map_AddY(TTile:TPos;Value:Integer):TPos;
var
TVar:Integer;
begin
Result:=TTile;
Result.Y:=TTile.Y+Value;
if (Result.Y >= 0) and (Result.Y <= 13) then
begin
Exit;
end
else
if Result.Y < 0 then
begin
TVar:=0-Result.Y;
Result.Y:=14-TVar;
end
else
begin
TVar:=Result.Y-13;
Result.Y:=-1+TVar;
end;
end;
function Map_NewTileNr(TTile:TPos):TPos;
begin
Result.Tile:=TTile.X+(TTile.Z*14*18)+(TTile.Y*18);
end;
Function Map_GetTileID(MapStart:Integer; Pos:TPos):TPos;
begin
Result.Tile:=ReadMemInt(MapStart+(Pos.Tile*Map_Size)+Map_Dist_TileID);
end;
procedure ChangeIP(IP:String);
var
Current: Integer;
oldp: cardinal;
begin
VirtualProtectEx(IDProcess,Ptr(RsaAdr),Length(RSA),PAGE_EXECUTE_READWRITE,oldp);
// WriteMemStr(RsaAdr,RSA+#0);
WriteMemStr(IPFirst,IP+#0);
WriteMemStr(IPFirst1,IP+#0);
WriteMemStr(IPFirst2,IP+#0);
WriteMemStr(IPFirst3,IP+#0);
end;
end.
Pe Es. Zapiszcie jako Tibia.pas wrzucie do folderu z błotem :) i dodajcie tibia do uses
Dobra wszystko już mam i działa .Działa nawet MemWriteInteger,normalnie mi zapisuje nowy level itp.Ale jak chce nadpisać sobie światło lub outfit i pisze coś takiego:
To nie ma żadnego erroru ani nic ale nie działa.. Próbowałem też pisać zamiast 168 160 ale nic z tego.Kod PHP:MemWriteInteger(battlelist_start+pozycja*168+distance_lightcolor,250,3); MemWriteInteger(battlelist_start+pozycja*168+distance_light,15,2);
A mója battle lista wygląda tak:
Kod PHP:function pozycja:integer; var i,id_battle,id:integer; begin id:=readMemInteger(Player_ID); for i:=1 to 250 do begin id_battle:=readMemInteger(Battlelist_Start + (i*168)); if id_battle=ID then begin Result :=i; exit; end; end; end;
Prosze o pomoc
@Up
od 8.54
Cytuj:
0xA8 = 168 - 8.5+?
0xA4 = 164 - 8.4?
0xA0 = 160 - to juz chyba 8.1
No fajnie 168 jest pod 8.54,ale nawet jak tak wpisuje to nie działa..