Riazzer
2008-10-13 16:22:47
This script will cook 26 items of the food.
Setting up:
1. Have a tinder box in your first slot inventory and the rest empty.
2. Have logs in your first bank slot.
3. Have the food you wish to cook your second slot in the bank.
It uses reflection , so look here. \/\/\/
Problems at the moment :
Whenever you gain a cooking level , it does not continue to cook the rest of the food, it will just wait then head back to the bank. I was not too sure on fixing this problem, so thought i would post it up here. Hopefully someone can help :)
To do list : Set it up to run several cooking runs.
Fix the cook all problem.
Add any suggestions.
Setting up:
1. Have a tinder box in your first slot inventory and the rest empty.
2. Have logs in your first bank slot.
3. Have the food you wish to cook your second slot in the bank.
It uses reflection , so look here. \/\/\/
Problems at the moment :
Whenever you gain a cooking level , it does not continue to cook the rest of the food, it will just wait then head back to the bank. I was not too sure on fixing this problem, so thought i would post it up here. Hopefully someone can help :)
program FoodCooker;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
{.include SRL\SRL\Skill\Firemaking.scar}
// Credits := How-To-Make a simple Reflection Walker - 0wn 4 skill
// How to setup/include REFLECTION for propper use by Master Kill
// Beginners and Intermediate Tutorials.
// Search Function on SRL
var
x : integer;
y : integer;
const
firecol= 1477818;
numberofloads = 10;
Procedure SetUpAngle;
begin
KeyDown(VK_UP); // Sets the camera angle, makes it easier for it to detect the booth.
wait(1000 + random(500)); // Found it via search on interweb :D
Keyup(VK_UP);
Writeln('Angle setup');
wait(5000 + random(500));
end;
procedure AntiRandoms;
begin
if(not(LoggedIn))then Exit;
findnormalrandoms;
if findfight=true then runaway('E',true,1,4000+random(2000));
end;
procedure AntiBan;
begin
case random(15) of
0: RandomRClick;
1: BoredHuman;
2: HoverSkill('Cooking', False);
end;
end;
Procedure SetupSmart;
Begin
SmartSetup('world80', True, True, False);
Wait(1000);
SetTargetDC(SmartGetDC);
end;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='Username';
Players[0].Pass :='password';
Players[0].Nick :='nick';
Players[0].Active:=True;
end;
function BankSpot: TPointArray;
begin
SetLength(Result, 2);
Result[0] := Point(3093, 3243);
Result[1] := Point(3094, 3243);
end;
function FireSpot: TPointArray;
begin
SetLength(Result, 1);
Result[0] := Point(3098, 3253);
end;
Procedure WalkToTheBank;
Var
I: Integer;
Path: TPointArray;
Begin
AntiRandoms;
Path := BankSpot;
for i := 0 to High(Path) do
Begin
WalkToTile(Path[i], 3, 0);
end;
Wait(500+Random(300));
end;
Procedure WalkToTheFireSpot;
Var
I: Integer;
Path: TPointArray;
Begin
AntiRandoms;
Path := FireSpot;
for i := 0 to High(Path) do
Begin
WalkToTile(Path[i], 3, 0);
end;
Wait(500+Random(300));
end;
procedure WithdrawFoodAndWood;
begin
OpenBankQuiet('db');
wait(5000 + random(500));
Deposit(2,28,true); //Deposits everything from slot 2-28
wait(1500 + random(500));
writeln('Withdrawing Log');
Withdraw(1,1,1); //Withdraws a log from slot one
wait(1000 + random(1000));
writeln('Withdrawing Shrimp');
withdraw(2,1,26); //Withdraws 26 of the item in slot 2 (Food)
closebank;
end;
procedure MakeFire;
begin
AntiRandoms;
MouseItem(1,true);
wait(1500 + random(300));
MouseItem(2,true);
end;
procedure CookFood;
var
fx, fy : integer;
begin
AntiBan;
wait(10000 + random(500));
if(ThereIsFire(fx,fy))then
begin
MouseItem(4,true);
MMouse(fx,fy,2,2);
AntiRandoms;
wait(100+random(99));
FindObj(x,y,'ire',firecol,50);
Mouse(x, y, 2, 2, true);
wait(5000 + random(500));
mouse(250, 421, 10, 10, false);
wait(500 + random(400));
ChooseOption('All');
AntiBan;
Writeln('Cooking now');
ClickToContinue;
AntiRandoms;
wait(50000 + random(5000));
end;
end;
Begin
SetupSRL;
SetupSmart;
DeclarePlayers;//Calls the DeclarePlayers procedure
LoginPlayer;// This will log your player in.
SetUpAngle; // Sets the angle, easier to find booth.
WalkToTheBank;// Makes sure you're in the bank.
WithdrawFoodAndWood;// Withdraws the logs and food.
WalkToTheFireSpot; // Moves out of the bank to a spot.
MakeFire; // Makes the fire.
CookFood; // Cooks the food.
WalkToTheBank; // Walks back to the bank.
Logout; //This will log your player out!
end.
To do list : Set it up to run several cooking runs.
Fix the cook all problem.
Add any suggestions.