remco1337
2012-06-05 08:04:44
Sup guys I am making a w100 cookahh, but i can“t make the cooking procedure
that clicks on the fire than select the option cook all
script :
edited script :
that clicks on the fire than select the option cook all
script :
program ShantayCooker;
{$DEFINE SMART}
{$i srl\srl.simba}
var
Lobster:integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
end;
function BankScreenEx: boolean; //New
begin
result:= BankScreen or PinScreen;
end;
Procedure SetDTMs;
begin
Lobster := DTMFromString('mlwAAAHicY2dgYHjKzMDwAYi/AvErIL4PxDeB+B4QezMyMNgDsQMQhwNxIBB7ALErEPPx8jIkW8oBTWBiqPdUZ0i0kGPw0hYHY1yAFYgZ8WAoAABSkwwb');
end;
Procedure FreeTheDtms;
begin
FreeDTM(Lobster);
end;
function ClickFire: Boolean;
var
x, y:Integer;
begin;
if FindObjTPA(x, y, 6272239, 20 ,5 , 15 ,60 ,450 ['Walk Here'])
end;
Procedure Cook;
var x, y :integer;
//If FindDTM(Lobster, x ,y, MBX1, MBY1, MBX2, MBY2) then
begin
MouseItem(RandomRange(1,27),mouse_Left);
wait(1250);
ClickFire;
end;
function FindShantayChest: boolean; //ty erik
var a, tmpCTS, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
begin
result:=false;
if not LoggedIn then Exit;
if BankScreenEx then
begin
result:=true;
Exit;
end;
FindNormalRandoms;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.12);
if FindColorsSpiralTolerance(MSCX, MSCY, tpa, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
begin
ATPA:= TPAtoATPAEx(tpa, 25, 25);
for a:=0 to high(atpa) do
begin
MP:= MiddleTPA(atpa[a]);
Mouse(mp.x, mp.y, 4, 4, mouse_move);
if WaitUpText('Open', 500) then
begin
ClickMouse2(mouse_left);
if WaitFunc(@DidRedClick, 50, 1000) then
begin
writeln('Clicked Bank chest');
if WaitFunc(@BankScreenEx, 100, 5000) then
begin
writeln('BankScreen found');
result:= true;
break;
end;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure Antiban;
begin
case Random(2300) of
0..1: begin; HoverSkill('cooking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
2..3: begin; HoverSkill('firemaking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
4: begin; HoverSkill('random', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
5..7: RandomRClick;
8..10: PickUpMouse;
11..13: RandomMovement;
14..16: BoredHuman;
17: ExamineInv;
18..22: SleepAndMoveMouse(Random(5000));
end;
end;
Procedure Bank;
var X, Y, P: Integer;
var a, tmpCTS, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
begin
x := MSCX;
y := MSCY;
if not LoggedIn or FindNormalRandoms then
Exit;
Antiban;
// 5859188
//if FindObjTPA(X,Y, 2572631,5 ,1 ,20 ,20, 600, ['Open']) then
//if FindColorsSpiralTolerance(MSCX, MSCY, tpa, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
if FindShantayChest then
Mouse(X, Y, 3, 3, False);
WaitOption('Open', 500);
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
if Bankscreen then
Wait(RandomRange(800, 1500));
if InvFull then DepositAll;
WithDraw(0,0,0);
Closebank;
end;
Procedure Startup;
begin
if not LoggedIn then
LoginPlayer;
If loggedIn then
debugln('Starting up');
MakeCompass('N');
GameTab(Tab_Inv);
SetAngle(SRL_ANGLE_HIGH);
end;
Procedure Mainloop;
Begin
repeat
If LoggedIn then
debugln('Performing the mainloop');
Startup;
Bank;
Cook;
until not LoggedIn
end;
begin
ClearDebug;
DeclarePlayers;
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetUpSRL;
repeat
MainLoop;
until(AllPlayersInactive)
end.edited script :
program ShantayCooker;
{$DEFINE SMART}
{$i srl\srl.simba}
var
Lobster:integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
end;
function BankScreenEx: boolean; //New
begin
result:= BankScreen or PinScreen;
end;
Procedure SetDTMs;
begin
Lobster := DTMFromString('mlwAAAHicY2dgYHjKzMDwAYi/AvErIL4PxDeB+B4QezMyMNgDsQMQhwNxIBB7ALErEPPx8jIkW8oBTWBiqPdUZ0i0kGPw0hYHY1yAFYgZ8WAoAABSkwwb');
end;
function ClickFire: Boolean;
var x, y :Integer;
begin
//if FindObjTPA(x, y, 6272239,20 ,5 , 15 ,60 ,450 ['Walk']) then
if FindObjTPA(X, Y, 6272239, 15 ,7, 15 , 40 , 450,['Alk Here']) then
begin
GetMousePos(X, Y);
Mouse(x, y, 5 , 5, True);
end;
end;
Procedure Cook;
var x, y :integer;
//If FindDTM(Lobster, x ,y, MBX1, MBY1, MBX2, MBY2) then
begin
MouseItem(RandomRange(1,27),mouse_Left);
wait(1250);
ClickFire;
end;
function FindShantayChest: boolean; //ty erik
var a, tmpCTS, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
begin
result:=false;
if not LoggedIn then Exit;
if BankScreenEx then
begin
result:=true;
Exit;
end;
FindNormalRandoms;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.12);
if FindColorsSpiralTolerance(MSCX, MSCY, tpa, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
begin
ATPA:= TPAtoATPAEx(tpa, 25, 25);
for a:=0 to high(atpa) do
begin
MP:= MiddleTPA(atpa[a]);
Mouse(mp.x, mp.y, 4, 4, mouse_move);
if WaitUpText('Open', 500) then
begin
ClickMouse2(mouse_left);
if WaitFunc(@DidRedClick, 50, 1000) then
begin
writeln('Clicked Bank chest');
if WaitFunc(@BankScreenEx, 100, 5000) then
begin
writeln('BankScreen found');
result:= true;
break;
end;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure Antiban;
begin
case Random(2300) of
0..1: begin; HoverSkill('cooking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
2..3: begin; HoverSkill('firemaking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
4: begin; HoverSkill('random', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
5..7: RandomRClick;
8..10: PickUpMouse;
11..13: RandomMovement;
14..16: BoredHuman;
17: ExamineInv;
18..22: SleepAndMoveMouse(Random(5000));
end;
end;
Procedure FreeTheDtms;
begin
FreeDTM(Lobster);
end;
Procedure Bank;
var X, Y, P: Integer;
var a, tmpCTS, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
begin
x := MSCX;
y := MSCY;
if not LoggedIn or FindNormalRandoms then
Exit;
Antiban;
// 5859188
//if FindObjTPA(X,Y, 2572631,5 ,1 ,20 ,20, 600, ['Open']) then
//if FindColorsSpiralTolerance(MSCX, MSCY, tpa, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
if FindShantayChest then
Mouse(X, Y, 3, 3, False);
WaitOption('Open', 500);
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
if Bankscreen then
Wait(RandomRange(800, 1500));
if InvFull then DepositAll;
WithDraw(0,0,0);
Closebank;
end;
Procedure Startup;
begin
if not LoggedIn then
LoginPlayer;
If loggedIn then
debugln('Starting up');
MakeCompass('N');
GameTab(Tab_Inv);
SetAngle(SRL_ANGLE_HIGH);
end;
Procedure Mainloop;
Begin
repeat
If LoggedIn then
debugln('Performing the mainloop');
Startup;
Bank;
Cook;
until not LoggedIn
end;
begin
ClearDebug;
DeclarePlayers;
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetUpSRL;
repeat
MainLoop;
until(AllPlayersInactive)
end.