PDA

View Full Version : [Cooking] [AeroLib] HoodzCooker - Rogues' den



Hoodz
07-28-2015, 09:22 PM
HoodzCooker

as promised the cooker, two more scripts left for release (super heater and fisher)

Features:
- hops worlds if it cant find the banker
- cooks at decent speed
- location: rogues' den
- stats: HoodzCooker (http://stats.grats.pw/variable.php?sid=40)
- cooks: shrimps, trout, salmon, tuna, lobster, shark and karambwam.
- nothing to specify, cooks everything visible (from low to high level)
- auto updater

Media: yes, thats a 12.6m xp proggy including breaks
http://puu.sh/jgzGw/5e2ed3ab27.png

Bugs:
- chance to click on another fire if somebody else is training firemaking there.

Clarity
07-28-2015, 09:23 PM
Congrats on the release, hoodz! :) +Rep

ineedbot
07-28-2015, 09:27 PM
Great work, grats on the release!

Fisher
07-28-2015, 09:40 PM
Very cool script and I cannot wait for your superheater. Only one question, no lobster support?

Hoodz
07-28-2015, 09:49 PM
Congrats on the release, hoodz! :) +Rep
thank you clarity!

Great work, grats on the release!
thanks :)


Very cool script and I cannot wait for your superheater. Only one question, no lobster support?

it does support lobster.

EDIT: added in OP post.

Chris!
07-28-2015, 10:06 PM
Great release Hoodz! That proggy is insane... looking forward to the rest. +rep :).

Sh4d0wf0x
07-29-2015, 10:08 AM
Gratz on the release Hoodz! Just released a rogues den cooker too :p

srlMW
07-29-2015, 12:46 PM
I am in awe of that progress report... :wow:
PS. Gratz on release!

TheShawey
07-30-2015, 12:56 AM
Looks sweet man! Will check it out tomorrow need to re buy members!

Smurf From RiD
07-31-2015, 05:51 PM
Great script, love it, a few comments: When out of raw food sometimes spams clicking in the bank, should log off really. Also when someone lights a fire down there the bot uses that fire and not the correct one - quite botlike and can be lured away if not careful. However, gone from 80-92 cook in a matter of days 10/10

Jeroen
08-02-2015, 01:00 PM
Nice script hoodz. By any chance that you'll add monkfish support? :P Already added it myself. Always learn alot from your scripts, keep up the good work.

Hoodz
08-02-2015, 01:46 PM
Great script, love it, a few comments: When out of raw food sometimes spams clicking in the bank, should log off really. Also when someone lights a fire down there the bot uses that fire and not the correct one - quite botlike and can be lured away if not careful. However, gone from 80-92 cook in a matter of days 10/10
already in OP thread. And i dont feel like adding a failsafe for checking if there are is any food left.

Nice script hoodz. By any chance that you'll add monkfish support? :P Already added it myself. Always learn alot from your scripts, keep up the good work.
gj.

jstemper
08-09-2015, 03:31 AM
You're a beast man, as said above, there is always a lot to learn from your scripts. Your banking and antiban method have been put to good use in some of my private scripts. Only weird thing i noticed is that sometimes it randomly ate my tunas.

rj
09-03-2015, 11:20 PM
Anyone have a proggy of cooking sharks?
hoodz;

Hoodz
09-04-2015, 09:01 PM
Anyone have a proggy of cooking sharks?
hoodz;

idk, i dont have one since i only ran the script once.

iownyou23
09-15-2015, 04:14 AM
idk, i dont have one since i only ran the script once.

Hoodz with another great script! Never disappoint man. I think this is the first working cooking script I've used yet.. I found one problem while running this script. Make sure your raw fish aren't the first item in the tab or else it clicks the tab (on the fish) and begins a loop without withdrawing food. Thanks hoodz!

Becks
09-15-2015, 04:22 AM
Looks great! You think you will be adding monks? Thanks!

Becks

jsand
10-05-2015, 11:55 AM
Tried to cook some diamond bolts in my bank, not sure why lol

Hoodz
10-05-2015, 12:38 PM
Tried to cook some diamond bolts in my bank, not sure why lol

they taste better when cooked.

on a serious note, move them down in your bank.

Zego
10-06-2015, 01:56 PM
Hello,

Could it be possible to include monkfish?

superfonz
11-22-2015, 04:47 PM
make your own DTM its not that hard lol

Bulbasaur
12-27-2015, 09:13 PM
Randomly tries to switch worlds, fails, logs out, picks a world and logs back in. Couldn't figure out how to fix it.

Hoodz
12-27-2015, 09:27 PM
Randomly tries to switch worlds, fails, logs out, picks a world and logs back in. Couldn't figure out how to fix it.

probably wrong brightness

Bulbasaur
12-27-2015, 09:33 PM
27041

rigel
01-03-2016, 12:53 AM
Does not work for Karambwans. Hovers over the "cook thoroughly" option but does not continue past this point

Hoodz
01-03-2016, 06:12 PM
Does not work for Karambwans. Hovers over the "cook thoroughly" option but does not continue past this point
weird, since it only checks for "ook" uptext. try changing the text of the uptext at line 307

