Const
// Boots to use if LESS then Min_Health //
Min_Health = 1200
SoftBoots_ID = 0
SoftBoots_InUse_ID = 0
// Boots to use if you have MORE then Max_Health //
Max_Health = 1201
Boh_ID = 0 // Can be any boots not only boh...
function GetItemFromOpenBackpack(ID: integer): TItem;
var
y: integer;
begin
Result := nil;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].ID = ID then
begin
Result := Self.Containers.Container[x].Item[y];
Exit;
end;
end;
end;
end;
if Max_Health <= Min_Health then
begin
Self.DisplayText('Min health higher then max health? lol noob');
A := 1;
end;
else A := 0;
while not terminated do
begin
if A then break;
UpdateWorld;
if Self.health <= Min_Health then
begin
if Self.Feet.ID <> SoftBoots_InUse_ID then
begin
Boots := GetItemFromOpenBackpack(SoftBoots_ID);
if Boots <> nil then
Boots.MoveToBody(Self.Feet,0);
else Self.Displaytext('Boots werent found in open backpack!');
end;
end;
if Self.Health >= Max_Health then
begin
if Self.Feet.ID <> Boh_ID then
begin
Boots := GetItemFromOpenBackpack(Boh_ID);
if Boots <> nil then
Boots.MoveToBody(Self.Feet,0);
else Self.Displaytext('Boots werent found in open backpack!');
end;
end;
Sleep(500);
end;
Zakładki