Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const
- SmallStoneID = 3436
- 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.RightHand.ID <> SmallStoneID then
- begin
- Weapon := GetItemFromOpenBackpack(SmallStoneID);
- if Weapon <> nil then
- begin
- Weapon.MoveToBody(Self.RightHand,0);
- Sleep(1000);
- end;
- else
- begin
- if Self.RightHand.ID <> BackupWeaponID then
- begin
- Weapon := GetItemFromOpenBackpack(BackupWeaponID);
- if Weapon <> nil then
- begin
- Weapon.MoveToBody(Self.RightHand,0);
- Sleep(1000);
- end;
- end;
- Self.DisplayText('Small Stones not found, Backup Weapon equipped instead!')
- end;
- end;
- Sleep(500);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement