SRL Archive - First Scripts

Rogues Den Cooker


shadowmarkus

2012-01-08 23:38:28

Well, I've spent alot of time on this now, and think it's somewhat ready to be released.

Features:
Antiban (Some)
Failsafes (Some)
Supports almost all cooking
And that's about it, for now..

Bugs:
Please inform me, so I can fix them ^^

Future:
More failsafes
User suggestions
Polishing

Usage:
Place your character by the fire in the Rogue's Den in Burthope
Put whatever you're cooking in the first row and first slot of your bank
Type in your information
Run


{                Welcome to Shadowmarkus' Rogues Den Cooker!
Place your character by the fire in Rogues Den (Burthope)
Declare players
Run

}

program RoguesDen_Cooker;

{$I SRL/SRL/misc/SMART.simba}
{$I SRL/SRL.simba}

const

//Smart Setup
SmartWorld = 16;
Members = True;
SignedClient = True;
HighDetail = False;

var
tri: integer;

procedure SetupPlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your login name/email
Players[0].Pass := ''; // Your password
Players[0].Active := True;
Players[0].Nick := ''; // 3-4 letters from your ingame name
end;

procedure ProgressReport;
begin
ClearDebug;
WriteLn('Shadowmarkus Rogues Den Cooker');
WriteLn('--------------------------------------');
WriteLn('Script Ran For: ' + TimeRunning);
// WriteLn('Experience gained' + IntToStr(exp));
WriteLn('--------------------------------------');
end;

procedure DoWithdraw;
begin
if (bankscreen) then
begin
MouseBox(38, 92, 71, 117, Mouse_Right);
WaitOptionMulti(['ithdraw-All', 'w-A'], RandomRange(250, 500));
end;
end;

procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;

case random(5000) of
0: SleepAndMoveMouse(1232 + random(857));
45:
begin
HoverSkill('cooking', False);
GameTab(tab_inv);
end;
3: MMouse(random(250), random(250), 10, 10);
4: PickUpMouse;
5: ExamineInv;
5:
begin
GameTab(1 + Random(12));
wait(1000 + random(1000));
GameTab(tab_inv);
end;
end;
end;

procedure Findbanker;
var
FindBankerTimer, x, y: integer;
tri: integer;
begin
if FindObj(x, y, 'ened',3299902, 15) then
begin
Mouse(x, y, 5, 5, False);
ChooseOption('ank');
end;
MarkTime(FindBankerTimer);
repeat
until (bankscreen) or (TimeFromMark(FindBankerTimer) > 1000)
if (TimeFromMark(FindBankerTimer) > 2500) then
if (tri < 5) then
begin
inc(tri);
if FindSymbol(x, y, 'Bank') then
begin
Mouse(x, y, 0, 0, Mouse_Left);
end;
Findbanker;
if (tri > 5) then
begin
writeln('Failed banking five times, IQuit');
TerminateScript;
end;
end;
deposit(1, 28, true);
DoWithdraw;
while CloseBank do
begin
MouseSpeed := (MouseSpeed + RandomRange(-1, +3));
end;
end;

procedure Cook;
var
x, y, d, c, b, SlotCol, DTM, i, xx, yy: integer;
FoodCol: TIntegerArray;
aFound: Extended;
a: TInvenItem;
begin //burnt color at end
FoodCol := [1860553, 1661107, 8804991, 3289909];
DTM :=
DTMFromString('mWAAAAHicY2FgYNBkZGBgB+JSINYAYgkg/ggUFwLSYUD8ZZ8HQ3yoJ0NGjD9DWpQfgyRQDhkzomEQAACSbwfK');
if existsitem(1) then
MouseItem(1, Mouse_Left);
marktime(d);
repeat
until (FindDTMRotated(DTM, xx, yy, MSX1, MSY1, MSX2, MSY2, -Pi / 2, Pi / 2, Pi
/ 30, aFound)) or (TimeFromMark(d) > 5000)
if (TimeFromMark(d) > 5000) then
begin
if FindSymbol(x, y, 'Bank') then
begin
Mouse(x, y, 0, 0, Mouse_Left);
end;
cook;
end;
Mouse(xx, yy, 0, 0, Mouse_right);
ChooseOption('ire');
marktime(b);
repeat
until (FindColorTolerance(xx, yy, 2070783, MCX1, MCY1, MCX2, MCY2, 15) or
(TimeFromMark(b) > 5000))
if (TimeFromMark(b) > 5000) then
begin
Cook;
end;
wait(1600 + RandomRange(150, 250));
MouseBox(235, 403, 283, 453, 1);
a := GetInven(28);
SlotCol := GetColor(a.CenterPoint.x, a.CenterPoint.y - 3);
writeln(SlotCol);
markTime(c);
repeat
AntiBan;
if LevelUp then
begin
ClickContinue(true, true);
end;
until (not FindColorTolerance(xx, yy, SlotCol, 692, 431, 715, 451, 15) or
(TimeFromMark(c) > 68000))
FreeDTM(DTM);
end;

