Code: Select all
20:57:12:452 [duper1]: Out Of Range at 45.1038
20:57:12:465 [duper1]: Script mining.sc stopped successfuly
Code: Select all
function DeliveryBank(x,y : Word):integer;
var
bankposx, bankposy : integer;
bankIdTemp, Bank, CurIngot : Cardinal;
i, CurIndex : shortInt;
oreType : array of Word;
var ore: TStringList;
begin
oreType := [$19B7,$19BA,$19B9,$19B8];
bankIdTemp := bankId;
NewMoveXY(GetX(bankIdTemp),GetY(bankIdTemp),false,1,true);
UseObject(bankIdTemp);
Bank:=ObjAtLayer(BankLayer);
if Bank <> 0 then begin
for i:=0 to Length(oreType) - 1 do
if (FindType(oreType[i], Backpack) > 0) then begin
try
ore := TStringList.Create;
if GetFindedList(ore) = False then begin
Result := 0;
end else begin
CurIndex := 0;
while CurIndex < FindCount do begin
if Dead or not Connected then Exit;
uosay(inttostr(FindCount));
CurIngot := StrToInt('$' + ore.Strings[CurIndex]);
if MoveItem(CurIngot, GetQuantity(CurIngot), Bank, $FFFF, $FFFF, 0) then inc(curIndex);
wait(2000);
end;
end;
finally
ore.free;
end;
end;
end;
NewMoveXY(x,y,false,1,true);
result := 0;
end;