SRL Archive - S.M.A.R.T. Questions and Answers.

SMART controle


Morten4800

2008-12-23 17:20:57

Hello guys, i have added smart to this script, but it doesnt work, can you check it for me and say what i have done wrong please? :)

{.Include SRL\SRL.SCAR}
{.include srl/srl.scar}

{^-S E T U P-^}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'namehee';
Players[0].Pass := 'passwordhere''';
Players[0].Nick := 'nick';
Players[0].Integers[1] := 0000; //Insert Bank Pin Here
Players[0].Active := True;

{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[1] := 0000; //Insert Bank Pin Here
Players[1].Active := True;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Integers[1] := 0000; //Insert Bank Pin Here
Players[2].Active := True;}
end;

const

YourSRLID = '';

YourSRLPass = '';

UseSleep = False; //Set to true if you want to take random breaks.

UseResponder = True; //Set True if you want to use the AutoResponder.

LoadsPerPlayer = 4;

{^ -S E T U P- ^}


Version = '1.1.prv'; //Dont touch


var
BankDTM, ChatTimed: Integer;
Loads, GainedLvl: Integer;
ChatMsg, JustTalked: Byte;

function AutoResponder: Integer; forward;

procedure findbrokenaxe; forward;

function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean; forward;

procedure Report;
var
I: Integer;
begin
ClearDebug;
begin
WriteLn(' BCD (Draynor Chop'#39'N Bank) ');
WriteLn('__________________________________________________________________________________');
WriteLn('Script has Ran For ' + TimeRunning);
WriteLn('Ents Total Found ' + IntToStr(EntsAvoided));
WriteLn('Total Loads Completed ' + IntToStr(Loads));
WriteLn('Total Levels Gained ' + IntToStr(GainedLvl));
WriteLn('');
WriteLn('');
WriteLn(' Single Player Report ');
WriteLn('__________________________________________________________________________________');
Writeln(' # | Status | Chopped | Gained (XP) | Loads ');
WriteLn('');
for I := 0 to HowManyPlayers - 1 do
Writeln(Padr(' ' + IntToStr(I), 13) +
' ' + Padr(BoolToStr(Players[I].Active), 19) +
' ' + Padr(IntToStr(Players[I].Integers[0]), 18) +
' ' + Padr(IntToStr(Players[I].Integers[0] * 67), 18) +
' ' + Padr(IntToStr(Players[I].Integers[1]), 17));
end;
wait(1000 + random(250));
WriteLn('');
WriteLn('');
SRLRandomsReport;
end;

procedure CheckStats;
begin
ScriptID := '971';
if (not (yourSRLID = '')) then
SRLID := YourSRLID
else
WriteLn('Get SRL Stats account');
if (not (yourSRLPass = '')) then
SRLPassword := YourSRLPass
else
WriteLn('Get SRL Stats account');
end;

procedure scriptterminate;
begin
disguise('Terminated');
Report;
end;

function PlayerStart: Boolean;
begin
DeclarePlayers;
if not (LoggedIn) then
LogInPlayer;
if LoggedIn then
begin
SetRun(True);
SetAngle(True);
Wait(500 + Random(500));
MakeCompass('S');
Wait(400 + Random(655));
Players[CurrentPlayer].integers[2] := GetSkillInfo('woodcutting', False);
writeln('Players WC level is ' +
IntToStr(Players[CurrentPlayer].integers[2]));
gametab(4);
if Players[CurrentPlayer].integers[2] >= 30 then
result := True;
if not (result) then
begin
WriteLn('Player Doesn'#39't have 30 Woodcutting');
LogOut;
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
end;
end;

procedure DSleep;
var
RTime, minu, seco: Integer;
begin
if not (UseSleep) then
Exit;
begin
if (UseSleep) then
begin
RTime := 45000 + random(300000);
Minu := RTime div 60000;
Seco := (RTime mod 60000) div 1000;
Writeln('Going to sleep for ' + inttostr(Minu) + ' minutes and ' +
inttostr(Seco) + ' seconds.');
Logout;
if (Loggedin) then
Logout;
wait(RTime);
LoginPlayer;
wait(700 + random(700));
PlayerStart;
end;
end;
end;

procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
case Random(60) of
0:
begin
JustTalked := 0;
BoredHuman;
wait(250 + random(500));
end;
2:
begin
JustTalked := 0;
RandomRClick;
wait(200 + random(500));
end;
3:
begin
JustTalked := 0;
GameTab(1 + Random(12));
Wait(300 + Random(500));
GameTab(4);
end;
4:
begin
JustTalked := 0;
PickUpMouse;
Wait(200 + Random(200));
end;
5:
begin
JustTalked := 0;
RandomMovement;
SetAngle(true);
end;
end;
end;

procedure InitialStart;
begin
ClearDebug;
SMARTSetupEx(38, False, False, False);
SetTargetDC(SMARTGetDC);
SetUpSRL;
CheckStats;
Disguise('BDC [Draynor Chop'#39'N Bank');
MouseSpeed := 15;
end;

procedure loadDTM(DTMnumber: Integer);
begin
case DTMnumber of
0: BankDTM := DTMFromString('78DA634C666260A86240017FFE30317001694' +
'620FE0F048C203525A86AFEFD1386AB0101007A1109D6');
end;
end;

function FindGainedLevel: boolean;
begin
if not LoggedIn then
Exit;
if ClickContinue(False, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
writeln('We gained a woodcutting level!');
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] +
1;
ClickContinue(True, True);
Result := True;
Exit;
end;
end;
end;

procedure FindRandoms;
begin
if (not (LoggedIn)) then
Exit;
findNormalRandoms;
if (FindFight) then
begin
RunAway('E', True, 1, 3000);
FFlag(0);
Wait(1000 + random(500));
end;
end;

function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;//Credits to SRL
var
x, y, EntTime, tcts: Integer;
begin
if not(LoggedIn)then
Exit;
GetMousePos(x, y);
if(x <> fx)or(y <> fy)then
MMouse(fx, fy, 0, 0);
if(IsUpText('Chop'))then
begin
tcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.75);
Result := (CountColorTolerance(118478, 9, 10, 124, 23, 10) > 10);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(tcts);
end;
if(Result)then
begin
WriteLn('Ent Found!!');
if(AvoidWhenFound)then
begin
Writeln('Waiting for it to go away.');
MFNF(MMCX, MMCY, -1, 1);
MarkTime(EntTime);
while(TimeFromMark(EntTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
EntsAvoided := EntsAvoided
+ 1;
ReportVars[2] := ReportVars[2]
+ 1;
end;
end;
end;

procedure FindBrokenAxe;
var
baxe: integer;
begin
if not (LoggedIn) then
Exit;
if TimeFromMark(baxe) < 1500 then
Exit;
FindNormalRandoms;
MarkTime(baxe);
if (FindBlackChatMessage('ou do not')) then
begin
Writeln('Axe has been broken');
LogOut;
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
end;

procedure Responder;
//Credits & Love To Dans The Man for writing this.
var
LastChat: Integer;
begin
if not (UseResponder) then
Exit;
LastChat := ChatMsg;
if (TimeFromMark(ChatTimed) > 39999 + RandomRange(-12999, 4999)) then
ChatMsg := 0;
ChatMsg := AutoResponder;
if (ChatMsg > LastChat) then
MarkTime(ChatTimed);
if (ChatMsg > 0) then
Writeln('Responded');
ReportVars[1] := ReportVars[1]
+ 1;
end;

function InChatArr(Text: array of string): Boolean;
//Credits to Nava2 and EvilChicken for this.
var
I, H: integer;
s: string;
begin
H := High(Text);
if (not (GetLastChatText(s))) then
LastChatter(s);
for I := 0 to H do
begin
if (Pos(Lowercase(Text[i]), (Lowercase(s))) > 0) then
begin
Result := true;
Exit;
end;
end;
end;

function AutoResponder: integer;
//Credits and love to DansTheMan for fixing this up.
var
level, laugh, noob, auto, greet: TStringArray;
begin
if (JustTalked = 1) then
Exit;

level := ['lvl', 'level', 'Woodcut', 'Wcing', 'Wc', 'Woodcutting'];
laugh := ['Lol', 'Rofl', 'Lawl', 'Haha', 'funny', 'Lmao', 'Lmfao'];
noob := ['noob', 'Nub', 'N00b', 'Nooblet'];
Auto := ['macro', 'autoer', 'cheater', 'bot', 'autoing'];
greet := ['Hi', 'Hello', 'Hey', 'Sup', 'Howdy', 'Hiya'];

if (InChatArr(level)) then
begin
if (ChatMsg = 1) then
Exit;
case (Random(4)) of
0: TypeSend('My WC lvl is ' +
IntToStr(Players[CurrentPlayer].Integers[2]));
1: TypeSend('Wcing is ' + IntToStr(Players[CurrentPlayer].Integers[2]) +
' you?');
2: TypeSend('I have ' + IntToStr(Players[CurrentPlayer].Integers[2]) +
' wcing');
3: IntToStr(Players[CurrentPlayer].Integers[2])
end;
ChatMsg := 1;
JustTalked := 1;
Exit;
end;
if (InChatArr(laugh)) then
begin
if (ChatMsg = 2) then
Exit;
case (Random(6)) of
0: TypeSend('lol');
1: TypeSend('lawl');
2: TypeSend('rofl');
3: TypeSend('haha');
4: TypeSend('lmao');
5: TypeSend('lmfao');
end;
ChatMsg := 2;
JustTalked := 1;
Exit;
end;
if (InChatArr(Noob)) then
begin
if (ChatMsg = 3) then
Exit;
case (Random(4)) of
0: TypeSend('Your A Noob');
1: TypeSend('NubCake');
2: TypeSend('Nooob');
3: TypeSend('Nubz');
end;
ChatMsg := 3;
JustTalked := 1;
Exit;
end;
if (InChatArr(Auto)) then
begin
if (ChatMsg = 4) then
Exit;
case (Random(5)) of
0: TypeSend('im not bot');
1: TypeSend('haha bots are lame');
2: TypeSend('whos bot?');
3: TypeSend('macros are lame');
4: TypeSend('autoer?');
end;
ChatMsg := 4;
JustTalked := 1;
Exit;
end;
if (InChatArr(Greet)) then
begin
if (ChatMsg = 5) then
Exit;
case (Random(7)) of
0: TypeSend('hello');
1: TypeSend('hey');
2: TypeSend('wut up');
3: TypeSend('sup');
4: TypeSend('hiya');
5: TypeSend('how goes it');
6: TypeSend('whats up?');
end;
ChatMsg := 5;
JustTalked := 1;
Exit;
end;
end;

function FindRockColors: Integer; //By SRL, edited out WriteLns
var
GC, a, l, TestColor: integer;
var
P: array of Tpoint;
begin
GC := 5856608;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 80);
l := GetArrayLength(P);
for a := 0 to l - 1 do
begin
TestColor := GetColor(P[a].x, P[a].y);
if (GetColor(P[a].x - 1, P[a].y) = TestColor - 723980) then
begin
Result := TestColor;
Exit;
end;
end;
Result := 0;
end;

function FindWaterColors: Integer; //Credits to SRL, edited out WriteLns
var
GC, a, l, TestColor, Red, Green, Blue: integer;
P: TPointArray;
begin
GC := 10324605;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
l := GetArrayLength(P);
for a := 0 to l - 1 do
begin
if rs_OnMinimap(P[a].x, P[a].y) then
begin
TestColor := GetColor(P[a].x, P[a].y);
if SimilarColors(TestColor, GC, 50) then
begin
ColorToRGB(TestColor, Red, Green, Blue);
if InRange(Blue - Green, -11, 49) then
if InRange(Green - Red, -17, 43) then
if InRange(Blue - Red, 2, 62) then
if GetColor(P[a].x + 2, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 1) = TestColor then
if GetColor(P[a].x, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 2, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y) = TestColor then
if GetColor(P[a].x + 2, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 2) = TestColor then
begin
Result := TestColor;
WaterColor := TestColor;
Exit;
end;
end;
end;
end;
Result := 0;
end;

function RDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 630;
dtmMainPoint.y := 36;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindRockColors;
dtmMainPoint.Tolerance := 1;

dtmSubPoints[0].x := 630;
dtmSubPoints[0].y := 36;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindRockColors;
dtmSubPoints[0].Tolerance := 1;

dtmSubPoints[1].x := 630;
dtmSubPoints[1].y := 37;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindRockColors;
dtmSubPoints[1].Tolerance := 1;

dtmSubPoints[2].x := 631;
dtmSubPoints[2].y := 32;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindRockColors;
dtmSubPoints[2].Tolerance := 1;

dtmSubPoints[3].x := 625;
dtmSubPoints[3].y := 34;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindRockColors;
dtmSubPoints[3].Tolerance := 1;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

function WTW: Boolean;
var
DDTM, x, y, i: integer;
TreeAngle: Extended;
begin
DDTM := RDDTM;
repeat
inc(i);
if FindDTMRotated(DDTM, X, Y, 664, 29, 689, 58, -pi, pi, 0.2,
TreeAngle) then
begin
Mouse(X, Y, 5, 5, True);
Flag;
Writeln('Walked to Willows');
FindRandoms;
Result := True;
end;
until (result) or (I >= 5);
if not (result) then
if RadialWalk(FindWaterColors, 25, 60, 68, -25, -5) then
begin
Writeln('Walked to Willows');
FindRandoms;
Result := True;
end
else
begin
Result := False;
Writeln('Walking Failed');
if not (Result) then
begin
LogOut;
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
end;
FreeDTM(DDTM);
end;

function OpenBankFast1(Location: String): Boolean;
//All Credits to SRL, Just didnt like how it always made the Compass North
var
x, y, i, l, c, z: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Wait(400);
case LowerCase(Location) of
'db', 'draynor': Info := [MSCX, MSCY, 605006, 4, 1];
else
begin
srl_Warn('OpenBankFast', 'Unknown bank: '+Location, warn_AllVersions);
Exit;
end;
end;

MakeCompass('S');
z := GetColorToleranceSpeed;
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSX1, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
if (not LoggedIn) or BankScreen or PinScreen then
Break;
if (LowerCase(Location) = 'vwb') or (LowerCase(Location) = 'varrock west') then
begin
Booths[i].X := Booths[i].X + 5;
Booths[i].Y := Booths[i].Y - 20;
end;
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
Wait(75 + Random(75));
if IsUpText('ooth') Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(70 + Random(75));
if ChooseOption('uickly') then
begin
FFLag(0);
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 3000);
if (Length(Players) > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
end;
end;
end;
Result := (BankScreen) or (PinScreen);
end;

function WTDB: Boolean;
var
Bank1Angle: Extended;
x, y, i: Integer;
begin
MakeCompass('S');
FindRandoms;
LoadDTM(0);
wait(500+random(250));
begin
repeat
inc(i);
if FindDTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -pi, pi, 0.1,
Bank1Angle) then
begin
Mouse(x - 4, y, 2, 4, true);
Flag;
Writeln('Walked to Bank');
FindRandoms;
Result := True;
Exit;
end;
until (result) or (I >= 5);
if not (result) then
if FindSymbol(x, y, 'bank') then
begin
mouse(x , y, 2, 2, true);
FFlag(2);
Writeln('Walked to Bank');
Result := True;
end
else
begin
Result := False;
Writeln('Could Not Find Bank, Nextplayer');
if not (Result) then
begin
Players[CurrentPlayer].Active := False;
LogOut;
NextPlayer(Players[CurrentPlayer].Active);
if (PlayersActive) = 0 then
begin
NextPlayer(False);
end;
end;
end;
FreeDTM(BankDTM);
end;
end;

function DB: Boolean;
begin
begin
FindRandoms;
MakeCompass('S');
begin
Wait(350 + Random(500));
Writeln('Banking Load');
OpenBankfast1('db');
Flag;
wait(500 + random(500));
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
begin
InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
Wait(500 + Random(250));
end;
if (BankScreen) then
begin
Deposit(2, 28, true);
end;
begin
CloseBank;
Wait(150 + random(250));
MakeCompass('S');
FindRandoms;
Result := True;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0]
+ 27;
ReportVars[0] := ReportVars[0]
+ 27;
Inc(Loads);
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1]
+ 1;
wait(500 + Random(200));
Report;
end;
end;
end;
end;
end;

