SCAR Code:
program TinTerror;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Mining.scar}
{=========================================================================]
[ PvH's TinTerror ] ]
[ ]
[ NAME : PvH's TinTerror ]
[ WRITER : PvH ]
[ CATEGORY : PowerMiner ]
[ DESCRIPTION : Mines tin ores and drops them ]
[ USAGE : Powerminer ]
[ AUTOCOLOR : Yes ]
[ NOTES : My first Script ]
[ CONTACT : [email]pvh@live.nl[/email] ]
[=========================================================================}
{credits:
NaumanAkhlaQ for fixing an error, updating standards and making the script
look amazing!!!!! Thanks a lot Naum!!!!!
Runescapian321 for fixing an error!
Torrent of Flame for fixing a mainloop error!
Dude Richard for making it compile
Hermpie for helping me with error}
/////////////////////////////////////////////////////////////////////
// HOW TO USE //
// 1.Setup your players near Tin //
// 2.Fill in your SRLStatsID and SRLStatsPassword //
// 3.Fill in RunDirection //
// 4.Fill in Loads //
// 5.Fill in DeclarePlayers //
// 6.Hit start and have fun ^_^ //
// 7.Post errors,bugs and proggies on my tread! //
/////////////////////////////////////////////////////////////////////
const
SRLStatsID = ''; // 4 digit number which records autoing things
// get one at [url]http://stats.srl-forums.com[/url]
SRLStatsPassword = ''; // your SRLStatsID Password
RunDirection = 'N'; //N = North, E = East, S = South, W = West
//this is the direction to run, if your in a fight
tincolor = 8816529; // do NOT touch this, only change this if the normal number doesn't work
{tincolor2 = 4013377; // do NOT touch this, only change this if the normal number doesn't work
tincolor3 = 4934480; // do NOT touch this, only change this if the normal number doesn't work}
Loads = 2; //how many loads to drop?
SmartWorld = 155; //What world to load smart in
Signed = False; //False = unsigned, slower and for multiplayer
//True = signed, faster and for 1 player only
var x, y, cx, cy, tol, oresmined, loadsb, waits: integer;
Mincount:byte;
procedure DeclarePlayers;
// you can add more if you want... make sure you change players[0] to
// players [1] etc.
// don't forget to change HowManyPlayers to the total amount of players!
begin
Status('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //your runescape account
Players[0].Pass := ''; // your runescape password of your account
Players[0].Nick := ''; //3 or 4 letters of the name, used for finding randoms
//zezima would be ezi for example
Players[0].Active := True; //do you want this account to auto? true = yes, false = no
end;
{----------------------------------}
{ Search Antiban! by NaumanAkhlaQ }
{----------------------------------}
procedure Search;
var
f, e : integer;
begin
If (not (Loggedin)) then
Exit;
Status('Using search antiban by NaumanAkhlaQ');
MMouse(645, -15, 1, 1)
MMouse(727, -9, 1, 1)
e := 5 + Random(6); //Of Almost Logout credits to Yakman :)
for f := 0 to e do
begin
case Random(3) of
0, 1: MMouse(727 - Random(200), 90 + Random(200), 0, 0);
2: IdleTime(300 + Random(300), 500, 0.5);
end;
FTwait(2 + Random(1));
end;
end;
procedure DontGetBanned;
begin
if not LoggedIn then
Exit;
Status('Performing Antiban');
case Random(68) of
0: HoverSkill('Mining', False);
1: HoverSkill('Smithing', false);
2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4)
end;
3: BoredHuman;
4: AlmostLogout;
5: DoEmote(400 + Random(90));
6: Search;
end;
end;
Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
Status('Running away!');
WriteLn('Running....')
RunAway(RunDirection,False,1,8000+Random(3000))
WriteLn('Successfully ran away from fight!')
end;
end;
end;
Procedure AntiRandoms;
var
i : Integer;
Begin
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1)
end;
procedure WaitWhileMine; // By NaumanAkhlaQ
var
Mark: Integer;
begin
MarkTime(Mark)
repeat
AntiRandoms;
DontGetBanned;
wait(900 + Random(200));
until (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark) > 8000)
end;
procedure MineTheTin;
var
Mark: Integer;
begin
MarkTime(Mark)
if not LoggedIn then
Exit;
if not FindObjOre2(cx,cy,'ock',tincolor,tol,mincount)then
Wait(350 + random(250));
Waits := Waits + 1;
if (Waits = 10) then
begin
writeln('We could not find the Tin');
writeln('Next player');
writeln('If this player cannot find the Tin too');
writeln('change the tincolor and post it on my tread please');
nextplayer(false);
Exit;
end else
if FindObjOre2(cx,cy,'ock',tincolor,tol,mincount)then
GetMousePos(cx,cy);
repeat
case (Random(5)) of
0: Mouse(cx, cy, 4, 4, True);
1: Mouse(cx, cy, 0, 0, True);
2: Mouse(cx, cy, 1, 1, True);
3: Mouse(cx, cy, 2, 2, True);
4: Mouse(cx, cy, 3, 3, True);
end;
WaitWhileMine;
until(InvFull);
if (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark) > 8000) then
begin
if not LoggedIn then
Exit;
MineTheTin;
end;
if (FindBlackChatMessage('There is no ore')) or (TimeFromMark(mark) > 8000) then
begin
if not LoggedIn then
Exit;
MineTheTin;
end;
If (InvFull) then
Begin
WriteLn(' Mined 27 ores! ');
end;
end;
procedure DropTheTinOre;
var
TinOreDTM: integer;
begin
if (InvFull) then
begin
Loadsb := loadsb + 1;
OresMined := OresMined + 27;
if not LoggedIn then Exit;
Status('Loading DTM');
TinOreDTM:= DTMFromString('78DA636C636460B0036224509693C3F01F488' +
'344FF03016323906580AA06220B2381F42420CB94809A2620CB9B' +
'809A5220CB99809A5E20CB95809AC94096150135E540962501355' +
'D4096217E350014AB0D41');
repeat
Status('Searching for DTM');
if FindDTM(TinOreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Status('DTM found!');
case (Random(5)) of
0: begin
Wait(150 + random(50));
Mouse(x, y, 4, 4, False);
ChooseOption('rop');
end;
1: begin
Wait(150 + random(50));
Mouse(x, y, 0, 0, False);
ChooseOption('rop');
end;
2: begin
Wait(150 + random(50));
Mouse(x, y, 1, 1, False);
ChooseOption('rop');
end;
3: begin
Wait(150 + random(50));
Mouse(x, y, 2, 2, False);
ChooseOption('rop');
end;
4: begin
Wait(150 + random(50));
Mouse(x, y, 3, 3, False);
ChooseOption('rop');
end;
end;
end;
Until (Not (finddtm(TinOreDTM, x, y, MIX1, MIY1, MIX2, MIY2)));
WriteLn('Dropped 1 load');
end;
freedtm(TinOreDTM);
ReportVars[0]:=1;
ReportVars[1]:= 27;
{ReportVars[2]:= ; }
SrlRandomsReport;
SendSRLReport;
end;
Procedure Proggie;
Begin
Status('Writing proggie');
SRLRandomsReport;
WriteLn(' |+++++++++++++++++++++++++++++++++++++++++++++ ')
WriteLn(' | Ores Mined := '+IntToStr(OresMined)+' Ores! | ')
WriteLn(' | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ')
WriteLn(' | Loads Dropped := '+IntToStr(LoadsB)+' ! | ')
WriteLn(' | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ')
WriteLn(' | Ran For := ' +TimeRunning);
WriteLn(' |+++++++++++++++++++++++++++++++++++++++++++++ ')
end;
procedure credits;
begin
Status('Writing Credits');
cleardebug;
writeln(' |+++++++++++++++++++++++++++++++++++++++++++++++| ');
writeln(' | CREDITS: | ');
writeln(' | NaumanAkhlaQ for fixing an error, | ');
writeln(' | updating standards and making the script | ');
writeln(' | look amazing!!!!! Thanks a lot Naum!!!! | ');
writeLn(' | Runescapian321 for fixing an error! | ');
writeln(' | Torrent of Flame for fixing a mainloop error! | ');
writeln(' | Dude Richard for making it compile! | ');
writeln(' | Hermpie for helping me with error | ');
writeln(' |+++++++++++++++++++++++++++++++++++++++++++++++| ');
wait(2000 + random(1000));
end;
procedure siggy;
begin
Status('Writing Siggy');
cleardebug;
writeln(' |+++++++++++++++++++++++++++|');
writeln(' | |');
writeln(' | ------- | |\ | |');
writeln(' | | | | \ | |');
writeln(' | | | | \ | |');
writeln(' | | | | \ | |');
writeln(' | | | | \| |');
writeln(' | TERROR |');
writeln(' | |');
writeln(' |+++++++++++++++++++++++++++|');
wait(1000 + random(500));
cleardebug;
writeln(' |+++++++++++++++++++++++++++|');
writeln(' | |');
writeln(' | |');
writeln(' | The first script from PvH |');
writeln(' | Special thanks to |');
writeln(' | |');
writeln(' | NaumanAkhlaQ |');
writeln(' | |');
writeln(' |+++++++++++++++++++++++++++|');
wait(1000 + random(500));
cleardebug;
writeln(' |+++++++++++++++++++++++++++|');
writeln(' | |');
writeln(' | remember |');
writeln(' | Please post proggies |');
writeln(' | and bugs |');
writeln(' | on my tread at srl-forums |');
writeln(' | |');
writeln(' |+++++++++++++++++++++++++++|');
wait(2000 + random(1000));
end;
procedure SetUpSmart;
begin
Status('Setting up SMART!');
smartSetupex(SmartWorld, False, Signed);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
end;
procedure srlstats;
begin;
Status('Setting up srlstats');
cleardebug;
SetupSRL;
ScriptID := '768';
if ((SRLStatsID = '') or (SRLStatsPassword = ''))then
begin
SRLID:='4902';
SRLPassword:='2ucrBRvcrz';
writeln('please do NOT leech!');
writeln('go to [url]http://stats.srl-forums.com[/url] and create an account');
writeln('script is started now');
end else
begin
SRLID := SRLStatsID;
SRLPassword := SRLStatsPassword;
end;
end;
procedure mainloop;
begin;
credits;
siggy;
SetUpSmart;
srlstats;
DeclarePlayers;
activateclient;
if not loggedin then loginplayer;
SetAngle(true);
MakeCompass('N');
begin
repeat;
MineTheTin;
Proggie;
DropTheTinOre;
Proggie;
until LoadsB >= Loads;
if LoadsB >= Loads then
begin
if not LoggedIn then
Exit;
writeln('We did our loads.. switching players');
status('Finished loads, switching players!');
nextplayer(true);
end;
end;
end;
begin
mainloop;
end.