MakingPaint
2013-02-22 15:20:25
So I've been watching tutorials and decided to try to script for a Disney Channel game called "Bueno Rufus". The link to the game is here:
http://disney.go.com/disneychannel/games/bueno-rufus-1966338
The problem that I am having is that when the script detects, for example, ice cream under the chocolate squirter, the script goes frantic and constantly clicks the squirter, which causes it to squirt things other than ice cream, causing the score to be lowered. Yes, I realize this happens because the script clicks as many times as it can in the very short amount of time that the ice cream is below the squirter due to the "repeat". But this repeat has to be there, so how do I get it to click only once? Please help!
This is my script so far:
program Rufus;
procedure Squirt;
var
x, y:Integer;
begin
repeat
If FindColorSpiral(x, y, 10066431, 371, 342, 431, 367) then
begin
MoveMouse(393, 213);
ClickMouse(393, 213, 1);
end;
until(false)
end;
procedure StartGame;
begin
ActivateClient;
MoveMouse(534, 346);
ClickMouse(534,346, 1);
Wait(750);
ClickMouse(534, 346, 1);
end;
begin
Startgame;
Squirt;
end.
http://disney.go.com/disneychannel/games/bueno-rufus-1966338
The problem that I am having is that when the script detects, for example, ice cream under the chocolate squirter, the script goes frantic and constantly clicks the squirter, which causes it to squirt things other than ice cream, causing the score to be lowered. Yes, I realize this happens because the script clicks as many times as it can in the very short amount of time that the ice cream is below the squirter due to the "repeat". But this repeat has to be there, so how do I get it to click only once? Please help!
This is my script so far:
program Rufus;
procedure Squirt;
var
x, y:Integer;
begin
repeat
If FindColorSpiral(x, y, 10066431, 371, 342, 431, 367) then
begin
MoveMouse(393, 213);
ClickMouse(393, 213, 1);
end;
until(false)
end;
procedure StartGame;
begin
ActivateClient;
MoveMouse(534, 346);
ClickMouse(534,346, 1);
Wait(750);
ClickMouse(534, 346, 1);
end;
begin
Startgame;
Squirt;
end.