function DCT: Boolean;
{var
x, xx, y, yy, CTS, I: Integer;
WTPA: TPointArray;
WATPA: T2DPointArray;

begin
if not (LoggedIn) then
Exit;
repeat
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.75);
FindColorsSpiralTolerance(MSCX, MSCY, WTPA, 9227966, MSX1, MSY1, MSX2, MSY2, 5);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
begin
WATPA := SplitTPA(WTPA, 10);
for I := 0 to High(WATPA) do
if MiddleTPAEx(WATPA[i], x, y) then
begin
Wait(500 + random(500));
MMouse(x, y, 4, 4);
if IsUpText('illow') then
begin
if (InvFull) then
Exit;
GetMousePos(xx, yy);
Mouse(xx, yy, 0, 0, true);
Flag;
wait(200 + random(500));
if FindObjTPA(x, y, 4876128, 20, 2, 15, 25, 10, ['illow', 'willo','willow']) then
begin
if (InvFull) then
Exit;
GetMousePos(xx, yy);
Mouse(xx, yy, 0, 0, true);
Flag;
FindObjTPA(x, y, 4876128, 20, 2, 15, 25, 10, ['illow', 'willo','willow'])
Result := True;
end;
repeat
FindNormalRandoms;
FindEnt(x, y, true);
AntiBan;
Responder;
FindGainedLevel;
FindRandoms;
until not IsUpText('illow') or (InvFull);
end;
FindRandoms;
FindBrokenAxe;
FindGainedLevel;
until (InvFull) or (AllPlayersInactive);
end;}
var
x, y, TTime : integer;

