Code: Select all
function Recall(RB : Cardinal; N:Integer):boolean;
var
Num : Integer;
Serial : Integer;
begin
if N < 1 then
N:=1;
Serial := 0;
repeat
if not (Serial = 0) then CloseSimpleGump(Serial);
UseObject(RB);
CheckConnect;
wait(3000);
GetGumpSerial(Serial);
until (GetGumpsCount > 0)
Num := GetRuneId();
if Num > 0 then
begin
waitGump(IntToStr(Num+(N-1)));
wait(5000);
result := true;
end
else
begin
addtosystemjournal('Руна не найдена :(');
result := false;
end;
end;