rigel
01-03-2016, 08:48 PM
Changed the text in line 307 to "horoughly" and then "thoroughly", no luck.
I think the issue may stem from the different dialogue with Karambwans (but I also don't know anything about scripting)
With other fish, the dialogue says "How many would you like to cook?"
With Karambwans, the dialogue says "How would you like to cook them?"

Hoodz
01-03-2016, 09:01 PM
Changed the text in line 307 to "horoughly" and then "thoroughly", no luck.
I think the issue may stem from the different dialogue with Karambwans (but I also don't know anything about scripting)
With other fish, the dialogue says "How many would you like to cook?"
With Karambwans, the dialogue says "How would you like to cook them?"

does it move the mouse like to the middle of the box where you can choose the karambwam or more to the right side (where the correct karambwam is)
and have you tried other food too?

rigel
01-03-2016, 10:35 PM
does it move the mouse like to the middle of the box where you can choose the karambwam or more to the right side (where the correct karambwam is)
and have you tried other food too?

It hovers over the correct side, with either "ook" or "thoroughly" in line 307. I have tried other food and it works fine

Hoodz
01-03-2016, 10:43 PM
It hovers over the correct side, with either "ook" or "thoroughly" in line 307. I have tried other food and it works fine

what happens if you remove line 307, 308 and 323?
307: if (waitUptext('ook', 670)) then
308: begin
323: end;

rigel
01-03-2016, 11:34 PM
what happens if you remove line 307, 308 and 323?
307: if (waitUptext('ook', 670)) then
308: begin
323: end;

Progress has been made. It right clicks on the proper karambwan, but does not choose an option from the menu.
When I get the chance, I will try to make it left click on the proper karambwan and reduce all the wait times to 1-tick cook the whole inventory

Hoodz
01-03-2016, 11:42 PM
Progress has been made. It right clicks on the proper karambwan, but does not choose an option from the menu.
When I get the chance, I will try to make it left click on the proper karambwan and reduce all the wait times to 1-tick cook the whole inventory

what are the options?

rigel
01-03-2016, 11:52 PM
what are the options?
Make 1
Make 5
Make 10
Make x
Cancel

Hoodz
01-04-2016, 12:12 AM
Make 1
Make 5
Make 10
Make x
Cancel

capital X or not?
if its not a capital change line at around 316
waitOption('Cook X', 300);

to

waitOption('Cook x', 300);

rigel
01-04-2016, 12:50 AM
capital X or not?
if its not a capital change line at around 316
waitOption('Cook X', 300);

to

waitOption('Cook x', 300);

I apologize, it is a capital X

Dead_Photos
01-04-2016, 12:52 AM
I got 99 cooking courtesy of this script :D thank you, Hoodz!

kristi
01-04-2016, 01:10 AM
capital X or not?
if its not a capital change line at around 316
waitOption('Cook X', 300);

to

waitOption('Cook x', 300);

It might be that the font is bugging out, I had a similiar problem that ChooseOption couldn't recognize the correct option.

rigel
01-04-2016, 03:51 AM
I have fixed it, sort of.
With lines 307, 308 and 323 deleted, the new line 315 should be

waitOption('Make X', 300);

because you MAKE karambwans, not COOK them

However, now the issue is that after the inventory is cooked, it does not bank. Rather, it clicks on the cooked karambwans and eats them. I suppose its clicking on them to use on the fire, as if it thinks they are raw

kirk
01-04-2016, 10:02 PM
I have been using your script to get me over forty cooking levels and it has been great! A couple issues though.


I'm not sure what this does as i'm not savvy in SIMBA scripting yet:


ATPA := FloodFillTPA(TPA);
sortATPASize(ATPA, true);
if (length(ATPA[0]) < 20) then
begin

But sometimes the script fails this check and ends up logging out. I realize this because I threw a writeln whenever the fail happens and so it shows in the console. I got annoyed of it and wasn't sure why it was doing it so I commented out the changeworld function and the script will continue working without logging out.
If I unminimize SMART the player script will eat a fish because it is trying to start cooking again and then will properly begin cooking. Not a major issue but I have lost a handful of fish because of this.
It sometimes tries to use my raw fish on players, out of the forty something levels i've gained and while watching it, i've only seen it happen maybe five times.

Hoodz
01-04-2016, 11:03 PM
I have been using your script to get me over forty cooking levels and it has been great! A couple issues though.


I'm not sure what this does as i'm not savvy in SIMBA scripting yet:


ATPA := FloodFillTPA(TPA);
sortATPASize(ATPA, true);
if (length(ATPA[0]) < 20) then
begin

But sometimes the script fails this check and ends up logging out. I realize this because I threw a writeln whenever the fail happens and so it shows in the console. I got annoyed of it and wasn't sure why it was doing it so I commented out the changeworld function and the script will continue working without logging out.
If I unminimize SMART the player script will eat a fish because it is trying to start cooking again and then will properly begin cooking. Not a major issue but I have lost a handful of fish because of this.
It sometimes tries to use my raw fish on players, out of the forty something levels i've gained and while watching it, i've only seen it happen maybe five times.


The last two errors are no problem for me, but about the first one... I made it hop worlds if the banker can't be found (most likely there is a player standing on front of the banker). Can you tell me whats actually wrong with the code? errors or just random world hopping?

kirk
01-04-2016, 11:57 PM
Ah, I never could've guess that was what it was for. Unfortunately since I wasn't aware that it had to do with the banker, I wasn't watching out for it.

It was just random world hopping, it didn't stop the script due to any errors but it seemed to happen quite often.

There are two blocks where it occured so I slightly modified them



tCol.create(2660821, 15, 0.15, 1.42);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
//world := randomWorld(true);
//changeWorld(world, false);
writeln('Something went wrong?! #001');
//exit;
end;


and



ATPA := FloodFillTPA(TPA);
sortATPASize(ATPA, true);
if (length(ATPA[0]) < 20) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
//world := randomWorld(true);
//changeWorld(world, false);
//exit;
writeln('Something went wrong?! #002');
end;


I've never had the first block send a message to the console but the second one goes off at least once an hour. Yet the script proceeds as if nothing is wrong as long as I have the lines commented out.

butlerofrs
01-25-2016, 10:36 PM
Hey wanted to say awesome script and thank you! Also a little feed back, I noticed that when there is an orange kalphite princess pet near the fire the script bugs out and keeps trying to click on it like it is the fire. I know there might be nothing you can do about this since it is color based but thought I would give you a heads up :D

Hoodz
01-25-2016, 10:49 PM
Hey wanted to say awesome script and thank you! Also a little feed back, I noticed that when there is an orange kalphite princess pet near the fire the script bugs out and keeps trying to click on it like it is the fire. I know there might be nothing you can do about this since it is color based but thought I would give you a heads up :D

Thank you!
Currently I don't do anything with bugs because im focussing on Pumba right now. I'm going to create a better version of this script for pumba in the future.

Simbaguardian
01-29-2016, 09:54 AM
Thank you!
Currently I don't do anything with bugs because im focussing on Pumba right now. I'm going to create a better version of this script for pumba in the future.

what is pumba is it any better i see it in your sig lol

Hoodz
01-29-2016, 03:24 PM
what is pumba is it any better i see it in your sig lol

well click on it ;)

maikelpro99
02-01-2016, 11:12 AM
Great script!

Please add Monkfish support :( I've tried everything to do it but i can't let it work.

Mj
02-06-2016, 11:05 AM
Great script!

Please add Monkfish support :( I've tried everything to do it but i can't let it work.

If you try to understand his script it will be very easy to add monkfish support, or if you just read some of the different tutorials it should make more sense. go through each line of code and try to understand what it is doing, and if you cannot figure it out by searching, then ask someone. will be a much better learning process

maikelpro99
02-07-2016, 12:55 AM
If you try to understand his script it will be very easy to add monkfish support, or if you just read some of the different tutorials it should make more sense. go through each line of code and try to understand what it is doing, and if you cannot figure it out by searching, then ask someone. will be a much better learning process

i've tried it again and again but no way, i can't do it. it is cooking monkfishes but then it eats them all.. something is going crazy

Threshold
02-18-2016, 07:58 PM
It spawns smart and then doesn't do anything...

hakishakataki
03-07-2016, 03:22 AM
It spawns smart and then doesn't do anything...

try changing your video settings on your account.

hakishakataki
03-07-2016, 03:26 AM
I am getting this error

Error: Duplicate declaration "AddDTM" at line 164
Compiling failed.

icode
05-11-2016, 01:46 PM
It opens the bank, but doesn't deposit or withdraw food

Hoodz
05-12-2016, 12:50 PM
It opens the bank, but doesn't deposit or withdraw food

what food are you trying to cook? and is your screen set on fixed with the highest brightness?

husow070
05-13-2016, 03:09 PM
sweet man thanks for this

Whiteballs
05-14-2016, 12:00 AM
It would be awesome if you could add a wine making option for fast XP! :stirthepot:

jstemper
05-14-2016, 01:02 AM
It would be awesome if you could add a wine making option for fast XP! :stirthepot:

https://villavu.com/forum/showthread.php?t=113790

tomjerry
05-15-2016, 01:20 AM
Feedback: Sometimes after withdrawing food from bank, the script takes the mouse cursor straight up north of the monitor and then resumes like normal. I suspect it has to do with aero lib changes maybe? Hoodz, all your scripts like this one and fletcher also glitch a little when withdrawing food from bank I noticed. Not sure why though...

Anyhow thanks for awesome scripts.

Solution:Problem solved by removing withdrawing all but one option. Why did this work though?Anybody know?

icode
05-20-2016, 01:25 PM
what food are you trying to cook? and is your screen set on fixed with the highest brightness?

I have on the highest brightness, fixed screen and lobsters. It just opens the bank and I guess it cant find the lobsters :/

If I withdraw the lobsters for it it will cook them and then open the bank again, but not deposit them

is version 1 the most recent one? if not, your downloader isn't working for me

uRLost
05-28-2016, 01:56 PM
Hmmm, trying to figure out why the downloader is not working on my end. Always says I have the latest version, but doesn't actually download anything. Also ran it as admin so that shouldn't be the issue.

Imported the script manually, but it can't seem to withdraw items properly. It moves the mouse up instead of down, making the mouse move all the way off screen.

bv2490
05-30-2016, 11:15 PM
Thanks for this, will have a proggy soon

6ix
06-16-2016, 03:58 PM
Hmmm, trying to figure out why the downloader is not working on my end. Always says I have the latest version, but doesn't actually download anything. Also ran it as admin so that shouldn't be the issue.

Imported the script manually, but it can't seem to withdraw items properly. It moves the mouse up instead of down, making the mouse move all the way off screen.

Same is happening with me! I thought it was because a simple edit cause I saw that "Terminate Script" but I removed that and realized that didn't make a change. I checked the file path in the script and it seems to be the same path. Not sure why it wouldn't be creating the file.

captainblast
06-16-2016, 10:11 PM
Opens up the bank and just sits there, doesnt withdraw or deposit any food. I'll see if I can find a fix, and good to see you're still around Hoodz :) I just came back from a botting break.

slyce
06-19-2016, 05:31 PM
Feedback: Sometimes after withdrawing food from bank, the script takes the mouse cursor straight up north of the monitor and then resumes like normal. I suspect it has to do with aero lib changes maybe? Hoodz, all your scripts like this one and fletcher also glitch a little when withdrawing food from bank I noticed. Not sure why though...

Anyhow thanks for awesome scripts.

Solution:Problem solved by removing withdrawing all but one option. Why did this work though?Anybody know?

Got this problem, too. but it also appears when it's trying to choose "Cook all" or "Cook X". I tryed to both options alone but it didn't work. Any suggestions? It still seems like a prob with the include

Her0nz
08-21-2016, 02:37 AM
Script works great so far, I'll try to get a reasonably decent proggy but I don't bot for particularly long times.

Color scripts are the best, so hard to break :D

Her0nz
08-23-2016, 02:52 PM
Got this problem, too. but it also appears when it's trying to choose "Cook all" or "Cook X". I tryed to both options alone but it didn't work. Any suggestions? It still seems like a prob with the include

It's not a problem with the include it's a problem with the fact that Cook all-but-one isn't an option, it's actually cook all-but-1.

Hoodz
08-23-2016, 05:10 PM
It's not a problem with the include it's a problem with the fact that Cook all-but-one isn't an option, it's actually cook all-but-1.

yes jagex changed it, you can change it manually in the code though.

webbydee
09-16-2016, 12:26 AM
Script still works with all the changes for lobsters with the DTM "mQwAAAHicY2ZgYChkZGBIAOJiIP4D5DMCaU4grvNQAPGgGAEYU UUBo30DPg==" for lobbys, nice work mate.

deepthroat123
12-17-2016, 12:51 PM
That proggy O.O

Great script, will be using it soon.

ThorDev
12-19-2016, 11:01 AM
Idk if it's just me but your updaters don't work for me... At least not this one and neither your fletching script.
Any chance you could post the source?

Dan the man
12-19-2016, 12:19 PM
Idk if it's just me but your updaters don't work for me... At least not this one and neither your fletching script.
Any chance you could post the source?

You can open the script and find the link for the source.

ThorDev
12-19-2016, 12:22 PM
You can open the script and find the link for the source.

Right..... lol nvm, that was a very stupid question lol

Dan the man
12-19-2016, 09:26 PM
Right..... lol nvm, that was a very stupid question lol

No such thing <3

elvenred
01-23-2017, 07:50 PM
I've managed to make this script cook karambwans by changing Cook X to Make X and also changing several other lines, but now it just clicks on the cooked karambwan and therefor eats them instead of banking them. Anyone know how I can fix this particular problem? Tried learning more code but I've had no avail...

Harrier
01-23-2017, 08:11 PM
I've managed to make this script cook karambwans by changing Cook X to Make X and also changing several other lines, but now it just clicks on the cooked karambwan and therefor eats them instead of banking them. Anyone know how I can fix this particular problem? Tried learning more code but I've had no avail...

We don't know what you've changed, post a diff.

elvenred
01-23-2017, 08:45 PM
We don't know what you've changed, post a diff.


Didn't really change much, just deleted lines 307,308 and 323 and changed line 315 from

(Cook X', 300); to (Make X', 300);

Instead of banking, the bot just clicks on the cooked karambwan. I believe the problem is the bot thinks cooked karambwans are the same as raw, which probably means something in the DTM's are off, which I've had no luck in fixing.

the henhead
02-11-2017, 06:30 PM
I'm 500k away from 99, all botted using this script. I changed a few things to make this run smoothly.
changed waitOption('Withdraw-All', 300) to

waitOptionMulti(['Withdraw-All'], 300);
deleted these lines

else
waitOption('Withdraw-All-but-one', 300);
I also changed the free worlds in worldhandler.simba (wasn't this scripts fault it kept switching to f2p worlds. After these changes the script ran flawlessly for 8 hours straight before I manually stopped it.

the henhead
02-11-2017, 08:41 PM
i've tried it again and again but no way, i can't do it. it is cooking monkfishes but then it eats them all.. something is going crazy

DTM_Monkfish := DTMFromString('mrAAAAHic42BgYMhkYmBIAOJyIM4C4hQgTg TiCiCuAeJnQDWPgfg1lH4AxG+A+B0Q3wHi5kgvhoYgDzCujXYH ijCiYH4giQ8zEsAwAABT2w+m');

iiTouchMyself
02-24-2017, 10:10 PM
Tried using this script to cook karambwan. Everything works fine until it uses the karambwan on the fire. It will mouse over "Thoroughly" and do nothing for about two seconds before it repeats the process.

Tried different zooms and brightnesses, but I have no idea what i'm doing and it still doesn't work.

niot
03-26-2017, 10:39 AM
where do i type in what food i want to cook ? cant find it

niot
03-28-2017, 02:04 PM
where do i type in what food i want to cook ? cant find it

anyone? :(

Harrier
03-28-2017, 02:08 PM
anyone? :(

Press play with any food you want cooking visible in your bank without scrolling.

niot
03-28-2017, 03:01 PM
thank you! :)

impitup
04-28-2017, 06:34 AM
very good script, just needed to change some text and dtms to get everything running smoothly

withdraw text in game is different than in the script,

I think I made these changes

waitOption('Withdraw-All ', 300); to
waitOption('Withdraw-All', 300);

waitOption('Withdraw-All-but-one', 300); to
waitOption('Withdraw-All-but-1', 300);

Karambwan cooking the text is also different, I think it's make instead of cook, just change the text to what's in the game

Also with karambwan cooking it starts eating the cooked karambwans, I think because they match the dtm of a lower level fish
I changed the dtm of everything besides karambwan to the raw lobster dtm and it fixed to problem

still have some problems with my world list but thats not the scripts fault and tbf I haven't put much time into fixing it

codexfiles981
05-08-2017, 10:05 PM
very good script, just needed to change some text and dtms to get everything running smoothly

withdraw text in game is different than in the script,

I think I made these changes

waitOption('Withdraw-All ', 300); to
waitOption('Withdraw-All', 300);

waitOption('Withdraw-All-but-one', 300); to
waitOption('Withdraw-All-but-1', 300);

Karambwan cooking the text is also different, I think it's make instead of cook, just change the text to what's in the game

Also with karambwan cooking it starts eating the cooked karambwans, I think because they match the dtm of a lower level fish
I changed the dtm of everything besides karambwan to the raw lobster dtm and it fixed to problem

still have some problems with my world list but thats not the scripts fault and tbf I haven't put much time into fixing it

I'm having the same problems with the world select as well. I believe that's smart related and not this script. Manually selecting the worlds seems to work just fine after.

OSRS BOT
05-16-2017, 11:01 PM
Tested the bot for a few hours. Worked good.

I did not change any of the code.

Hylix
08-01-2017, 02:43 PM
Sadly not working for me in combination with sharks. It however did try to cook my feathers...
Any idea how to solve this?

edit:
I made a new DTM for shark which works :)
mlwAAAHicY2dgYJjGBMGLgHg+EM8A4i4g7gRib0YGBlcgDgLia CgdD8TBQFyckQHUzYgD4wa4dCDpAgCc4gfG

Ofcourse set the brightness to full :)

ccesssu
08-10-2017, 03:07 AM
Working great for me! Thanks for the DTM

lolskilla
09-27-2017, 05:00 PM
works well, only issue is the banking can be iffy. doesnt always withdraw correctly. CHanging speeds helps. Thanks @Hoodz.

jajo123
12-26-2017, 06:31 AM
How do you change it to work with the new production screen interface?

underforu
01-17-2018, 08:47 PM
How do you change it to work with the new production screen interface?
program HoodzCooker;
{$i AeroLib/AeroLib.Simba}

var
x, y, cooked, currentFood: Integer;
DTM_Lobster, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Karambwam, DTM_Shrimp, DTM_Shark,DTM_Swordfish,DTM_MonkFish,DTM_Angler: Integer;
Raw_Array, xpTable: TIntegerArray;
breakAfterTime, breakLength: Integer;

const
P_USERNAME = '';
P_PASSWORD = '';
P_PIN = '';

USEBREAKS = true;
breakAfterHours_MIN = 2;
breakAfterHours_MAX = 3;
breakForMinutes_MIN = 30;
breakForMinutes_MAX = 90;

VERSION = '1';

procedure declarePlayer();
begin
Me.Name := P_USERNAME;
Me.Pass := P_PASSWORD;
Me.Pin := P_PIN;
Me.Nick := '';
Me.Active := True;
Me.Member := True;
end;

procedure updater();
var
NewFile: integer;
OnlineVersion, NewScript, NewFileName: string;
begin
writeln('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=Fnc4CpZp');
if (trim(OnlineVersion) > VERSION) then
begin
writeLn('Script update available!');
writeLn('Updating script to v' + OnlineVersion);
NewScript := GetPage('http://pastebin.com/raw.php?i=LJWtzExX');
NewFileName := 'C:\Simba\Scripts\' + 'HoodzCooker Aero V' + Trim(OnlineVersion) + '.simba';
NewFile := Rewritefile(NewFileName, true);
try
WriteFileString(NewFile, NewScript);
except
begin
writeLn('Fatal error writing to ' + NewFileName + '!!');
terminatescript;
end;
end;
CloseFile(NewFile);
writeLn('New script downloaded to ' + NewFileName + '. Please restart Simba.');
TerminateScript;
end
else
writeLn('You have the latest version of the script!');
end;

{procedure stats_check;
begin
if (STATS_ID = '') then
begin
writeln('You MUST have a stats account registered to use this script');
writeln('You can register for free here: http://stats.grats.pw/reg.php');
writeln('More information about stats here: https://villavu.com/forum/showthread.php?t=112103&p=1332139');
TerminateScript;
end;
end; }

procedure randomBreakTime();
begin
breakAfterTime := GetTimeRunning + (RandomRange(breakAfterHours_MIN, breakAfterHours_MAX) * 3600000) + RandomRange(2000, 3500000);
Writeln('breakAfterTime = ' + MsToTime(breakAfterTime, 3));
breakLength := (RandomRange(breakForMinutes_MIN, breakForMinutes_MAX) * 60000) + RandomRange(2000, 59000);
Writeln('breakLength = ' + MsToTime(breakLength, 3));
end;

procedure BreakHandlerCustom();
begin
writeln('starting breakhandler');
while (isLoggedIn) do
logoutPlayer;
while not (getTimeRunning >= (breakAfterTime + breakLength)) do
begin
Writeln('Break handler active');
Writeln('TimeRunning: ' + MsToTime(getTimeRunning, 3));
Writeln('Breaking till: ' + MsToTime((breakAfterTime + breakLength), 3));
Writeln('Time left until break is done: ' + MsToTime(((breakAfterTime + breakLength) - getTimeRunning), 3));
Sleep(5000);
ClearDebug;
end;
randomBreakTime;
end;

procedure free;
begin
freeDTM(DTM_Lobster);
freeDTM(DTM_Trout);
freeDTM(DTM_Salmon);
freeDTM(DTM_Tuna);
freeDTM(DTM_Karambwam);
freeDTM(DTM_Shrimp);
freeDTM(DTM_Shark);
freeDTM(DTM_Swordfish);
freeDTM(DTM_MonkFish);
freeDTM(DTM_Angler);
end;

procedure setupPlayer();
begin
writeln('player setup...');
if (not isLoggedIn()) then
loginPlayer(false);
if (isLoggedIn()) then
begin
toggleRunning(true);
setAngle(ANGLE_HIGH);
end;
end;

procedure setup();
begin
mouseSpeed := Random(18, 25);
writeln('mouseSpeed set at: ' + intToStr(mouseSpeed));
DTM_Lobster := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ7IDYHYhMg9g biJ0C5j0D8GohfAfFTIH4OxBUuckCSEQOzM2AHmCohGAIA83QH 9g==');
DTM_Shark := DTMFromString('mggAAAHicY2NgYGgH4logngZlVwPxFCBOBO IiIC4A4nQgToPi6b09QJIRA7MzYAeYKiEYAgDc0Qdv');
DTM_Trout := DTMFromString('mbQAAAHicY2VgYHBiYmCwB2I3IDYFYksgfg EUf8cAoV8B8QcgPrJ7F5BkRMHsDJiAEQsGAwBuJwgm');
DTM_Shrimp := DTMFromString('mggAAAHicY2NgYOBnhmAmIOYEYnEglgJiNU YGBiNGCG0IxFpArALEezuzgboYMTA7A3aAqRKCIQAAFswDOQ== ');
DTM_Salmon := DTMFromString('mggAAAHicY2NgYNBiYWBQA2JZINYHYk0glg NiVUYgH4i1gVgDyjYE4q5wf6AuRgzMzoAdYKqEYAgAADSUA1E= ');
DTM_Tuna := DTMFromString('mwQAAAHic42RgYLjLxMDwGIgvA/EtIL4HxM+A+CYQv4XyIxgZGOKAOBaIE6E4CohDGCFy0UC8b8sW oGmMuLEsAwM7A37Ajt8EOIYDACVbDZE=');
DTM_Karambwam := DTMFromString('mrAAAAHic42BgYNjIxMCwAYi3A/FyIF4PxLuAeB8QLwbit0A1P4D4CxB/BeLfUP4nIH4HxC4xJkCSESdmZ8APcOuEYBgAAGHHDi0=');;
DTM_Swordfish := DTMFromString('mAAEAAHiclcuxCoJgAMTxc+8RCyyHgsQHaA 7CycElycAhHOTLqGj4JiGhRnHQ5+kfNrR68JvubiKpcAYlrj8J UhyR4YQLcsz4uJjDwxIB1lhhgamG3be326deh0aN6dVWnfLQ6B zddYutbFrJbB7a+5l2bqS6eGtsnJH+8wHxVSSF');
DTM_MonkFish := DTMFromString('mVAEAAHicE2BgYFjKyMCwAohXA/FmIN4OxeuhYsuBeBEQzwXi2UA8D8peAMRLgDgNaEY2EGcyQNgZ UH4KFMcBcTwUJwFxMpIaEG6P8WFId7JiSHGwZMj2tGFw1lJjiL Y0YQi3MQDzE53MGSojXBkKfe0ZynycGSYmBzFsra1i2FhVznDu +DEGSgEjhRgdAACuCyLM');
DTM_Angler := DTMFromString('mVAEAAHicE2BgYFjJyMCwHIgXA/FcIJ4NxHOg7HVAvAmItwHxdigN4q8H4iVAvBCIE4Fm5AFxIRRn A3EGEKcCcRQQxwJxPBAnA3EaEKdA5WKg/J2H9jIomWgw9HcWMtRWJDM01aQxWM5NZ9i9dRpDSIAaQ2C4AUN 0uBaDWr4ng4+HEoNVmBODgYc5g09BOMOZYxsZKAWMFGJ0AAAjl iQ4');
Raw_Array := [DTM_Shrimp, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Lobster, DTM_Shark, DTM_Karambwam,DTM_Swordfish,DTM_MonkFish,DTM_Angle r];
xpTable := [30, 70, 90, 100, 120, 210, 190,140,150,230];
addOnTerminate('free');
randomBreakTime();
setupPlayer();
end;

procedure customMouse(point: TPoint);
begin
case random(0, 6) of
0..2: BrakeMMouse(point, random(5), random(5), true);
3: BrakeMMouse(point, random(5), random(5), false);
4..5: MissMouse(point, random(5), random(5));
6: HumanMMouse(point, random(5), random(5));
end;
end;

function waitForPixelShift(amount, timeOut: Integer; box: TBox): Boolean;
var
x1, y1, BMP, BMP2, tempShift: Integer;
t: Timer;
begin
result := false;
t.start();
BMP := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
repeat
if (t.timeElapsed() >= timeOut) then
break;
sleep(250);
BMP2 := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
tempShift := calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1)));
if (calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1))) >= amount) then
result := true;
freeBitmap(BMP2);
until (Result);
freeBitmap(BMP);
end;