begin
if not(LoggedIn) then Exit;
wait(2+random(250));
FindRandoms;
if TimeFromMark(TTime) < (20000 + Random (10000)) then
TerminateScript;
repeat
MarkTime(TTime);
if not(LoggedIn) then Exit;
If(FindNormalRandoms) or (InvFull) then Exit;
FindBrokenAxe;
FindRandoms;
if FindObjTPA(x, y, 4876128, 20, 2, 15, 25, 10, ['illow', 'Willo', 'Willow']) then
begin
Result := True;
case random(2) of
0:
begin
Mouse(x, y, 0, 0, false);
ChooseOption('hop')
end;
1:
Mouse(x, y, 0, 0, true);
end;
FindRandoms;
Flag;
FindObjTPA(x, y, 4876128, 20, 2, 15, 25, 10, ['illow', 'Willo', 'Willow'])
end;
repeat
FindRandoms;
FindBrokenAxe;
FindEnt(X, Y, True);
AntiBan;
Responder;
wait(500+random(250));
FindGainedLevel;
wait(1000+random(175));
Until not IsUpText('illow') or (InvFull);
FindRandoms;
FindBrokenAxe;
FindGainedLevel;
Until(invfull);
if not (Result) then
begin
Players[CurrentPlayer].Active := False;
LogOut;
NextPlayer(Players[CurrentPlayer].Active);
If (PlayersActive) = 0 then
begin
TerminateScript;
end;
end;
end;

