SRL Archive - RS3 Outdated / Broken Scripts

JJ's Varrock West Bank Cooker


J J

2012-04-06 15:11:19

Hey!

I proudly present to you: JJ's Varrock West Bank Cooker! This script will cook multiple items on your own made fire just outside the varrock west bank. This script has antiban and it can solve randoms. All the stuff that the script does is randomized to avoid bans :)

Video example:
http://www.youtube.com/watch?v=CXlegMTjco0

Before you start the script:
  • Your graphic settings must be set on the lowest possible
  • You must have a tinderbox on your toolbelt
  • Your bank has to be set up like this:
  • Your character has to be in this area:
  • Fill in the correct values at line 45 and 46
  • Leave feedback/rep or anything that can help me!

Scripting notes:
  • SMART
  • Anti-ban
  • Solves random events
  • On screen progress report [NOTE: Will be inaccurate if you burn fish!]
  • Failsafes
  • TPA usage
  • DTM usage
  • Object DTM
  • Animation/PBox
  • Loads of mousebox used
  • Close to everythingis randomized

Be sure to leave some feedback!

Greetz,

JJ.

Majnoon

2012-04-06 18:29:35

Exception in Script: Unable to find file 'ObjectDTM/ObjDTMInclude.simba'


Uhh?

I never deleted a file so how can it not be able to find it?

J J

2012-04-07 04:06:53

From: Majnoon
Uhh?

I never deleted a file so how can it not be able to find it?

http://villavu.com/forum/showthread.php?t=68112&highlight=ObjectDTM
Read & Install that. It's in the scripting notes that it used ObjectDTM and once you get an error like that you can just google it for a quick answer.

Abu

2012-04-07 11:44:07

Its funny, I've literally almost completed a Varrock Cooker myself (hope you don't mind a bit of competition)….

Anyway - your Proggy is inaccurate. It increases CookedFish by 27 every time it cooks - which means it doesn't take into account burnt food or the fact that the fire has run out before it finished cooking.

J J

2012-04-07 11:59:42

From: abu_jwka
Its funny, I've literally almost completed a Varrock Cooker myself (hope you don't mind a bit of competition)….

Anyway - your Proggy is inaccurate. It increases CookedFish by 27 every time it cooks - which means it doesn't take into account burnt food or the fact that the fire has run out before it finished cooking.

Yeah it assumes that your character doesn't burn anything. Oak logs last for around 30 fish it seems and most of the people that use this probably have 30+ firemaking and are probably using willow logs. However, if it would get in a random event or if something else happens the proggy will be inaccurate, indeed.

I might add some things in the future such as even more randomized things, custom antiban, responding to common questions such as cooking level possibly. For now it works though :P I'm not sure how you can identify burned and cooked fish - especially because this script is mainly based on using mouseboxes and some failsafes for when something unexpected happens.. I would have to add bitmaps for loads of cooked / burned fish. The best way would probably be to get the total xp and the xp gained from RuneScape self and divide that by the cooking xp that a fish gives. That way you can have some simple maths such as

Total trips = 10
Total fish = (Total trips)*27 = 270
Total xp = 2000
Fish xp = 10
Max cook xp gained = (fish xp)*(total fish) = 2700
Burned fish = ((Max cook xp gained)-(total xp)/(Fish xp))

I might look at other cooking script to see if they added a feature like this and see if I can learn from that & implement it :P Forgot to add to the main post that the proggy will be inaccurate when you burn fish. I would also like to let it update every second instead of once every trip, but this might take too much RAM, I'll see if it's possible.

–

For the other part, I don't mind "competition" :p We might be able to learn some stuff from eachothers scripts :) At first I was planning to make an Edgeville Bank Cooker, but there are some annoying lamps just outside the bank where you can't lit a fire. So I switched to Varrock West Bank as the walking distance isn't that big :)

Anubis89

2012-04-07 18:23:55

Bot started good, but then became unresponsive. It did the first load just fine, but then it couldn't bank. Any thoughts? I am going to shut it down and try again.

After the bot does the first load, it can't find the bank to deposit the cook fish.

kunzy

2012-04-07 20:27:14

hey JJ, ill try this bit later today and post you if any bugs, thanks for the script tho :)

J J

2012-04-07 20:32:54

