SRL Archive - OSR News and General

OSR Randoms and srl...


Nebula

2014-05-19 21:08:51

Why do we have 3 different functions for random events now?
  • FindNormalRandoms
  • R_FindNormalRandoms
  • F_FindNormalRandoms

Like honestly I don't know which one to call in my scripts. Whichever one you call first is pretty much the only one that matters, because if it detects a random and fails it, it logs out and ends the script so the other functions don't even get a chance to solve the randoms.

The current best option:

procedure Randoms;
begin
R_FindNormalRandoms;
F_FindNormalRandoms;
end;
This would attempt to solve random events using Reflection, but if that doesn't work then it tries using regular FindNormalRandoms. But if FindNormalRandoms doesn't work, the entire thing gets terminated and flight's stuff doesn't even get to be looked at.

Pretty much each function has a few really great working solvers in it, so if we could just combine all of the good stuffs from each into one sooper RF_FindNormalRandoms that'd be gr8 my friends. :D

Olly

2014-05-19 21:14:58

Screw even attempting color ones imo. Hard to see how a well coded (pretty much repeats (failsafes)) reflection solver can fail.

Nebula

2014-05-19 21:29:32

From: Olly
Screw even attempting color ones imo. Hard to see how a well coded (pretty much repeats (failsafes)) reflection solver can fail.


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.

Olly

2014-05-19 21:32:44

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.

That is possible, but I don't think srl currently can. why i do not know - I know nothing about java/relfection so I leave it alone. You would have to ask someone who handles the relfection side of things why srl currently (or maybe it does?) support it.

Flight

2014-05-20 00:37:31

From: Olly
Screw even attempting color ones imo. Hard to see how a well coded (pretty much repeats (failsafes)) reflection solver can fail.


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.


Keep in mind this is a long time since I've been on the subject, but the last I've heard not everything related to interfaces (maybe just the child IDs?) in the OSR-Reflection include was hooked, many things still missing. And as a result they couldn't create random-solvers for random events which used on-screen interfaces. I imagine if that was already hooked, nearly all randoms should be incredibly easily solved…

Nebula

2014-05-20 00:52:04

From: Flight
Keep in mind this is a long time since I've been on the subject, but the last I've heard not everything related to interfaces (maybe just the child IDs?) in the OSR-Reflection include was hooked, many things still missing. And as a result they couldn't create random-solvers for random events which used on-screen interfaces. I imagine if that was already hooked, nearly all randoms should be incredibly easily solved…


flight senpai could you please explain this widget maddness in your sandwich lady solver that seems to recognize the floating spinning sandwiches, bakery items, and delectable pasterys on screen?

atm i feel pretty motivated to solve some osrs randoms. getting like 10 randoms an hour with my master farmer pickpocketr -.- 1/2 them fail :( feelsbadman

edit: This sandwich lady is teasing me so hard. she shows me like 10 pastry items and lets me choose only one. I swear one of these days when she shows up i am going to tie her up in the draynor maynor basement and summon 15 moss giants to gangrape her.

Flight

2014-05-20 01:26:29

I didn't write anything for the Sandwich Lady, I only optimized detection and what not, and this is surely not in the SRL-OSR include. Also, I'm quite sure the Sandwich Lady can fail when it must choose between a triangle sandwich and a square sandwich (because of the similar colors). This can be easily fixed by color counting but it's not in my priority at the moment.

Hoodz

2014-05-20 01:30:12

Do f_antirandoms first

ry0240

2014-05-20 07:25:29

From: hoodz
Do f_antirandoms first

I think Sandwich solver is broken for F_antirandom also.

samerdl

2014-05-24 07:44:58


// Random checks.
procedure FindALlrandoms;
begin
//f_antirandoms
R_FindNormalRandoms;
FindNonInventoryRandoms;
FindNormalRandoms;
FindMod;
end;

That's what i call, never slows me down. Script usually solves stuff like Genie and Hyde but doesn't solve something like prison pete. I avoid all spots with random events and when i do bot at a spot with random events in most cases i use Osbot to deal with the randoms.

Botting at none random event zones works wonders, i still would love to see full on functionality that solves all randoms all the time after any update… Perhaps we should look for string derivative functions? instead of looking for Id's we could look for strings/objects and load id from them and scan for it?. Is that possible? would only require to update hooks each time the game gets updated only instead of going all the way to update all the ids.

hakishakataki

2014-06-06 12:04:43

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.

Nebula

2014-06-06 12:21:30

From: hakishakataki
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.


In that script there is nothing besides FindNormalRandoms that could solve the box. so maybe the standard box solver actually works.

hakishakataki

2014-06-06 12:26:42

From: Nebula
In that script there is nothing besides FindNormalRandoms that could solve the box. so maybe the standard box solver actually works.


I watched it work its magic a couple times.
What it does is figure out what it thinks the answer is, and if that answer doesn't match up with any of the available answers it clicks the box again to reset the problem.
It normally takes it between 2-5 resets for it to solve the box.

It's tree spirit handler, on the other hand, sucks butt. I die to it every time I dont catch it.