procedure SNG;
begin
ClearDebug;
Writeln('+++++++ --- +++ +++ ---- ---- +++++++ --- ++++++ ------- ++++++ ------');
Writeln(' + + - + + - - - - + + - + - - + - ');
Writeln(' + +++ - + + - - - + +++ - +++ ----- ++++ ---- ');
Writeln(' + + - + + - - + + - + - - + - ');
Writeln('+++++++ ------ + + --- --- +++++++ ------ ++++++ ------ ++++++ ------');
Wait(2000);
WriteLn('');
Writeln('Draynor Chop and Bank, Version ' + Version);
Wait(1500);
ClearDebug;
end;

procedure MainLoop;
begin
SNG;
InitialStart;
wait(500 + random(200));
PlayerStart;
repeat
repeat
WTW;
WriteLn('Chopping Willows');
DCT;
if (InvFull) then
WTDB;
DB;
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
Players[CurrentPlayer].Active := False;
if not LoggedIn then
begin
if (Players[HowManyPlayers - 1].Active = False) then
terminatescript;
Players[CurrentPlayer].Active := False;
PlayerStart;
end;
until (Players[CurrentPlayer].Integers[1] >= LoadsPerPlayer) or
(Players[HowManyPlayers - 1].Active = False);
begin
DSleep;
NextPlayer(True);
PlayerStart;
end;
until (AllPlayersInactive);
end;

