newguy45
2015-03-30 10:22:04
So my simba coding skills are obviously terrible but I tried many things to make this script work, in the end I used coordinates and colors lots of work will need to be done if you want to be able to use this but here it is none the less
program SetSail;
var
glitchCount: Integer;
procedure Fuel;
var X, Y: Integer;
begin
if(FindColor(X,Y, 10975533,910, 508, 992, 538))then
begin
writeln('found Depart Button 1');
MoveMouse(665, 515);
wait(200);
ClickMouse(665, 515, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 1');
end;
wait(1000);
if(FindColor(X,Y, 11304237,909, 558, 988, 596))then
begin
writeln('found Depart Button 2');
MoveMouse(619, 571);
wait(200);
ClickMouse(619, 571, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 2');
end;
wait(1000);
if(FindColor(X,Y, 11501100,910, 611, 988, 647))then
begin
writeln('found Depart Button 3');
MoveMouse(611, 628);
wait(200);
ClickMouse(611, 628, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 3');
end;
wait(1000);
if(FindColor(X,Y, 11238444,910, 663, 991, 701))then
begin
writeln('found Depart Button 4');
MoveMouse(629, 686);
wait(200);
ClickMouse(629, 686, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 4');
end;
wait(1000);
if(FindColor(X,Y, 11303980,910, 721, 990, 753))then
begin
writeln('found Depart Button 5');
MoveMouse(583, 740);
wait(200);
ClickMouse(583, 740, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 5');
end;
wait(1000);
if(FindColor(X,Y, 10975788,910, 776, 990, 812))then
begin
writeln('found Depart Button 6');
MoveMouse(654, 793);
wait(200);
ClickMouse(654, 793, mouse_Left);
wait(1200);
MoveMouse(871, 340);
wait(400);
ClickMouse(871, 340, mouse_Left);
wait(400);
MoveMouse(952, 317);
wait(400);
ClickMouse(952, 317, mouse_Left);
end else
begin
writeln('Did not find Depart Button 6');
end;
end;
procedure Madness;
var X, Y: Integer;
begin
wait(600);
MoveMouse(651, 843); //click send ships
wait(400);
ClickMouse(651, 843, mouse_Left);
wait(4000);
if(FindColor(X,Y, 10384430,611, 286, 739, 591))then
begin
writeln('found Hide Button');
MoveMouse(X, Y);
writeln('mouse on hide');
wait(5000);
ClickMouse(X, Y, mouse_Left);
wait(180000);
MoveMouse(580, 332); //click routes
writeln('mouse off hide');
wait(400);
ClickMouse(580, 332, mouse_Left);
wait(3000);
end else
begin
writeln('No ships avalible, checking again in three mins');
wait(180000);
MoveMouse(580, 332); //click routes
wait(400);
ClickMouse(580, 332, mouse_Left);
wait(1000);
end;
end;
procedure glitchCheck;
var X, Y: Integer;
begin
if not(FindColor(X,Y, 9207392,342, 469, 418, 490))then
begin
Inc(glitchCount);
wait(1000);
MoveMouse(580, 332); //click routes
wait(400);
ClickMouse(580, 332, mouse_Left);
if(glitchCount <= 1)then
begin
writeln('fixed '+ IntToStr(glitchCount) +' glitch');
end else
begin
writeln('fixed '+ IntToStr(glitchCount) +' glitches');
end;
wait(15000);
end else
writeln('No glitch');
end;
begin
repeat
wait(2000);
Fuel;
wait(2000);
Madness;
glitchCheck;
until( false );
end.