procedure MainLoop;
var
TimesToRepeat: integer;
begin
repeat
tri := 0;
inc(TimesToRepeat);
Findbanker;
Cook;
FindNormalRandoms;
ProgressReport;
until (TimesToRepeat > 99)
end;

begin
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := HighDetail;
SetupSRL;
SetupPlayers;
ActivateClient;
SetAngle(SRL_ANGLE_High);
if not LoggedIn then
LogInPlayer;
MainLoop;

end.

Shadowmarkus Rogues Den Cooker
--------------------------------------
Script Ran For: 22 Minutes and 5 Seconds
--------------------------------------



Credits: CRU1Z1N, this guy is an awesome scripter, and a really helpful guy, he taught me EVERYTHING, and has been the BEST help ever. Also a petite thanks to Daniel, for helping me fix a tiny error in my script :)

phamxboa

2012-01-09 07:00:56

cannot detect the banker :/

shadowmarkus

2012-01-09 08:20:37

From: phamxboa
cannot detect the banker :/


After it has cooked, or in the beginning of the script? Because it's running perfectly for me.

Do you have highest brightness, lowest graphics settings, newest srl/simba? (Sorry! Mistype! It's ROGUES DEN, not Thieving Guild)

Sunblast

2012-01-09 10:42:50

I'll try this when I reach 70 Mining, I hope this script will work because there is no script for Rogues Den cooking ;P

shadowmarkus

2012-01-09 10:48:13

From: Sunblast
I'll try this when I reach 70 Mining, I hope this script will work because there is no script for Rogues Den cooking ;P


Which is the exact reason I made it, and damn it, Rogues Den… Name error, lol.

But it does work. Just hoping for some people to test it, so I can perfect it.. :)

Kyle Undefined

2012-01-09 14:32:14

Nice release! I'll go over it when I get home from the office. A quick look and it seems legit :)

phamxboa

2012-01-09 17:28:07

Like It cannot detect the banker, and examines the fire over and over

shadowmarkus

2012-01-09 18:21:49

From: phamxboa
Like It cannot detect the banker, and examines the fire over and over


And you are in rogues den? And the banker is visible? If not, try setting your own color of the banker, at

if FindObj(x,y,'ened',4488020,6)then

Change
4488020


To the color you pick.

onilika

2012-01-09 18:47:23

I already had changed the color, but the script starts examining the fire. So..It doesn't open the bank to get the raw fish, examines only the fire. But when works great, it bank, cooks and withdraws without any faillure.
The script needs some more improvements but it is looking good :)

~onilika

shadowmarkus

2012-01-09 18:49:01

From: onilika
I already had changed the color, but the script starts examining the fire. So..It doesn't open the bank to get the raw fish, examines only the fire. But when works great, it bank, cooks and withdraws without any faillure.
The script needs some more improvements but it is looking good :)

~onilika



I have no idea why that's happening to you.. I gotta look deeper into this, it's working perfectly for me.

phamxboa

2012-01-09 18:53:32

From: onilika
I already had changed the color, but the script starts examining the fire. So..It doesn't open the bank to get the raw fish, examines only the fire. But when works great, it bank, cooks and withdraws without any faillure.
The script needs some more improvements but it is looking good :)

~onilika


I'm having the same problem aswell, even after changing the color.

onilika

2012-01-09 19:20:19

Ok…I changed some things.
I used the Auto Color function for the banker.
Also, found out that, since I was wearing Guilded clothes of mining, it was messing the script.
Working good now, and I'll post some proggies later :)

~onilika

phamxboa

2012-01-09 19:25:20

From: onilika
Ok…I changed some things.
I used the Auto Color function for the banker.
Also, found out that, since I was wearing Guilded clothes of mining, it was messing the script.
Working good now, and I'll post some proggies later :)

~onilika



Is it possible if you can PM me your edited version ? :O

phamxboa

2012-01-09 20:07:22

I've managed to fix the banker, and fire detection, but I'm having an issue where it doesn't choose the cook all option. Can you help me with that ?

shadowmarkus

2012-01-09 20:14:43

From: phamxboa
I've managed to fix the banker, and fire detection, but I'm having an issue where it doesn't choose the cook all option. Can you help me with that ?



I'd like to know how both of you fixed the issue lol.

But, go to line 148, and adjust the
wait(1600 + RandomRange(150, 250));

Adjust the 1600 to fit your need, you might need to raise the number so it clicks correctly, depends on your lag really.

phamxboa

2012-01-09 22:09:47

From: shadowmarkus
I'd like to know how both of you fixed the issue lol.

But, go to line 148, and adjust the
wait(1600 + RandomRange(150, 250));

