Simba Code:
program Script;
{$i SRL\SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
procedure MakeFire;
var
X, Y, Logs: Integer;
PBox: TBox;
begin;
{ Walking to a firemaking spot }
ObjDTM_Walk('82:63:5:1:7:36:84:1:7:62:41:3:7:117:55:10:7:71:78:10:7:113:75', 1, 80, 200, True);
Wait(300 + Random(300));
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
{ Failsafe when standing on a fire }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
if FindColorSpiralTolerance(X, Y, 536379, 244, 159, 276, 193, 3) then
{ Standing in a fire, moving }
begin;
MouseBox(211, 99, 318, 161, 1);
Wait(400 + Random(200));
end else
{ Light a log }
Logs := DTMFromString('mAAEAAHiclcvBCkBAFIXhY9aewjNIyUISK5Pm8SeUhbJB3oC/WFiaW9+pU+fGkmojVciRIX2V6OBg0aLBws+AEbOevuPEhhUTPA70RUJGv11Ba8kE7r93A1hgD7U=');
if FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
end;
FreeDTM(Logs);
{ Check for fire animation }
PBox := IntToBox(282, 145, 320, 195);
repeat
Wait(150 + Random(150))
until Animating(PBox, 100, 200);
Wait(150 + Random(150));
end;
procedure StartCooking;
var
X, Y, i, arL: Integer;
arP: TPointArray;
ararP: T2DPointArray;
P: TPoint;
begin;
{ Find fire co-ordinates }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
case Random(9) of
0..4: MouseBox(605, 213, 640, 244, 1);
5..7: MouseBox(605, 249, 640, 280, 1);
8: MouseBox(563, 249, 598, 280, 1);
end;
MMouse(P.x, P.y, 5, 5);
Exit;
end;
end;
procedure Cooking;
var
X, Y, t: Integer;
begin;
{ Start cooking all the food }
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, 1);
Wait(500 + Random(300));
MouseBox(222, 397, 302, 466, 1);
{ Mark the time to know when the inventory has been cooked }
MarkTime(t);
repeat
Wait(100 + Random(100));
//Antiban; //Still have to add this
Wait(100 + Random(100));
until TimeFromMark(t) >= RandomRange(63000, 66000);
{ If the inventory has been cooked, walk back to the banker }
ObjDTM_Walk('81:102:5:3:7:122:75:1:7:62:58:1:7:31:105:10:7:117:96:10:7:70:117', 1, 80, 200, True);
end;
begin
SetupSRL;
ActivateClient;
ObjDTM_Setup;
MakeFire;
StartCooking;
Cooking;
end.