From: Anubis89
Bot started good, but then became unresponsive. It did the first load just fine, but then it couldn't bank. Any thoughts? I am going to shut it down and try again.

After the bot does the first load, it can't find the bank to deposit the cook fish.

Might be a problem with your graphic settings or the colors have changed slightly. I will try it out myself tomorrow and see if it sell works correctly. You can try to add some more tolerance to the banker/bankbooth procedures or make the size where it searches for the colors larger. I'll see tomorrow.

From: kunzy
hey JJ, ill try this bit later today and post you if any bugs, thanks for the script tho :)

No problem, let me know :)

bolshak25

2012-04-08 01:33:37

jj if you look at my script, you can see my xp procedure that i use to find what im at exactly. You could use that and have "while cooking do proggy"
then in your proggy have it call xp and youd have realtime info. If you do use it please give me credit.

I have an ak cooker i released that you can see how i did the counting. Not sure if my released version has the proper counter. Im going to send out an update soon to it that i know has the proper counting

krasniy

2012-04-08 09:35:08

Ill try to test this out here later today…..

pigggy

2012-04-09 13:10:48

ill test it out, and post a proggy :D

StickToTheScript

2012-04-09 17:15:30

this script, in my case, ran perfectly!

i enjoyed the work it did! Good jog J J.

StickToTheScript

kunzy

2012-04-09 21:56:08

ran pretty well very impressed JJ :)

raiderbwoi

2012-04-09 23:23:21

ran pretty well indeed almost 2 hours straight but sometimes need babysitting because sometimes it walks back and fourth between the spot where the fire is made and the bank without cooking the fish or closes out the bank too quickly with cooked fish still in inventory

kunzy

2012-04-10 01:55:26

it must be your computer due to lag etc, fix the setting yourself (the waiting times, are in mini seconds remember)
From: raiderbwoi
ran pretty well indeed almost 2 hours straight but sometimes need babysitting because sometimes it walks back and fourth between the spot where the fire is made and the bank without cooking the fish or closes out the bank too quickly with cooked fish still in inventory

J J

2012-04-10 13:39:22

Hmm sorry for the late responses, been busy with other stuff haha.

From: bolshak25
jj if you look at my script, you can see my xp procedure that i use to find what im at exactly. You could use that and have "while cooking do proggy"
then in your proggy have it call xp and youd have realtime info. If you do use it please give me credit.

I have an ak cooker i released that you can see how i did the counting. Not sure if my released version has the proper counter. Im going to send out an update soon to it that i know has the proper counting

I will look into it next weekend :) I will probably add a realtime progress report and add detection of burned fish aswell. Will be a good "training" for another script I'm working on ;) Thanks for the tips :P

From: krasniy
Ill try to test this out here later today…..

Okay.

From: pigggy
ill test it out, and post a proggy :D

Ok, thanks :)

From: StickToTheScript
this script, in my case, ran perfectly!

i enjoyed the work it did! Good jog J J.

StickToTheScript

Thanks, appreciate comments like this :)

From: raiderbwoi
ran pretty well indeed almost 2 hours straight but sometimes need babysitting because sometimes it walks back and fourth between the spot where the fire is made and the bank without cooking the fish or closes out the bank too quickly with cooked fish still in inventory

As said in a quote below here.. probably based on your computer. You can change the waiting times yourself to make it work better for you. It could be something with my script though, but it seems to be something with your script that it tries to withdraw some items before they are loaded on your RuneScape. I try to make my scripts work for every computer, but my own one is pretty fast so yeah.. Let me know if changing the waiting times helps you.

From: kunzy
it must be your computer due to lag etc, fix the setting yourself (the waiting times, are in mini seconds remember)

Responded in the post before this :P It's actually milli[/b seconds haha ;) 1000 milli seconds (ms) = 1 second (s)

kunzy

2012-04-10 18:50:54

hahaha "mini" seconds my bad, got 70 cooking on my pure from this JJ well done:)

RubenPriest

2012-04-11 15:24:06

Its ok. But it doesn't work without supervision.

kunzy

2012-04-12 06:00:12

Ruben, you must be lagging.. change a few settings.. i ran it flawlessly for 22-70 cooking

raiderbwoi

2012-04-12 13:15:47

From: kunzy
Ruben, you must be lagging.. change a few settings.. i ran it flawlessly for 22-70 cooking


what settings did you change?

J J

2012-04-12 13:20:44