{Main Execution}

begin
MainLoop;
end.

---------------------
++ Version History ++
---------------------


> V 1.0.prv - 'First Testing, Initial Trials (Testing Only)

> V 1.1.prv - 'Added AutoResponder to Private Version (Thanks Dan for Help)

> V 1.0.pub - 'Released to The Public! let the Leeching Begin!

> V 1.1.pub - 'Changed The Banking Procedure So that it doesnt make the compass
'North everytime, aswell as tweaking my autoresponder, and fixing up
'A couple procedures here and there. Minor Update Really.


---------------------
++ Version History ++
---------------------


----------------
== Bug Report ==
----------------

> {AutoResponder Occasionally Responds to Itself, Currently Fixing it. }

> {Sometimes Mouses Over Tree Its Not Chopping, (Just slows down Chopping a Bit}

> {No other Known Bugs }

----------------
== Bug Report ==
----------------


this error comes: Failed when compiling
Line 11: [Error] (16243:1): Duplicate identifier 'SRLVersionNumber' in script C:\Programmer\SCAR 3.15\includes\SRL/SRL/Core/Globals.scar

Globals.scar:

//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป Global Variables --//
//-----------------------------------------------------------------//
// * procedure LoadSRLBitMaps; // * by SRL Dev Team
// * procedure FreeSRLBitMaps; // * by Ron

{ const SRLVersionNumber;
Description: Repository Version Number. }
Const
SRLVersionNumber = 29;

{ var TalkAfterRandoms: Boolean;
Description: Talk random phrases after randoms are detected/solved. }
var
TalkAfterRandoms: Boolean;

{ var bmpAdmin, bmpMod, Lamp, BoxMask: Integer;
Description: Global Bitmaps. Need to be Global because of SCAR Memory leaks. }
var
bmpAdmin, bmpMod, Lamp, BoxMask: Integer;

{ var RoadColor, WaterColor, BankColor: Integer;
Description: Three variables you will almost always use. :) }
var
RoadColor, WaterColor, BankColor: Integer;

{ var LampSkill: String;
Description: Set Lamp skill. }
var
LampSkill: string;

{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
const
MMX1 = 550;
MMY1 = 8;
MMX2 = 703;
MMY2 = 161;

{ const MMCX, MMCY;
Description: MiniMap Centre Point. }
const
MMCX = 627;
MMCY = 85;

{ const MSX1, MSY1, MSX2, MSY2;
Description: Main Screen EdgePoints. }
const
MSX1 = 4;
MSY1 = 4;
MSX2 = 516;
MSY2 = 338;

{ const MSCX, MSCY;
Description: Main Screen Centre Points. }
const
MSCX = 259;
MSCY = 170;

{ const MIX1, MIY1, MIX2, MIY2;
Description: Inventory EdgePoints. }
const
MIX1 = 547;
MIY1 = 202;
MIX2 = 737;
MIY2 = 466;

{ const MICX, MICY;
Description: Inventory Centre Points. }
const
MICX = 642;
MICY = 334;

{ const MCX1, MCY1, MCX2, MCY2;
Description: Chat Screen EdgePoints. }
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 496;
MCY2 = 460;

{ const MCCX, MCCY;
Description: Chat Screen Centre Points. }
const
MCCX = 250;
MCCY = 401;

{ const SRL_Procs Constants;
Description: Constants for SRL_Procs. }
const
srl_AntiBan = 0; //Your AntiBan procedure to be called during various SRL functions and procedures. (Flag, FFlag)
srl_OnFindMod = 1; //After a player or Jagex mod is detected talking in the chat box.
srl_OnFindDead = 2; //After the text 'Oh dear you are dead' is detected.
srl_OnFindFight = 3; //After detecting a fighting random.
srl_OnFindTrade = 4; //After the trade has been attempted (either success or failure).
srl_OnNextPlayer = 5; //While the players are logged out and before CurrentPlayer changes.
srl_OnSendStats = 6; //After SRL Script Stats are sent to the server.
srl_OnRandomCall = 7; //Called in FindNormalRandoms, FindInventoryRandoms, FindNonInventoryRandoms. (NOT ONLY WHEN RANDOMS ARE DETECTED).
srl_OnFindRandom = 8; //After a random event is detected. (FNR, FIR, FNIR, FT)

{ var SRL_Procs: array [0..5] of procedure();
Description: Varibles to store user-defined procs to be called in SRL. }
var
SRL_Procs: array [0..8] of procedure();

//****************************************************************************//
// * I tried to make these Bitmaps Local, but I got after a couple of hours
// * running scripts, CTB and DB handle errors. So sorry, declared them global
//****************************************************************************//

{*******************************************************************************
procedure LoadSRLBitMaps;
By: SRL Dev Team
Description: Loads SRL Bitmaps into memory.
*******************************************************************************}

procedure LoadSRLBitMaps;
begin
bmpMod := BitmapFromString(9, 6, 'beNqbPn0RWeDBgwdAkgEMkBnT' +
'p0+HS6GR+KVwAgAGXFQr');
bmpAdmin := BitmapFromString(9, 6, 'beNqbp/j9PwcZ6P//FiDJAA' +
'bIjGvzFOFSaCR+KZwIALniVEk=');
Lamp := BitmapFromString(6, 6, 'beNrzdWpr4a2qBCEZGQYGBkYgAr' +
'KLCnmtLKHczRtF8nJ5/f05dHVBIgYKCkAyPY3DzZUDogUoEubrBFE' +
'M4UJEIAwICvGyDgMAG0ERxQ==');
BoxMask := BitmapFromString(25, 25, 'beNpjYMAF/mMABtIBLo0km' +
'UyS7bhMJtsLyCbASQoBJUFKSeCMGjVq1KhRw94ouCFUKfFwcck2h4' +
'wqgCQHEDSZEo8QdjYABzDsFA==');
end;

{*******************************************************************************
procedure FreeSRLBitMaps;
By: Ron
Description: Frees SRL Bitmaps into memory.
*******************************************************************************}

procedure FreeSRLBitmaps;
begin
FreeBitmap(bmpMod);
FreeBitmap(bmpAdmin);
FreeBitmap(Lamp);
FreeBitmap(BoxMask);
end;

Const
WarnSensitivity = -2; //-2 will show Warnings and above, -3 notices too.

{*******************************************************************************
Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);
by: SRL Dev Team
Description: WriteLn's a warning message.
*******************************************************************************}

Const
warn_AllVersions = 0;
warn_Terminate = -1;
warn_Warning = -2;
warn_Notice = -3;

Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);

Begin
Case wVersion Of
warn_Terminate: begin end;
warn_AllVersions: begin end;
warn_Warning: begin end;
warn_Notice: begin end;
Else If wVersion <> SRLVersionNumber Then
Exit;
End;
if (wVersion > WarnSensitivity) then
WriteLn('** Warning in ' + ProcName + ': ' + ErrorMessage + '**');
If wVersion = -1 Then
TerminateScript;
End;

Cazax

2008-12-23 17:21:33

Use SCAR Tags please…

Morten4800

2008-12-23 17:31:30

From: Cazax
Use SCAR Tags please…


Done

Can you help me now please? :)

mastaraymond

2008-12-23 18:17:16

Your SRLID password was in it, removed it.

Morten4800

2008-12-23 18:18:30

From: mastaraymond
Your SRLID password was in it, removed it.


thx but it isn't mine. It was standard in the script when i downloaded it. But can anyone help me?

Freddy1990

2008-12-23 18:57:53

U're including SRL twice, remove 1 include statement

Morten4800

2008-12-23 19:09:48

ops yeah :S i though i incuded smart, but just copied a wrong line