I've had this script for a while, made it in about 10 minutes while i was making my own planks - it worked but needed lots of monitoring.
NO idea if it still works.
Simba Code:
{ Instructions:
- Put coins in Inventory slot #1.
- Put logs in bank slot #1. (make sure bank scroller is up).
- Setup account detail & log type.
- Start at any where, either near varrock east or at the sawmill.
- Script will re-bank if it messes up withdrawing.
Made by samerdl in about 10 minutes, should work but do monitor it.
// i have no idea when i wrote this script lol.
}
program PlankMaker;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
{$i SRL-OSR\SRL\misc\debug.simba}
{$i SRL-OSR\SRL\misc\SmartGraphics.simba}
var
BankCord, shopcord: tpointarray;
planksmade, cx, cy: integer;
const
bankpin = '1234';
PlankType = 2; // 1 normal, 2 oak.
procedure playerSetup;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Zezima';
Players[0].Pass := 'iscool';
Players[0].Nick := 'Ezim';
Players[0].Active := True;
Players[0].LampSkill := SKILL_CONSTRUCTION;
end;
procedure WaitShortClick;
begin
case random(600) of
1..450: Wait(RandomRange(100, 150));
451..570: Wait(RandomRange(150, 200));
571..590: Wait(RandomRange(200, 250));
591..600: Wait(RandomRange(250, 400));
end;
end;
procedure Keyboards;
begin
case random(5) of
0..2:
begin
KeyDown(37);
WaitShortClick KeyUp(37);
WaitShortClick KeyDown(40);
WaitShortClick KeyUp(40);
end;
3..4:
begin
KeyDown(39);
WaitShortClick KeyUp(39);
WaitShortClick KeyDown(38);
WaitShortClick KeyUp(38);
end;
5:
begin
KeyDown(38);
WaitShortClick KeyUp(38);
WaitShortClick KeyDown(39);
WaitShortClick KeyUp(39);
end;
end;
end;
function HoverNearbyNpc: boolean;
var
I: Tpointarray;
P: Integer;
begin
I := GetMiniMapDots('npc');
if (length(I) > 6) then
begin
SortTPAFrom(i, Point(MMCX, MMCY));
P := random(length(I)) Mmouse(I[0].x, I[0].y, 3, 3);
result := true;
end;
end;
procedure Antiban;
begin
case random(140) of
0..2: hoverskill(skill_hitpoints, false);
3..7.: HoverSkill(skill_strength, False);
12..15: hoverskill(skill_attack, false);
16..19: HoverOnlineFriend;
20: BoredHuman;
30: MMouseOffClient('top');
40: MMouseOffClient('left');
50: MMouseOffClient('right');
60: MMouseOffClient('bottom');
70: SmallRandomMouse;
80: RandomAngle(1);
90: RandomAngle(2);
100: PickUpMouse;
110: CompassMovement(10, 70, true);
120: HoverNearbyNpc;
130: Keyboards;
140: writeln('hi');
end;
end;
procedure SecondAntiban2;
begin
case random(20) of
1: PickUpMouse;
2: BoredHuman;
3: MMouseOffClient('left');
4: MMouseOffClient('right');
5: MMouseOffClient('bottom');
6: SmallRandomMouse;
7: boredhuman;
8: SmallRandomMouse;
10: keyboards;
end;
end;
procedure WaitHumanClick;
begin
case random(600) of
1..450: Wait(RandomRange(400, 600));
451..570: Wait(RandomRange(400, 600));
571..590: Wait(RandomRange(600, 800));
591..600: Wait(RandomRange(800, 1000));
end;
end;
procedure WaitHumanClick2;
begin
case random(600) of
1..450: Wait(RandomRange(1000, 1500));
451..570: Wait(RandomRange(1500, 2000));
571..590: Wait(RandomRange(2000, 2500));
591..600: Wait(RandomRange(2500, 3000));
end;
end;
procedure WaitHumanClick3;
begin
case random(600) of
1..450: Wait(RandomRange(3000, 5000));
451..570: Wait(RandomRange(5000, 5500));
571..590: Wait(RandomRange(6000, 6500));
591..600: Wait(RandomRange(7000, 7500));
end;
end;
var
BankCords, SawmilCord: array of Tpoint;
procedure myvars;
begin
SawmilCord := [Point(3253, 3420), Point(3253, 3425), Point(3257, 3428), Point(3262, 3428), Point(3267, 3428), Point(3272, 3429), Point(3275, 3433), Point(3275, 3438), Point(3279, 3441), Point(3281, 3446), Point(3281, 3451), Point(3281, 3456), Point(3281, 3461), Point(3284, 3465), Point(3287, 3469), Point(3290, 3473), Point(3293, 3478), Point(3295, 3483), Point(3300, 3486), Point(3303, 3490)] BankCords := [Point(3302, 3491), Point(3302, 3486), Point(3299, 3481), Point(3295, 3477), Point(3291, 3473), Point(3290, 3468), Point(3287, 3464), Point(3285, 3459), Point(3285, 3454), Point(3284, 3449), Point(3282, 3444), Point(3279, 3440), Point(3275, 3437), Point(3275, 3432), Point(3270, 3430), Point(3265, 3430), Point(3260, 3430), Point(3255, 3427), Point(3253, 3422)] BankCord := [point(2843, 3542)];
shopcord := [point(2838, 3549)];
end;
function GetGreenUptext: string;
var
WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
begin
WhiteT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
BlueT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
YellowT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
OrangeT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
GreenT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 120577, 65, 'UpChars07');
FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
Result := FoundText;
end;
function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
var
TheText: string;
i, n: Integer;
begin
TheText := GetGreenUptext;
n := High(Text);
for i := 0 to n do
if (Pos(Text[i], TheText) > 0) then
begin
Result := True;
Exit;
end;
end;
function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
var
T: Integer;
begin
Result := false;
T := GetSystemTime + Time;
while (GetSystemTime < T) do
begin
if (IsUpTextMultiCustom2(S)) then
begin
Result := True;
Exit;
end;
Wait(20 + Random(20));
end;
end;
function OpenWScreen: Boolean;
begin
Result := False;
if WorldScreen then
exit;
if Loggedin then
Exit;
if not WorldScreen then
begin
Mmouse(54, 475, 1, 1);
WaitHumanClick;
ClickMouse2(Mouse_Left);
waithumanclick;
Result := True;
end;
end;
function whitecolor: boolean;
var
Monster: TpointArray;
TmpCts: Integer;
begin
tmpcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.22, 1.69);
result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
ColorToleranceSpeed(tmpcts);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure ProgressReport;
begin
if (not (loggedin)) then
exit;
ClearDebug;
WriteLn('* FPlanker');
WriteLn('* Runtime: ' + TimeRunning);
Writeln('*');
writeln('* Planks Made ' + IntToStr(PlanksMade));
end;
function FindObjExX(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol, CTS: integer; Hue, Sat: Extended; Step, xs, ys, xe, ye: Integer): Boolean;
var
MidX, MidY, i, j, k, x, y, width, height, HalfWidth, HalfHeight: Integer;
ColorFound: Boolean;
SearchBoxes: array of array of TBox;
p: TPointArray;
begin
if (not (loggedin)) then
exit;
Result := False;
for i := 0 to (GetArrayLength(Color) - 1) do
begin
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(Hue, sat);
if (FindColorSpiralTolerance(cx, cy, Color[i], xs, ys, xe, ye, Tol)) then
begin
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorFound := True;
Break;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
if not (ColorFound) then
Exit;
MidX := Round((xe - xs) / 2);
MidY := Round((ye - ys) / 2);
Width := Ceil(abs(xe - xs) / 2 / Step - 0.5) * 2 + 1;
Height := Ceil(abs(ye - ys) / 2 / Step - 0.5) * 2 + 1;
SetLength(SearchBoxes, Width);
HalfWidth := Floor(Width / 2);
HalfHeight := Floor(Height / 2) for x := - 1 * HalfWidth to HalfWidth do
begin
SetLength(SearchBoxes[x + HalfWidth], Height);
for y := - 1 * HalfHeight to HalfHeight do
SearchBoxes[x + HalfWidth][y + HalfHeight] := IntToBox(Max(xs, xs + Round(MidX + ((x - 0.5) * Step))), Max(ys, ys + Round(MidY + ((y - 0.5) * Step))), Min(xe, xs + Round(MidX + ((x + 0.5) * Step))), Min(ye, ys + Round(MidY + ((y + 0.5) * Step))));
end;
p := TPAFromBox(IntToBox(0, 0, Width - 1, Height - 1));
SortTPAFrom(p, Point(floor(Width / 2), floor(Height / 2)));
for k := 0 to High(Color) do
for j := 0 to High(p) do
begin
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(Hue, sat);
if (FindColorTolerance(cx, cy, Color[k], SearchBoxes[p[j].x][p[j].y].x1, SearchBoxes[p[j].x][p[j].y].y1, SearchBoxes[p[j].x][p[j].y].x2, SearchBoxes[p[j].x][p[j].y].y2, Tol)) then
begin
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
MMouse(cx, cy, 3, 3);
wait(randomrange(200, 300));
if (WaitUptextMulti2(Text, 300)) then
begin
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(cx, cy);
Result := True;
Exit;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure loginloop;
begin
OpenWorldScreen;
repeat
if whitecolor then
break;
if whitecolor then
writeln('yeaya');
if not whitecolor then
writeln('yea22ya');
case random(10) of
0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
end;
until (whitecolor) if whitecolor then
begin
clickmouse2(mouse_left);
waithumanclick;
currentworld;
waithumanclick;
if (CurrentWorldLS = 365) then
exit;
waithumanclick;
loginplayer;
exit;
end;
end;
function FindObject(Color: TintegerArray; Tol, CTS: integer; hMoD, sMoD: extended; split, sort: integer; Uptext: array of string; WaitUptextWait, WaitUptextRandom: Integer; x, y, xs, ys: integer): boolean;
var
III, i, tmpcts: integer;
TPA: tpointarray;
TPAA: T2DPointArray;
begin
if (not (loggedin)) then
exit;
gametab(tab_inv);
tmpcts := GetColorToleranceSpeed;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(hMoD, SMoD);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, color[III], x, y, xs, ys, Tol) ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (length(TPA) > 0) then
begin
Result := True;
end;
end;
function Clickobject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
var
Booth: TPoint;
begin
if (not LoggedIn) then
Exit;
Booth := R_TileToMS(ObjPoint);
MMouse(Booth.X, Booth.Y, 2, 2);
Sleep(100 + Random(100));
if (R_IsUpTextMulti(Uptext)) then
begin
result := true;
end;
end;
function LocateNPC(Name, Uptext: string): boolean;
var
Tp: Tpoint;
NpcName: tnpc;
begin
if R_FindNpc(Name, NpcName) then
begin
if NpcName.InCombat then
exit;
Tp := NpcName.Tile;
Tp := R_TileToMs(Tp);
Mmouse(Tp.x, Tp.y, 0, 0);
if R_WaitUptext(Uptext, 200) then
begin
result := true;
end;
end;
end;
function OnPlankBuyScreen: boolean;
var
Monster: TpointArray;
TmpCts: Integer;
begin
tmpcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.29);
result := FindColorsTolerance(Monster, 3952732, 470, 28, 500, 50, 3);
ColorToleranceSpeed(tmpcts);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure buyplanks;
begin
FindNormalRandoms R_FindNormalRandoms;
R_PerfectPath(SawmilCord);
R_FindNormalRandoms;
waithumanclick;
if LocateNPC('Sawmill', 'Sawmill') then
begin
clickmouse2(mouse_right);
WaitOptionMulti(['uy', 'Buy', 'Plank'], 500);
waithumanclick2;
if OnPlankBuyScreen then
begin
case PlankType of
1:
begin
if FindObjExX(cx, cy, ['Buy', 'uy', '1'], [3693430], 1, 2, 0.04, 0.74, 50, msx1, msy1, msx2, msy2) then
begin
clickmouse2(mouse_right);
WaitOptionMulti(['All', 'll'], 500);
waithumanclick2;
R_FindNormalRandoms;
end;
end;
2:
begin
writeln('we are here');
if FindObjExX(cx, cy, ['Buy', 'uy', '1'], [5008518], 1, 2, 0.04, 0.44, 50, msx1, msy1, msx2, msy2) then
begin
clickmouse2(mouse_right);
WaitOptionMulti(['All', 'll'], 500);
waithumanclick2;
R_FindNormalRandoms;
end;
end;
3:
begin
if FindObjExX(cx, cy, ['Buy', 'uy', '1'], [4287627], 2, 2, 0.10, 0.18, 50, msx1, msy1, msx2, msy2) then
begin
clickmouse2(mouse_right);
WaitOptionMulti(['All', 'll'], 500);
waithumanclick2;
R_FindNormalRandoms;
end;
end;
4:
begin
if FindObjExX(cx, cy, ['Buy', 'uy', '1'], [604252], 1, 2, 0.23, 0.85, 50, msx1, msy1, msx2, msy2) then
begin
clickmouse2(mouse_right);
WaitOptionMulti(['All', 'll'], 500);
waithumanclick2;
R_FindNormalRandoms;
end;
end;
end;
end;
end;
end;
function ScrollerIsUp: boolean;
var
Monster: tpointarray;
TmpCts: integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.23);
result := FindColorsTolerance(Monster, 3885654, 471, 76, 476, 76, 12);
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure bankthings;
begin
if bankscreen then
begin
waithumanclick2;
MouseItem(2, mouse_right);
waithumanclick;
if (WaitOptionMulti(['All', 'll'], 500)) then
waithumanclick;
MouseBankSlot(1, mouse_Right);
waithumanclick;
if (WaitOption('ut-one', 500)) then
writeln('we did it');
end;
end;
procedure bankplanks;
begin
MakeCompass('s');
R_PerfectPath(BankCords);
if LocateNPC('Banker', 'Bank') then
begin
clickmouse2(mouse_right);
waitoption('ank', 1000);
waithumanclick2;
if pinscreen then
begin
InPin(bankpin);
end;
waithumanclick2;
if BankScreen then
begin
bankthings;
CloseBank;
IncEx(planksmade, 27)
end;
end;
end;
procedure Antibans;
begin
if not loggedin then
exit;
R_FindNormalRandoms;
progressreport;
gametab(tab_inv);
if not R_IsRunOn then
begin
Mouse(570, 148, 3, 3, mouse_left);
WaitHumanClick2;
end;
case random(20) of
0..3: Antiban;
4..20: writeln('not doing antiban');
end;
case random(10) of
1..8: writeln('doing nothing');
9: setangle(0);
10: setangle(1);
end;
case random(20) of
1..16: writeln('doing nothingx2');
17: MakeCompass('n');
18: MakeCompass('s');
19: MakeCompass('w');
20: MakeCompass('e');
end;
end;
function RunisOn: boolean;
var
Monster: TpointArray;
TmpCts: Integer;
begin
tmpcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 0.77);
result := FindColorsTolerance(Monster, 5294307, 568, 122, 593, 150, 7);
ColorToleranceSpeed(tmpcts);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function HpLevel: integer;
var
s: string;
CurrentHpLevel: integer;
begin
s := GetTextAtExWrap(520, 50, 540, 70, 0, 5, 1, 65280, 0, statchars07);
CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
if (CurrentHpLevel > 0) then
begin
result := CurrentHpLevel
end;
end;
function RunStatus(): integer;
var
s: string;
CurrentRun: integer;
begin
wait(randomrange(200, 400));
s := GetTextAtExWrap(545, 130, 560, 150, 0, 5, 1, 65535, 0, statchars07);
CurrentRun := StrToIntDef(GetNumbers(s), - 1);
if (CurrentRun > 0) then
begin
result := CurrentRun;
end;
end;
procedure mainloop;
begin
progressreport;
FindNormalRandoms if not RunisOn and (RunStatus > 1) then
begin
Mouse(570, 148, 3, 3, mouse_left);
WaitHumanClick2;
FindNormalRandoms
end;
R_FindNormalRandoms;
FindNormalRandoms;
case PlankType of
1:
begin
if FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
Buyplanks;
if FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
bankplanks;
if (not FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) and (not FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) then
bankplanks;
case random(100) of
0..63: writeln('nada');
64..100: antibans;
end;
end;
2:
begin
if FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
Buyplanks;
if FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
bankplanks;
if (not FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) and (not FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) then
bankplanks;
case random(100) of
0..63: writeln('nada');
64..100: antibans;
end;
end;
3:
begin
if FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
Buyplanks;
if FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
bankplanks;
if (not FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) and (not FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) then
bankplanks;
case random(100) of
0..63: writeln('nada');
64..100: antibans;
end;
end;
4:
begin
if FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
Buyplanks;
if FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2) then
bankplanks;
if (not FindObject([4810880], 3, 2, 0.09, 0.46, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) and (not FindObject([5077144], 8, 2, 0.01, 0.51, 0, 0, ['Logs'], 300, 500, MIX1, MIY1, MIX2, MIY2)) then
bankplanks;
case random(100) of
0..63: writeln('nada');
64..100: antibans;
end;
end;
end;
end;
begin
playerSetup;
setupsrl;
SetupReflection;
addonterminate('progressreport');
R_Reincarnate := true;
ReinCarnate := false;
R_CombatRandoms := true;
myvars;
repeat
wait(400);
if not loggedin then
loginloop;
wait(400);
if loggedin then
mainloop;
until (false);
end.
Literally wrote it in 10 minutes during that time, just needed 50 construction and was too cheap to go buy the planks for 2x the price from players
.
Used a basic script skeleton and added walking functionality, that's about it. Nothing fancy nothing special and i doubt it still works.
Anyway, you could probably take some code from it to make your own? i guess. Good luck!
edit2: The code i posted above is from last year i think, never posted it publicly because i never worked on this script, just needed something to do all the clicks for me to make planks (only needed enough to get from 16 to 50).
edit3: hmm, this might deserve a script of its own tbh, a well worked on script? I've got loads of crapty scripts i made for personal use never posted publicly because i never worked too much on them.