From: kunzy
hahaha "mini" seconds my bad, got 70 cooking on my pure from this JJ well done:)

Good to know :)

From: RubenPriest
Its ok. But it doesn't work without supervision.

Hm as Ruben said in a quote below, I think it's a problem with your own settings :P Who knows though ;) I will be adding some new features this weekend I think.

From: kunzy
Ruben, you must be lagging.. change a few settings.. i ran it flawlessly for 22-70 cooking

Answered above :)

hents1230

2012-04-12 15:17:40

Great script, but found some issues.
Firstly sometimes it wount click on bank and run back outside from bank.
Secondly banking issue - Clicks on bank booth but runs imidatly when bank opens. (happens like once in 5 times,but comes back soon)
Thirdly I'm not able to find, where to change time between lighting fire and start cooking. Fixed for myself bank timing but it takes like 5-6 seconds after a light has fired to start cooking and this always happens. I wouldnt mind it, but my campfire will sometimes extinguish before cooking ends and in those 5-6 seconds it can do some fishes instead staring around. (I'm not of a much scripter, but i'm learning something already just from checking issues and timing)
:):p

Mat

2012-04-21 19:23:00

Time to rake in the XP.

J J

2012-04-25 11:05:37

From: hents1230
Great script, but found some issues.
Firstly sometimes it wount click on bank and run back outside from bank.
Secondly banking issue - Clicks on bank booth but runs imidatly when bank opens. (happens like once in 5 times,but comes back soon)
Thirdly I'm not able to find, where to change time between lighting fire and start cooking. Fixed for myself bank timing but it takes like 5-6 seconds after a light has fired to start cooking and this always happens. I wouldnt mind it, but my campfire will sometimes extinguish before cooking ends and in those 5-6 seconds it can do some fishes instead staring around. (I'm not of a much scripter, but i'm learning something already just from checking issues and timing)
:):p

