Cern
2012-02-06 12:46:40
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal know it pretty well (was studying in Programing Basics classes), and a bit of Java.
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal know it pretty well (was studying in Programing Basics classes), and a bit of Java.
Are you a member of any other communities?
No
Tell us about yourself…
From: Cern
I am Tomas, 17 years old student from Lithuania. I'm interested in IT and Mathematics. Also I play some computer games and for sure Runescape. I am really happy, that I can practice programing in more complex way, cause runescape scripts, are quite hard to make. In the script I am showing, I didn't used few methods (cases, SPS, radialwalk), because it wasn't neccesary in this script. It's running really good.
Please show us one (or multiple) of your scripts.
[simba]//_________________________________________________________________________________________________________\\
// cSafeCracker \\
// v1.0 \\
//_________________________________________________________________________________________________________\\
// Requirements \\
// * Runescape Membership \\
// * 25+ Thieving \\
// * Food in bank (scirpt is made for tunas but you can \\
// just change food DTM if you want to use other food. \\
// * Have stethoscope in your bank(if using it). \\
//_________________________________________________________________________________________________________\\
// Instructions \\
// # Have stethoscope and food visible in bank. \\
// # Start with player in the Rogue's Den. \\
// # Edit Character details below \\
//_________________________________________________________________________________________________________\\
program cSafeCracker;
{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}
var
UseStethoscope, run : boolean;
SafeDTM, BankerColor, LowHPColor, SafePlaceDTM, BankPlaceDTM,
StethDTM, FoodDTM, BankerDTM :integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; //Login or email
Players[0].Pass :=''; //Password
Players[0].Nick :=''; //3-4 letters from Character's Name
Players[0].Active:=True;
Players[0].Member:=True;
Players[0].BoxRewards := ['oins', 'mote', 'ostume', 'aphire', 'ssence'];
UseStethoscope := true; // If using stethoscope then true, else false
{
Players[1].Name := 'UserName';
Players[1].Pass := 'Password';
Players[1].Nick := '3-4 letters of UserName';
Players[1].Active := False;
Players[1].Member:=True;
Players[1].BoxRewards := ['oins', 'mote', 'ostume', 'aphire', 'ssence'];
UseStethoscope := true; // If using stethoscope then true, else false
}
end;
Procedure StartUP;
begin
SafeDTM := DTMFromString('mbQAAAHicY2UAAiYGhp+MDAzsQPojkOYD0jFAOhKIo4A4Aoojw0IZrMzNGUyMjBiywt0ZEvwcGHiB2tExIxYMBgBE9AhR');
BankerColor := 2772023;
LowHPColor := 65535;
SafePlaceDTM := DTMFromString('mKgEAAHicncuxCkBQGIbhn5SNyzKcRVHq2MkVyKSUzAwuwG5htCopF+UdzqJYfPUsX72eiBy2yIYTq7GYb8eFGR16DGhQ0dZGiRwJYhTIMEEjxIgWaaQ/OeK+UoESn/YP66fnbgnXGR8=');
BankPlaceDTM := DTMFromString('m1gAAAHic42JgYDjLxMDwBoh5mRkYeID4LZDNzAzBX4Dsz0D8DYg3A9XOAOLpQLwHiPcB8SIgXgfFS4C4GIiDfNwZIkNCUDALEzMG5geqJQYzEokRAACwJBHs');
StethDTM := DTMFromString('mbQAAAHicY2VgYDBjZmAwBGJzILYGYlcgvsDIwHAOiK8C8VkgPgbEZsbGYGxhZsaQkpAAxmxA/eiYEQsGAwCR4wmF');
FoodDTM := DTMFromString('mWAAAAHicY2FgYOhnZmBoBeJeIJ4CxB8YGRi+A/EPIP4IxNlxMQxtZcUMvLy8DAmhwQxcQD3ImBENgwAAUFIKCQ==');
end;
Procedure FreeDTMs();
begin
FreeDTM(SafeDTM);
FreeDTM(SafePlaceDTM);
FreeDTM(BankPlaceDTM);
FreeDTM(FoodDTM);
FreeDTM(StethDTM);
FreeDTM(BankerDTM);
end;
Procedure Bank;
var x, y: integer;
begin
if FindColorTolerance(x, y, BankerColor, MSX1, MSY1, MSX2, MSY2, 15) then
begin
MMouse(x, y, 0, 0);
if IsUpText('alk') then
begin
Mouse(x, y, 5, 5, False);
ChooseOption('ank');
Wait(RandomRange(3000, 3500));
DepositAll;
Wait(RandomRange(1000, 1200));
if FindDTM(StethDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
Wait(100);
if IsUpText('ithdraw') then
begin
Wait(100);
Mouse(x, y, 0, 0, True);
Wait(RandomRange(700, 1000));
end;
end
else writeln('fail steth'); ///////////////////////////////
if FindDTM(FoodDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
Wait(100);
if IsUpText('ithdraw') then
begin
Wait(100);
Mouse(x, y, 4, 4, False);
ChooseOption('ithdraw-10');
Wait(RandomRange(1000, 1200));
end;
end
else writeln('fail food'); ///////////////////////
CloseBank;
end;
end
else
if FindDTM(BankPlaceDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 3, 3, True);
Wait(RandomRange(2000, 2500));
end
else writeln('fail go to bank'); ///////////////////////
end;
Procedure Crack;
var x, y: integer;
begin
if FindDTM(SafeDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if IsUpText('rack') then
begin
Mouse(x, y, 5, 5, True);
Wait(RandomRange(1000, 1700));
end;
end
else begin
writeln('fail to find safe'); ///////////////
if FindDTM(SafePlaceDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 3, 3, True);
Wait(RandomRange(2000, 2500));
end
else writeln('fail to go to safe'); ///////////////////
end;
end;
Function HpIsLow: boolean;
var x, y: integer;
begin
if FindColorSpiralTolerance(x, y, LowHPColor, 702, 22, 747, 43, 5) then
Result := true
else
Result := false;
end;
Function Eat: boolean; //If there is no food, then returns false.
var x, y: integer;
begin
if FindDTM(FoodDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 4, 4, True);
Wait(RandomRange(700, 1000));
Result := true;
end
else Result := false;
end;
Function Cracking: Boolean; //Thanks to Flight for this function
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 400);
end;
begin
run := true;
Smart_Server := 135;
Smart_Members:= true;
Smart_Signed := true;
SetUpSRL;
ActivateClient;
DeclarePlayers;
StartUP;
LoginPlayer;
Mouse(544, 21, 5, 5, True);
SetAngle(SRL_ANGLE_HIGH);
Repeat
FindNormalRandoms;
if Cracking then
Wait(300)
else
begin
if HpIsLow then
begin
if not(Eat) then
Bank;
end
else if InvFull then
Bank
else Crack;
end;
until(AllPlayersInactive);
FreeDTMs;
end.