Advertisement
Guest User

Untitled

a guest
May 29th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.43 KB | None | 0 0
  1. Procedure FishCount;
  2. var
  3.   DontCount : TIntegerArray;
  4.   i, j : Integer;
  5. begin
  6.   SetLength(DontCount, Length(GearArray));
  7.   DontCount := GearArray;
  8.   for i := 1 to 5 do
  9.   begin
  10.     for j := 1 to 28 do
  11.     begin
  12.     Writeln('Looking in slot #'+ToStr(j));
  13.     if not(InIntArray(DontCount, GetItemIDAt(i)))then
  14.     begin
  15.       Writeln('ID was not in array, checking case #'+ToStr(i));
  16.       case i of
  17.       1:
  18.       begin
  19.         Sardines := Sardines + R_CountItemID(SardineID);
  20.         SetLength(DontCount, (Length(DontCount) + 1));
  21.         DontCount[Length(DontCount)-1] := SardineID;
  22.       end;
  23.       2:
  24.       begin
  25.         Herring := Herring + R_CountItemID(HerringID);
  26.         SetLength(DontCount, (Length(DontCount) + 1));
  27.         DontCount[Length(DontCount)-1] := HerringID;
  28.       end;
  29.       3:
  30.       begin
  31.         Tuna := Tuna + R_CountItemID(TunaID);
  32.         SetLength(DontCount, (Length(DontCount) + 1));
  33.         DontCount[Length(DontCount)-1] := TunaID;
  34.       end;
  35.       4:
  36.       begin
  37.         Swords := Swords + R_CountItemID(SwordsID);
  38.         SetLength(DontCount, (Length(DontCount) + 1));
  39.         DontCount[Length(DontCount)-1] := SwordsID;
  40.       end;
  41.       5:
  42.       begin
  43.         Lobsters := Lobsters + R_CountItemID(LobstersID);
  44.         SetLength(DontCount, (Length(DontCount) + 1));
  45.         DontCount[Length(DontCount)-1] := LobstersID;
  46.       end;
  47.       end;
  48.     Break;
  49.     end;
  50.     end;
  51.   end;
  52. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement