procedure WalkToShop;
var rx,ry, count,x1,y1,x2,y2: integer;
begin
if not(loggedin) then LoginPlayer;
case Players[CurrentPlayer].Loc of
'havethecash': begin //Inside the bank ready to go
RoadColor := FindFallyRoadColor;
Path[0].Mainpoint.x:=605;
Path[0].Mainpoint.y:=118;
Path[0].Subpoints[0].x:=593;
Path[0].Subpoints[0].y:=82;
Path[0].Subpoints[1].x:=593;
Path[0].Subpoints[1].y:=96;
Path[0].Subpoints[2].x:=601;
Path[0].Subpoints[2].y:=106;
Path[0].Subpoints[3].x:=605;
Path[0].Subpoints[3].y:=118;
Path[0].Subpoints[4].x:=613;
Path[0].Subpoints[4].y:=144;
Path[0].Subpoints[5].x:=619;
Path[0].Subpoints[5].y:=134;
Path[0].Subpoints[6].x:=599;
Path[0].Subpoints[6].y:=104;
Path[0].Subpoints[7].x:=606;
Path[0].Subpoints[7].y:=118;
Path[0].Subpoints[8].x:=611;
Path[0].Subpoints[8].y:=139;
if not WalkPath(0) then
begin
writeln('used rad in havethecash');
if not RadialRoadWalk(FindFallyRoadColor, 200, 260, 70, 2, 2) then
begin
if not RadialRoadWalk(FindFallyRoadColor, 190, 270, 70, 2, 2) then
begin
if not RadialRoadWalk(FindFallyRoadColor, 190, 270, 70, 2, 2) then
begin
if (UseCoords) then
begin
mouse(595,132,5,5,true);
writeln('used coord in havethecash');
FFlag(3);
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := '2pos';
end;
'2pos': begin //located at First click outside the bank, start of Guild mine (which is to the east)
RoadColor := FindFallyRoadColor;
if not RadialRoadWalk(RoadColor, 170, 190, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 165, 200, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 160, 205, 75, 2, 2) then
begin
if (UseCoords) then
begin
mouse(615,140,5,5,true);
FFlag(3);
writeln('used coord in 2pos');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'endoffally';
end;
'endoffally': begin //In between the two walls, right where road color switches
RoadColor := FindFallyRoadColor;
Path[3].Mainpoint.x:=630;
Path[3].Mainpoint.y:=109;
Path[3].Subpoints[0].x:=625;
Path[3].Subpoints[0].y:=94;
Path[3].Subpoints[1].x:=625;
Path[3].Subpoints[1].y:=101;
Path[3].Subpoints[2].x:=614;
Path[3].Subpoints[2].y:=117;
Path[3].Subpoints[3].x:=637;
Path[3].Subpoints[3].y:=112;
Path[3].Subpoints[4].x:=642;
Path[3].Subpoints[4].y:=118;
Path[3].Subpoints[5].x:=625;
Path[3].Subpoints[5].y:=97;
if not WalkPath(3) then
begin
writeln('used rad in emdoffally');
if not RadialRoadWalk(RoadColor, 180, 205, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 170, 215, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 165, 220, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 155, 225, 70, 2, 2) then
begin
if (UseCoords) then
begin
mouse(626,155,5,5,true);
FFlag(3);
writeln('used coord in endoffally');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'firstroadclick';
end;
'firstroadclick': begin //(starts from) First click on the non-fally road
RoadColor := FindRoadColor;
Path[4].Mainpoint.x:=631;
Path[4].Mainpoint.y:=143;
Path[4].Subpoints[0].x:=636;
Path[4].Subpoints[0].y:=108;
Path[4].Subpoints[1].x:=636;
Path[4].Subpoints[1].y:=118;
Path[4].Subpoints[2].x:=632;
Path[4].Subpoints[2].y:=133;
Path[4].Subpoints[3].x:=632;
Path[4].Subpoints[3].y:=141;
Path[4].Subpoints[4].x:=630;
Path[4].Subpoints[4].y:=150;
Path[4].Subpoints[5].x:=634;
Path[4].Subpoints[5].y:=137;
Path[4].Subpoints[6].x:=633;
Path[4].Subpoints[6].y:=141;
Path[4].Subpoints[7].x:=636;
Path[4].Subpoints[7].y:=110;
if not WalkPath(4) then
begin
writeln('used rad in firstroadclick');
if not RadialRoadWalk(RoadColor, 160, 185, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 150, 195, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 70, 2, 2) then
begin
if (UseCoords) then
begin
mouse(610,145,5,5,true);
FFlag(3);
writeln('used coord in firstroadclick');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'roadclick2';
end;
'roadclick2': begin //starts after the 2nd click on the normal road
RoadColor := FindRoadColor;
Path[1].Mainpoint.x:=639;
Path[1].Mainpoint.y:=133;
Path[1].Subpoints[0].x:=632;
Path[1].Subpoints[0].y:=99;
Path[1].Subpoints[1].x:=628;
Path[1].Subpoints[1].y:=105;
Path[1].Subpoints[2].x:=627;
Path[1].Subpoints[2].y:=111;
Path[1].Subpoints[3].x:=627;
Path[1].Subpoints[3].y:=119;
Path[1].Subpoints[4].x:=638;
Path[1].Subpoints[4].y:=128;
Path[1].Subpoints[5].x:=642;
Path[1].Subpoints[5].y:=136;
Path[1].Subpoints[6].x:=648;
Path[1].Subpoints[6].y:=142;
if not WalkPath(1) then
begin
writeln('used rad in roadclick2');
if not RadialRoadWalk(RoadColor, 135, 155, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 125, 165, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 120, 170, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 115, 175, 70, 2, 2) then
begin
if (UseCoords) then
begin
mouse(626,148,5,5,true);
FFlag(3);
writeln('used coord in roadclick2');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'roadclick3';
end;
'roadclick3': begin //starts after the 3rd click on the normal road (goes onto the fork)
RoadColor := FindRoadColor;
if not RadialRoadWalk(RoadColor, 170, 190, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 165, 195, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 155, 205, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 210, 75, 2, 2) then
begin
if (UseCoords) then
begin
mouse(673,140,5,5,true);
FFlag(3);
writeln('used coord in roadclick3');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'roadclick4';
end;
'roadclick4': begin
RoadColor := FindRoadColor;
if not RadialRoadWalk(RoadColor, 100, 120, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 90, 130, 75, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 83, 137, 75, 2, 2) then
begin
if (UseCoords) then
begin
mouse(615,154,5,5,true);
FFlag(3);
writeln('used coord in roadclick4');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'enteringport';
end;
'enteringport': begin //clicks the beginning of port sarim
RoadColor := FindRoadColor;
Path[1].Mainpoint.x:=644;
Path[1].Mainpoint.y:=125;
Path[1].Subpoints[0].x:=688;
Path[1].Subpoints[0].y:=90;
Path[1].Subpoints[1].x:=678;
Path[1].Subpoints[1].y:=101;
Path[1].Subpoints[2].x:=661;
Path[1].Subpoints[2].y:=113;
Path[1].Subpoints[3].x:=645;
Path[1].Subpoints[3].y:=125;
Path[1].Subpoints[4].x:=643;
Path[1].Subpoints[4].y:=145;
if not WalkPath(1) then
begin
writeln('used rad in enteringport');
if not RadialRoadWalk(RoadColor, 160, 185, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 150, 195, 70, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 140, 200, 70, 2, 2) then
begin
if (UseCoords) then
begin
mouse(625,141,5,5,true);
FFlag(3);
writeln('used coord in enteringport');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'port3';
end;
'port3': begin //Ends up a bit south east of the magic shop
RoadColor := FindRoadColor;
Path[2].Mainpoint.x:=625;
Path[2].Mainpoint.y:=133;
Path[2].Subpoints[0].x:=624;
Path[2].Subpoints[0].y:=104;
Path[2].Subpoints[1].x:=627;
Path[2].Subpoints[1].y:=109;
Path[2].Subpoints[2].x:=627;
Path[2].Subpoints[2].y:=121;
Path[2].Subpoints[3].x:=628;
Path[2].Subpoints[3].y:=137;
Path[2].Subpoints[4].x:=626;
Path[2].Subpoints[4].y:=149;
if not WalkPath(2) then
begin
writeln('used rad in port3');
if not RadialRoadWalk(RoadColor, 165, 190, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 155, 195, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 60, 2, 2) then
begin
if (UseCoords) then
begin
mouse(619,132,5,5,true);
FFlag(3);
writeln('used coord in port3');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'port4';
end;
'port4': begin //Ends up just north of the range
Path[3].Mainpoint.x:=636;
Path[3].Mainpoint.y:=126;
Path[3].Subpoints[0].x:=628;
Path[3].Subpoints[0].y:=104;
Path[3].Subpoints[1].x:=628;
Path[3].Subpoints[1].y:=112;
Path[3].Subpoints[2].x:=615;
Path[3].Subpoints[2].y:=128;
Path[3].Subpoints[3].x:=645;
Path[3].Subpoints[3].y:=124;
Path[3].Subpoints[4].x:=658;
Path[3].Subpoints[4].y:=124;
if not WalkPath(3) then
begin
writeln('used rad in port4');
if not RadialRoadWalk(RoadColor, 165, 190, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 155, 195, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 55, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 60, 2, 2) then
begin
if (UseCoords) then
begin
mouse(607,141,5,5,true);
FFlag(3);
writeln('used coord in port4');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'port2';
end;
'port2': begin //2nd point in port sarim (first point being entering port sarim)
mouse(632,152,5,5,true); //z0mg a coord click (Couldn't figure out what else to do in this spot -_-)
FFlag(5);
Players[CurrentPlayer].Loc := 'atminigame';
end;
'atminigame': begin //At the minigame (bit more southeast)
RoadColor := FindRoadColor;
Path[0].Mainpoint.x:=606;
Path[0].Mainpoint.y:=134;
Path[0].Subpoints[0].x:=611;
Path[0].Subpoints[0].y:=117;
Path[0].Subpoints[1].x:=604;
Path[0].Subpoints[1].y:=126;
Path[0].Subpoints[2].x:=607;
Path[0].Subpoints[2].y:=134;
Path[0].Subpoints[3].x:=608;
Path[0].Subpoints[3].y:=144;
Path[0].Subpoints[4].x:=611;
Path[0].Subpoints[4].y:=147;
if not WalkPath(0) then
begin
if (UseCoords) then
begin
mouse(606,128,5,5,true);
FFlag(3);
writeln('used coord in atminigame');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'nearfishstore';
end;
'nearfishstore': begin //south of the fish store
RoadColor := FindRoadColor;
Path[0].Mainpoint.x:=638;
Path[0].Mainpoint.y:=121;
Path[0].Subpoints[0].x:=630;
Path[0].Subpoints[0].y:=94;
Path[0].Subpoints[1].x:=632;
Path[0].Subpoints[1].y:=102;
Path[0].Subpoints[2].x:=636;
Path[0].Subpoints[2].y:=110;
Path[0].Subpoints[3].x:=638;
Path[0].Subpoints[3].y:=116;
Path[0].Subpoints[4].x:=637;
Path[0].Subpoints[4].y:=131;
Path[0].Subpoints[5].x:=635;
Path[0].Subpoints[5].y:=139;
Path[0].Subpoints[6].x:=632;
Path[0].Subpoints[6].y:=147;
if not WalkPath(0) then
begin
writeln('used rad in nearfishstore');
if not RadialRoadWalk(RoadColor, 165, 185, 50, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 155, 195, 50, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 50, 2, 2) then
begin
if not RadialRoadWalk(RoadColor, 145, 205, 65, 2, 2) then
begin
if (UseCoords) then
begin
mouse(628,127,5,5,true);
FFlag(3);
writeln('used coord in nearfishstore');
end else
begin
writeln('Failed walking to the shop, next player');
NextPlayer(false);
if (ActivePlayers = 0) then
begin
if (PlayMusic) then
PlaySound(Location);
end;
exit;
end;
end;
end;
end;
end;
end;
FFlag(3);
Players[CurrentPlayer].Loc := 'nearthestore';
end;
end;
end;