SRL Archive - First Scripts

Falador Chef


KillerTHC

2010-11-27 15:52:41

After many years of not botting runescape I have suffered withdrawal symptoms. At first I helped develop and scripted for a bot titled RoMBot for a MMO called runes of magic. After getting bored of that I decided that runescape botting was my favorite and what brought me into the world of botting 8 years ago.

This is my first SMART, and Reflection script, I have scripted SRL but it was years ago.

Things I plan to improve:
- Check if we have raw food

Known bugs:
- Sometimes the script will think it is in the cookery with cooked food when really it is in the cookery with no food/already cooked food
- Sometimes fails to open the bank, only happens if you SMART client is lagging

I have successfully tested this script with 9 loads of food.

=============Falador Chef Using Reflection=============
Ganja***: |252 Food Cooked |9 Loads|

Instructions:
Fill in player details
Start in Falador East Bank preferably, however you can start in the building with the range.
Have food you wish to cook in first bank slot, additional food may be put in the following bank slots in case you cook all the food in the first one.
ie - First slot raw shrimp, Second slot raw anchovies.

Update Log:
V1 - First initial version
V2 - Removed redundant code
- Perfected wait times for cooking
- Added multiplayer(Untested but should work)
- Added loops to door checks to ensure we get a value

doublex8

2010-11-27 20:19:33

I'll test this out, I got a bunch of food to cook.

Cstrike

2010-11-27 21:39:26

Nice, was looking for something I can cook my new fish with :)

KillerTHC

2010-11-28 12:02:42

Updated it to version 2. Should be more stable now although there are still a few things I want to implement.

blulightning

2010-11-28 12:31:52

aaaah, running now.
i like the al kharid one, but now i dont have to pay a toll! (im a miser with my gp :P)

doom0791

2011-02-09 23:32:39

Version 2.0 is incomplete. Seems like you may have accidentally deleted a few lines of code or something:

function HaveRawFood(): Boolean;
var
ItemName: String;
Extract: String;
begin
ItemName := GetItemNameAt(RandomRange(1, 10));
Extract := Between('', ' ', ItemName);
WriteLn(ItemName + ' | Extract: ' + Extract);

if
end;

Although your code works well, personally I'd clean up lines 475-482:

if not TileOnMM(BankTile) then //We arent in the bank
begin
if not TileOnMM(CookTile) then //We arent in the cookery either
begin
WriteLn('You must start either in the bank or in the cookery!');
NextPlayer(False);
end
end;

Something along these lines would work well:

if not TileOnMM(BankTile) and not TileOnMM(CookTile) then
begin
WriteLn('You must start either in the bank or in the cookery!');
NextPlayer(False);
end;

Also, you don't want to do a repeat — until(False). This makes the script possibly run forever instead of stopping when all players are inactive. You should do repeat — until(AllPlayersInactive);

When you declare a function you don't need () unless you're defining parameters:

function GoToCookery(): Boolean; //This works
function GoToCookery : Boolean; //This also works, and looks nicer.


Also, I'm not sure why you're using WalkPath and WalkToTile:

function WalkToSingle(Tile: TTile): Boolean;
begin
if not WalkToTile(Tile, 0, 0) then
begin
WriteLn('WalkToTile failed, trying WalkPath');
TempTA := [OutsideDoorTile];
if WalkPath(TempTA) then
Result := True;
end else
Result := True;
R_Flag;
end;

To my knowledge, unless you're using an array of TTiles, WalkToTile and WalkPath do exactly the same thing, unless I misread some code.

You want AntiBan to run more than once every time you cook. You want it to run multiple times while you're waiting for it to cook, and you want it to happen less often. By that, I mean the case Random(10) should be more like case Random(500)

Overall it's a great script! Keep up the good work!:thumbsup:

smurg

2011-02-10 02:19:17

It's 2.5 months old, includes change, and it looks like he's not updating it anymore.

doom0791

2011-02-10 02:29:01

Suppose I should have looked at the date even though it was first page ;).