Adjust the 1600 to fit your need, you might need to raise the number so it clicks correctly, depends on your lag really.



My current issue with what I stated above is that it clicks the fire correctly after selecting the lobster to cook, but when the "cook all" selection shows up, it seems as it doesn't detect it and just continuously clicks the lobster onto the fire

shadowmarkus

2012-01-09 22:42:24

From: phamxboa
My current issue with what I stated above is that it clicks the fire correctly after selecting the lobster to cook, but when the "cook all" selection shows up, it seems as it doesn't detect it and just continuously clicks the lobster onto the fire


The number I gave you, is the amount of time it waits, before it clicks "cook all" So you might have to raise it…

phamxboa

2012-01-09 23:06:25

From: shadowmarkus
The number I gave you, is the amount of time it waits, before it clicks "cook all" So you might have to raise it…


Yeah, tried it, and it doesn't make a difference at all. I don't think you fully understand my issue. Specifically, after it selects the food in the inventory and uses it onto the fire to cook, it doesn't detect the the chatbox area at all, and continues to use the food onto the fire…

shadowmarkus

2012-01-09 23:12:11

From: phamxboa
Yeah, tried it, and it doesn't make a difference at all. I don't think you fully understand my issue. Specifically, after it selects the food in the inventory and uses it onto the fire to cook, it doesn't detect the the chatbox area at all, and continues to use the food onto the fire…


Try keeping an eye on the mouse, does it go to the chatbox area at all, after withdrawing food?

phamxboa

2012-01-09 23:43:07

From: shadowmarkus
Try keeping an eye on the mouse, does it go to the chatbox area at all, after withdrawing food?


I've tested it over 3-4 times just to make sure, and it doesn't go to the chat box area at all.

shadowmarkus

2012-01-10 08:01:50

From: phamxboa
I've tested it over 3-4 times just to make sure, and it doesn't go to the chat box area at all.


That's really odd. I'm looking into it.

The odd part is, I have 2 methods to detect the chatbox, one is an actual color check, which can fail, but the second is a timer, set to click coordinates inside the box, that shouldn't fail, it's the failsafe XD

 wait(1600 + RandomRange(150, 250));
MouseBox(235, 400, 284, 455, Mouse_Left);

I'll look more into it though! :)

Main

2012-01-10 13:12:33

looks sweet and difficult enough. See if you can use move over the object check uptext for banker if it wasn't working.
Will def test this after school today:p

shadowmarkus

2012-01-10 14:11:22

From: Main
looks sweet and difficult enough. See if you can use move over the object check uptext for banker if it wasn't working.
Will def test this after school today:p


Well, I did have an uptext check for the banker! But now it can't find the "Cook all" option in the chatbox, for some reason, even though there's a coordinate failsafe.. :S I'm confused.

Helper

2012-01-10 16:01:03

Nice script :D

lilipeter

2012-01-19 03:56:52

Ok guys so I have fixed the banker problem… Change the first colour to:"3827527" and then the colour after:"3449508" This made a massive difference….

onilika

2012-01-19 08:47:39

The problem isn't clicking on banker or fire. The problem is that after selecting the food and fire, it won't select the 'cook all ' option. And that happened to people that fixed the banking and fire issue. That's wierd.

~onilika

shadowmarkus

2012-01-19 09:31:58

From: onilika
The problem isn't clicking on banker or fire. The problem is that after selecting the food and fire, it won't select the 'cook all ' option. And that happened to people that fixed the banking and fire issue. That's wierd.

~onilika


I have no idea how people are having these issues. I just started the bot up down there, to figure out where the problems are.. But it's running perfectly…

EDIT: Updated to v3. Minor changes really. I'll have to rewrite something later I guess, since so many are having these issues.

Datank

2012-01-20 05:43:24

Does anyone have a rough estimate of xp/h with lobster or swordfish?

Tocholoko

2012-01-22 23:15:55

does this support monkfish??

shadowmarkus

2012-01-23 21:34:48

From: Tocholoko
does this support monkfish??



Yup.

Datank

2012-01-23 23:31:06

How many fish will this cook in an hour with minimal to no lag?

Helper

2012-01-23 23:52:02

i was waiting for this so long ! now i can get 99 cooking

Emotional

2012-06-26 16:59:03

Well, i've got it to where it will actually open the banker for me now, but it won't withdraw anything, it will just click around, so i manually took the food out, cooks on fire fine, but will not look for the banker again… help?

jarnovg

2014-10-07 10:29:20

Can you make this for oldschool runescape?

Nerrultheretard

2014-10-07 11:16:36

From: jarnovg
Can you make this for oldschool runescape?


This thread is two years old. Chances are that this person no longer visits srl. Even if they did still visit the script would pretty much need to be rewritten.

the bank

2014-10-09 14:22:23

gratz on first script!

Harrier

2014-10-09 14:38:44

From: the bank
gratz on first script!

The thread is from 2012…