benleegt
2008-01-07 03:17:04
[H]
This script is Work in Progress so it does not have multiplayer OR randoms support. Those features will come in the first official release. :)
This script was released in this phase for testing and promotional purposes.
Please start with 9 pots and 9 buckets ONLY. =)
Please start at rosd outside the wheat plot above lumbridge.
Work in Progress
Please post constructive criticisms
[/H]Please post constructive criticisms
This script is Work in Progress so it does not have multiplayer OR randoms support. Those features will come in the first official release. :)
This script was released in this phase for testing and promotional purposes.
Please start with 9 pots and 9 buckets ONLY. =)
Please start at rosd outside the wheat plot above lumbridge.
program BreadBaker;
{.include SRL/SRL/misc/Smart.scar}
{.include SRL/SRL.scar}
const
retryAttempts = 1;
//{$Define DEBUG}
{$IfDef DEBUG}
type
TCanvasText = record
x,y:Integer;
Text:String;
end;
{$EndIf}
var
Obstacle:String;
{$IfDef DEBUG}Buffer,{$EndIf}failures,tmpInt,previousCount,previousTime,
Grain,Bucket,BucketOfWater,Pot,PotOfFlour,BreadDough:Integer;
{$IfDef DEBUG}MainBounds:TPoint;{$EndIf}
RangetoFountain,FountaintoIndustrialPark,IndustrialParktoPlot,
IndustrialParktoMill:TPointArray;
{$IfDef DEBUG}TextArray:Array of TCanvasText;{$EndIf}
//Script Initialisation and Deinitialisation Function
procedure Initialize;
begin
//Item Bmps
Bucket := BitmapFromString(7, 8, 'beNqrdkvxlYSjBC8JIIpxF0cT' +
'wSNobyhgpcMHRCYavECkq8wNRA2Z1gVhMmioLdeus8AeiLqLHIGor' +
'8QJiJDZE8udgWhKpQsaF4imAQANBjQq');
Grain := BitmapFromString(6, 4, 'beNpTYFk8Kx+Cls8rmtabxsDAK' +
'K/BioyWzilYOCNvSncqUBaIJBRYgKijIRbChQoCAJXvGe0=');
Pot := BitmapFromString(9, 7, 'beNpLMIl3VE5zU8vz1myNMexOMJm' +
'YYjY9w2JBnvWKYrsgC7loO8XSAG2geEuYcneUysR4tRnJGvPSNT2N' +
'pMMsxLJdZWqDFNGkgCbUh+tneaqHWSsAtQPNT3ZRAVoBNGdujhUEz' +
'cqyBNoCVNmXZAo0vCPOCGgjBAFlgVJT0syBshCpRQU2EISuEQDRfE' +
'Nv');
PotOfFlour := BitmapFromString(5, 7, 'beNpLML538+bta9duXr58' +
'8tDBLStWvHn58tXz5w/v3r105szeLZtDreR/fP8OFAGqAXJnZlhMS' +
'zOfkGTam2DcFWc0J8sSyJ2cYgYUgXCRFczLsYIr6AUALqw7Hw==');
BucketOfWater := BitmapFromString(7, 6, 'beNordKipnUMkcjMTc' +
'jASsNblN9XkBSI9ZR4gasyyKQyXRUN16dZA8ZYcu/Z8+65Ch55ip/' +
'4y54oki+pUSxQpAMMwMEE=');
BreadDough := BitmapFromString(6, 6, 'beNpb07VxQ+/aNV0rV7Yv' +
'XdqyaGHjvLl1W7ZMQBPctnXipk1969d1r17dsXx565LFTbt2TkET3' +
'LNnOprgvr0zd++eumP7ZKiBAHDZRLw=');
//Paths
SetArrayLength(RangetoFountain,6);
RangetoFountain[0].X:=3209; RangetoFountain[0].Y:=3214;
RangetoFountain[1].X:=3208; RangetoFountain[1].Y:=3210;
RangetoFountain[2].X:=3214; RangetoFountain[2].Y:=3210;
RangetoFountain[3].X:=3214; RangetoFountain[3].Y:=3218;
RangetoFountain[4].X:=3221; RangetoFountain[4].Y:=3218;
RangetoFountain[5].X:=3221; RangetoFountain[5].Y:=3224;
SetArrayLength(FountaintoIndustrialPark,16);
FountaintoIndustrialPark[0].X:=3222; FountaintoIndustrialPark[0].Y:=3223;
FountaintoIndustrialPark[1].X:=3224; FountaintoIndustrialPark[1].Y:=3219;
FountaintoIndustrialPark[2].X:=3234; FountaintoIndustrialPark[2].Y:=3219;
FountaintoIndustrialPark[3].X:=3234; FountaintoIndustrialPark[3].Y:=3229;
FountaintoIndustrialPark[4].X:=3228; FountaintoIndustrialPark[4].Y:=3235;
FountaintoIndustrialPark[5].X:=3221; FountaintoIndustrialPark[5].Y:=3241;
FountaintoIndustrialPark[6].X:=3218; FountaintoIndustrialPark[6].Y:=3248;
FountaintoIndustrialPark[7].X:=3216; FountaintoIndustrialPark[7].Y:=3256;
FountaintoIndustrialPark[8].X:=3216; FountaintoIndustrialPark[8].Y:=3266;
FountaintoIndustrialPark[9].X:=3214; FountaintoIndustrialPark[9].Y:=3275;
FountaintoIndustrialPark[10].X:=3210; FountaintoIndustrialPark[10].Y:=3278;
FountaintoIndustrialPark[11].X:=3202; FountaintoIndustrialPark[11].Y:=3280;
FountaintoIndustrialPark[12].X:=3193; FountaintoIndustrialPark[12].Y:=3282;
FountaintoIndustrialPark[13].X:=3185; FountaintoIndustrialPark[13].Y:=3284;
FountaintoIndustrialPark[14].X:=3177; FountaintoIndustrialPark[14].Y:=3286;
FountaintoIndustrialPark[15].X:=3168; FountaintoIndustrialPark[15].Y:=3288;
SetArrayLength(IndustrialParktoPlot,5);
IndustrialParktoPlot[0].X:=3166; IndustrialParktoPlot[0].Y:=3290;
IndustrialParktoPlot[1].X:=3162; IndustrialParktoPlot[1].Y:=3289;
IndustrialParktoPlot[2].X:=-2; IndustrialParktoPlot[2].Y:=0;
IndustrialParktoPlot[3].X:=3162; IndustrialParktoPlot[3].Y:=3292;
IndustrialParktoPlot[4].X:=3160; IndustrialParktoPlot[4].Y:=3295;
SetArrayLength(IndustrialParktoMill,4);
IndustrialParktoMill[0].X:=3166; IndustrialParktoMill[0].Y:=3291;
IndustrialParktoMill[1].X:=3166; IndustrialParktoMill[1].Y:=3302;
IndustrialParktoMill[2].X:=-1; IndustrialParktoMill[2].Y:=0;
IndustrialParktoMill[3].X:=3166; IndustrialParktoMill[3].Y:=3307;
end;
procedure Deinitialize ;
begin
FreeBitmap(Bucket);
FreeBitmap(Grain);
FreeBitmap(Pot);
FreeBitmap(PotOfFlour);
FreeBitmap(BucketOfWater);
FreeBitmap(BreadDough);
end;
//End of Script Initialisation and Deinitialisation Function
{$IfDef DEBUG}
//Debugging Eye Candy Functions
function gradient(points:Integer):Array of TColor;
var
i,width,height,gradientSource,Pointer,interval:Integer;
begin
SetArrayLength(Result,Points);
gradientSource := BitmapFromString(40, 1, 'beNp7JvVMCoz0YMg' +
'JhsJhKBuGGmBoCgytgKG9MHQRhp5B0UUY2gtGKyAIAKUTPkA=');
GetBitmapSize(gradientSource,width,height);
interval:=((width-(width mod points)) div points);
for i:=0 to points-1 do
begin
Result[i]:=FastGetPixel(gradientSource,Pointer,0);
IncEx(Pointer,interval);
end;
end;
procedure colourArray(TPointArray:TPointArray;Colour:TColor);
var
arraylength,i:Integer;
begin
arraylength:=High(TPointArray);
for i:=0 to arraylength do
begin
FastSetPixel(Buffer,TPointArray[i].X,TPointArray[i].Y,Colour);
end
end;
procedure RenderText;
var
i:Integer;
begin
if(High(TextArray)=0) then
begin
GetDebugCanvas.TextOut(TextArray[0].X,TextArray[0].Y,TextArray[0].Text);
end else
begin
for i:=0 to High(TextArray) do
begin
GetDebugCanvas.TextOut(TextArray[i].X,TextArray[i].Y,TextArray[i].Text);
end;
end;
end;
{$EndIf}
//End of Debugging Eye Candy Functions
//Object functions
function FindObjIncludeColsEx(var cx,cy:Integer;X1,Y1,X2,Y2:Integer;Text:String;
minArea,maxArea:Integer;colour:Integer;IncludeCols:Array of Integer;
Tol:Integer):Boolean;
var
i{$IfDef DEBUG},v{$EndIf}:Integer;
{$IfDef DEBUG}gradientArray:Array of TColor;{$EndIf}
Possiblity:TPoint;
Points,tmpPoints:TPointArray;
SplitTPAA:Array of TPointArray;
begin
FindColorsTolerance(Points,colour,X1,Y1,X2,Y2,tol);
{$IfDef DEBUG}
gradientArray:=gradient(1+GetArrayLength(IncludeCols));
colourArray(Points,gradientArray[0]);
{$EndIf}
for i:=0 to high(IncludeCols) do
begin
FindColorsTolerance(tmpPoints,IncludeCols[i],X1,Y1,X2,Y2,tol);
{$IfDef DEBUG}
colourArray(tmpPoints,gradientArray[i+1]);
{$EndIf}
Points:=CombineTPA(Points,tmpPoints);
end;
SplitTPAA := SplitTPAEx(Points, 2, 2);
for i := 0 to High(SplitTPAA) do
begin
if ((minArea=-1)and(maxArea=-1)) or InRange(Length(SplitTPAA[i]),minArea,
maxArea) then
begin
Possiblity:=MiddleTPA(SplitTPAA[i]);
{$IfDef DEBUG}
SetArrayLength(TextArray,getArrayLength(TextArray)+1);
TextArray[v].X:=Possiblity.X;
TextArray[v].Y:=Possiblity.Y;
TextArray[v].Text:=inttostr(Length(SplitTPAA[i]));
Inc(v);
{$EndIf}
MMouse(Possiblity.X,Possiblity.Y,0,0);
wait(300);
if(IsUpText(Text)) then
begin
cx:=Possiblity.X;
cy:=Possiblity.Y;
Result:=True;
break;
end;
end;
end;
end;
function FindObjIncludeCols(var cx,cy:Integer;Text:String;minArea,
maxArea:Integer;colour:Integer;IncludeCols:Array of Integer;
Tol:Integer):Boolean;
begin
Result:=FindObjIncludeColsEx(cx,cy,MSX1,MSY1,MSX2,MSY2,Text,minArea,maxArea,colour,IncludeCols,Tol);
end;
function FindGate(var Gate:TPoint):Boolean;
var
i,tol:Integer;
GateCol:TColor;
begin
GateCol:=1004409;
tol:=20;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(Gate.X,Gate.Y,'Ope',370,1200,GateCol,[],tol);
if(Result) then
break;
end;
end;
function OpenGate:Boolean;
var
Gate:TPoint;
begin
Status('Opening Gate');
Obstacle:='Door';
Result:=FindGate(Gate);
if(Result)then
begin
Mouse(Gate.X,Gate.Y,0,0,true);
wait(1500);
end;
end;
function FindDoor(var Door:TPoint):Boolean;
var
i,tol:Integer;
DoorCol:TColor;
begin
DoorCol:=2387341;
tol:=20;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(Door.X,Door.Y,'do',200,2000,DoorCol,[],tol);
if(Result) then
break;
end;
end;
function OpenDoor:Boolean;
var
Door:TPoint;
begin
Status('Opening Door');
Obstacle:='Door';
Result:=FindDoor(Door);
if(Result)then
begin
Mouse(Door.X,Door.Y,0,0,true);
wait(1500);
end;
end;
function FindLadder(var Ladder:TPoint):Boolean;
var
i,tol:Integer;
LadderCol:TColor;
begin
LadderCol:=5074311;
tol:=20;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(Ladder.X,Ladder.Y,'La',100,400,LadderCol,[],tol);
if(Result) then
break;
end;
end;
function ClimbLadder(dir:Integer):Boolean;
var
Ladder:TPoint;
begin
Status('Climbing Ladder');
Result:=FindLadder(Ladder);
if(Result)then
begin
Mouse(Ladder.X,Ladder.Y,0,0,False);
case dir of
1:ChooseOption('up');
2:ChooseOption('dow');
end;
fflag(0);
repeat
wait(500);
until(not GetMyMoving)
wait(2000);
end;
end;
function FindWheat(var Wheat:TPoint):Boolean;
var
i,tol:Integer;
WheatCol:TColor;
begin
WheatCol:=6268839;
tol:=40;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeColsEx(Wheat.X,Wheat.Y,175,105,355,245,'Whea',1,10,
WheatCol,[],tol);
if(Result) then
break;
end;
end;
function PickWheat:Boolean;
var
Wheat:TPoint;
begin
Status('Picking Wheat');
Result:=FindWheat(Wheat);
if(Result)then
Mouse(Wheat.X,Wheat.Y,0,0,true);
end;
function FindHopperControl(var HopperControl:TPoint):Boolean;
var
i,tol:Integer;
HopperCol,FlameCol,SlushCol:TColor;
begin
HopperCol:=7313060;
FlameCol:=5131860;
SlushCol:=8043474;
tol:=25;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(HopperControl.X,HopperControl.Y,'Op',3,10,
HopperCol,[FlameCol,SlushCol],tol);
if(Result) then
break;
end;
end;
function OperateHopperControl(left:Integer):Boolean;
var
HopperControl:TPoint;
begin
Status('Operating Hopper Control');
Result:=FindHopperControl(HopperControl);
if(Result)then
begin
Mouse(HopperControl.X,HopperControl.Y,0,0,False);
ChooseOption('Ope');
end;
if(left=0) then
MakeCompass('n');
end;
function FindFountain(var Fountain:TPoint):Boolean;
var
i,tol:Integer;
FountainCol:TColor;
begin
FountainCol:=9468010;
tol:=50;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(Fountain.X,Fountain.Y,'Fou',1200,2300,
FountainCol,[],tol);
if(Result) then
break;
end;
end;
function UseFountain:Boolean;
var
Fountain:TPoint;
begin
Status('Filling water');
Result:=FindFountain(Fountain);
if(Result)then
Mouse(Fountain.X,Fountain.Y,0,0,true);
end;
function FindHopper(var Hopper:TPoint):Boolean;
var
i,tol:Integer;
HopperCol:TColor;
begin
HopperCol:=4613243;
tol:=25;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(Hopper.X,Hopper.Y,'Hop',180,300,HopperCol,[],
tol);
if(Result) then
break;
end;
end;
function UseHopper:Boolean;
var
Hopper:TPoint;
begin
Status('Putting grains in Hopper');
MakeCompass('e');
Result:=FindHopper(Hopper);
if(Result)then
Mouse(Hopper.X,Hopper.Y,0,0,true);
end;
function FindFlourBin(var FlourBin:TPoint):Boolean;
var
i,tol:Integer;
FlourBinCol:TColor;
begin
FlourBinCol:=16316665;
tol:=25;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(FlourBin.X,FlourBin.Y,'Empt',100,200,FlourBinCol,
[],tol);
if(Result) then
break;
end;
end;
function EmptyFlourBin:Boolean;
var
FlourBin:TPoint;
begin
Status('Emptying Flour Bin');
Result:=FindFlourBin(FlourBin);
if(Result)then
Mouse(FlourBin.X,FlourBin.Y,0,0,true);
end;
function FindCookingRange(var CookingRange:TPoint):Boolean;
var
i,tol:Integer;
CookingRangeCol:TColor;
begin
CookingRangeCol:=1583549;
tol:=25;
for i:=0 to retryAttempts do
begin
Result:=FindObjIncludeCols(CookingRange.X,CookingRange.Y,'ran',4,50,
CookingRangeCol,[],tol);
if(Result) then
break;
end;
end;
function UseCookingRange:Boolean;
var
CookingRange:TPoint;
begin
Status('Cooking');
Result:=FindCookingRange(CookingRange);
if(Result)then
Mouse(CookingRange.X,CookingRange.Y,0,0,true);
end;
//End of Object Functions
//Inventory Functions
function ReturnSlotsOf(Items:TIntegerArray):TIntegerArray;
var
i,v:Integer;
tmp:TPoint;
Slot:TBox;
begin
SetArrayLength(Result,29);
for i:=1 to 28 do
begin
Slot:=InvBox(i);
for v:=0 to High(Items) do
begin
if(ExistsItem(i)) then
begin
if(FindBitmapSpiralTolerance(Items[v],tmp.X,tmp.Y,Slot.X1,Slot.Y1,
Slot.X2,Slot.Y2,35)) then
begin
Result[i]:=v+1;
break;
end;
end else
begin
Result[i]:=-1;
break;
end;
end;
end;
end;
procedure DropAllExcept(Items:TIntegerArray);
var
i:Integer;
Slots:TIntegerArray;
begin
Status('Disposing of rubbish');
Slots:=ReturnSlotsOf(Items);
for i:=1 to 28 do
begin
if(Slots[i]=0) then
begin
MouseItem(i,False);
ChooseOption('Dro');
end;
end;
end;
function UseWith(Item:Integer):Boolean;
var
i,v:Integer;
Slots,TranslatedSlots:TIntegerArray;
begin
Slots:=ReturnSlotsOf([Item]);
for i:=1 to 28 do
begin
if(Slots[i]>0) then
begin
SetArrayLength(TranslatedSlots,Length(TranslatedSlots)+1);
TranslatedSlots[v]:=i;
Inc(v);
end;
end;
if(Length(TranslatedSlots)>0) then
begin
MouseItem(TranslatedSlots[RandomRange(0,High(TranslatedSlots))],True);
Result:=True;
end;
end;
//End of Inventory Functions
//Walking functions
//Modified FFlag - by by Wizzup? / WT-Fakawi.
function MFFlag(Distance: Integer):Boolean;
var
XK, YK, XL, YL: Integer;
var
T1, T2: Extended;
begin
T1 := GetTickCount;
repeat
T2 := GetTickCount;
Wait(100);
if HumanCircleFlag(Distance) then
Break;
Wait(100);
if (T2 - T1 > 4000) and (obstacle='Door') then
begin
OpenDoor;
Result:=True;
Obstacle:='';
end;
if (T2 - T1 > 4000) and (obstacle='Gate') then
begin
OpenGate;
Result:=True;
Obstacle:='';
end;
if T2 - T1 > 30000 then
begin
if FindColor(XL, YL, 255, MMX1, MMY1, MMX2, MMY2) then
MouseFindFlag(XL, YL, 1, 1)
else Mouse(MMCX, MMCY, 0, 0, True);
Break;
end;
if Random(20) = 1 then IdleTime(500, 1000, 0.01);
until (not FindColor(XK, YK, 255, MMX1, MMY1, MMX2, MMY2));
end;
procedure walk(path:TPointArray;direction:Integer);
var
pathlength,i : Integer;
mmTile:TPoint;
begin
status('Walking');
pathlength:=High(path);
case direction of
0: for i:=0 to pathlength do
begin
case path[i].X of
-1: openDoor;
-2: OpenGate;
-3: climbLadder(1);
-4: climbLadder(2);
else
begin
TileToMinimap(path[i].X,path[i].Y,mmTile.X,mmTile.Y);
Mouse(mmTile.X,mmTile.Y,0,0,True);
if(MFFlag(0)) then
begin
TileToMinimap(path[i].X,path[i].Y,mmTile.X,mmTile.Y);
Mouse(mmTile.X,mmTile.Y,0,0,True);
end;
repeat
wait(500);
until(not GetMyMoving)
end;
end;
end;
1: for i:=pathlength downto 0 do
begin
status('Walking');
case path[pathlength-i].X of
-1: openDoor;
-2: openGate;
-3: climbLadder(1);
-4: climbLadder(2);
else
begin
TileToMinimap(path[i].X,path[i].Y,mmTile.X,mmTile.Y);
Mouse(mmTile.X,mmTile.Y,0,0,True);
if(MFFlag(0)) then
begin
TileToMinimap(path[i].X,path[i].Y,mmTile.X,mmTile.Y);
Mouse(mmTile.X,mmTile.Y,0,0,True);
end;
repeat
wait(500);
until(not GetMyMoving)
end;
end;
end;
end;
end;
//End of Walking Functions
//LevelUp Disruptable Function
procedure BakeBread;
begin
Status('Baking bread');
if(CountItemBmpTol(BreadDough,25)>0) then
begin
if(UseWith(BreadDough)) then
if(UseCookingRange) then
begin
fflag(0);
previousTime:=GetTimeRunning;
repeat
wait(100);
if(GetTimeRunning-previousTime>4000) then
begin
BakeBread;
break;
end;
until(SimilarColors(GetColor(254, 408),9088173,25));
if(CountItemBmpTol(BreadDough,25)>0) then
begin
MouseBox(237,391,277,426,False);
wait(500);
ChooseOption('All');
repeat
wait(1000);
if(FindNpcChatText('Cooking le'))then
begin
tmpInt:=Random(4);
case tmpInt of
0:ClickNpcChatText('Click',True);
1:ClickNpcChatText('here',True);
2:ClickNpcChatText('to',True);
3:ClickNpcChatText('continue',True);
end;
BakeBread;
end;
until((CountItemBmpTol(BreadDough,25)=0))
end;
end;
end;
end;
//End of LevelUp Disruptable Function
begin
SmartSetup('ul1',false,true);
while(not(IsFKeyDown(1))) do wait(100);
SetTargetDC(SmartGetDC);
SetupSRL;
Initialize;
{$IfDef DEBUG}
MainBounds.X:=MSX2-MSX1
MainBounds.Y:=MSY2-MSY1
DisplayDebugImgWindow(MainBounds.X,MainBounds.Y);
Buffer:=BitmapFromString(MainBounds.X,MainBounds.Y,'');
FastDrawClear(Buffer,clBlack);
{$EndIf}
repeat
//Pick Wheat
walk(IndustrialParktoPlot,0);
repeat
previousCount:=CountItemBmpTol(Grain,35);
if(PickWheat) then
begin
previousTime:=GetTimeRunning;
repeat
wait(100);
until((CountItemBmpTol(Grain,35)>previousCount) or (GetTimeRunning-previousTime>4000))
wait(200);
end;
until(CountItemBmpTol(Grain,35)=9)
walk(IndustrialParktoPlot,1);
walk(IndustrialParktoMill,0);
ClimbLadder(1);
ClimbLadder(1);
//Grind
while((CountItemBmpTol(Grain,35)>0) and (failures<3)) do
begin
if(UseWith(Grain)) then
if(UseHopper) then
begin
Fflag(0);
wait(1000);
if(OperateHopperControl(CountItemBmpTol(Grain,35))) then
begin
failures:=0;
Fflag(0);
wait(1000);
end else
begin
Inc(failures);
end;
end;
end;
ClimbLadder(2);
ClimbLadder(2);
//Collect
while((CountItemBmpTol(Pot,35)>0) and (failures<5)) do
begin
if(EmptyFlourBin) then
begin
failures:=0;
Fflag(0);
wait(1000);
end else
begin
Inc(failures);
end;
end;
walk(FountaintoIndustrialPark,1);
//Collect Water
UseWith(Bucket);
UseFountain;
repeat
wait(1000);
until(CountItemBmpTol(Bucket,35)=0);
//Mix Dough
status('Mixing dough');
if(UseWith(PotOfFlour)) then
if(UseWith(BucketOfWater)) then
begin
wait(1000);
ClickNpcChatText('Bre',True);
repeat
wait(100);
until(SimilarColors(GetColor(254, 408),9088173,35))
MouseBox(237,391,277,426,False);
wait(500);
ChooseOption('All');
end;
repeat
wait(1000);
until((CountItemBmpTol(PotOfFlour,35)=0) or (CountItemBmpTol(BucketOfWater,35)=0))
walk(RangetoFountain,1);
//Bake Bread
MakeCompass('e');
BakeBread;
MakeCompass('n');
DropAllExcept([Pot,PotOfFlour,Bucket,BucketOfWater]);
walk(RangetoFountain,0);
walk(FountaintoIndustrialPark,0);
until(false);
{$IfDef DEBUG}
SafeDrawBitmap(Buffer, GetDebugCanvas, 0, 0);
FreeBitmap(Buffer);
GetDebugCanvas.Brush.Style := bsClear
GetDebugCanvas.Font.Name := 'Arial';
GetDebugCanvas.Font.Color := clWhite;
RenderText;
{$EndIf}
Deinitialize;
end.