function getLocations(DTM: Integer): TIntegerArray;
var
I: Integer;
tempArray: TIntegerArray;
begin
setLength(tempArray, 0);
for I := 1 to 28 do
begin
if (FindDTM(DTM, x, y, invBox(I).x1, invBox(I).y1, invBox(I).x2, invBox(I).y2)) then
begin
SetLength(tempArray, Length(tempArray) + 1);
tempArray[High(tempArray)] := I;
end;
end;
result := tempArray;
end;

function textVisible(): Boolean;
var
t: Timer;
numb: Integer;
begin
result := false;
numb := random(2000, 3000);
t.start();
repeat
if (t.timeElapsed() > numb) then
break;
sleep(random(320, 600));
if (countColor(0, 211, 392, 307, 411) = 277) then
result := true;
until (result);
end;

function selectMenu(): Boolean;
begin
result := (countColor(128, 129, 359, 379, 382) > 50);
end;

procedure cookHandler();
var
Timer, world, I, rand: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
spot, selectPoint: TPoint;
aBool: Boolean;
tCol : TColEx;
begin
aBool := false;
if (not anySlotActivated()) then
begin
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
customMouse(point(x, y));
sleep(20 + random(30));
case random(12) of
0..10: fastClick(MOUSE_LEFT);
11:
begin
fastClick(MOUSE_RIGHT);
waitOption('Use', 300);
end;
end;
sleep(20 + random(120));
break;
end
else
if (I = length(Raw_Array)) then
exit;
end;
end;
tCol.create(2660821, 15, 0.15, 1.42);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
ATPA := FloodFillTPA(TPA);
sortATPASize(ATPA, true);
if (length(ATPA[0]) < 20) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
sleep(200 + random(200));
if (not anySlotActivated()) then
exit;
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(150));
if (waitUpText('ire', 300)) then
begin
aBool := true;
case random(10) of
0..8: fastClick(MOUSE_LEFT);
9:
begin
fastClick(MOUSE_RIGHT);
waitOption('-> Fire', 300);
end;
end;
end
else
begin
fastClick(MOUSE_RIGHT);
if (waitOption('-> Fire', 300)) then
aBool := true;
end;
if (aBool) then
begin
//sleep(1000);
timer := (getTimeRunning() + 6000 + random(1200));
while (isLoggedIn) and (not selectMenu()) and (getTimeRunning() < timer) do
sleep(200 + random(150));
// if (selectMenu()) then
begin
if (I = high(RAW_ARRAY)) then
selectPoint := Point(245, 410)
else
selectPoint := Point(260, 424);
customMouse(point(selectPoint.X + random( - 22, 22), selectPoint.Y + random( - 17, 30)));
begin
fastClick(MOUSE_LEFT);
{ if (I = high(RAW_ARRAY)) then
rand := 0
else
rand := random(16);
case rand of
0:
begin
waitOption('Cook X', 300);
if (textVisible()) then
typeSend(toStr(random(28, 99)), true);
end;
1..15: waitOption('Cook All', 300); }
end;
end;
end;
end;


