Xeuoh
2012-02-08 23:27:21
How Long have You Played Runescape?
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
i used to create xbox and ps3 patches which is similar to creating scripts
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
i used to create xbox and ps3 patches which is similar to creating scripts
Are you a member of any other communities?
No
Tell us about yourself…
From: Xeuoh
Im a quick learner used to make patches for ps3 which is almost the same as scripts just different commands but stopped due to both of them breaking and helped with the ps3 challenge lobbys for mw2 and cod7 by creating patches and keeping up with the updates Made this script from multiple scripts and made it better and added antiBan and changed many things and hope you like it made it within a day by watching a few of YOHO's vids and a few other yt vids :)
Please show us one (or multiple) of your scripts.
program IronMiner;
{$DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}
{$i srl/srl/misc/paintsmart.simba}
const
SRLStats_Username = ''; //srl STATS username
SRLStats_Password = ''; //srl STATS pass
Ore = 'iron';
HowManyOresToMine = 10000;//Ores to mine each player.
World = 73; //World you want to login.
LampXpIn = 'Mining';//Skill you want exp in from the genie.
var
resourceDTM, oreDTM, AColor, BColor, oreXp, orePrice, oreID: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;//change to your belongs.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Integers[0] := 0;// ores mined.
Integers[1] := HowManyOresToMine;
Integers[2] := 0;//xp gained
Integers[3] := 0;//profit total
BoxRewards := ['Xp', 'emote', 'costume', 'coins', 'saphire', 'essence'];//Random event prices.
end;
end;
procedure Report;
begin
SRLRandomsReport;
Stats_Commit;
Writeln('========= CURRENT SCRIPT STATS ENJOY ==========');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + IntToStr(Players[CurrentPlayer].Integers[2]));
Writeln('|= Ores mined : ' + IntToStr(Players[CurrentPlayer].Integers[0]));
Writeln('|= Profit : ' + IntToStr(Players[CurrentPlayer].Integers[3]));
Writeln('======================================');
end;
procedure LoadInfo(Ore: String);
begin
Case (Lowercase(Ore)) of
'iron', 'iron ore':
begin
AColor := 2964582;
BColor := 3294064;
oreDTM := DTMFromString('mrAAAAHic42BgYKhlYmAoAuISIK4G4nYg7gbiRiAuBeLdjAwMe4D4CBCfBuKjjBCxDUC8DYgNZUUZfG21gSYxYcWsQBIfZiSAYQAAup0LRw==');
oreXp := 35;
end;
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := (LampXpIn);
LevelUp;
end;
procedure GetPriceGe;
var
url, price, final: String;
begin
Case (Lowercase(Ore)) of
'iron', 'iron ore': oreID := 440;
end;
url := ('http://glowbotting.x10.mx/GEPriceChecker.php?id=' + IntToStr(oreID));
price := GetPage(url);
if (orePrice = 0) then
begin
final := Trim(price);
if (final = '') then writeln('PLEASE RESTART SIMBA.');
writeln('Price ore: ' + final);
orePrice := StrToInt(final);
end else
Exit;
end;
procedure StartUpClient;
begin
Smart_Server := World;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
if (SRLStats_Username = '') then
begin
writeln('No SRL account entered using Anonymous.');
SetupSRLStats(623, 'Anonymous', 'anon1337');
end else
writeln('Using SRL account ' + SRLStats_Username);
SetupSRLStats(623, SRLStats_Username, SRLStats_Password);
DeclarePlayers;
ActivateClient;
writeln('Getting Current GE Price of Iron Ore');
GetPriceGe;
end;
function ClickObject(col, col2, height, width, tol: integer; uptext, action: String; LeftClick: boolean): boolean;
var
i, x, y, cts: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, col, MSX1, MSY1, MSX2, MSY2, tol);
if Length(tpa) = 0 then FindColorsTolerance(tpa, col2, MSX1, MSY1, MSX2, MSY2, tol);
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, height, width);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpText(uptext, 650)) then
begin
GetMousePos(x, y);
if (not(LeftClick)) then
begin
Mouse(x, y, 0, 0, False);
ChooseOption(action);
if (DidRedClick) then
Begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end else
if (LeftClick) then
begin
Mouse(x, y, 0, 0, true);
if (DidRedClick) then
begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end;
end else Exit;
end;
end;
procedure StopScript(s: string);
begin
WriteLn(s);
Logout;
TerminateScript;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(1000) of
0: begin
RandomMovement;
SetAngle(SRL_ANGLE_HIGH);
end;
1: PickUpMouse;
2: HoverSkill('mining', False);
3: SleepAndMoveMouse(5000 + Random(500));
4: RandomMovement;
5: PickUpMouse;
6: BoredHuman;
7: RandomRClick;
8: ExamineInv;
9..20:begin
MakeCompass( RandomRange( -360, 360));
Wait(100 + random(50));
end;
21..50: Wait( Random( 4500));
end;
end;
function AtResource: boolean;
var
x, y: Integer;
angle: Extended;
begin
resourceDTM := DTMFromString('mggAAAHicY2NgYJjIxMDQBsQzgXguELcCcQsQezMyMPgDsR8QuwOxMxCHA3F/ZTxDdHgEw5f3HxneMTIzuDq4MHz49pOBH2gWNsyIA0MAAM/iD3c=');
if (PercentBlackMM >= 35) then
if (FindDTMRotated(resourceDTM, x, y, MMX1, MMY1, MMX2, MMY2, -PI*2, PI*2, 0.2, angle)) then
begin
result := true;
end;
FreeDTM(resourceDTM);
end;
function FindResourceEntrance(x, y: Integer): boolean;
var
cts, i: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 2175656, MSX1, MSY1, MSX2, MSY2, 5);
if Length(tpa) = 0 then FindColorsTolerance(tpa, 4079680, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, 50, 50);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpTextMulti(['yster', 'entrance'], 550)) then
begin
GetMousePos(x, y);
result := true;
end else
Exit;
end;
end;
function EnterResource: boolean;
var
x, y: Integer;
begin
if (FindResourceEntrance(x, y)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Right);
if (ChooseOption('nter')) then
if (DidRedClick) then
begin
Flag;
Wait(3000+random(350));
if (AtResource) then
begin
result := true;
end else
Exit;
end else
Exit;
end else
MakeCompass(170+random(30));
end;
function ExitResource: boolean;
begin
result := ClickObject(2175656, 4079680, 25, 25, 5, 'yster', 'xit', false);
end;
Function Mining: Boolean; // thanks to flight explained me this ;D
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 400);
end;
function MineOre: boolean;
var
OldMouseSpeed: Integer;
begin
if (InvFull) then Exit;
AntiRandoms;
OldMouseSpeed := MouseSpeed;
MouseSpeed := RandomRange(19, 22);
repeat
AntiBan;
AntiRandoms;
while (Mining) do
begin
Wait(20);
end;
if (ClickObject(AColor, BColor, 20, 10, 5, 'ocks', 'ine', true)) then
begin
wait(500 + random(150));
MouseSpeed := OldMouseSpeed;
result := true;
end else
MakeCompass('n');
MouseSpeed := OldMouseSpeed;
until (InvFull) or not (LoggedIn);
end;
function CloseBankX: Boolean;// FRM SRL FOLDER
var
i, Timer: Integer;
begin
Result := False;
if DepositScreen then
begin
Timer := GetTimeRunning + 8000;
repeat
Mouse(434, 42, 5, 5, mouse_left);
for i := 0 to 30 do
begin
if not DepositScreen then
begin
Result:= True;
Break;
end;
Wait(100);
end;
Wait(Random(100));
until (GetTimeRunning > Timer) or Result;
end;
end;
procedure Bank;
var
i, x, y, ores, xpgained, profit: integer;
box, box2: TBox;
begin
if not DepositScreen then exit;
if (DepositScreen) then
ores := CountItemsIn('deposit box', 'dtm', oreDTM, []);
xpgained := ores * oreXp;
profit := ores * orePrice;
stats_IncVariable('Iron Ore (Mined)', ores);
stats_IncVariable('Mining EXP (Gained)', xpgained);
stats_IncVariable('Profit Made', profit);
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + ores;
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + xpgained;
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + profit;
Report;
begin
for i := 1 to 28 do
begin
box := DepositItemBox(i);
box2 := IntToBox(92, 29, 396, 54);
if (FindDTM(oreDTM, x, y, box.X1, box.Y1, box.X2, box.Y2)) then
begin
QuickDeposit(SRL_DEPOSIT_ALL);
wait(650 + random(350));
end else
CloseBankX;
end;
end;
end;
procedure Loop;
begin
AntiRandoms;
if DepositScreen then
begin
Bank;
end;
if not (InvFull) then
begin
if (AtResource) then
begin
ExitResource;
end else
MineOre;
end else
if (AtResource) then
begin
ClickObject(5923688, 6186860, 25, 25, 3, 'eposit', 'eposit', false);
end else
EnterResource;
end;
begin
StartUpClient;
SMART_ClearCanvas;
repeat
if not LoggedIn then
LogInPlayer;
repeat
SetAngle(SRL_ANGLE_HIGH);
LoadInfo(Ore);
Loop;
FreeDTM(oreDTM);
until (Players[CurrentPlayer].Integers[1] <= Players[CurrentPlayer].Integers[0]) or (not LoggedIn);
Report;
Players[CurrentPlayer].Active := False;
Logout;
if (not(AllPlayersInactive)) then
begin
NextPlayer(Players[CurrentPlayer].Active);
end;
until (AllPlayersInactive);
StopScript('Script stopped got our ores we needed to mine or logged out.');
end.