не работает функция рекола
Posted: 13.11.2014 13:17
Помогите пож-та, не работает рекол по рунбуке, я так подозреваю, что он тут не может взять Id gump рунбуки, пишет "Руна не найдена", хотя все остальные переменные заданы и руны там есть. Вот собственно функция рекола
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;