procedure antiban();
var
rand: Integer;
what: String
begin
if (random(0, 30) = 0) then
begin
rand := random(0, 71);
case rand of
0..45:
begin
if (pointInBox(getMousePnt(), intToBox(1, 1, 765, 500))) then
MMouseOffClient('random');
what := 'mouse off client';
end;
46..51:
begin
compassMovement(30, 170, false);
what := 'compass movement';
end;
52..57:
begin
hoverSkill(SKILL_COOKING, false);
what := 'hovering skill';
end;
58..70:
begin
pickUpMouse;
what := 'pick up mouse';
end;
end;
writeln('last antiban on: ' + mstoTime(getTimeRunning, 3) + ' ' + what);
end;
end;

procedure bankHandler();
var
slot, I: Integer;
slots: TIntegerArray;
begin
if (Interfaces[PINSCREEN].isVisible()) then
inPin(P_PIN);
case random(30) of
0..28: quickDeposit('inv');
29:
begin
middleBox(invBox(1));
customMouse(Point(x, y));
sleep(20 + random(20));
fastClick(MOUSE_RIGHT);
waitOption('Deposit-All', 300);
end;
end;
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
customMouse(Point(x, y));
sleep(20 + random(30));
fastClick(MOUSE_RIGHT);
if (random(0, 1) = 0) then
waitOption('Withdraw-All ', 300)
else
waitOption('Withdraw-All-but-1', 300);
sleep(100 + random(100));
closeInterface();
sleep(500 + random(300));
cookhandler();
break;
end else
begin
if (isBankOpen() and (I = length(Raw_Array))) then
begin
closeInterface();
logoutPlayer();
writeln('out of raws');
terminateScript();
end;
end;
end;
end;

