Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 2.29 KB | None | 0 0
  1. function Slaughter: boolean; //Player kills innocent cows.{Modified from Harri's Karamja Fisher}
  2. var
  3.   Colors: array of integer;
  4.   Cow, Calf: TNPC;
  5.   Cows, Calves: TNPCArray;
  6.   P: TPoint;
  7.   KillCowTime, srch, FindFail: Integer;
  8. begin
  9.   if not LoggedIn then Exit;
  10.   R_FindRandoms;
  11.   if (TimeFromMark(KillCowTime) > 30000)then
  12.     WalkPath([Tile(3161, 3321)]);
  13.   if (TimeFromMark(KillCowTime) > 120000) then
  14.     ColorSlaughter;
  15.   MakeCompass('North');
  16.   SetAngle(True);
  17.   Wait(100+Random(30));
  18.   SetRun(True);
  19.   Calves := SortNPCs(GetNPCs('Calf'));
  20.   Writeln('0');
  21.   Cows := SortNPCs(GetNPCs('Cow'));
  22.   Writeln('1');
  23.   if Calf.Fighting or Cow.Fighting then Exit;
  24.   Writeln('2');
  25.   for srch := 0 to 3 do
  26.   begin
  27.     Writeln('3');
  28.     try P := TileToMS(Cows[0].Tile, 20);
  29.       except
  30.         begin
  31.           try P := TileToMS(Calves[0].Tile, 20);
  32.             except begin Writeln('Failed to find cows!'); Exit; end;
  33.           end;
  34.           Writeln('4c');
  35.           Mouse(P.X, P.Y, 10, 10, False)
  36.           Result := r_WaitOption('tac', 1000);
  37.           if (not Result) then
  38.           begin
  39.             r_WaitOption('ancel', 500);
  40.             Inc(FindFail);
  41.           end else
  42.           begin
  43.             if (R_FlagExists) then
  44.               R_Flag;
  45.             MarkTime(KillCowTime);
  46.             repeat
  47.               R_FindRandoms;
  48.               Wait(200+Random(300));
  49.               if hInvFull then Bill;
  50.             until (not AreWeInteracting(Calf)) or (TimeFromMark(KillCowTime) > 30000);
  51.             IncEx(Deaded, 1);
  52.             if (not LoggedIn) or LobbyScreen then Exit;
  53.             GetLoot;
  54.             if hInvFull then Bill;
  55.           end;
  56.         end;
  57.     Mouse(P.X, P.Y, 10, 10, False);
  58.     Writeln('4b');
  59.     Result := r_WaitOption('tac', 1000);
  60.     if (not Result) then
  61.     begin
  62.       r_WaitOption('ancel', 500);
  63.       Inc(FindFail);
  64.     end else
  65.     begin
  66.       if (R_FlagExists) then
  67.         R_Flag;
  68.       MarkTime(KillCowTime);
  69.       repeat
  70.         R_FindRandoms;
  71.         Wait(200+Random(300));
  72.         if hInvFull then Bill;
  73.       until (not AreWeInteracting(Cow)) or (TimeFromMark(KillCowTime) > 30000);
  74.       IncEx(Deaded, 1);
  75.       if (not LoggedIn) or LobbyScreen then Exit;
  76.       GetLoot;
  77.       if hInvFull then Bill;
  78.     end;
  79.   end;
  80.   end;
  81. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement