TomTuff
2010-09-05 14:02:07
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
tidbits of visual basic and C
Are you a member of any other communities?
not actively.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
6 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
tidbits of visual basic and C
Are you a member of any other communities?
not actively.
Tell us about yourself…
From: TomTuff
I'm 15, i'm a sophomore in high school, taking honors classes, i've always enjoyed playing rs, but i enjoy finding ways to get around playing rs even more ;)
Please show us one (or multiple) of your scripts.
program AKC;
{=========================================================================]
[ ]
[ ]
[ NAME : AKC ]
[ WRITER : TomTuff ]
[ CATEGORY : Cooking ]
[ DESCRIPTION : Cooks fish (currently trout only) in al-kharid ]
[ NOTES : Start with player in bank. ]
[ ]
[=========================================================================]
[ VALID FISH ARGUMENTS ]
[ crayfish ]
[ chicken ]
[ shrimp ]
[ sardine ]
[ beef ]
[ anchovies ]
[ herring ]
[ pike ]
[ trout ]
[ salmon ]
[ tuna ]
[ lobster ]
[ swordfish ]
[ ]
[ ]
[=========================================================================]
[ Instructions ]
[=========================================================================]
[ 1. Have your display settings set to 32 bit TRUE color. ]
[ 2. Fill out DeclarePlayers. ]
[ (For further instructions on how to fill it out, visit this thread: ]
[ [url]http://www.villavu.com/forum/showthread.php?t=5410[/url]) ]
[ 3. If you want to use S.M.A.R.T., uncomment line 24, otherwise ]
[ drag the crosshair over the RS client window. ]
[ 4. Start script! ]
[=========================================================================}
//{.include SRL/SRL/misc/smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/BuySell.scar}
var
{prog}
OTime,C,StartTime,LD,FishXP,Pl: integer;
{invent}
FishDTM,FishBMP: integer;
{objects}
UT: string;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Pl := HowManyPlayers - 1;
With players[0] do
begin
Name := ''; //character name
Pass := ''; //character pass
Nick := ''; //3 consecutive non capital letters of username
Active := True; //Use this player?
Pin := '';//Bank pin. Leave blank if you don't have one.
Strings[0] := ''; //fish name here; valid arguments listed above
Integers[0] := 10; //Loads to do
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
{
With players[1] do
begin
Name := ''; //character name
Pass := ''; //character pass
Nick := ''; //3 consecutive non capital letters of username
Active := True; //Use this player?
Pin := '';//Bank pin. Leave blank if you don't have one.
Strings[0] := ''; //fish name here; valid arguments listed above
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;} {uncomment and copy this ass neccesary to add more players}
end;
procedure Antiban(I: integer);
var
ABChance: integer;
begin
case I of
0: ABChance := 60;
1: ABChance := 300;
2: ABChance := 600;
end;
case Random(ABChance) of
0: RandomRClick;
1: HoverSkill('cooking', false);
2: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: ExamineInv;
end;
GameTab(tab_Inv);
end;
procedure antirandom;
begin
FindNormalRandoms;
LampSkill := 'cooking';
end;
procedure logo;
begin
ClearDebug;
WriteLn('A script by...');
Wait(1000);
WriteLn('_________ _______ _______ _________ _______ _______ ');
Wait(10);
WriteLn('\__ __/( ___ )( )\__ __/|\ /|( ____ \( ____ \ ');
Wait(10);
WriteLn(' ) ( | ( ) || () () | ) ( | ) ( || ( \/| ( \/ ');
Wait(10);
WriteLn(' | | | | | || || || | | | | | | || (__ | (__ ');
Wait(10);
WriteLn(' | | | | | || |(_)| | | | | | | || __) | __) ');
Wait(10);
WriteLn(' | | | | | || | | | | | | | | || ( | ( ');
Wait(10);
WriteLn(' | | | (___) || ) ( | | | | (___) || ) | ) ');
Wait(10);
WriteLn(' )_( (_______)|/ \| )_( (_______)|/ |/ ');
Wait(1100);
WriteLn('presenting...');
Wait(1000);
WriteLn(' _______ _ _______ ');
Wait(10);
WriteLn('( ___ )| \ /\( ____ \ ');
Wait(10);
WriteLn('| ( ) || \ / /| ( \/ ');
Wait(10);
WriteLn('| (___) || (_/ / | | ');
Wait(10);
WriteLn('| ___ || _ ( | | ');
WriteLn('| ( ) || ( \ \ | | ');
Wait(10);
WriteLn('| ) ( || / \ \| (____/\ ');
Wait(10);
WriteLn('|/ \||_/ \/(_______/ ');
Wait(1000);
WriteLn('Al Kharid Cooker');
Wait(1100);
ClearDebug;
end;
procedure SetDTM;
begin
case Players[CurrentPlayer].Strings[0] of
'crayfish': FishDTM := DTMFromString('mWAAAAHicY2FgYJjCxMAwFYj7gHgRED8Hil0D4k9AfB+IM20VgCQTQ5SJDJhGBvxAzIiEYQAA3ioHeg==');
'chicken': FishDTM := DTMFromString('mbQAAAHicY2VgYJjKxMCwFIj7gbgDSvMyMjBwAbEIEPMDMSsQr546BaiaCQ2jAn4gZkTDcAAAqzoFIw==');
'shrimp': FishDTM := DTMFromString('mWAAAAHicY2FgYJjPxMAwA4iXQLE6IwODChBrArEuEE/MCASqYkLCCMAPxIxIGAYAMwEEkw==');
'sardine': FishDTM := DTMFromString('mWAAAAHicY2FgYJjCxMDQD8QTgHg2EAczMjAEAXE4EPsAcermNKAqJiSMAPxAzIiEYQAAVvgFPQ==');
'beef': FishDTM := DTMFromString('mWAAAAHicY2FgYJjJxMCwCIg7gXgKEBczMjCkAXEpEDcDcZuMMFAVExJGAH4gZkTCMAAAU3kFBw==');
'anchovies': FishDTM := DTMFromString('mWAAAAHicY2FgYFjAxMAwE4iXAPEiIJ7CyMDQD8RTgXgWEGdl5wNVMSFhBOAHYkYkDAMAmnoGPg==');
'herring': FishDTM := DTMFromString('mbQAAAHicY2VgYJjKBMGdQDwNiBcA8QFGBoadQHwEiI8C8S4g3rByBVA1ExpGBfxAzIiG4QAAxVAI1g==');
'pike': FishDTM := DTMFromString('mbQAAAHicY2VgYNjPxMBwAIg3A/E+ID4NxM+A4neA+D0QvwPie0AcnxsPJJnQMCrgB2JGNAwHABf2CY4=');
'trout': FishDTM := DTMFromString('mbQAAAHicY2VgYDABYjMg1gRiUyB2BuIcIE4B4jIgLgHiNCBurK4GkkwMB3bsYFg4axZDR1MTAz9QBB0zomE4AACYawqK');
'salmon': FishDTM := DTMFromString('mbQAAAHicY2VgYNjHxMBwAIg3M0HYp4FYj5GBQQWIzYHYDIjVgLgjzAeomgkNowJ+IGZEw3AAAAQ+Bfk=');
'tuna': FishDTM := DTMFromString('mbQAAAHicY2VgYNjDxMBwAIg3A/FeID4NxMGMDAxuQBwFxDFA7AfE0ydMAKpmQsOogB+IGdEwHAAAXUoHOw==');
'lobster': FishDTM := DTMFromString('mWAAAAHicY2FgYDjExMBwFoj3A/EJIC5lZGBIB+ICIK4G4mRLeaAqJiSMAPxAzIiEYQAAi+QFwQ==');
'swordfish': FishDTM := DTMFromString('mWAAAAHicY2FgYNjPxMBwAIi3APFRIJ7KyMDQDcTzgbgfiFdVbAaqYkLCCMAPxIxIGAYA24EHRA==');
end;
end;
procedure SetBMP;
begin
case Players[CurrentPlayer].Strings[0] of
'crayfish': FishBMP := BitmapFromString(4, 4, 'meJzT8m1TsM2UNY2V0PPX9GlRtMuW' +
'NYsX1/ZWdasEikvqB4moOio7FgIFpQxCgOIAJC8Leg==');
'chicken': FishBMP := BitmapFromString(4, 4, 'meJzr7Vvc178EgiZNWQlEEyetAKKp' +
'09ZOmboagqbPWAdBQEEAvFMc+Q==');
'shrimp': FishBMP := BitmapFromString(4, 4, 'meJxr6Z7R2D61rmViTXN/ZX1PVWNf' +
'eV1Xfdtk3+SuwAyQYEv3DCA7KHNyZNH8jv65AFNuF+k=');
'sardine': FishBMP := BitmapFromString(4, 4, 'meJxzKHSImBU2ccXEaWun9i7uXbR7' +
'0dJ9S5PWJs7cMAPITtucmrkjHchYc2x1zr5sIBsAhSkbLw==');
'beef': FishBMP := BitmapFromString(4, 4, 'meJwTlmkThqEFC1cgs+FcZDYAhQIR' +
'VQ==');
'anchovies': FishBMP := BitmapFromString(4, 4, 'meJwrTkkpT08vTUstTknJjI7OjY/P' +
'T0wAklHhYfHR0amJiUCunZkZkJ2enJyfnQUAy98SRA==');
'herring': FishBMP := BitmapFromString(4, 4, 'meJzr65s6YcJ0IJo0acbsOYuBaO7c' +
'JUC0fPm6FSs3QNDqNZvhCADOmx5z');
'pike': FishBMP := BitmapFromString(4, 4, 'meJzzi/ILSQyJSA2PzoyGkPG58UmF' +
'SYn5CSnFKenl6dnVWZmVmTm1OXn1eYXNhQC69xMm');
'trout': FishBMP := BitmapFromString(4, 4, 'meJybNGnGjBnz585dsnjJaiAKCgrb' +
'snXvxk27li9fB2EA0bZt+zZv3g1BAOHWH3Q=');
'salmon': FishBMP := BitmapFromString(4, 4, 'meJyzdEi1ccl2cC908iqFkC4+lW7+' +
'tc7e5UDSM6jZJ6wDQvpH9gXFTgYAhg8Q9g==');
'tuna': FishBMP := BitmapFromString(4, 4, 'meJwlwgEKABAMAMAX8HaNNY012pLy' +
'Scp1uXBKBFBfESeSF7GHGFo35qm6zM+Y+7+X6huT');
'lobster': FishBMP := BitmapFromString(4, 4, 'meJyTNYuXt0pVss/l5eWTs0hUsE5X' +
'cshXdS2Xt0xWsM1UdixUdasEskVUHUXVnYEkAA6BCvo=');
'swordfish': FishBMP := BitmapFromString(4, 4, 'meJzrimnuimnuiG4EovlZ0xfnzlqW' +
'P3dl4YK1xYu3Va3dW7f5UOP2zRWrtlau3lG9DsgFAHWsG1Y=');
end;
end;
procedure SetUT;
begin
Case [Players[CurrentPlayer].Strings[0]] of
'crayfish': UT := 'aw crayfish';
'chicken': UT := 'aw chicken';
'shrimp': UT := 'aw shrimp';
'sardine': UT := 'aw sardine';
'beef': UT := 'aw beef';
'anchovies': UT := 'aw anchovies';
'herring': UT := 'aw herring';
'pike': UT := 'aw pike';
'trout': UT := 'aw trout';
'salmon': UT := 'aw salmon';
'tuna': UT := 'aw tuna';
'lobster': UT := 'lobster';
'swordfish': UT := 'aw swordfish';
end;
end;
procedure SetFishXP;
begin
case [Players[CurrentPlayer].Strings[0]] of
'crayfish': FishXP := 30;
'chicken': FishXP := 30;
'shrimp': FishXP := 30;
'sardine': FishXP := 40;
'beef': FishXP := 30;
'anchovies': FishXP := 30;
'herring': FishXP := 50;
'pike': FishXP := 80;
'trout': FishXP := 70;
'salmon': FishXP := 90;
'tuna': FishXP := 100;
'lobster': FishXP := 120;
'swordfish': FishXP := 140;
end;
end;
function CountInvFish: integer;
var
NumFish: integer;
begin
SetDTM;
NumFish := CountItems('dtm',FishDTM,[]);
FreeDTM(FishDTM);
Result := NumFish;
WriteLn(IntToStr(NumFish));
end;
procedure setcamera;
begin
MakeCompass('n');
SetAngle(true);
end;
procedure prog;
var p: integer;
begin
p := 0;
repeat
with players[p] do
begin
SetFishXP;
WriteLN('Player: ' + Players[currentplayer].name);
WriteLn('Fish Cooked: ' + IntToStr(C));
WriteLn('Loads Done: ' + IntTostr(LD));
WriteLn('Exp Gained: ' + IntToStr(C*FishXP));
p := p + 1;
end;
until p = pl;
end;
procedure OpenTheBank; //i luffs yew (over msn), slightly modified
begin
if(not (Loggedin)) then exit;
if LD = Players[currentplayer].Integers[0] then
begin
NextPlayer(Players[CurrentPlayer].Active);
Prog;
end else
begin
if BankScreen then exit;
setcamera;
if( not (OpenBankNPC)) then
if(not (OpenBankFast('akb'))) then
if(not (OpenBank('akb',false,false))) then
if(not (OpenBankGlass('akb',false,false))) then
begin
WriteLn('banking failed, logging out');
Logout;
end;
end;
Antiban(2);
end;
procedure WithdrawTheFood;
var
x,y,i,a: integer;
TP: TPointArray;
begin
if(not (Loggedin)) then exit;
if(not (BankScreen)) then OpenTheBank;
DepositAll;
FixBank;
FixBankTab;
Wait(100+random(25));
SetDTM;
if FindDTM(FishDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('found du fishy');
Mouse(x,y,5,5,false);
ChooseOption('draw-All');
end else
begin
TP := FindItems(10526888, 6, UT, 28);
repeat
MMouse(TP[i].x, TP[i].y,4,4);
Mouse(x,y,0,0,false);
ChooseOption('All');
a := a + 1;
until(CountInvFish > 0) or (a>4);
end;
CloseBank;
if CountInvFish = 0 then logout;
FreeDTM(FishDTM);
end;
function FindRangeFloor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.00);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 7440298, MMX1, MMY1, MMX2, MMY2, 0);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 28.20) and (X <= 28.24) and (Y >= 27.05) and (Y <= 27.09) and (Z >= 19.34) and (Z <= 19.38) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure WalkToRange;
var x, y, CColor: integer;
begin
if not LoggedIn then Exit;
setcamera;
antirandom;
antiban(1);
CColor := FindRangeFloor;
if( not( RadialWalkTolerance(CColor, 4, 30, 55,1,1,10))) then
if( not( FindSymbol(x,y, 'cook'))) then
begin
WriteLn('both walking functions failed, logging out...');
logout;
end else Mouse(x,y,2,2,true);
Wait(1000+random(200));
end;
function FindBankFloor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.00);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 6786228, MMX1, MMY1, MMX2, MMY2, 0);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 30.63) and (X <= 30.67) and (Y >= 29.42) and (Y <= 29.46) and (Z >= 16.88) and (Z <= 16.92) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure WalkToBank;
var x, y,CColor: integer;
begin
if not LoggedIn then Exit;
setcamera;
antirandom;
antiban(1);
CColor := FindBankFloor;
if( not( RadialWalkTolerance(CColor, 195, 205, 53,1,1,10))) then
if( not( FindSymbol(x,y, 'bank'))) then
begin
WriteLn('both walking functions failed, logging out...');
logout;
end else Mouse(x,y,2,2,true);
Wait(1000+random(200));
end;
function ClickFishInInv: boolean;
var
x,y,ObjX,ObjY: integer;
begin
antiban(0);
antirandom;
SetDTM;
if FindDTM(FishDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('found du fishy');
Mouse(x,y,5,5,true);
result := true;
end else
begin
FreeDTM(FishDTM);
SetBMP;
if( not( FindObjectDeformed(ObjX,ObjY,'ang','nge',FishBMP,MSX1,MSY1,MSX2,MSY1))) then
begin
FreeBitmap(FishBMP);
result := false;
Logout;
end else
begin
FreeBitmap(FishBMP);
MMouse(ObjX,ObjY,5,5);
Mouse(ObjX,ObjY,0,0,true);
result := true;
exit;
end;
end;
FreeDTM(FishDTM);
end;
function FindTheRange: Boolean; //credits: Coh3n's guide, slightly modified/parts taken out
var
ObjX, ObjY,x, y, i,RangeBMP: integer;
TPA: TPointArray;
ATPA : T2DPointArray;
begin
if not LoggedIn then Exit;
if( not (ClickFishInInv)) then
begin
result := false;
logout;
end else
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.85);
FindColorsSpiralTolerance(x,y,TPA,1648046,MSX1, MSY1, MSX2, MSY2,10);
ATPA := SplitTPAEX(TPA,5,5);
if(Length(ATPA) = 0) then
begin
RangeBMP := BitmapFromString(4, 4, 'meJyT1tgnjQ35JhUDUWB6JRBJqqwF' +
'IinVzUAEAIr2EGc=');
if( not( FindObjectDeformed(ObjX,ObjY,'ang','nge',RangeBMP,MSX1,MSY1,MSX2,MSY1))) then
begin
FreeBitmap(RangeBMP);
Result := false;
Logout;
end else
begin
FreeBitmap(RangeBMP);
MMouse(ObjX,ObjY,5,5);
Mouse(ObjX,ObjY,0,0,true);
result := true;
exit;
end;
end;
SortATPAFromFirstPoint(ATPA, Point(MSCX,MSCY));
WriteLn('Length: ' + IntToStr(Length(ATPA[i])));
MiddleTPAEx(ATPA[i],x,y);
MMouse(x,y,4,4);
Mouse(x,y,0,0,true);
Result := True;
end;
Wait(4000+Random(1000));
end;
procedure cook;
begin
if FindTheRange then
begin
Mouse(257,414,5,5,false);
ChooseOption('All');
C := C + CountInvFish;
LD := LD + 1;
WriteLn('Completing load #' + IntToStr(LD));
end else logout;
end;
procedure CWait;
var time, WT: integer;
begin
WriteLn('Waiting for fish to cook...');
MarkTime(time);
WT := (CountInvFish * 2500 + Random(200));
while TimeFromMark(time) < WT do
begin
antirandom;
antiban(2);
end;
end;
procedure MainLoop;
begin
Logo;
SetUpSRL;
DeclarePlayers;
LoginPlayer;
repeat
repeat
OpenTheBank;
WithdrawTheFood;
WalkToRange;
cook;
CWait;
WalkToBank;
until (not LoggedIn);
NextPlayer(Players[CurrentPlayer].Active);
until(AllPlayersInactive);
prog;
end;
begin
MainLoop;
end.