procedure openBank();
var
TPA: TPointArray;
ATPA: T2DPointArray;
I, world: Integer;
spot: TPoint;
t: Timer;
tCol : TColEx;
begin
if (isBankOpen()) then
exit;
if (Interfaces[PINSCREEN].isVisible()) then
inPin(P_PIN);
tCol.create(1521211, 10, 0.08, 0.91);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
ATPA := FloodFillTPA(TPA);
SortATPASize(ATPA, true);
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(30));
if (waitUptext('ald', 250)) then
begin
fastClick(MOUSE_RIGHT);
waitOption('Bank', 300);
I := getTimeRunning() + 3000 + random(1000);
while (not isBankOpen()) and (getTimeRunning < I) do
sleep(250 + random(200));
end;
end;

function findAnyRaw(): Boolean;
var
I: Integer;
begin
result := false;
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
currentFood := I;
exit(true);
end;
end;
end;

procedure incVars();
var
xp: Integer;
begin
xp := xpTable[currentFood];
stats_incVariable('78', xp);
end;

function getState(): Integer;
begin
if (getTimeRunning >= breakAfterTime) and (USEBREAKS) then
exit(7);
if (not isLoggedIn()) then
exit(0);
if ((getCurrentTab <> TAB_INV) and (not isBankOpen())) then
exit(1);
if (not findAnyRaw()) and (not isBankOpen()) then
exit(5);
if (not findAnyRaw()) and (isBankOpen()) then
exit(6);
if (findAnyRaw()) and (isBankOpen()) then
exit(2);
if (findAnyRaw()) and (not isBankOpen()) and (not waitForPixelShift(10, 3400, intToBox(MIX1, MIY1, MIX2, MIY2))) then
exit(3);
incVars();
exit(4);
end;

procedure executeState(State: Integer);
begin
case (State) of
0: setupPlayer();
1: gameTab(TAB_INV);
2: closeInterface();
3: cookHandler();
4: antiban();
5: openBank();
6: bankHandler();
7: breakHandlerCustom();
end;
stats_Commit();
sleep(Random(100, 200));
end;

begin
declarePlayer();
initAL();
updater();
setup();
stats_setup('40');
//stats_check;
stats_initVariable('78', 0);
repeat
executeState(getState());
until (false);
end.


This is the code that i used to fix the interface problems. I got 99 cooking recently with this code. Also thanks hoodz

Hoodz
01-21-2018, 03:33 AM
program HoodzCooker;
{$i AeroLib/AeroLib.Simba}

var
x, y, cooked, currentFood: Integer;
DTM_Lobster, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Karambwam, DTM_Shrimp, DTM_Shark,DTM_Swordfish,DTM_MonkFish,DTM_Angler: Integer;
Raw_Array, xpTable: TIntegerArray;
breakAfterTime, breakLength: Integer;

const
P_USERNAME = '';
P_PASSWORD = '';
P_PIN = '';

USEBREAKS = true;
breakAfterHours_MIN = 2;
breakAfterHours_MAX = 3;
breakForMinutes_MIN = 30;
breakForMinutes_MAX = 90;

VERSION = '1';

procedure declarePlayer();
begin
Me.Name := P_USERNAME;
Me.Pass := P_PASSWORD;
Me.Pin := P_PIN;
Me.Nick := '';
Me.Active := True;
Me.Member := True;
end;

procedure updater();
var
NewFile: integer;
OnlineVersion, NewScript, NewFileName: string;
begin
writeln('Checking for script updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=Fnc4CpZp');
if (trim(OnlineVersion) > VERSION) then
begin
writeLn('Script update available!');
writeLn('Updating script to v' + OnlineVersion);
NewScript := GetPage('http://pastebin.com/raw.php?i=LJWtzExX');
NewFileName := 'C:\Simba\Scripts\' + 'HoodzCooker Aero V' + Trim(OnlineVersion) + '.simba';
NewFile := Rewritefile(NewFileName, true);
try
WriteFileString(NewFile, NewScript);
except
begin
writeLn('Fatal error writing to ' + NewFileName + '!!');
terminatescript;
end;
end;
CloseFile(NewFile);
writeLn('New script downloaded to ' + NewFileName + '. Please restart Simba.');
TerminateScript;
end
else
writeLn('You have the latest version of the script!');
end;

{procedure stats_check;
begin
if (STATS_ID = '') then
begin
writeln('You MUST have a stats account registered to use this script');
writeln('You can register for free here: http://stats.grats.pw/reg.php');
writeln('More information about stats here: https://villavu.com/forum/showthread.php?t=112103&p=1332139');
TerminateScript;
end;
end; }

procedure randomBreakTime();
begin
breakAfterTime := GetTimeRunning + (RandomRange(breakAfterHours_MIN, breakAfterHours_MAX) * 3600000) + RandomRange(2000, 3500000);
Writeln('breakAfterTime = ' + MsToTime(breakAfterTime, 3));
breakLength := (RandomRange(breakForMinutes_MIN, breakForMinutes_MAX) * 60000) + RandomRange(2000, 59000);
Writeln('breakLength = ' + MsToTime(breakLength, 3));
end;

