Puxar small stone para mão.

Const
SmallStoneID = 1781
BackupWeaponID = 3277

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;

begin
while not Terminated do
begin
UpdateWorld;
if Self.LeftHand.ID <> SmallStoneID then
begin
Weapon := GetItemFromOpenBackpack(SmallStoneID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
else
begin
if Self.LeftHand.ID <> BackupWeaponID then
begin
Weapon := GetItemFromOpenBackpack(BackupWeaponID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
end;
Self.DisplayText('Small Stones not found, Backup Weapon equipped instead!')
end;
end;
Sleep(500);
end;
end;

Pesquisar no site

By Chuck Norriz © 2009 Todos os direitos reservados.