juliea
2013-11-19 20:24:44
I made this simple fighting script for a flash game.It is a side scroller game,all the monsters are to the right.When you are close enough to them an instance is triggered and you automatically fight them.
This script was suppose to click to the right(walker procedure),Stop clicking if instant load(load procedure)and comfirm that the battle is over(end battle procedure).The 'walker' and the 'endbattle' procedure works 100% but the 'load' procedure don't the script keeps clicking to the right during the battle it only stop to confirm 'endbattle'.I think it is my repeat part that is wrong. Here is the script.Sorry for my noobiness.
btw I watched yohoo video tutorial to make this.
This script was suppose to click to the right(walker procedure),Stop clicking if instant load(load procedure)and comfirm that the battle is over(end battle procedure).The 'walker' and the 'endbattle' procedure works 100% but the 'load' procedure don't the script keeps clicking to the right during the battle it only stop to confirm 'endbattle'.I think it is my repeat part that is wrong. Here is the script.Sorry for my noobiness.
program ninja;
var
x, y:integer;
procedure walker;
begin
Movemouse(928, 576);
wait(500);
clickmouse(928, 576, 1);
wait(500);
releasemouse(x, y, 1);
wait(1000);
end
procedure load;
begin
if findcolorspiraltolerance(x, y, 5461071, 596, 701, 656, 701, 1) then
releasemouse(x, y, 1);
end
procedure endbattle;
begin
if findcolorspiraltolerance(x, y, 8328, 454, 306, 791, 539, 1) then
Movemouse(x, y);
clickmouse(x, y, 1);
wait(500);
releasemouse(x, y, 1);
end
begin
repeat
walker;
load;
endbattle;
until(false);
end. btw I watched yohoo video tutorial to make this.