Simba Code:
program crudechair;
{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}
{$i sps/sps.simba}
Const
SRLStats_Username = ''; //LoginPlayer; Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
BreakEvery = '' ;
BreakFor = '' ;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // 3-4 lower case letters of your character's name
Pin := ''; // Bank pin
Member := True;
Active := True;
end;
end;
Procedure FindChair;
var
ChairDTM, Build, x, y:Integer;
aFound: Extended;
Begin
ChairDTM := DTMFromString('mwQAAAHic42RgYGBkZGDgB+IfQDYTkGYG4u8MCDFeIH0eSJ8B4gtAfByInwHxAyB+BOUfBWJ/RwkGAw1+hkBnSQZrQyGGZa2eDBFBzmC8aNZEhsWzJzPwg8wlgBmJwHAAAKEQFEQ=');
Build := DTMFromString('mwQAAAHic42RgYOBmgABWKFsMiKWAWBTKZwNiXiAWAWIJIFaAqgHJs0P1cgDxkd3bGQ7t3MoQHujEsHj2FIapfW1g9typExkWzZrMsHvLerAZcgQwIxEYDgDtOhGA');
if not LoggedIn then Exit;
repeat
if FindDTMRotated(ChairDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
wait(RandomRange(100,500));
MMouse(x, y, 0, 0);
IsUpText('Chair');
Mouse(x, y, 0, 0, False);
WaitOption('Remove', 500);
ClearReport;
ClearDebug;
writeln('Destroying Chair');
writeln('' +TimeRunning);
wait(RandomRange(1000,1500));
end else
Exit;
until FindNPCChatText('Yes', Clickleft)
ClearReport;
ClearDebug;
writeln('Destroyed Chair');
wait(1000);
FreeDTM(ChairDTM);
FreeDTM(Build);
End;
Procedure BuildChair;
var
Built, x, y, Build, ChairDTM:Integer;
Begin
Build := DTMFromString('mwQAAAHic42RgYOBmgABWKFsMiKWAWBTKZwNiXiAWAWIJIFaAqgHJs0P1cgDxkd3bGQ7t3MoQHujEsHj2FIapfW1g9typExkWzZrMsHvLerAZcgQwIxEYDgDtOhGA');
ChairDTM := DTMFromString('mwQAAAHic42RgYGBkZGDgB+IfQDYTkGYG4u8MCDFeIH0eSJ8B4gtAfByInwHxAyB+BOUfBWJ/RwkGAw1+hkBnSQZrQyGGZa2eDBFBzmC8aNZEhsWzJzPwg8wlgBmJwHAAAKEQFEQ=');
MarkTime(Built);
repeat
if FindDTM(Build, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
wait(RandomRange(100,300));
MMouse(x, y, 0, 0);
if IsUpText('4 more') then
begin
Mouse(x, y, 0, 0, false);
WaitOption('Build Chair', 500);
ClearReport;
ClearDebug;
writeln('Finding Crude Chair');
writeln('' +TimeRunning);
wait(RandomRange(1400,1500));
MouseBox(101, 61, 120, 84, mouse_Move);
wait(500);
if IsUpText('Crude') then
begin
ClearReport;
ClearDebug;
writeln('Crude Chair Found!');
ClickMouse2(mouse_left);
wait(500);
writeln('Building chair');
writeln('' +TimeRunning);
wait(RandomRange(5500,6000));
end;
end;
end;
until (TimeFromMark(Built) > 9500) or (FindChatBoxText('material', 8, clBlack));
FreeDTM(Build);
FreeDTM(ChairDTM);
End;
Procedure TeleportEdge;
Begin
if not GameTab(tab_Magic) then
GameTab(tab_Magic);
begin
if GameTab(tab_Magic) then
MouseOval(572, 230, 7, 7, mouse_Move);
IsUpText('Home');
ClickMouse2(mouse_Left);
ClearReport;
ClearDebug;
writeln('Banking');
end;
repeat
until LodestoneScreen;
LodestoneTeleport('Edgeville');
ClickMouse2(mouse_Left)
wait (18000);
Exit;
End;
Procedure WalktoBank;
var
myPath: TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['10_6']);
myPath := [Point(4111, 2628), Point(4121, 2632), Point(4128, 2634), Point(4136, 2637), Point(4145, 2640), Point(4151, 2644), Point(4159, 2647), Point(4167, 2653), Point(4173, 2658), Point(4180, 2665), Point(4186, 2674), Point(4193, 2683), Point(4203, 2686), Point(4208, 2686)];
SPS_WalkPath(myPath);
ClearReport;
ClearDebug;
writeln('At bank');
wait(2500);
end;
Procedure Banking;
var
x, y, Plank:Integer;
begin
Plank := DTMFromString('mwQAAAHic42RgYMhjZGAoBeJiIE4H4kwgzgbiSiBOAeJcEB+oLg6Ic4C4ggHCrwTiBCAuBeI0IA521QOSTDhxQoApAz+QRQgzEoHhAAB/IgoD');
if not LoggedIn then TerminateScript;
repeat
OpenBankNPC;
wait(3000);
if FindDTM(Plank, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
MMouse(x, y, 2, 2);
wait(RandomRange(500,1000));
IsUpText('lank')
ClearReport;
ClearDebug;
writeln('Withdrawing Planks');
Mouse(x, y, 0, 0, false);
ChooseOption('All Plank');
end else
begin
Logout;
TerminateScript;
end;
until CloseBank;
FreeDTM(Plank);
end;
//Teleport to Port Sarim
Procedure TeleportPS;
Begin
if not GameTab(tab_Magic) then
GameTab(tab_Magic);
begin
if GameTab(tab_Magic) then
MouseOval(572, 230, 7, 7, mouse_Move);
IsUpText('Home');
ClickMouse2(mouse_Left);
ClearReport;
ClearDebug;
writeln('Teleporting');
end;
repeat
until LodestoneScreen;
LodestoneTeleport('Port Sarim');
ClickMouse2(mouse_Left)
wait (16000);
Exit;
End;
Procedure WalktoHouse;
var
myPath: TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['9_9']);
myPath := [Point(3861, 3787), Point(3850, 3785), Point(3840, 3784), Point(3828, 3782), Point(3818, 3781), Point(3809, 3781), Point(3801, 3778), Point(3794, 3778), Point(3785, 3778), Point(3775, 3778), Point(3765, 3777), Point(3754, 3774), Point(3742, 3774), Point(3732, 3773), Point(3720, 3772), Point(3710, 3770), Point(3701, 3769), Point(3690, 3767), Point(3678, 3766), Point(3663, 3765)];
SPS_WalkPath(myPath);
wait(2000);
ClearReport;
ClearDebug;
writeln('Walking to House');
end;
Procedure EnterPortal;
var
x, y:Integer;
Begin
repeat
If FindColorSpiralTolerance(x, y, 6496589, MSX1, MSY1, MSX2, MSY2, 14) then
ClearReport;
ClearDebug;
writeln('Entering Portal');
Mouse(x, y, 2, 2, true);
wait(RandomRange(2000,2500));
until FindNPCChatText('mode', Clickleft);
wait(RandomRange(5000,5500));
writeln('Entered Portal');
End;
Procedure WalktoChair;
var
x, y, Center:Integer;
Begin
x := 235
y := 25
Mouse(x, y, 2, 2, true);
ClearReport;
ClearDebug;
writeln('Walking to Center');
wait(3000);
FreeDTM(Center);
End;
begin
ClearReport;
ClearDebug;
Smart_Server := 10;
Smart_Signed := true;
Smart_Members := true;
Smart_SuperDetail := false;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
wait(1000)
until LoggedIn;
ClickNorth(SRL_ANGLE_HIGH);
repeat
EnterPortal;
WalktoChair;
repeat
FindChair
BuildChair;
until FindChatBoxText('material', 8, clBlack);
writeln('No materials');
TeleportEdge;
WalktoBank;
Banking;
TeleportPS;
WalktoHouse
until (false);
end.