procedure BreakHandlerCustom();
begin
writeln('starting breakhandler');
while (isLoggedIn) do
logoutPlayer;
while not (getTimeRunning >= (breakAfterTime + breakLength)) do
begin
Writeln('Break handler active');
Writeln('TimeRunning: ' + MsToTime(getTimeRunning, 3));
Writeln('Breaking till: ' + MsToTime((breakAfterTime + breakLength), 3));
Writeln('Time left until break is done: ' + MsToTime(((breakAfterTime + breakLength) - getTimeRunning), 3));
Sleep(5000);
ClearDebug;
end;
randomBreakTime;
end;

procedure free;
begin
freeDTM(DTM_Lobster);
freeDTM(DTM_Trout);
freeDTM(DTM_Salmon);
freeDTM(DTM_Tuna);
freeDTM(DTM_Karambwam);
freeDTM(DTM_Shrimp);
freeDTM(DTM_Shark);
freeDTM(DTM_Swordfish);
freeDTM(DTM_MonkFish);
freeDTM(DTM_Angler);
end;

procedure setupPlayer();
begin
writeln('player setup...');
if (not isLoggedIn()) then
loginPlayer(false);
if (isLoggedIn()) then
begin
toggleRunning(true);
setAngle(ANGLE_HIGH);
end;
end;

procedure setup();
begin
mouseSpeed := Random(18, 25);
writeln('mouseSpeed set at: ' + intToStr(mouseSpeed));
DTM_Lobster := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ7IDYHYhMg9g biJ0C5j0D8GohfAfFTIH4OxBUuckCSEQOzM2AHmCohGAIA83QH 9g==');
DTM_Shark := DTMFromString('mggAAAHicY2NgYGgH4logngZlVwPxFCBOBO IiIC4A4nQgToPi6b09QJIRA7MzYAeYKiEYAgDc0Qdv');
DTM_Trout := DTMFromString('mbQAAAHicY2VgYHBiYmCwB2I3IDYFYksgfg EUf8cAoV8B8QcgPrJ7F5BkRMHsDJiAEQsGAwBuJwgm');
DTM_Shrimp := DTMFromString('mggAAAHicY2NgYOBnhmAmIOYEYnEglgJiNU YGBiNGCG0IxFpArALEezuzgboYMTA7A3aAqRKCIQAAFswDOQ== ');
DTM_Salmon := DTMFromString('mggAAAHicY2NgYNBiYWBQA2JZINYHYk0glg NiVUYgH4i1gVgDyjYE4q5wf6AuRgzMzoAdYKqEYAgAADSUA1E= ');
DTM_Tuna := DTMFromString('mwQAAAHic42RgYLjLxMDwGIgvA/EtIL4HxM+A+CYQv4XyIxgZGOKAOBaIE6E4CohDGCFy0UC8b8sW oGmMuLEsAwM7A37Ajt8EOIYDACVbDZE=');
DTM_Karambwam := DTMFromString('mrAAAAHic42BgYNjIxMCwAYi3A/FyIF4PxLuAeB8QLwbit0A1P4D4CxB/BeLfUP4nIH4HxC4xJkCSESdmZ8APcOuEYBgAAGHHDi0=');;
DTM_Swordfish := DTMFromString('mAAEAAHiclcuxCoJgAMTxc+8RCyyHgsQHaA 7CycElycAhHOTLqGj4JiGhRnHQ5+kfNrR68JvubiKpcAYlrj8J UhyR4YQLcsz4uJjDwxIB1lhhgamG3be326deh0aN6dVWnfLQ6B zddYutbFrJbB7a+5l2bqS6eGtsnJH+8wHxVSSF');
DTM_MonkFish := DTMFromString('mVAEAAHicE2BgYFjKyMCwAohXA/FmIN4OxeuhYsuBeBEQzwXi2UA8D8peAMRLgDgNaEY2EGcyQNgZ UH4KFMcBcTwUJwFxMpIaEG6P8WFId7JiSHGwZMj2tGFw1lJjiL Y0YQi3MQDzE53MGSojXBkKfe0ZynycGSYmBzFsra1i2FhVznDu +DEGSgEjhRgdAACuCyLM');
DTM_Angler := DTMFromString('mVAEAAHicE2BgYFjJyMCwHIgXA/FcIJ4NxHOg7HVAvAmItwHxdigN4q8H4iVAvBCIE4Fm5AFxIRRn A3EGEKcCcRQQxwJxPBAnA3EaEKdA5WKg/J2H9jIomWgw9HcWMtRWJDM01aQxWM5NZ9i9dRpDSIAaQ2C4AUN 0uBaDWr4ng4+HEoNVmBODgYc5g09BOMOZYxsZKAWMFGJ0AAAjl iQ4');
Raw_Array := [DTM_Shrimp, DTM_Trout, DTM_Salmon, DTM_Tuna, DTM_Lobster, DTM_Shark, DTM_Karambwam,DTM_Swordfish,DTM_MonkFish,DTM_Angle r];
xpTable := [30, 70, 90, 100, 120, 210, 190,140,150,230];
addOnTerminate('free');
randomBreakTime();
setupPlayer();
end;

procedure customMouse(point: TPoint);
begin
case random(0, 6) of
0..2: BrakeMMouse(point, random(5), random(5), true);
3: BrakeMMouse(point, random(5), random(5), false);
4..5: MissMouse(point, random(5), random(5));
6: HumanMMouse(point, random(5), random(5));
end;
end;

function waitForPixelShift(amount, timeOut: Integer; box: TBox): Boolean;
var
x1, y1, BMP, BMP2, tempShift: Integer;
t: Timer;
begin
result := false;
t.start();
BMP := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
repeat
if (t.timeElapsed() >= timeOut) then
break;
sleep(250);
BMP2 := bitmapFromClient(box.x1, box.y1, box.x2, box.y2);
tempShift := calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1)));
if (calculatePixelShift(BMP, BMP2, IntToBox(0, 0, (box.x2 - box.x1), (box.y2 - box.y1))) >= amount) then
result := true;
freeBitmap(BMP2);
until (Result);
freeBitmap(BMP);
end;

function getLocations(DTM: Integer): TIntegerArray;
var
I: Integer;
tempArray: TIntegerArray;
begin
setLength(tempArray, 0);
for I := 1 to 28 do
begin
if (FindDTM(DTM, x, y, invBox(I).x1, invBox(I).y1, invBox(I).x2, invBox(I).y2)) then
begin
SetLength(tempArray, Length(tempArray) + 1);
tempArray[High(tempArray)] := I;
end;
end;
result := tempArray;
end;

function textVisible(): Boolean;
var
t: Timer;
numb: Integer;
begin
result := false;
numb := random(2000, 3000);
t.start();
repeat
if (t.timeElapsed() > numb) then
break;
sleep(random(320, 600));
if (countColor(0, 211, 392, 307, 411) = 277) then
result := true;
until (result);
end;

