Code: Select all
Program FishingYew;
Const 
   Meshok = $4001655E; 
   Udochka = $0DBF;
   Nozhik = $0F51;
var
   count:Integer;
Procedure Fishing;
var   
   Riba:array[1..8] of Cardinal; 
   i:Integer;
   Label start;
Begin
WaitGump('0001');
uosay('boxkeeperbox');
wait(1000);
UseObject(Meshok);
start:
if weight<=320 then
 begin
   if not Hidden then
   begin
      Repeat
         if (WarMode = true) then
         begin
            SetWarMode(false);
         end;
         useskill('Hiding');
         wait(3000);
      Until Hidden;
   end;
   UseObject(Udochka);
   if targetpresent then
   begin
      TargetToTile(6044,633,806,251);
      wait(4000);
   end;
 end
Else
 begin
   count := 0;
   FindType($09CD,backpack);
   count := FindCount;
   FindType($09CC,backpack);
   count := count+FindCount;
   FindType($09CF,backpack);
   count := count+FindCount;
   FindType($09CE,backpack);
   count := count+FindCount;
   if count < 5 then
   begin
      wait(1000)
      if targetpresent then
      begin
         canceltarget;
      end;
      FindType($097A,backpack);
      if FindCount>0 then
      begin
         repeat
	    MoveItem(finditem, 1, Meshok, 0, 0, 0);
	    wait(500);
	    FindType($097A,backpack);
         until FindCount = 0;
      end;
      goto start;
   end;
   Riba[1] := $09CC;
   Riba[2] := $09CD;
   Riba[3] := $09CF;
   Riba[4] := $09CE;
   Riba[5] := $09CC;
   Riba[6] := $09CD;
   Riba[7] := $09CF;
   Riba[8] := $09CE;
   for i:=1 to 8 do 
   begin 
      FindType(Riba[i],backpack); 
      if FindCount>0 then 
      begin
         UseObject(Nozhik);
         if targetpresent then
         begin
             TargetToObject(Riba[i])
         end;
         wait(2000);
      end;
   end;
end;
end;
End.
