Owinger
2014-12-09 22:37:40
I'm brand new to scripting with Simba, so I decided to watch a scripting tutorial video. I found a tutorial by YoHoJo and it teaches you how to make a script for the flash game Save Them Goldfish! I followed instructions and double-checked the code and it doesn't seem to work like it does in the video.
Whenever I run the script, it starts the game and then it tries to grab the fish and drop it in the fishbowl. However, whenever it moves the mouse to try and grab the fish, the fish has already moved out of the x, y coordinates. The mouse is always a split second behind the fish.
Any idea on what I'm doing wrong?
Whenever I run the script, it starts the game and then it tries to grab the fish and drop it in the fishbowl. However, whenever it moves the mouse to try and grab the fish, the fish has already moved out of the x, y coordinates. The mouse is always a split second behind the fish.
Any idea on what I'm doing wrong?
program SaveThemGoldfish;
procedure StartGame;
begin
MoveMouse(234, 354);
ClickMouse(234, 354, 1);
Wait(1000);
MoveMouse(382, 321);
ClickMouse(382, 321, 1);
Wait(1000);
MoveMouse(338, 162);
ClickMouse(338, 162, 1);
end;
procedure SaveFish;
var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 1471228, 16, 51, 256, 226, 20) or
FindColorSpiralTolerance(x, y, 172287, 16, 51, 256, 226, 20) or
FindColorSpiralTolerance(x, y, 886525, 16, 51, 256, 226, 20) or
FindColorSpiralTolerance(x, y, 690943, 16, 51, 256, 226, 20) then
begin
MoveMouse(x, y);
HoldMouse(x, y, 1);
MoveMouse(322, 84);
ReleaseMouse(322, 84, 1);
end;
end;
begin
StartGame;
Repeat
SaveFish;
until(false);
end.