Code:
Program DewrangeLumbridgeFlaxSpinner;
{$DEFINE SMART8}
{$I srl-osr/srl.simba}
var
flaxdtm: integer;
bowstringdtm: integer;
i: integer;
clear: integer;
count: integer;
stairs: integer;
menu: integer;
spinning: integer;
stairsup: integer;
flaxspun: integer;
const
// script version 3.0
flaxtospin = 313; /// how much flax do you want to spin?
procedure DeclarePlayers();
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Nick := '';
Name := '';
Pass := '';
Active := true;
Integers[0] := 1;
end;
end;
procedure declarevariables;
begin
flaxdtm := DTMFromString('mlwAAAHicY2dgYHBgYmBwB2I7IDYHYm8g9o XynwHlH0DxEyB+BcT3gPgtEDPYcDLEHj7OELnnAEPErn0Mwes2 McQfPwMWZwFK48KMeDAUAACZCxIF');
bowstringdtm := DTMFromString('mrAAAAHic42BgYDjBxMBwCogPAvE2IN4BxP uBeCcQHwLiY4xAOSDeC8Q7gXgrEG8C4uNQ3FwRyVCQ7gOmYWxk PhfQDnyYkQCGAQAVoxZz');
end;
procedure customantiban;
var
x, y: integer;
begin
x := (random(1000));
if (x >= 800) then
begin
y := (random(10));
case(y) of
1: boredhuman;
2: boredhuman;
3: randomrclick;
4: mmouseoffclient('random');
5: HoverMovingObject;
6: randomtab(true);
7: pickupmouse;
8: hoverskill(skill_crafting, false);
9: smallrandommouse;
10: hoverskill(skill_crafting, false);
end;
end;
end;
procedure godownstairsfailsafe;
var
x, y: integer;
begin
if (not(findcolorspiraltolerance(x, y, 1917807, 628, 45, 692, 71, 35))) then
begin
if findobjcustom(x, y, ['Stair', 'case', 'ase'], [605015, 4145992], 15) then
begin
mmouse(x, y, 5, 5);
if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
begin
clickmouse2(mouse_left);
sleep(randomrange(700, 1000));
writeln('we have made it downstairs');
findnormalrandoms;
end;
end;
end;
end;
procedure withdrawflax;
var
x, y: integer;
begin
if (bankscreen) then
begin
if (not(invempty)) then
begin
writeln('inventory not empty, depositing remaining items');
deposit(1, 28, true);
if finddtm(flaxdtm, x, y, 24, 60, 451, 282) then
begin
mmouse(x, y, 5, 5);
if waituptextmulti(['Flax', 'lax', 'ax'], randomrange(300, 600)) then
begin
clickmouse2(mouse_right);
wait(randomrange(300, 350));
chooseoption('All');
sleep(randomrange(1000, 1500));
if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
begin
closebank
findnormalrandoms;
end;
end;
end;
end;
end;
end;
procedure climbdownstairs;
var
x, y: integer;
begin
if (not(bankscreen)) then
begin
if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
begin
if findobjcustom(x, y, ['Stair', 'case', 'ase'], [605015, 4145992], 15) then
begin
writeln('found stairs, trying to go down');
wait(200);
mmouse(x, y, 5, 5);
if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
begin
clickmouse2(mouse_left);
sleep(randomrange(1000, 1500));
if (findcolorspiraltolerance(x, y, 3630998, 649, 48, 670, 71, 35)) then
begin
sleep(1500 + randomrange(500, 1000));
writeln('we have made it downstairs');
sleep(1 + random(10));
findnormalrandoms;
end else
repeat
sleep(randomrange(1000, 2000));
godownstairsfailsafe;
inc(stairs);
findnormalrandoms;
until((findcolorspiraltolerance(x, y, 1917807, 626, 44, 693, 78, 35) or (stairs = 2)));
end;
end;
end;
end;
end;
procedure openbankflax;
var
x, y: integer;
begin
setangle(SRL_angle_high);
makecompass('n')
if (invempty) then
begin
writeln('inventory is empty, trying to open bank');
end else
if (not(bankscreen)) then
begin
if findobjcustom(x, y, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 10) then
begin
writeln('attempting to open bank');
mmouse(x, y, 5, 5);
begin
if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], randomrange(300, 400)) then
clickmouse2(mouse_left);
while (not(bankscreen)) do
writeln('bank not yet open');
inc(count)
sleep(500 + random(500));
mmouse(x, y, 2, 2);
wait(randomrange(200, 300));
clickmouse2(mouse_left);
end;
begin
if (bankscreen) then
begin
writeln('bank should now be open');
sleep(2000);
end else
begin
writeln('could not open the bank!');
end;
end;
end;
end;
end;
procedure gettostairsfrombank;
var
x, y: integer;
begin
if finddtm(flaxdtm, x, y, 561, 215, 723, 459) then
begin
mmouse(605, 128, 2, 2); //
wait(200);
clickmouse2(mouse_left);
sleep(randomrange(6000, 7000)); // arrived at first set of stairs
findnormalrandoms;
end;
end;
procedure walktowheelfromstairs;
var
x, y: integer;
begin
if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
begin
if findcolorspiraltolerance(x, y, 1458038, 653, 46, 686, 82, 35) then
begin
mmouse(x, y, 2, 2);
wait(300);
clickmouse2(mouse_left);
makecompass('e');
sleep(1500 + (randomrange(1500, 2000)));
findnormalrandoms;
end
end;
end;
procedure spinflaxfailsafe;
var
x, y, s, w: integer;
begin
if (not(findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35))) then
begin
if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
begin
if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
begin
mmouse(s, w, 2, 2);
if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
begin
clickmouse2(mouse_left);
sleep(randomrange(1800, 2100));
if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
begin
writeln('spin menu open');
wait(100);
end else
writeln('unable to open menu, trying again');
end;
end;
end;
end;
end;
procedure spinflax;
var
x, y, s, w: integer;
begin
if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
begin
if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
begin
wait(randomrange(200, 300));
mmouse(s, w, 2, 2);
if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
begin
clickmouse2(mouse_left);
sleep(randomrange(2200, 2400));
if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
begin
writeln('spin menu is now open');
sleep(1000);
end else
repeat
sleep(randomrange(1000, 1500));
spinflaxfailsafe;
inc(menu);
sleep(randomrange(1900, 2100));
until ((findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35)) or (menu = 2))
end;
end;
end;
end;
procedure customfindallrandoms;
var
x, y, s, w, a, b: integer;
begin
if (findnormalrandoms) then
begin
findnormalrandoms;
sleep(randomrange(2500, 5000));
if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
begin
if findcolorspiraltolerance(a, b, 1789819, 586, 38, 669, 92, 35) then
begin
mmouse(a, b, 2, 2);
wait(randomrange(500, 600));
if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
begin
mmouse(s, w, 3, 3);
if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
begin
clickmouse2(mouse_left);
sleep(randomrange(900, 1000));
if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
begin
mmouse(259, 142, 10, 5);
if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
begin
clickmouse2(mouse_right);
sleep(randomrange(300, 500));
chooseoption('Make X');
sleep(randomrange(1000, 1200));
if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
begin
typesend('28');
end;
end;
end;
end;
end;
end;
end;
end;
end;
procedure customlevelup;
var
x, y, s, w: integer;
begin
if (levelup) then
begin
clickcontinue(true);
sleep(randomrange(1000, 1500));
clickcontinue(true);
sleep(randomrange(2300, 2700));
if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
begin
if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
begin
mmouse(s, w, 3, 3);
if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
begin
clickmouse2(mouse_left);
sleep(randomrange(900, 1000));
if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
begin
mmouse(259, 142, 10, 5);
if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
begin
clickmouse2(mouse_right);
sleep(randomrange(300, 500));
chooseoption('Make X');
sleep(randomrange(1000, 1200));
if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
begin
typesend('28');
end;
end;
end;
end;
end;
end;
end;
end;
procedure startspinning;
var
x, y: integer;
begin
sleep(1000);
if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
begin
writeln('we found the color');
mmouse(x, y, 2, 2);
if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
writeln('we have made it this far');
sleep(randomrange(400, 500));
clickmouse2(mouse_right);
sleep(randomrange(300, 500));
chooseoption('Make X');
sleep(randomrange(1000, 1200));
if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 25) then
begin
typesend('28');
end;
begin
repeat
sleep(randomrange(2400, 2700));
customfindallrandoms;
customantiban;
customlevelup;
customfindallrandoms;
inc(spinning);
until ((finddtm(bowstringdtm, x, y, 668, 416, 732, 471) or (spinning = 28)));
end;
end;
end;
procedure walktostairsfromwheel;
var
x, y: integer;
begin
if (finddtm(bowstringdtm, x, y, 664, 424, 739, 474) or (finddtm(flaxdtm, x, y, 553, 213, 726, 459))) then
begin
mmouse(675, 93, 5, 5);
wait(randomrange(200, 300));
clickmouse2(mouse_left);
sleep(randomrange(4000, 5000));
findnormalrandoms;
end else
writeln('unable to walk to stairs');
end;
procedure climbupstairsfailsafe;
var
x, y, s, w: integer;
begin
if (not(findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 30))) then
begin
if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
begin
mmouse(s, w, 3, 3);
if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
begin
clickmouse2(mouse_right);
sleep(randomrange(500, 600));
chooseoption('Climb-up');
sleep(randomrange(1500, 2000));
findnormalrandoms;
//changeangleforbank;
end;
end;
end;
end;
procedure climbupstairs;
var
x, y, s, w: integer;
begin
if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
begin
mmouse(s, w, 3, 3);
if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
begin
clickmouse2(mouse_right);
sleep(randomrange(500, 600));
chooseoption('Climb-up');
sleep(randomrange(1500, 2000));
if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) then
sleep(randomrange(1, 10));
writeln('made it back upstairs');
//changeangleforbank;
end else
repeat
writeln('did not make it upstairs, trying again');
findnormalrandoms;
climbupstairsfailsafe;
findnormalrandoms;
sleep(randomrange(400, 500));
//changeangleforbank;
inc(stairsup);
until((findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) or (stairsup = 2)));
end;
begin
//changeangleforbank;
end;
end;
procedure gettobank;
var
x, y, s, w: integer;
begin
//changeangleforbank;
if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 75) then
begin
mmouse(597, 66, 3, 3);
wait(200 + randomrange(100, 200));
clickmouse2(mouse_left);
makecompass('n');
sleep(randomrange(5000, 6000));
findnormalrandoms;
begin
if findobjcustom(s, w, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 15) then
begin
mmouse(s, w, 2, 2);
if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], (100 + randomrange(100, 50))) then
begin
clickmouse2(mouse_left);
while (not(bankscreen)) do
sleep(1);
end;
end;
end;
end;
end;
begin
DeclarePlayers;
setupsrl;
declarevariables;
if (not(loggedin)) then
begin
loginplayer;
setrun(true);
end;
repeat
declarevariables;
openbankflax;
withdrawflax;
gettostairsfrombank;
climbdownstairs;
walktowheelfromstairs;
spinflax;
startspinning;
walktostairsfromwheel;
climbupstairs;
//changeangleforbank;
gettobank;
inc(flaxspun);
freedtm(bowstringdtm);
freedtm(flaxdtm);
until((flaxspun * 28) >= (flaxtospin)) or (not(loggedin));
writeln('congratulations, sinning comleted succesfully! =]');
end.