
{$Include 'grab.inc'}
Code: Select all
procedure grab(Stype : word);
begin
Finddistance := 2;
findtype(Stype,backpack);
if getquantity(finditem) < 50 then
begin
if getquantity(findtype(Stype,ground)) > 0 then
begin
grab(finditem,500);
wait(1000)
else;
begin
SetARStatus(false);
Disconnect;
end;
end;
wait(1000);
end;
end;
Code: Select all
procedure checkweapon(weapon : word);
Begin
Finddistance := 2;
if (getquantity(findtype(weapon,ground)) > 0) and (ObjAtLayer(RhandLayer) <= 0) then Equip(RhandLayer,finditem);
if getquantity(findtype(weapon,ground)) <= 0 then
begin
SetARStatus(false);
Disconnect;
end;
Wait(2000);
End;