function selectMenu(): Boolean;
begin
result := (countColor(128, 129, 359, 379, 382) > 50);
end;

procedure cookHandler();
var
Timer, world, I, rand: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
spot, selectPoint: TPoint;
aBool: Boolean;
tCol : TColEx;
begin
aBool := false;
if (not anySlotActivated()) then
begin
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
customMouse(point(x, y));
sleep(20 + random(30));
case random(12) of
0..10: fastClick(MOUSE_LEFT);
11:
begin
fastClick(MOUSE_RIGHT);
waitOption('Use', 300);
end;
end;
sleep(20 + random(120));
break;
end
else
if (I = length(Raw_Array)) then
exit;
end;
end;
tCol.create(2660821, 15, 0.15, 1.42);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
ATPA := FloodFillTPA(TPA);
sortATPASize(ATPA, true);
if (length(ATPA[0]) < 20) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
sleep(200 + random(200));
if (not anySlotActivated()) then
exit;
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(150));
if (waitUpText('ire', 300)) then
begin
aBool := true;
case random(10) of
0..8: fastClick(MOUSE_LEFT);
9:
begin
fastClick(MOUSE_RIGHT);
waitOption('-> Fire', 300);
end;
end;
end
else
begin
fastClick(MOUSE_RIGHT);
if (waitOption('-> Fire', 300)) then
aBool := true;
end;
if (aBool) then
begin
//sleep(1000);
timer := (getTimeRunning() + 6000 + random(1200));
while (isLoggedIn) and (not selectMenu()) and (getTimeRunning() < timer) do
sleep(200 + random(150));
// if (selectMenu()) then
begin
if (I = high(RAW_ARRAY)) then
selectPoint := Point(245, 410)
else
selectPoint := Point(260, 424);
customMouse(point(selectPoint.X + random( - 22, 22), selectPoint.Y + random( - 17, 30)));
begin
fastClick(MOUSE_LEFT);
{ if (I = high(RAW_ARRAY)) then
rand := 0
else
rand := random(16);
case rand of
0:
begin
waitOption('Cook X', 300);
if (textVisible()) then
typeSend(toStr(random(28, 99)), true);
end;
1..15: waitOption('Cook All', 300); }
end;
end;
end;
end;


procedure antiban();
var
rand: Integer;
what: String
begin
if (random(0, 30) = 0) then
begin
rand := random(0, 71);
case rand of
0..45:
begin
if (pointInBox(getMousePnt(), intToBox(1, 1, 765, 500))) then
MMouseOffClient('random');
what := 'mouse off client';
end;
46..51:
begin
compassMovement(30, 170, false);
what := 'compass movement';
end;
52..57:
begin
hoverSkill(SKILL_COOKING, false);
what := 'hovering skill';
end;
58..70:
begin
pickUpMouse;
what := 'pick up mouse';
end;
end;
writeln('last antiban on: ' + mstoTime(getTimeRunning, 3) + ' ' + what);
end;
end;

procedure bankHandler();
var
slot, I: Integer;
slots: TIntegerArray;
begin
if (Interfaces[PINSCREEN].isVisible()) then
inPin(P_PIN);
case random(30) of
0..28: quickDeposit('inv');
29:
begin
middleBox(invBox(1));
customMouse(Point(x, y));
sleep(20 + random(20));
fastClick(MOUSE_RIGHT);
waitOption('Deposit-All', 300);
end;
end;
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
customMouse(Point(x, y));
sleep(20 + random(30));
fastClick(MOUSE_RIGHT);
if (random(0, 1) = 0) then
waitOption('Withdraw-All ', 300)
else
waitOption('Withdraw-All-but-1', 300);
sleep(100 + random(100));
closeInterface();
sleep(500 + random(300));
cookhandler();
break;
end else
begin
if (isBankOpen() and (I = length(Raw_Array))) then
begin
closeInterface();
logoutPlayer();
writeln('out of raws');
terminateScript();
end;
end;
end;
end;

procedure openBank();
var
TPA: TPointArray;
ATPA: T2DPointArray;
I, world: Integer;
spot: TPoint;
t: Timer;
tCol : TColEx;
begin
if (isBankOpen()) then
exit;
if (Interfaces[PINSCREEN].isVisible()) then
inPin(P_PIN);
tCol.create(1521211, 10, 0.08, 0.91);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
if (isBankOpen()) then
begin
closeInterface();
exit;
end;
world := randomWorld(true);
changeWorld(world, false);
exit;
end;
ATPA := FloodFillTPA(TPA);
SortATPASize(ATPA, true);
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(30));
if (waitUptext('ald', 250)) then
begin
fastClick(MOUSE_RIGHT);
waitOption('Bank', 300);
I := getTimeRunning() + 3000 + random(1000);
while (not isBankOpen()) and (getTimeRunning < I) do
sleep(250 + random(200));
end;
end;

function findAnyRaw(): Boolean;
var
I: Integer;
begin
result := false;
for I := 0 to high(Raw_Array) do
begin
if (FindDTM(Raw_Array[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
currentFood := I;
exit(true);
end;
end;
end;

procedure incVars();
var
xp: Integer;
begin
xp := xpTable[currentFood];
stats_incVariable('78', xp);
end;

function getState(): Integer;
begin
if (getTimeRunning >= breakAfterTime) and (USEBREAKS) then
exit(7);
if (not isLoggedIn()) then
exit(0);
if ((getCurrentTab <> TAB_INV) and (not isBankOpen())) then
exit(1);
if (not findAnyRaw()) and (not isBankOpen()) then
exit(5);
if (not findAnyRaw()) and (isBankOpen()) then
exit(6);
if (findAnyRaw()) and (isBankOpen()) then
exit(2);
if (findAnyRaw()) and (not isBankOpen()) and (not waitForPixelShift(10, 3400, intToBox(MIX1, MIY1, MIX2, MIY2))) then
exit(3);
incVars();
exit(4);
end;

procedure executeState(State: Integer);
begin
case (State) of
0: setupPlayer();
1: gameTab(TAB_INV);
2: closeInterface();
3: cookHandler();
4: antiban();
5: openBank();
6: bankHandler();
7: breakHandlerCustom();
end;
stats_Commit();
sleep(Random(100, 200));
end;

begin
declarePlayer();
initAL();
updater();
setup();
stats_setup('40');
//stats_check;
stats_initVariable('78', 0);
repeat
executeState(getState());
until (false);
end.


This is the code that i used to fix the interface problems. I got 99 cooking recently with this code. Also thanks hoodz

thanks! yea just use this version above since my version doesnt work anymore

lljeffll
02-08-2018, 01:35 AM
grats on 99 cooking!!!

kyle12308
05-25-2018, 08:43 PM
Does this script still work?

JSmooth
05-26-2018, 08:09 AM
Does this script still work?

Read the other posts... or just download it yourself and see if it compiles?


thanks! yea just use this version above since my version doesnt work anymore

kyle12308
05-31-2018, 06:21 PM
Thx for this