Code:
program MonkeyGame;
procedure SelectingMonkey; // Uses colorfind to Locate a monkey in the queue.
var x, y: integer;
Begin;
if findcolor (x, y, 2913210, 281, 363, 303, 455) then // Finds monkey in queue
Begin
MoveMouse (x, y);
ClickMouse (x, y, 1); // moves mouse to bear and selects him.
end;
end;
Procedure SelectingTable;
var x, y: integer;
Begin;
if findcolor (x, y, 7066362, 729, 358, 738, 401) then // searches for the brown colour on the furthest away stool that
// is vissible when the monkey isnt sitting there (ie when the seat is vacant)
Begin;
MoveMouse (645, 223);
ClickMouse (645, 223, 1);//if the seat is vacant, the stool is selected.
end
else if not findcolor (x, y, 7066362, 729, 358, 738, 401) then //if not vaccant then...
if findcolor (x, y, 9232379, 595, 454, 603, 486) then
Begin; //same description as above but for each stool.
MoveMouse (x, y);
ClickMouse (x, y, 1);
End
else if not findcolor (x, y, 9232379, 595, 454, 603, 486) then
if findcolor (x, y, 5880557, 459, 565, 472, 593) then
Begin;
MoveMouse (x, y);
ClickMouse (x, y, 1);
End;
if not findcolor (x, y, 5880557, 459, 565, 472, 593)then
SelectingTable; // if no free seat is found, then the procedure is repeated.
End;
begin;
Repeat
SelectingMonkey;
wait (500); //This should look for a monkey in the queue untill a monkey shows up.
SelectingTable; //and then takes it to a table.
until (True)
repeat
SelectingMonkey; // This should carry out the two procedures but the Selectingtables
wait(500) // seems to do nothing.
SelectingTable;
until (false);
end.