Code: Select all
procedure GetBODInfo;
var
GumpInfo:TGumpInfo;
Exep,Text:String;
CountOfString:Byte;
begin
if Dead or not Connected then Exit;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
UseObject(BOD);
Wait(WaitTime);
CheckLag(WaitLag);
If GetGumpID(GetGumpsCount-1)<>$5AFBD742 then GetBODInfo;
GetGumpInfo(GetGumpsCount-1, gumpInfo);
CountOfString:=Length(gumpInfo.XmfHTMLGumpColor);
if CountOfString = 0 then GetBODInfo;
Amount:=StrToInt(gumpInfo.Text[gumpInfo.GumpText[0].text_id]); //131 строка
Count:=StrToInt(gumpInfo.Text[gumpInfo.GumpText[1].text_id]);
Amount:=Amount-Count;
Item:=GetClilocById(gumpInfo.XmfHTMLGumpColor[4].Cliloc_id);
if (Amount=0) then begin
MoveItem(BOD,1,BulkDestination,0,0,0);
Wait(WaitTime);
CheckLag(WaitLag);
while IsGump do CloseSimpleGump(GetGumpsCount-1);
AddToSystemJournal('Бод '+Item+' выполнен');
SalvageItems;
SearchBOD;
end;
AddToSystemJournal('Надо сделать '+IntToStr(Amount)+' '+Item);
Exep:=GetClilocById(gumpInfo.XmfHTMLGumpColor[6].Cliloc_id);
If Exep='All items must be exceptional.' then Exceptional:=True;
if CountOfString>7 then begin
Text:=GetClilocById(gumpInfo.XmfHTMLGumpColor[7].Cliloc_id);
If Text='All items must be made with spined leather.' then Spined:=True;
Text:=GetClilocById(gumpInfo.XmfHTMLGumpColor[7].Cliloc_id);
If Text='All items must be made with horned leather.' then Horned:=True;
Text:=GetClilocById(gumpInfo.XmfHTMLGumpColor[7].Cliloc_id);
If Text='All items must be made with barbed leather.' then Barbed:=True;
end;
While IsGump do CloseSimpleGump(GetGumpsCount-1);
Wait(250);
end;
что не так?