From: bolshak25
9737370 is color for trout
74 for tol
i just clicked in the middle of it. is that all thats you need? ive never done it, but i thought id try
do you need cooked one too?
if so that is
5790310 color for cooked
121 tol
I'm looking for the item id numbers now. and will update as soon as i get em and start using the script :)
just copy and past.. change the numbers. done.
ok, so ive done that here is the script:
program AlKharidCooker;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}
var
Count : integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := '';
Integers[1] := 600; //Amount of fish you want to cook
Integers[5] := 335; // Fish ID
Loc := 'at bank';
// 335 = Trout, 331 = Salmon, 345 = Herring, 327 = Sardine, 359 = Tuna, 377 = Lobster, 371 = Swordfish
end;
end;
Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If (FindBlackChatMessage('Congratulations')) Or
(FindBlackChatMessage('you just advance')) Or
InChat('Congratulations') Or InChat('just advance') Or
InChat('congratulations,') Or LevelUp Then
Begin
Inc(Players[CurrentPlayer].Integers[2]);
Writeln('Woooot we have now gained'+IntToStr(Players[CurrentPlayer].Integers[2])+' levels!');
Begin
Case Random(50) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;
End;
Procedure ProgressReport;
Begin
LevelTalking;
cleardebug;
Writeln('[-----------------------------]');
Writeln('[ AKCooker ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Cooked ' + IntToStr(Players[CurrentPlayer].Integers[0])+' fish successfully out of '+IntToStr(Players[CurrentPlayer].Integers[1])+' to do');
Writeln(' Leveled ' + IntToStr(Players[CurrentPlayer].Integers[2]));
Writeln(' Antibanned ' + IntToStr(Players[CurrentPlayer].Integers[3]));
Writeln('[-----------------------------]');
End;
function R_IDExistAT(ID, slot: Integer): Boolean;
begin
Result := (GetItemIDAt(slot) = (ID));
end;
procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[3]);
end;
Procedure AntiRandoms;
Begin
LevelTalking;
FindNormalRandoms;
Wait(300+Random(200));
FindLamp('Cooking');
End;
function R_WithdrawItemID(ID, Amount: Integer): Boolean;
var
I, WhichBankTab, ItemSlot: Integer;
BankTabItemIDs: TIntegerArray;
RelPoint: TPoint;
TabBox, ItemBox: TBox;
begin
for ItemSlot := 0 to 515 do
if ID = GetChildComponentID(INTERFACE_BANK, 93, ItemSlot) then
Break;
if GetChildComponentID(INTERFACE_BANK, 93, ItemSlot) = -1 then
begin
Writeln('ItemID ' + IntToStr(ID) + ' not found.');
Exit;
end;
if ItemSlot = 515 then
begin
Writeln('ItemID ' + IntToStr(ID) + ' not found.');
Exit;
end;
RelPoint.x := GetChildComponentRelativeX(INTERFACE_BANK, 93, ItemSlot);
RelPoint.y := GetChildComponentRelativeY(INTERFACE_BANK, 93, ItemSlot);
if (RelPoint.x = 0) then
begin
SetLength(BankTabItemIDs, 9);
for I := 1 to 9 do
BankTabItemIDs[I - 1] := GetInterfaceComponentID(INTERFACE_BANK, 47 + ((9 - I) * 2));
for I := ItemSlot downto 0 do
if InIntArrayEx(BankTabItemIds, WhichBankTab, GetChildComponentID(INTERFACE_BANK, 93, I)) then
Break;
TabBox.x1 := GetInterfaceComponentRelativeX(INTERFACE_BANK, 47 + ((8 - WhichBankTab) * 2)) + 4;
TabBox.y1 := GetInterfaceComponentRelativeY(INTERFACE_BANK, 47 + ((8 - WhichBankTab) * 2)) + 4;
TabBox.x2 := TabBox.x1 + GetInterfaceComponentWidth(INTERFACE_BANK, 47 + ((8 - WhichBankTab) * 2));
TabBox.y2 := TabBox.y1 + GetInterfaceComponentHeight(INTERFACE_BANK, 47 + ((8 - WhichBankTab) * 2));
MouseBox(TabBox.x1, TabBox.y1, TabBox.x2, TabBox.y2, 1);
RelPoint.x := GetChildComponentRelativeX(INTERFACE_BANK, 93, ItemSlot);
RelPoint.y := GetChildComponentRelativeY(INTERFACE_BANK, 93, ItemSlot);
end;
ItemBox.x1 := RelPoint.x + GetInterfaceComponentRelativeX(INTERFACE_BANK, 93) + 4;
ItemBox.y1 := RelPoint.y + GetInterfaceComponentRelativeY(INTERFACE_BANK, 93) + 4;
ItemBox.x2 := ItemBox.x1 + GetChildComponentWidth(INTERFACE_BANK, 93, ItemSlot)
ItemBox.y2 := ItemBox.y1 + GetChildComponentHeight(INTERFACE_BANK, 93, ItemSlot)
if Amount = 1 then
begin
MouseBox(ItemBox.x1, ItemBox.y1, ItemBox.x2, ItemBox.y2, 1);
Result := True;
Exit;
end;
MouseBox(ItemBox.x1, ItemBox.y1, ItemBox.x2, ItemBox.y2, 2);
if Amount = 0 then
Result := R_ChooseOption('Withdraw-All') else
if OptionExists('Withdraw-' + IntToStr(Amount)) then
Result := R_ChooseOption('Withdraw-' + IntToStr(Amount)) else
begin
if R_ChooseOption('Withdraw-X') then
begin
Wait(RandomRange(1200, 1500));
//I personally don't like this, but its how both RSBot and Tribot does it
TypeSend(IntToStr(Amount));
Result := True;
end;
end;
end;
Function Bank: Boolean;
Var
i, WithdrawTry : integer;
Begin
If Not LoggedIn Then
Exit;
Wait(1000+ Random(1000));
If Not R_OpenBankBooth(Bank_AK) Then
If Not OpenBank(Bank_AK, False, False) Then
Exit;
Deposit(i, 28, True);
Repeat
Inc(WithdrawTry);
if R_WithdrawItemID(Players[CurrentPlayer].Integers[5], 28) then
Break;
Until WithdrawTry = 5;
if WithdrawTry = 5 then
begin
Writeln('Couldn''t Withdraw');
TerminateScript;
end;
Wait(750);
if R_InvEmpty then
Exit;
Players[CurrentPlayer].Loc := 'banked';
Result := True;
CloseBank;
ProgressReport;
End;
function WaitWhileCooking: Boolean;
begin
if not(LoggedIn) then
Exit;
if R_IDExistAt((Players[CurrentPlayer].Integers[5]), Count) then
begin
Result := False;
end else
Result := True;
end;
procedure CountCooked;
begin
if not(LoggedIn) then
Exit;
case Players[CurrentPlayer].Integers[5] of
331 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(329)));
335 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(333)));
345 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(347)));
327 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(325)));
359 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(361)));
377 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(379)));
371 : IncEx((Players[CurrentPlayer].Integers[0]), (R_CountItemID(373)));
end;
end;
function WalkToRange: Boolean;
begin
if not(LoggedIn) then
Exit;
R_FindRandoms;
//case Random(3) of
if WalkToTile(Point(3273, 3180), 0, 1) then
begin
Wait(500);
Count := R_CountItemID(Players[CurrentPlayer].Integers[5]);
Players[CurrentPlayer].Loc := 'at range';
Result := True;
end;
end;
{function ClickRaw:boolean;
begin
if not(LoggedIn) then
Exit;
if R_IDExistAt((Players[CurrentPlayer].Integers[5]), 1) then
if R_ClickItem(1, True, '') then
Result := True;
end;}
procedure ClickRange;
Var
i : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
x, y, h : integer;
begin
if not LoggedIn then Exit;
Wait(300);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.22);
begin
FindColorsSpiralTolerance(x, y, TPA, 1779646, MSX1, MSY1, MSX2, MSY2, 4);
SetColorToleranceSpeed(1);
ATPA := SplitTPAEx(TPA, 40, 40);
if (Length(ATPA) = 0) then
Exit;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
h := High(ATPA);
for i := 0 to h do
begin;
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
GetMousePos(x,y);
if WaitUpText('ange', 450) then
Mouse(x, y, 1, 1, True);
end;
end;
Writeln('Found the Range!');
Wait(1000);
End;
Function FoundFishCook:boolean;
var
x,y : integer;
Found : boolean;
begin
if not LoggedIn then Exit;
case Players[CurrentPlayer].Integers[5] of
331 : Found := FindColorTolerance(x,y,5790310,221,393,293,453, 121);
335 : Found := FindColorTolerance(x,y,9737370,221,393,293,453, 74);
345 : Found := FindColorTolerance(x,y,8158338,221,393,293,453, 13);
327 : Found := FindColorTolerance(x,y,5542995,221,393,293,453, 30);
359 : Found := FindColorTolerance(x,y,8355973,221,393,293,453, 15);
377 : Found := FindColorTolerance(x,y,1782617,221,393,293,453, 23);
371 : Found := FindColorTolerance(x,y,10184851,221,393,293,453, 27);
end;
begin
if Found then
Result := True;
end;
end;
function CookLoop:boolean;
var
x,y : integer;
begin
if not(LoggedIn) then
Exit;
Writeln('at cookloop');
Wait(1000);
if R_IDExistAt((Players[CurrentPlayer].Integers[5]), 2) then
repeat
R_ClickItem(2, True, '');
ClickRange;
Wait(500);
until FoundFishCook;
if ValidInterface(137) then
begin
MMouse(258, 423, 10, 10);
GetMousePos(x, y);
if WaitUpText('ll', 450) then
Mouse(x, y, 0, 0, true);
end;
Repeat
AntiBan;
AntiRandoms;
LevelTalking;
Until WaitWhileCooking
CountCooked;
Players[CurrentPlayer].Loc := 'cooked';
Result := True;
end;
function WalkToBank: Boolean;
begin
if not(LoggedIn) then
Exit;
R_FindRandoms;
if WalkToTile(Point(3269, 3169), 1, 1) then
Players[CurrentPlayer].Loc := 'at bank';
Result := True;
end;
Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'banked':
if WalkToRange then
Players[CurrentPlayer].Loc := 'at range';
'at range':
if CookLoop then
Players[CurrentPlayer].Loc := 'cooked';
'cooked':
if WalkToBank then
Players[CurrentPlayer].Loc := 'at bank';
'at bank':
if Bank then
Players[CurrentPlayer].Loc := 'banked';
end;
until(Players[CurrentPlayer].Integers[1] <= Players[CurrentPlayer].Integers[0]);
End;
begin
ClearDebug;
ClearReport;
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
begin
declareplayers;
LoginPlayer;
ProgressReport;
MakeCompass('North');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop
until(false);
end;
end.
If you could save that and add it to the orig post dynamite :)
just about to test it now.
EDIT: i added in an extra wait time before it clicks the range and changed the range color.
EDIT2: this kept logginh me out:
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
so i deleted it