From: Nebula
this pretty much, but I'm also wondering if it is possible to get an id for those spinny boxes and puzzles and such that they make you solve. Do we already have all of the things we can possibly grab with reflection? I remember nexus (rsbots.net) used to solve those puzzles with ease.
I dont know how it does it, but the random solver in sk1ny nerds pro draynor cutter solves the spinny boxes like no ones buisiness. I looked through the script and he doesnt have any of the randoms you mentioned above.
Here's his code so that no one has to go searching. It really is great at the spinning box solver, I think it uses 'Smart Graphics' to solve them, but I've never seen that in any other script.
program Sk1nyNerdsPRODraynorWillowBanker;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/reports.simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}
{$I SRL-OSR/SRL/reflection/Reflection.simba}
var
LogDTM: integer;
InvLogs, RandomNumber, InvLogsCheck, LogsCut, x, y: integer;
WCxp, WCxph, LogsCutph, LevelsGained: integer;
FindTreeTime, NewLogTime, Timer1: integer;
Status: String;
(*```````````````````````````````Player Settings```````````````````````````````*)
const
DropLogs = False; //False to Bank Logs, True to Power Chop
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Enter your username
Players[0].Pass := ''; //Enter your password
Players[0].Nick := ''; //Enter 3-4 sidebyside characters of you user name
Players[0].Pin:= ''; //Enter your bankpin
Players[0].WorldInfo := []; //Enter a desired world or leave blank for random
Players[0].LampSkill := Skill_Slayer;
Players[0].Active := True;
end;
(*`````````````````````````````End Player Settings`````````````````````````````*)
(*
QuickRun
~~~~~~~~~~~~
.. code-block:: pascal
QuickRun(Run: Boolean): Boolean;
Sets Run on or off using the Run Toggle on the MiniMap
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function QuickRun(Run: Boolean): Boolean;
var
CCountGold, CCountGrey: integer;
begin
Result := False;
CCountGold := CountColorTolerance(105406, 574, 133, 590, 144, 23);
CCountGrey := CountColorTolerance(9411739, 574, 133, 590, 144, 36);
if ((CCountGold < 1) and (CCountGrey < 1)) then
Exit;
if (Run) then
begin
if (CCountGold < 1) then
begin
MouseBox(574, 133, 590, 144, mouse_left);
Result := True;
end;
end else
begin
if (CCountGold > 1) then
begin
MouseBox(574, 133, 590, 144, mouse_left);
Result := True;
end;
end;
end;
procedure LoadDTMz;
begin
LogDTM := DTMFromString('m1gAAAHic42JgYHBhYmAwB2JLIDYGYh8odgZiDyAOBGIHIH4KVPsYiN8C8QsgfgTEt4D4DpLYByCe2xIBJBkJ4v8MxAHCJkEwAgAAe2gOPw=='); //tol 255
end;
procedure FreeDTMz;
begin
FreeDTM(LogDTM);
end;
Procedure DrawCustomPaintReport(st, tr, lc, wc, lg: string);
var
PaintPic: integer;
begin
WCxph := Round((WCxp * 3600) / (GetTimeRunning / 1000));
LogsCutph := Round((LogsCut * 3600) / (GetTimeRunning / 1000));
SMART_ClearCanvas;
SMART_DrawText(8,25, SmallChars07, 'Status: ', 16776960);
SMART_DrawText(52,25, Smallchars07, st, 16776960);
SMART_DrawText(8,45, SmallChars07, 'Time Running: ', 16776960);
SMART_DrawText(85,45, SmallChars07, TimeRunning, 16776960);
SMART_DrawText(8,65, SmallChars07, 'Logs Cut: ', 16776960);
SMART_DrawText(62,65, SmallChars07, lc, 16776960);
SMART_DrawText(8,85, SmallChars07, 'Woodcutting EXP: ', 16776960);
SMART_DrawText(105,85, SmallChars07, wc, 16776960);
SMART_DrawText(8,105, SmallChars07, 'Levels Gained: ', 16776960);
SMART_DrawText(92,105, SmallChars07, lg, 16776960);
end;
procedure AntiBanCamera;
begin
case random(10000) of
0..5: MakeCompass(randomrange(60,120));
end;
end;
procedure EntDetection;
begin
if (CountColorTolerance(122595, 83, 8, 122, 19, 15) > 5) then
begin
case random(4) of
1: R_BlindWalk(Point(3087, 3233));
2: R_BlindWalk(Point(3086, 3237));
3: R_BlindWalk(Point(3086, 3231));
4: R_BlindWalk(Point(3089, 3232));
end;
end else
Exit;
end;
procedure LeveledUp;
begin
if (LevelUp()) then
begin
inc(LevelsGained);
DrawCustomPaintReport('Chopping trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end;
EntDetection;
FindMod();
end;
procedure LocationTrees;
begin
if (Not LoggedIn) then
Exit;
if (Not(R_NearTile(Point(3087, 3233),10))) then
begin
Status := ('Walking to trees...');
DrawCustomPaintReport('Walking to trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
R_BlindWalk(Point(3087, 3233));
FFlag(0);
if (FindNormalRandoms) then
begin
Status := ('Random Event detected!');
DrawCustomPaintReport('Random Event detected!', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end;
end;
end;
procedure BankLogs;
begin
repeat
Status := ('Banking...');
DrawCustomPaintReport('Banking...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
R_BlindWalk(Point(3092, 3244));
FFlag(0);
wait(randomrange(50,250));
if FindObjCustom(x, y, ['ooth'], [7574949,6914446,5857124] , 5) then
begin
MMouse(x,y,5,5);
if (IsUpTextMultiCustom(['ooth'])) then
begin
ClickMouse2(mouse_left);
wait(randomrange(750,2000));
ConfirmPin;
InPin(Players[0].Pin);
Deposit(1, 27, True);
end;
end;
until(InvCount < 27);
Status := ('Walking to trees...');
DrawCustomPaintReport('Walking to trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
wait(randomrange(50,650));
case random(4) of
1: R_BlindWalk(Point(3087, 3233));
2: R_BlindWalk(Point(3086, 3237));
3: R_BlindWalk(Point(3086, 3231));
4: R_BlindWalk(Point(3089, 3232));
end;
FFlag(0);
if (FindNormalRandoms) then
begin
Status := ('Random Event detected!');
DrawCustomPaintReport('Random Event detected!', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end;
Exit;
end;
procedure NoTrees;
begin
if (TimeFromMark(FindTreeTime) > 60000) then
begin
Status := ('Unable to find any trees...');
DrawCustomPaintReport('Unable to find any trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
LogOut;
TerminateScript;
end;
end;
procedure FindTree;
var
x, y, a, b: Integer;
Colors: TIntegerArray;
begin
if (Not LoggedIn) then
Exit;
a := 102;
b := 13;
LocationTrees;
MarkTime(NewLogTime);
MarkTime(Timer1);
Status := ('Searching for tree...');
DrawCustomPaintReport('Searching for trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
InvLogs := CountItems('DTM', LogDTM, []);
if ((rs_GetCompassAngleDegrees < 60) or (rs_GetCompassAngleDegrees > 120)) then
MakeCompass(randomrange(60,120));
Colors := [2461562, 2641479, 2579537, 2769994];
if (FindObjCustom(x, y, ['hop', 'own', 'illo'], Colors, 5)) then
begin
MMouse(x,y,5,5);
if ((IsUpTextMultiCustom(['hop','own'])) and (Not(CountColorTolerance(122595, 83, 8, 122, 19, 15) > 5))) then
begin
wait(randomrange(50,450));
ClickMouse2(mouse_left);
if (DidRedClick) then
begin
Status:= ('Chopping tree...');
DrawCustomPaintReport('Chopping tree...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
MarkTime(FindTreeTime);
InvLogs := CountItems('DTM', LogDTM, []);
FFlag(0);
Exit;
end else
FindTree;
end;
end else
NoTrees;
end;
procedure NoNewLogs;
begin
if (TimeFromMark(NewLogTime) > 20000) then
begin
wait(randomrange(0,5000));
LocationTrees;
FindTree;
end;
end;
procedure DropInv;
var
i, x, y: integer;
DropSequence: TIntegerArray;
InvSlot: TBox;
begin
if (Not LoggedIn) then
Exit;
if (DropLogs = True) then
begin
Status := ('Dropping logs...');
DrawCustomPaintReport('Dropping logs...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
case random(100) of
0..40: DropSequence := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,
22,23,24,25,26,27,28];
41..100: DropSequence := [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,
27,4,8,12,16,20,24,28];
end;
for i:= 0 to 27 do
begin
InvSlot := InvBox(DropSequence[i]);
if FindDTM(LogDTM, x, y, InvSlot.x1, InvSlot.y1, InvSlot.x2, InvSlot.y2) then
begin
MouseItem(DropSequence[i],mouse_right);
WaitOption('rop',randomrange(0,360));
ChooseOption('rop');
end;
end;
end else
BankLogs;
end;
procedure LiveInvUpdater;
begin
EntDetection;
if (CountItems('DTM', LogDTM, []) > InvLogs) then
begin
MarkTime(NewLogTime);
MarkTime(FindTreeTime);
IncEx(WCxp, 68);
Inc(InvLogs);
Inc(LogsCut);
DrawCustomPaintReport('Chopping tree...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end else
NoNewLogs;
end;
procedure CheckInv;
begin
if (Not LoggedIn) then
Exit;
repeat
LiveInvUpdater;
if (FindNormalRandoms) then
begin
Status := ('Random Event detected!');
DrawCustomPaintReport('Random Event detected!', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end;
AntiBanCamera;
LeveledUp;
until (not(IsUpTextMultiCustom(['hop','own'])) or (invFull));
LiveInvUpdater;
wait(randomrange(0,350));
if (invFull) then
begin
LiveInvUpdater;
DropInv;
end else
Exit;
end;
procedure FinalReport;
begin
SRLProgressReport(ResultDebugBox, '[PRO] Draynor Willow Banker', 'SK1NYNERD','',
['Status', 'Time Running', 'Logs Cut', 'Woodcutting EXP', 'Levels Gained'],
[Status, MsToTime(GetTimeRunning,Time_Abbrev), IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained)]);
end;
begin
ClearDebug;
DeclarePlayer;
SetupSRL;
SetupReflection;
SMART_ClearCanvas;
writeln('');
writeln('Thanks for using Sk1nyNerds PRO Draynor Willow Banker');
writeln('');
writeln('Message me on Skype for any Script Requests or Information');
writeln('');
writeln('Script is currently running...');
writeln('');
if (Not LoggedIn) then
begin
LogInPlayer;
end;
LoadDTMz;
AddOnTerminate('FinalReport');
AddOnTerminate('FreeDTMz');
CloseWindow;
QuickRun(True);
MakeCompass(randomrange(60,120));
MarkTime(FindTreeTime);
CheckInv;
RandomNumber := randomrange(10000,100000);
LocationTrees;
repeat
if (Not LoggedIn) then
begin
LogInPlayer;
QuickRun(True);
SetAngle(0);
MakeCompass(randomrange(250,290));
MarkTime(FindTreeTime);
CheckInv;
LocationTrees;
end;
FindTree;
CheckInv;
if (FindNormalRandoms) then
begin
Status := ('Random Event detected!');
DrawCustomPaintReport('Random Event detected!', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LevelsGained));
end;
if(TimeFromMark(Timer1) > (360000 + RandomNumber)) then
TerminateScript;
until(False);
TerminateScript;
end.