Thanks for pointing out the issues :)
Point 1) I think the problem is mainly based on the waiting times, increasing them will probably fix it
Point 2) Probably another waiting time problem
Point 3) This is the script part
{ Light a log }
Logs := DTMFromString('mAAEAAHiclcvBCkBAFIXhY9aewjNIyUISK5Pm8SeUhbJB3oC/WFiaW9+pU+fGkmojVciRIX2V6OBg0aLBws+AEbOevuPEhhUTPA70RUJGv11Ba8kE7r93A1hgD7U=');
if FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
Wait(600 + Random(300));
if not(FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
Inc(BurnedLogs);
end else
begin
FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
end;
end;
FreeDTM(Logs);
{ Check for fire animation }
PBox := IntToBox(282, 145, 320, 195);
FindNormalRandoms;
Marktime(q);
repeat
Wait(100 + Random(100));
Antiban;
Wait(100 + Random(100));
until (Animating(PBox, 100, 200)) or (TimeFromMark(q)>10000);
WriteLn('We have ignited a log')

This line will count the pixelshift in a box.
until (Animating(PBox, 100, 200))
The box is east of the character just about where the fire will be lit. It will currently check for 100, 200 which means it will count the pixelshift for 100 ms and it waits until the pixelshift has been more than 200 pixels. You can change those values. Either change it into a higher amount of ms waiting, or lower the pixelshift to detect the fire easier. If you have low FPS the pixelshift won't give correct results I believe.

You can also change the waiting time. It waits a maximum of 10 seconds to find the desired animating fire in the box. If more than 10 seconds has passed since attempting to light it, it assumes that is has been lit. You can change this to a lower time if you have a high firemaking level, because you will always lit a log within 1-2 seconds.
(TimeFromMark(q)>10000);
That is the line you can change.

You can also delete the animating part and just let the script wait a random 1-2 seconds
Wait(1000 + Random(1000));
Will wait 1-2 seconds


From: Mat
Time to rake in the XP.

Good luck :D

Wescs

2012-05-11 10:19:29

Add support for tuna please.

EDIT: Does not work, I've tried other fish and it wont cook it.

necher

2012-05-13 10:48:20

It banks and lights without problems but then it clicks on the food, clicks on the bottom (where the button would come up to cook) but inbetween that it doesnt use the food on the fire. Any idea how to fix that?

chuckyb0y

2012-05-14 05:06:46

Does not use fish on fire.

1. Takes Log
2. Takes Fish
3. Runs
4. Light Fire
5. does NOT use fish on it.
6. Repeats.

:(
brightness on max all plugins updated.

I try to do Lobsters.

Debug says nothing

J J

2012-05-22 03:51:52

From: chuckyb0y
Does not use fish on fire.

1. Takes Log
2. Takes Fish
3. Runs
4. Light Fire
5. does NOT use fish on it.
6. Repeats.

:(
brightness on max all plugins updated.

I try to do Lobsters.

Debug says nothing

I'm pretty sure that I know what the problem is. The colors of the burning fire have changed slightly because of the new bonfire update.

procedure StartCooking;
var
X, Y, i, arL: Integer;
arP: TPointArray;
ararP: T2DPointArray;
P: TPoint;

begin;
{ Find fire coordinates }
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
case Random(9) of
0..1: MouseBox(605, 213, 640, 244, 1);
2: MouseBox(605, 249, 640, 280, 1);
3..8: MouseBox(563, 249, 598, 280, 1);
end;
MMouse(P.x, P.y, 5, 5);
Exit;
end;
end;

If you would pick new colors of the fire, the brown/light brown colors at the edges, it will most likely work again. I have final exams myself but I will look into it soon.

SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
Those colors/modifiers need updating other than that it is fine I think.

chuckyb0y

2012-05-22 15:49:39

From: J J
I'm pretty sure that I know what the problem is. The colors of the burning fire have changed slightly because of the new bonfire update.

procedure StartCooking;
var
X, Y, i, arL: Integer;
arP: TPointArray;
ararP: T2DPointArray;
P: TPoint;

begin;
{ Find fire coordinates }
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
case Random(9) of
0..1: MouseBox(605, 213, 640, 244, 1);
2: MouseBox(605, 249, 640, 280, 1);
3..8: MouseBox(563, 249, 598, 280, 1);
end;
MMouse(P.x, P.y, 5, 5);
Exit;
end;
end;

If you would pick new colors of the fire, the brown/light brown colors at the edges, it will most likely work again. I have final exams myself but I will look into it soon.

SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
Those colors/modifiers need updating other than that it is fine I think.


good luck with your exams i am gonna try and fix it :)

public_static_void_main

2012-05-22 21:43:17

Wow JJ this looks brilliant. Thanks you and can't wait to try. Will proggy when i use.

btw: what tweaks need to be made? Saw some people having a few issues with the light of fire.

honeyhoney

2012-05-26 15:41:40

From: public_static_void_main
Wow JJ this looks brilliant. Thanks you and can't wait to try. Will proggy when i use.

btw: what tweaks need to be made? Saw some people having a few issues with the light of fire.


See:

From: J J

SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
Those colors/modifiers need updating other than that it is fine I think.

joshperson

2012-05-26 23:43:39

It works perfectly up till the point of me having to cook the lobster, it clicks use but then the red dot "mouse" goes towards chat and does nothing, then deposits the raw fish, deposits and does the exact same thing. :/

Blackdeath

2012-06-14 09:05:39

I just changed the line above to this color number 4682879 and it found the fire no problem. Great script, will post a proggy in a few hours.

EDIT: Not sure if it matters but that number was from burning a willow log.
EDIT2: One major thing I am noticing that is some what of an issue is the stupid stray dog that comes around, the dog will stand directly on top of the fire and mess up the clicking of the food to the fire.

Knoa

2012-06-18 02:05:42

From: Blackdeath
I just changed the line above to this color number 4682879 and it found the fire no problem. Great script, will post a proggy in a few hours.

EDIT: Not sure if it matters but that number was from burning a willow log.
EDIT2: One major thing I am noticing that is some what of an issue is the stupid stray dog that comes around, the dog will stand directly on top of the fire and mess up the clicking of the food to the fire.


I changed the number too, make sure you click the colour on the side of the logs and not the actual fire and that should get rid of any problems with the dog being in the way.

TehNeonFishy

2012-06-19 09:55:56

After updating the colour, it works perfectly. :D

EDIT: Sometimes I notice after cooking, it will run in the bank, but then walk straight into the firemaking spot again without actually getting more supplies.

thomas1116

2012-06-23 05:48:59

J J could't u please update this ? I cud help u with acc or i can donate u some rsgp if u n eed that for supplies urself… to test and fix ? Really need a coocking script :O !