SRL Archive - Archive

Promising New Comer: Mormonman - granted


Sir R. M8gic1an

2009-02-23 07:49:20

Very Active, Testers cup, Participated in JM Competition although he didn't finish the script.

His Profile

Just yesterday he released a new script which looks quite good, Stick Smither.

JM Competition (incompleted, but shows some skill)

program RimmingtonMiner;
{.Include SRL\SRL.SCAR}
{.include srl/srl/misc/NewAutocolor.scar}
{.include srl/srl/misc/path.scar}
{.include srl/srl/skill/mining.scar}

{RM I didn't finish... I give up! Here is what I had.}
const

Debug = False;

{ // SRL-Stats \\ }
YourSRLID = ''; // SRL-Stats ID
YourSRLPassword = ''; // SRL-Stats PW
{ \\ SRL-Stats // }

var
OreDTM, ClayDTM, x, y, RockColor, BrownColor, WaitWhileMine, ores : Integer;
Time, Loads : LongInt;

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

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 letters of the username
Players[0].Strings[0] := ''; //Type of Ore to Mine (Valid types: iron, gold, copper, clay, tin)
Players[0].Active := True; // Use this Character?

SetAutoColorReference('Grey Rock', 4872025);
RockColor := srl_AutoGetColor('Grey Rock');
SetAutoColorReference('Brown Rock', 3428502);
BrownColor := srl_AutoGetColor('Brown Rock');
end;

procedure LoadOreDTM;
begin
OreDTM := DTMFromString('78DA6364606560D8CBC8800C3C741419FE036' +
'99028986601AAD988AA06220B2381F45F160686D304D47C00AAD94F4' +
'00D1FD0AEED04D47002D51CC5AF060011C30943');

ClayDTM := DTMFromString('78DA63FCCFC2C070809101194C6F0803D3305' +
'146065606861DA86A60B27035FF80E61C25A0E61BA65D186AB88076E' +
'DC1AF0600D505084D');
end;

function FindPickInvEquip : boolean;
begin
if not (LoggedIn) then Exit;
Result := True;
Result := False;
end;


procedure Antiban;
begin
if not (LoggedIn) then Exit;
case Random(30) of

0: begin
RandomRClick;
MMouse(0,0,15,15);
end;

25: begin
GameTab(2);
HoverSkill('Mining', false);
wait(2000+random(1000));
GameTab(4);
end;

4: PickupMouse;

7: begin
MakeCompass('N');
wait(10+random(5));
MakeCompass('S');
wait(10+random(5));
MakeCompass('N');
end;

8: begin
GameTab(1 + Random(12));
wait(1000+random(1000));
GameTab(4);
end;

9..12: FindPick;

13: MouseBox(MSX1,MSY1,MSX2,MSY2,3);

18: AntiBan;

20: SleepAndMoveMouse(2000+random(2000));
end;
end;

procedure AntiRandoms;
begin
if not (LoggedIn) then Exit;
FindNormalRandoms;
if (FindFight) then
RunAway('S',true,1,5000+random(1000));
end;



function RoadAC: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(8.34, 0.07);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 7237222, MMX1, MMY1, MMX2, MMY2, 6);
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 >= 9.99) and (X <= 17.87) and (Y >= 10.11) and (Y <= 18.13) and (Z >= 10.66) and (Z <= 19.09) 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;

function B2MWalkDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 1249;
dtmMainPoint.y := 345;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6652035;
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 1249;
dtmSubPoints[0].y := 345;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6652035;
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 1244;
dtmSubPoints[1].y := 339;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 16183024;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1261;
dtmSubPoints[2].y := 342;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 6652035;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 1256;
dtmSubPoints[3].y := 310;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 6652035;
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 1246;
dtmSubPoints[4].y := 354;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 6652035;
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 1249;
dtmSubPoints[5].y := 297;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 6652035;
dtmSubPoints[5].Tolerance := 15;

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

function S2MEntranceDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 1285;
dtmMainPoint.y := 285;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1137799;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1285;
dtmSubPoints[0].y := 285;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1137799;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1275;
dtmSubPoints[1].y := 289;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 15263986;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1289;
dtmSubPoints[2].y := 295;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 15263986;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1283;
dtmSubPoints[3].y := 260;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 6051431;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 1308;
dtmSubPoints[4].y := 277;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 6051431;
dtmSubPoints[4].Tolerance := 30;

dtmSubPoints[5].x := 1254;
dtmSubPoints[5].y := 269;
dtmSubPoints[5].AreaSize := 3;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 15263986;
dtmSubPoints[5].Tolerance := 30;

dtmSubPoints[6].x := 1310;
dtmSubPoints[6].y := 302;
dtmSubPoints[6].AreaSize := 3;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 15263986;
dtmSubPoints[6].Tolerance := 30;

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


procedure LoadS2M;
begin
SetupPath;
RoadColor := RoadAC;
Path[1].Mainpoint.x:=685;
Path[1].Mainpoint.y:=67;
Path[1].Subpoints[0].x:=649;
Path[1].Subpoints[0].y:=126;
Path[1].Subpoints[1].x:=564;
Path[1].Subpoints[1].y:=74;
Path[1].Subpoints[2].x:=658;
Path[1].Subpoints[2].y:=69;
Path[1].Subpoints[3].x:=666;
Path[1].Subpoints[3].y:=66;
Path[1].Subpoints[4].x:=680;
Path[1].Subpoints[4].y:=69;
Path[1].Subpoints[5].x:=657;
Path[1].Subpoints[5].y:=37;
Path[2].Mainpoint.x:=671;
Path[2].Mainpoint.y:=70;
Path[2].Subpoints[0].x:=676;
Path[2].Subpoints[0].y:=62;
Path[2].Subpoints[1].x:=619;
Path[2].Subpoints[1].y:=32;
Path[2].Subpoints[2].x:=619;
Path[2].Subpoints[2].y:=83;
Path[2].Subpoints[3].x:=621;
Path[2].Subpoints[3].y:=111;
Path[2].Subpoints[4].x:=638;
Path[2].Subpoints[4].y:=85;
end;

procedure LoadM2S;
begin
RoadColor := RoadAC;
Path[0].Mainpoint.x:=583;
Path[0].Mainpoint.y:=105;
Path[0].Subpoints[0].x:=620;
Path[0].Subpoints[0].y:=90;
Path[0].Subpoints[1].x:=612;
Path[0].Subpoints[1].y:=100;
Path[0].Subpoints[2].x:=601;
Path[0].Subpoints[2].y:=106;
Path[0].Subpoints[3].x:=589;
Path[0].Subpoints[3].y:=105;
Path[0].Subpoints[4].x:=569;
Path[0].Subpoints[4].y:=102;
Path[0].Subpoints[5].x:=565;
Path[0].Subpoints[5].y:=77;
Path[1].Mainpoint.x:=621;
Path[1].Mainpoint.y:=110;
Path[1].Subpoints[0].x:=629;
Path[1].Subpoints[0].y:=34;
Path[1].Subpoints[1].x:=630;
Path[1].Subpoints[1].y:=49;
Path[1].Subpoints[2].x:=624;
Path[1].Subpoints[2].y:=73;
Path[1].Subpoints[3].x:=639;
Path[1].Subpoints[3].y:=94;
Path[1].Subpoints[4].x:=674;
Path[1].Subpoints[4].y:=83;
Path[1].Subpoints[5].x:=622;
Path[1].Subpoints[5].y:=117;
end;


function LoadRockWalk(Rock: String): Integer;
var
dtmMainPoint: TdtmPointDef;
dtmSubPoints: array[0..4] of TdtmPointDef;
TempTdtm: Tdtm;
begin
case lowercase(Rock) of
'iron' : begin
dtmMainPoint.x := 1253;
dtmMainPoint.y := 274;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 869733;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1253;
dtmSubPoints[0].y := 274;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 869733;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1257;
dtmSubPoints[1].y := 266;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RockColor;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1254;
dtmSubPoints[2].y := 280;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RockColor;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1268;
dtmSubPoints[3].y := 285;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RockColor;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 1233;
dtmSubPoints[4].y := 275;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 15263465;
dtmSubPoints[4].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'copper' : begin
dtmMainPoint.x := 1268;
dtmMainPoint.y := 285;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 735324;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1268;
dtmSubPoints[0].y := 285;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 735324;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1251;
dtmSubPoints[1].y := 297;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := BrownColor;
dtmSubPoints[1].Tolerance := 20;

dtmSubPoints[2].x := 1278;
dtmSubPoints[2].y := 283;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := BrownColor;
dtmSubPoints[2].Tolerance := 20;

dtmSubPoints[3].x := 1272;
dtmSubPoints[3].y := 296;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := BrownColor;
dtmSubPoints[3].Tolerance := 20;

dtmSubPoints[4].x := 1274;
dtmSubPoints[4].y := 269;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 15001846;
dtmSubPoints[4].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'tin' : begin
dtmMainPoint.x := 1317;
dtmMainPoint.y := 330;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 735324;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1317;
dtmSubPoints[0].y := 330;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 735324;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1310;
dtmSubPoints[1].y := 328;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RockColor;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1319;
dtmSubPoints[2].y := 334;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RockColor;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1322;
dtmSubPoints[3].y := 314;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := BrownColor;
dtmSubPoints[3].Tolerance := 20;

dtmSubPoints[4].x := 1296;
dtmSubPoints[4].y := 316;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := BrownColor;
dtmSubPoints[4].Tolerance := 20;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'gold' : begin
dtmMainPoint.x := 1291;
dtmMainPoint.y := 305;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 734551;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1291;
dtmSubPoints[0].y := 305;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 734551;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1287;
dtmSubPoints[1].y := 301;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RockColor;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1295;
dtmSubPoints[2].y := 306;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RockColor;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1276;
dtmSubPoints[3].y := 320;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 15066346;
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 1293;
dtmSubPoints[4].y := 329;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 15066346;
dtmSubPoints[4].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'clay' : begin
dtmMainPoint.x := 1314;
dtmMainPoint.y := 314;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 255;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1314;
dtmSubPoints[0].y := 314;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 255;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1310;
dtmSubPoints[1].y := 328;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RockColor;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1322;
dtmSubPoints[2].y := 314;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := BrownColor;
dtmSubPoints[2].Tolerance := 20;

dtmSubPoints[3].x := 1296;
dtmSubPoints[3].y := 316;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := BrownColor;
dtmSubPoints[3].Tolerance := 20;

dtmSubPoints[4].x := 1315;
dtmSubPoints[4].y := 284;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 15001846;
dtmSubPoints[4].Tolerance := 30;

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

function StoreToMine : boolean;
var
x, y, DTM : Integer;
begin
if not (LoggedIn) then Exit;
DTM := S2MEntranceDTM;
if MakeCompass('N') then
begin
if FindSymbol(x, y, 'portal') then
Mouse(x, y, 3, 3, True);
FFlag(0);
LoadS2M;
WalkPath(2);
if DTMRotated(DTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
Flag;
Wait(1000+random(500));
end;
Writeln(' Walk To Mine. - Complete.');
Result := True;
end else
begin
Result := False;
Writeln(' Walk To Mine. - Failed.');
FreeDTM(DTM);
if not (Result) then
begin
Exit;
end;
end;
end;

function WalkToRock(Ore : String) : Boolean;
var
x, y, RockDTM : integer;
begin
if not (LoggedIn) then Exit;
if MakeCompass('N') then
Case lowercase(Ore) of
'iron' : begin
RockDTM := LoadRockWalk('iron');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'copper' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(0);
RockDTM := LoadRockWalk('copper');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'tin' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(5);
RockDTM := LoadRockWalk('tin');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'gold' : begin
RockDTM := LoadRockWalk('gold');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'clay' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(0);
RockDTM := LoadRockWalk('clay');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
end;
FreeDTM(RockDTM);
end;

procedure WaitWhileMining;
begin
if not (LoggedIn) then Exit;
MarkTime(Time);
begin
repeat
Antiban;
Wait(500+random(100));
AntiRandoms
Wait(500+random(100));
FindPickInvEquip;
Wait(500+random(300));
until (FindBlackChatMessage('anage') or (TimeFromMark(Time) >= WaitWhileMine));
end;
end;

procedure morm_RockColor; //loads colors from mining.scar
var
kind: string;
begin
LoadRockRecords;
begin
kind := (Players[CurrentPlayer].strings[0]);
case LowerCase(kind) of
'tin': begin
ores := rimmington_Tin;
WaitWhileMine := 14000;
end;
'gold': begin
ores := rimmington_Gold;
WaitWhileMine := 20000;
end;
'clay': begin
ores := rimmington_Clay;
WaitWhileMine := 12000;
end;
'iron':
begin
ores := rimmington_Iron;
WaitWhileMine := 8000;
end;
'copper': begin
ores := rimmington_Copper;
WaitWhileMine := 14000;
end;

end;
end;
end;

function FindClickRock : boolean;
begin
if not (LoggedIn) then Exit;
SetAngle(True);
if FindObjRock(x, y, ores) then
begin
case random(4) of
0,3: begin
Mouse(x, y, 3, 3, True);
end;
1: begin
Mouse(x, y, 3, 3, False);
Wait(600+random(200));
ChooseOption('ine');
end;
2: begin
Mouse(x, y, 3, 3, True);
end;
end;
Result := True;
end else
begin
Result := False;
end;
end;

procedure MineRock;
begin
if not (loggedin) then exit;
if FindClickRock then
WaitWhileMining;
end;



function MineToStore : Boolean;
var
FirsDTM : Integer;
begin
if not (LoggedIn) then Exit;
FirsDTM := S2MEntranceDTM;
if MakeCompass('N') then
if FindSymbol(x, y, 'mining spot') then
begin
Mouse(x, y, 1, 1, true);
FFlag(5);
if DTMRotated(FirsDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
Flag;
Wait(1000+random(500));
end else
begin
Result := False;
Writeln('Storewalk failed');
end;
LoadM2S;
repeat
WalkPath(0);
FFlag(0);
until (FindPath(1, True));
if FindSymbol(x,y,'shop') then
begin
Mouse(x + 18, y - 15, 1, 1, true);
FFlag(0);
Wait(1000+random(500));
Writeln(' Walk To Store. - Complete.');
Result := True;
end else
begin
Result := False;
Writeln('Storewalk failed');
end;
end else
begin
Result := False;
Writeln(' Walk To Store. - Failed.');
FreeDTM(FirsDTM);
if not (Result) then
begin
Exit;
end;
end;
end;

function FindShopKeeper(var cx, cy: Integer) : boolean ; //my own custom function
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2504761, MSX1, MSY1, MSX2, MSY2, 9);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['ssistant', 'hop'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;

procedure SellOres;
begin
LoadOreDTM;
Writeln('Finding Shopkeeper');
repeat
if FindShopKeeper(x,y) then
begin
Mouse(x, y, 1, 1, False);
Wait(300+random(100));
ChooseOption('rade');
Wait(3000);
if FindDTM(OreDTM,x,y,mix1,miy1,mix2,mix2) then
begin
Mouse(x,y,3,3,false);
Wait(300+random(100));
ChooseOption('ell 50');
end;
if FindDTM(ClayDTM,x,y,mix1,miy1,mix2,mix2) then
begin
Mouse(x,y,3,3,false);
Wait(300+random(100));
ChooseOption('ell 50');
end;
Mouse(485,42,7,7,true);
end;
until not FindDTM(OreDTM,x,y,mix1,miy1,mix2,mix2);
Loads := Loads+1;
end;

procedure SetupPlayer;
begin
if not (LoggedIn) then
LoginPlayer;
repeat
Wait(50);
until LoggedIn;
morm_RockColor;
SetRun(true);
FindPick;
end;

procedure ProgressReport;
var
Load : longint;
begin
if not debug then
ClearDebug;
Load := Loads;
Writeln('Rimmington Miner By: Mormonman');
Writeln('Time Running ' +TimeRunning);
Writeln('Loads Sold ' +inttostr(Load));
Writeln('I know I did not do good...');
SendSRLReport;
end;

procedure MainLoop;
begin
DeclarePlayers;
ScriptID := '1144';
SRLID := YourSRLID;
SRLPassword := YourSRLPassword;
ActivateClient;
Wait(500);
SetupPlayer;
repeat
if StoreToMine then
WalkToRock(Players[CurrentPlayer].Strings[0]);
Writeln('Mining...');
repeat
MineRock;
InvCount;
until (InvFull)
Writeln('Selling...');
if MineToStore then
SellOres;
ProgressReport;
until AllPlayersInactive;
end;

begin
SetupSRL;
SetupNewAutoColor;
SetupMining;
MainLoop;
end.


Stick Smther
His New Script

{to do list:

}
program StickSmither;
{.Include SRL/SRL/Misc/Smart.scar}
{.Include SRL/SRL.SCAR}
{.include SRL/SRL/Reflection/Reflection.scar}
{.Include SRL/SRL/Skill/Smithing.scar}

Type Bar = Record
Kind, Anvil : String;
Col : Integer;
Up : TStringArray;
end;

Item = Record
Name : String;
Bars : Integer;
Up : TStringArray;
Scroll : Boolean;

end;

//idea from text.scar
ScreenChoice = (BankScreen, SmithingScreen);

var Hammer : Boolean; x, y, a, Loads, AllLoads : Integer; Bars : Bar; Items : Item;

const
Debug = False; //leave as false
{SMARTSETUP}
//Signed
Signed = True;
//World(Doesn't matter if Signed)
SmartWorld = 8;
//Members
Members = False;
{END of SMARTSETUP}

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Pin := '0000'; //Leave '0000' if you don't have one.
Players[0].Active := True;
Players[0].Integers[0] := 5; //Loads to do before switching(5-8 recommended).
Players[0].Integers[2] := 2; //Rounds of Loads to do before setting player false.
Players[0].Strings[0] := ''; //Bar Type. Choices: bronze, iron, steel,
// mithril, adamant, rune.
Players[0].Strings[1] := ''; // Item To Smith. Choices: Dagger, Axe,
// Med Helm, Bolts, Sword, Nails,
// Arrowtips, Scimitar, Knife,
// Longsword, Full Helm, Square,
// Warhammer, BattleAxe, Chain, Skirt,
// Kite, TwoHand, Legs, PlateBody,
// Dart, Mace, Claws.

end;

////////////Don't Touch Anything Below This!!//////////////
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Script \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}


procedure SetVars;
begin
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze' :
begin
Bars.Kind := 'Bronze';
Bars.Col := 2242890;
Bars.Up := ['ronze', 'nze bar'];
end;
'iron' :
begin
Bars.Kind := 'Iron';
Bars.Col := 5000530;
Bars.Up := ['ron', 'on bar'];
end;
'steel' :
begin
Bars.Kind := 'Steel';
Bars.Col := 7368824;
Bars.Up := ['teel', 'eel bar'];
end;
'mithril', 'mith' :
begin
Bars.Kind := 'Mithril';
Bars.Col := 6111295;
Bars.Up := ['ithril', 'ril bar'];
end;
'adamant', 'adamantite' :
begin
Bars.Kind := 'Adamantite';
Bars.Col := 4346433;
Bars.Up := ['damant', 'mantite', 'tite bar'];
end;
'rune', 'runite' :
begin
Bars.Kind := 'Runite';
Bars.Col := 6511172;
Bars.Up := ['unite', 'nite bar'];
end;
end;
Bars.Anvil := 'nvil';
Case lowercase(Players[CurrentPlayer].Strings[1]) of
'dagger' :
begin
Items.Name := 'agger';
Items.Bars := 1;
Items.Scroll := False;
end;
'axe' :
begin
Items.Name := 'Axe';
Items.Bars := 1;
Items.Scroll := False;
end;
'mace' :
begin
Items.Name := 'Mace';
Items.Bars := 1;
Items.Scroll := False;
end;
'med helm' :
begin
Items.Name := 'edium helm';
Items.Bars := 1;
Items.Scroll := False;
end;
'bolts' :
begin
Items.Name := 'ossbow bolts';
Items.Bars := 1;
Items.Scroll := False;
end;
'sword' :
begin
Items.Name := 'Sword';
Items.Bars := 1;
Items.Scroll := False;
end;
'nails' :
begin
Items.Name := 'ails';
Items.Bars := 1;
Items.Scroll := False;
end;
'arrowtips' :
begin
Items.Name := 'rrow tips';
Items.Bars := 1;
Items.Scroll := False;
end;
'scimitar' :
begin
Items.Name := 'cimitar';
Items.Bars := 2;
Items.Scroll := False;
end;
'longsword' :
begin
Items.Name := 'ongsword';
Items.Bars := 2;
Items.Scroll := False;
end;
'full helm' :
begin
Items.Name := 'ull helm';
Items.Bars := 2;
Items.Scroll := False;
end;
'square' :
begin
Items.Name := 'quare shield';
Items.Bars := 2;
Items.Scroll := False;
end;
'warhammer' :
begin
Items.Name := 'arhammer';
Items.Bars := 3;
Items.Scroll := False;
end;
'battleaxe' :
begin
Items.Name := 'attleaxe';
Items.Bars := 3;
Items.Scroll := False;
end;
'chain' :
begin
Items.Name := 'hainbody';
Items.Bars := 3;
Items.Scroll := True;
end;
'kite' :
begin
Items.Name := 'iteshield';
Items.Bars := 3;
Items.Scroll := True;
end;
'twohand' :
begin
Items.Name := 'anded sword';
Items.Bars := 3;
Items.Scroll := True;
end;
'legs' :
begin
Items.Name := 'latelegs';
Items.Bars := 3;
Items.Scroll := True;
end;
'platebody' :
begin
Items.Name := 'latebody';
Items.Bars := 5;
Items.Scroll := True;
end;
'skirt' :
begin
Items.Name := 'lateskirt';
Items.Bars := 3;
Items.Scroll := True;
end;
'knife' :
begin
Items.Name := 'hrowing';
Items.Bars := 1;
Items.Scroll := False;
end;
'dart' :
begin
Items.Name := 'art tips';
Items.Bars := 1;
Items.Scroll := False;
end;
'claws' :
begin
Items.Name := 'laws';
Items.Bars := 2;
Items.Scroll := True;
end;
end;
end;

///////////////////////////////////////////////////////////

function HammerDTM : Integer; //hammer dtm
begin
Result := DTMFromString('78DA63F4636260606464400681E65C0C72401' +
'A24FA1F0818A3816A7E32A00146241248BB03D5F031E257E3C584' +
'C4C3A1C61FA88605BF1A00F487075E');
end;

///////////////////////////////////////////////////////////

function Barz: Integer;
var
BMP: TDTMPointDef;
BSP: Array [0..5] of TDTMPointDef;
BARDTM: TDTM;
begin
BMP.x := 977;
BMP.y := 303;
BMP.AreaSize := 2;
BMP.AreaShape := 0;
BMP.Color := Bars.Col;
BMP.Tolerance := 15;

BSP[0].x := 977;
BSP[0].y := 303;
BSP[0].AreaSize := 2;
BSP[0].AreaShape := 0;
BSP[0].Color := Bars.Col;
BSP[0].Tolerance := 15;

BSP[1].x := 987;
BSP[1].y := 300;
BSP[1].AreaSize := 0;
BSP[1].AreaShape := 0;
BSP[1].Color := 65536;
BSP[1].Tolerance := 5;

BSP[2].x := 992;
BSP[2].y := 305;
BSP[2].AreaSize := 0;
BSP[2].AreaShape := 0;
BSP[2].Color := 65536;
BSP[2].Tolerance := 5;

BSP[3].x := 986;
BSP[3].y := 312;
BSP[3].AreaSize := 0;
BSP[3].AreaShape := 0;
BSP[3].Color := 65536;
BSP[3].Tolerance := 5;

BSP[4].x := 974;
BSP[4].y := 316;
BSP[4].AreaSize := 0;
BSP[4].AreaShape := 0;
BSP[4].Color := 65536;
BSP[4].Tolerance := 5;

BSP[5].x := 965;
BSP[5].y := 311;
BSP[5].AreaSize := 0;
BSP[5].AreaShape := 0;
BSP[5].Color := 65536;
BSP[5].Tolerance := 5;

BARDTM.MainPoint := BMP;
BARDTM.SubPoints := BSP;
Result := AddDTM(BARDTM);
end;

///////////////////////////////////////////////////////////

procedure SetHammer(T : Boolean);
begin
if T then Hammer:=True else Hammer:=False;
end;

function BarUpText : Boolean;
begin
Result := IsUptextMultiCustom(Bars.Up);
end;

function ScreenWait(Screen : ScreenChoice; Seconds : Integer) : Boolean;
var T : LongInt; S : Integer;
begin
S := Seconds * 1000;
if not LoggedIn then Exit;
Result := Screen;
MarkTime(T);
repeat
Wait(100);
until Result or (TimeFromMark(T) >= S);
if (TimeFromMark(T) >= S) then
begin
WriteLn('No Screen... Probably Lagged Out!');
Exit;
end;
end;

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Weird Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

Function IsOption(Text : String): Boolean; //Cazax's function... should be in
Var //srl cuz its great!
TPA : TPointArray; //(I added if not Result part)
Box : TBox;
Begin
FindColorsTolerance(TPA, 4674653, 0, 0, 764, 502, 5);
Box := GetTPABounds(TPA);
Result := FindText(X, Y, Text, UpChars, Box.X1, Box.Y1, Box.X2, Box.Y2);
if not Result then
srl_Warn('IsOption', 'Option Not Found', warn_AllVersions);
End;

///////////////////////////////////////////////////////////

Function IsOptionMulti(Text : TStringArray): Boolean; {Changed it to help me!}
Var I : Integer;
Begin
For I:=0 To High(Text) do
If IsOption(Text[I]) Then
Begin
Result := True;
Exit;
End;
End;

///////////////////////////////////////////////////////////

function IfIsOptionChooseEx(cx, cy : Integer; randomx, randomy : Integer; MaxWait : Integer; ChooseThis : TStringArray; Click, Move : Boolean) : Boolean;
var T : Integer;
begin
MarkTime(T);
if Click then Mouse(cx, cy, randomx, randomy, False);
repeat
Wait(300);
until (IsOptionMulti(ChooseThis) or (TimeFromMark(T)>= MaxWait));
if (TimeFromMark(T)>= MaxWait) and Move then
begin
MMouse(cx - 50, cy, 15, 15);
Result := False;
end;
Result := ChooseOptionMulti(ChooseThis);

end;

///////////////////////////////////////////////////////////

function IfIsOptionChoose(MaxWait: Integer; ChooseThis : TStringArray; Move : Boolean) : Boolean;
begin
Result := IfIsOptionChooseEx(0, 0, 0, 0, MaxWait, ChooseThis, False, Move);
end;

///////////////////////////////////////////////////////////

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// End of Weird Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

function CountItemsDTMs(DTMs: TIntegerArray; Including: Boolean): integer;
var
i, Hi, c: integer;
begin
if not Including then Result := InvCount;
Hi := High(DTMs);
if Hi < 0 then Exit;
for i := 0 to Hi do
begin
c := CountItems(DTMs[i], 'dtm', []);
if Including then
IncEx(Result, c)
else
DecEx(Result, c);
end;
if Debug then WriteLn(IntToStr(Result));
end;

///////////////////////////////////////////////////////////

function CountBarsInInv : Integer;
var barss : Integer;
begin
barss := Barz;
Result := CountItemsDTMs([Barss], True);
FreeDTM(Barz);
end;

///////////////////////////////////////////////////////////

function CountItemsSmithed : Integer;
var barss, hamm : Integer;
begin
barss := Barz;
hamm := DTMFromString('78DA63F4636260606464400681E65C0C72401' +
'A24FA1F0818A3816A7E32A00146241248BB03D5F031E257E3C584' +
'C4C3A1C61FA88605BF1A00F487075E');
Result := CountItemsDTMs([Hamm, barss], False);
FreeDTM(Barz);
FreeDTM(Hamm);
end;

///////////////////////////////////////////////////////////

function HammerOnly : Boolean;
var H, I : Integer;
begin
I := HammerDTM;
if FindDTM(I, x, y, MIX1, MIY1, MIX2, MIY2) then Result := True;
for H := 2 to 28 do
begin
if ExistsItem(H) then Result := False;
if not Result then Break;
end;
FreeDTM(I);
end;

///////////////////////////////////////////////////////////

function DepositAllButHammer : Boolean;
var H, I : Integer; TB : TBox;
begin
I := HammerDTM;
for H := 1 to 28 do
begin
TB := InvBox(H);
if ExistsItem(H) then
if not FindDTM(I, x, y, TB.X1, TB.Y1, TB.X2, TB.Y2) then
begin
MouseItem(H, False);
if not IfIsOptionChoose(4000, ['All'], False) then
R_ChooseOption('Deposit All');
Wait(RandomRange(800, 1000));
end;
end;
if HammerOnly then Result := True;
end;
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Random Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

procedure WalkAnvil; forward;
procedure WalkBank; forward;
function GetLocation : String; forward;

function HandleFight : Boolean;
var L : Integer; Loc, Color : String;
begin
Loc := Players[CurrentPlayer].Loc
Result := FindFight;
if Result then
begin
L := GetMMLevels('run', Color);
if (L >= 15) then SetRun(True);
Case Loc of
'Bank' :
begin
WalkAnvil;
end;
'Anvil' :
begin
WalkBank;
end;
end;
Flag;
if FindFight then {failsafe...}
begin
RunAway('n', False, 1, 4000);
GetLocation;
end;
end;
end;

///////////////////////////////////////////////////////////

function Randoms : Boolean; //too lazy to type findnormalrandoms...
var I : Integer;
begin
for I := 1 to 3 do
begin
case I of
1: Result := R_FindRandoms;
2: Result := FindNormalRandoms;
3: Result := HandleFight;
end;
if Result then Break;
end;
end;

///////////////////////////////////////////////////////////

procedure FastAB;
begin
if not LoggedIn then Exit;
Case Random(13) of
1,9 : PickUpMouse;
2..5, 12 : SleepAndMoveMouse(500+random(1000));
6..8 : RandomRClick;
end;
end;

///////////////////////////////////////////////////////////

procedure WhileAB;
begin
if not LoggedIn then Exit;
case Random(40) of
10, 20, 30: Wait(500+random(7000));
1: begin
MakeCompass('E');
Wait(25+random(5));
MakeCompass('S');
Wait(25+random(5));
MakeCompass('W');
Wait(25+random(5));
MakeCompass('N');
Wait(random(200));
end;
2..5, 35: begin
HoverSkill('smithing' ,false);
Wait(random(2000));
GameTab(4);
end;
3, 15, 31..34: FastAB;
4, 7, 40: MouseBox(MSX1,MSY1,MSX2,MSY2,3);
6, 17, 23: MMouse(Random(500),Random(500), 15, 15);
end;
end;

///////////////////////////////////////////////////////////

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// End of Random Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

function GetSmithingLevel(Start : Boolean) : Boolean;
var
SmithLvl : Integer;
begin
SmithLvl := GetMySkill(13, True);
if Start then
begin
Players[CurrentPlayer].Integers[3] := SmithLvl;
end;
Players[CurrentPlayer].Integers[4] := SmithLvl;
if SmithLvl > 0 then
begin
Result := True;
Writeln('Smithing lvl = ' + IntToStr(SmithLvl));
end
else
begin
Result := False;
Writeln('Error with getting Smithing lvl.');
Players[CurrentPlayer].Rand := 'Error getting Smithing lvl.';
LogOut;
Players[CurrentPlayer].Active := False;
end;
end;

function DTMS(Which : String) : Integer; //NOT DYNAMIC I KNOW, BUT I COULDN'T
var // GET THE OTHER WAY TO WORK FOR ME!
dtmMainPoint: TDTMPointDef; // PLUS I CAN EDIT THESE FASTER!
dtmSubPoints: Array of TDTMPointDef;
TempTDTM: TDTM;
begin
case lowercase(Which) of
'walkbank' :
begin //walk to bankers
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 964;
dtmMainPoint.y := 219;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 15527148;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 964;
dtmSubPoints[0].y := 219;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 15527148;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 970;
dtmSubPoints[1].y := 218;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 928;
dtmSubPoints[2].y := 215;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 928;
dtmSubPoints[3].y := 225;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 971;
dtmSubPoints[4].y := 226;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 964;
dtmSubPoints[5].y := 231;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'blackness' :
begin
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 964;
dtmMainPoint.y := 219;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 15527148;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 964;
dtmSubPoints[0].y := 219;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 15527148;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 972;
dtmSubPoints[1].y := 226;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 972;
dtmSubPoints[2].y := 231;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 964;
dtmSubPoints[3].y := 231;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 968;
dtmSubPoints[4].y := 230;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 965;
dtmSubPoints[5].y := 229;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'inbank' :
begin
SetArrayLength(dtmSubPoints, 5);
dtmMainPoint.x := 1162;
dtmMainPoint.y := 163;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 195836;
dtmMainPoint.Tolerance := 30;

dtmSubPoints[0].x := 1162;
dtmSubPoints[0].y := 163;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 195836;
dtmSubPoints[0].Tolerance := 30;

dtmSubPoints[1].x := 1118;
dtmSubPoints[1].y := 168;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1119;
dtmSubPoints[2].y := 212;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1163;
dtmSubPoints[3].y := 203;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 1118;
dtmSubPoints[4].y := 184;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 195836;
dtmSubPoints[4].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'ladders' :
begin
SetArrayLength(dtmSubPoints, 3);
dtmMainPoint.x := 672;
dtmMainPoint.y := 286;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := a;
dtmMainPoint.Tolerance := 20;

dtmSubPoints[0].x := 672;
dtmSubPoints[0].y := 286;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := a;
dtmSubPoints[0].Tolerance := 20;

dtmSubPoints[1].x := 622;
dtmSubPoints[1].y := 263;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := a;
dtmSubPoints[1].Tolerance := 20;

dtmSubPoints[2].x := 678;
dtmSubPoints[2].y := 207;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := a;
dtmSubPoints[2].Tolerance := 20;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'middle' :
begin
SetArrayLength(dtmSubPoints, 4);
dtmMainPoint.x := 652;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := a;
dtmMainPoint.Tolerance := 20;

dtmSubPoints[0].x := 652;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := a;
dtmSubPoints[0].Tolerance := 20;

dtmSubPoints[1].x := 673;
dtmSubPoints[1].y := 299;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := a;
dtmSubPoints[1].Tolerance := 20;

dtmSubPoints[2].x := 679;
dtmSubPoints[2].y := 224;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := a;
dtmSubPoints[2].Tolerance := 20;

dtmSubPoints[3].x := 624;
dtmSubPoints[3].y := 281;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := a;
dtmSubPoints[3].Tolerance := 20;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'anvilblack' :
begin
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 638;
dtmMainPoint.y := 155;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6520976;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 638;
dtmSubPoints[0].y := 155;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6520976;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 639;
dtmSubPoints[1].y := 120;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 649;
dtmSubPoints[2].y := 120;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 649;
dtmSubPoints[3].y := 125;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 640;
dtmSubPoints[4].y := 125;
dtmSubPoints[4].AreaSize := 2;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 646;
dtmSubPoints[5].y := 113;
dtmSubPoints[5].AreaSize := 2;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 195836;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'anvilfailsafe' :
begin
SetArrayLength(dtmSubPoints, 7);
dtmMainPoint.x := 636;
dtmMainPoint.y := 155;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6520976;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 636;
dtmSubPoints[0].y := 155;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6520976;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 639;
dtmSubPoints[1].y := 120;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 649;
dtmSubPoints[2].y := 120;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 649;
dtmSubPoints[3].y := 125;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 640;
dtmSubPoints[4].y := 125;
dtmSubPoints[4].AreaSize := 2;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 646;
dtmSubPoints[5].y := 107;
dtmSubPoints[5].AreaSize := 2;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

dtmSubPoints[6].x := 647;
dtmSubPoints[6].y := 115;
dtmSubPoints[6].AreaSize := 2;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 65536;
dtmSubPoints[6].Tolerance := 5;

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

function GetLocation : String;
var InBanks, Anvils{, Middles} : Integer;
begin
a := FindLadderColor;
InBanks := DTMS('inbank');
Anvils := DTMS('ladders');
{Middles := DTMS('middle');
if DTMRotated(Middles, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Middle';
Result := 'Middle';
end
else }
if DTMRotated(InBanks, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Bank';
Result := 'Bank';
end
else
if DTMRotated(Anvils, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Anvil';
Result := 'Anvil';
end
else
begin
WriteLn('Location Not Found!');
Result := '';
Players[CurrentPlayer].Loc := 'LocationCheckFailed';
Players[CurrentPlayer].Active := False;
Logout;
FreeDTM(InBanks);
FreeDTM(Anvils);
{FreeDTM(Middles);}
Exit;
end;
WriteLn('At ' +(Players[CurrentPlayer].Loc)+ '.');
end;

procedure WalkBank;
var Black, Bankers : Integer;
begin
if not LoggedIn then Exit;
Black := DTMS('blackness');
Bankers := DTMS('walkbank');
if DTMRotated(Black, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
if FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
begin
WriteLn('Walk To Bank Failed... Setting Player False');
Players[CurrentPlayer].Loc := 'BankWalkFailed';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(Bankers);
FreeDTM(Black);
end;

procedure WalkAnvil;
var Black, Failsafe : Integer;
begin
if not LoggedIn then Exit;
if (Players[CurrentPlayer].Loc = 'Anvil') then Exit;
Black := DTMS('anvilblack');
Failsafe := DTMS('anvilfailsafe');
if DTMRotated(Black, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Blackness');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if DTMRotated(Failsafe, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using FailsafeDTM');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Anvil Symbol');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if FindSymbol(x, y, 'guide') then
begin
Mouse(x, y, 3, 3, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Guide Symbol');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
begin
WriteLn('Walk To Anvil Failed... Setting Player False');
Players[CurrentPlayer].Loc := 'AnvilWalkFailed';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(Black);
FreeDTM(Failsafe);
end;

procedure GetHammer;
var H : Integer;
begin
H := HammerDTM;
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
WriteLn('Getting hammer...');
MakeCompass('e');
OpenBank('vwb', False, False);
ScreenWait(BankScreen, 10);
SearchBank('hammer');
Wait(2000+random(500));
if FindDTM(H, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 3, 3, False)
Wait(1000+random(500));
IfIsOptionChoose(5000, ['ammer', 'ithdraw Ham'], True);
Wait(1000+random(500));
CloseBank;
SetHammer(True);
end
else
begin
WriteLn('Hammer Not Found In Bank.');
Players[CurrentPlayer].Loc := 'NoHammerInBank';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(H);
end;

procedure HCheck(Quick : Boolean);
var H : Integer;
begin
H := HammerDTM;
if not LoggedIn then Exit;
GameTab(4);
if not FindDTM(H, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if not Quick then GetHammer;
end else SetHammer(True);
if Hammer then WriteLn('Hammer Found.')
else
begin
WriteLn('Hammer Not Found.');
Players[CurrentPlayer].Loc := 'NoHammer';
Players[CurrentPlayer].Active := False;
Logout;
end;
FreeDTM(H);
end;

function LevelUpCheck : Boolean;
begin
Result := (GetColor(104, 367) = 0) and (GetColor(470, 370) = 0) and (GetColor(98, 424) = 0);
if not Result then
Result := (GetColor(474, 427) = 0) and (GetColor(267, 426) = 0);
end;

function FindBar(InBank, Click, Inv : Boolean) : Boolean;
begin
if not LoggedIn then Exit;
if InBank then
begin
if FindDTM(Barz, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
Wait(1000+random(500));
if IsUptextMultiCustom(Bars.Up) then
Mouse(x, y, 0, 0, False);
Result := IfIsOptionChoose(5000, ['All'], False)
if not Result then Result := R_ChooseOption('All');
end else
begin
if Inv then
begin
WriteLn('Bar Not Found.');
Players[CurrentPlayer].Loc := 'NoBars';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
if not InBank then
begin
GameTab(4);
if FindDTM(Barz, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if Click then
begin
WriteLn('Clicking Bar');
MMouse(x, y, 3, 3);
GetMousePos(x, y);
Result := BarUpText;
Mouse(x, y, 0, 0, True);
Wait(1000+random(500));
end
else
Result := True;
end else
begin
if Inv then
begin
WriteLn('Bar Not Found.');
Players[CurrentPlayer].Loc := 'NoBars';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
if Result then
if Click then
WriteLn(Bars.Kind+' Bar Found.');
FreeDTM(Barz);
end;

function MyBank : Boolean;
var Bank, Time : LongInt; I : Integer;
begin
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
MarkTime(Bank);
Result := BankScreen;
if not Result then
begin
repeat
if OpenBankReflection('vwb') then
begin
MarkTime(Time);
repeat
Wait(50);
until (BankScreen) or (PinScreen) or (TimeFromMark(Time) >= 6000);
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if Result then Break else
begin
Inc(I);
Continue;
end;
end;
until (BankScreen) or (I >= 10);
if (I >= 10) then
begin
WriteLn('Bank not opened.');
Players[CurrentPlayer].Loc := 'NoBank';
Players[CurrentPlayer].Active := False;
Logout;
end;
if BankScreen then FixBank;
end else Wait(500);
end;


procedure Withdraws;
var I : Integer; Close : LongInt;
begin
if not LoggedIn then Exit;
if (CountBarsInInv >= Items.Bars) then Exit;
if not HammerOnly then Exit;
if MyBank then
begin
I := 0;
repeat
FindBar(True, True, True)
Wait(1500+random(500));
Inc(I);
until (InvFull) or (I >= 8) or (CountBarsInInv >= Items.Bars);
if I >= 8 then
begin
SearchBank('bar');
Wait(2000+random(500));
I := 0;
repeat
FindBar(True, True, True)
Wait(1500+random(500));
Inc(I);
until (InvFull) or (I >= 4) or (CountBarsInInv >= Items.Bars);
end;
if I >= 4 then
begin
WriteLn('No Bars In Bank.');
Players[CurrentPlayer].Loc := 'NoBarsInBank';
Players[CurrentPlayer].Active := False;
Logout;
end;
MarkTime(Close);
repeat
CloseBank;
until (not Bankscreen) or (TimeFromMark(Close) >= 10000);
if GetSmithingLevel(False) then WriteLn('We are level ' + IntToStr(Players[CurrentPlayer].Integers[4]) + ' smithing.');
if not Bankscreen then WalkAnvil;
end;
end;

procedure Deposits;
var I : Integer;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
if not HammerOnly then
begin
if MyBank then
begin
I := 0;
WriteLn('Depositing');
repeat
Deposit(2, 28, True);
Inc(I);
Wait(1000);
until (HammerOnly) or (I >= 10);
if HammerOnly then
begin
WriteLn('Items Deposited');
Inc(Loads);
Inc(AllLoads);
Inc(Players[CurrentPlayer].Integers[1]);
end;
if (I >= 10) then
begin
WriteLn('Depositing Error');
Players[CurrentPlayer].Loc := 'Depositing';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
end;

function FindAnvil(Click : Boolean): Boolean;
Var
tpa : TPointArray;
atpa : T2DPointArray;
p : TPoint;
cts : Integer;
h, z : Integer;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.00, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 4671308, MSX1, MSY1, MSX2, MSY2, 6);
ColorToleranceSpeed(cts);
SetColorspeed2Modifiers(0.2, 0.2);
if Length(tpa) > 20 then
begin
atpa := SplitTPAEx(tpa, 10, 10);
SortATPAFrom(atpa, p);
z := High(atpa);
for h := 0 to z do
if Length(atpa[h]) > 30 then
begin
MiddleTPAEx(atpa[h], x, y);
Wait(50 + random(100));
MMouse(x, y, 2, 2);
Wait(100 + random(50));
GetMousePos(x, y);
if Click then
begin
GetMousePos(x, y);
WriteLn('Anvil Found');
Mouse(x, y, 5, 5, False);
Result := IfIsOptionChoose(5000, [Bars.Anvil], False)
if not Result then Result := R_ChooseOption(Bars.Anvil);
FFlag(0);
end
else
begin
Result := True;
end;
if Result then Break;
end;
end;
end;

procedure Anvil;
var Anvils : TPoint;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
if FindObjectEx(Anvils, 2783, 10) then
begin
if not TileOnMS(Anvils, 15) then
begin
Anvils := TileToMM(Anvils);
WalkToTile(Anvils, 1, 0);
FFlag(0);
Wait(400);
end;
Anvils := TileToMS(Anvils, 15);
MMouse(Anvils.x, Anvils.y, 3, 3);
GetMousePos(x, y);
WriteLn('Anvil Found Using Reflection');
Mouse(x, y, 3, 3, False);
IfIsOptionChoose(5000, [Bars.Anvil], False);
end
else
if not FindAnvil(True) then
begin
WriteLn('Anvil Not Found... weird error');
Players[CurrentPlayer].Loc := 'NoAnvil';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;

{*******************************************************************************
Function SmithItems : Boolean;
By: n3ss3s Edited by Mormonman!
Description: Returns true if could smith the item Item.
*******************************************************************************}

function SmithItems : Boolean;
begin
If Items.Scroll Then
FixSmith(True);
If FindTextTPAEx(16777215, 10, MSX1, MSY1, MSX2, MSY2, x, y, Items.Name, statchars, Nothing) Then
begin
if (CountBarsInInv < Items.Bars) then
begin
srl_Warn('SmithItems', 'Not enough bars to smith', warn_Warning);
Exit;
end;
Mouse(x + 3, y + 3, 4, 4, False);
Result := IfIsOptionChoose(5000, ['ake All'], False)
if not Result then Result := R_ChooseOption('All');
end;
end;

function WaitForIt : Boolean; Forward;

procedure Load;
var LoadTime : LongInt; I : Integer;
begin
if not LoggedIn then Exit;
if not (CountBarsInInv >= Items.Bars) then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
MarkTime(LoadTime);
I := 0;
repeat
FindBar(False, True, True);
Anvil;
ScreenWait(SmithingScreen, 5);
if SmithingScreen then Break;
begin
Inc(I);
WriteLn('Try #' +IntToStr(I));
end;
Wait(1000+random(500));
if SmithingScreen then Break;
until (SmithingScreen) or (I >= 15);
if SmithItems then
while not WaitForIt do Wait(500);
end;

function WaitForIt : Boolean;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then Exit;
While (CountBarsInInv > 0) do
begin
Wait(1000);
if Randoms then
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'RandomFail';
NextPlayer(False);
end;
if LevelUpCheck then
begin
Inc(Players[CurrentPlayer].Integers[3]);
Load;
end;
if not FindBar(False, False, False) then Break;
end;
if (CountBarsInInv = 0) or (not (FindBar(False, False, False))) then
Result := True;
end;

procedure SetupScript;
begin
WriteLn('Smart Loading...');
SmartSetupEx(Smartworld, Members, Signed, false);
wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
WriteLn('Smart Loaded!');
SetupSRL;
SetupSmithing;
SRL_Procs[0] := @FastAB;//antiban for walking
DeclarePlayers;
//SetAutoingDefaults;
end;

procedure SetupPlayer;
var L : Integer; color : String;
begin
if not LoggedIn then LoginPlayer;
Loads := 0;
MakeCompass('n');
SetAngle(True);
L := GetMMLevels('run', color);
if (L >= 50) then SetRun(True) else SetRun(False);
HCheck(False);
SetVars;
GetLocation;
if not (Players[CurrentPlayer].Integers[1] >= 1) then GetSmithingLevel(True);
end;

procedure Report;
var I : Integer;
begin
R_RandomsReport;
SendSRLReport;
if not Debug then ClearDebug;
WriteLn(' ');
WriteLn('[------Stick Smither------]');
WriteLn('[---Made By : Mormonman---]');
WriteLn('[--Time : '+TimeRunning+'--]');
WriteLn('[--Loads : '+IntToStr(AllLoads)+'--]');
WriteLn('[---Player Stats---]');
for I := 0 to High(Players) do
begin
Writeln('[---' + IntToStr(I) + ': ' + Players[I].Nick + ': ' + Players[I].Rand +
'[Loads : ' + IntToStr(Players[I].Integers[1]) + '] ' +
'[Levels Gained : ' + (IntToStr(Players[I].Integers[4] - Players[I].Integers[3])) + '] ' +
'[Current Lvl : ' + IntToStr(Players[I].Integers[4]) + '] ' +
'[Active : ' + BoolToStr(Players[I].Active) + '] ---] ');
end;
WriteLn('[Thank you for using my script!]');
end;

procedure ScriptTerminate;
begin
if not Debug then ClearDebug;
//Report;
end;

procedure LoopoftheMain;
begin
repeat//player loop
SetupPlayer;
repeat //smithing loop
Withdraws;
Load;
Deposits;
until (Loads >= Players[CurrentPlayer].Integers[0]) or (not (LoggedIn)); //end of smithing loop
if LoggedIn then NextPlayer(True)
else NextPlayer(False);
until (AllPlayersInactive);//end of player loop
end;


begin
SetupScript;
//SetupPlayer;
LoopoftheMain;
end.

~RM

WT-Fakawi

2009-02-23 08:43:36

granted. GJ.

bullzeye95

2009-02-23 17:17:02

http://www.srl-forums.com/forum/showpost.php?p=549262&postcount=60

Definitely not a newcomer.

Widget

2009-02-23 19:08:40

From: bullzeye95
http://www.srl-forums.com/forum/showpost.php?p=549262&postcount=60

Definitely not a newcomer.


Eh? Drags is saying he's also The Cheese. Both mormonman and Drags are Mormon though :p

The Claw

2009-02-24 00:35:17

So….why does he feel the need to have 3 accounts? :confused:

Hobbit

2009-02-24 00:42:38

And yet he applies for members again?

http://www.villavu.com/forum/showthread.php?t=42414?p=550340#post550340

Fail?

Widget

2009-02-24 02:54:26

Nonononono
Mormonism is a term used to describe the religious, ideological and cultural elements of certain branches of the Latter Day Saint movement, and specifically, The Church of Jesus Christ of Latter-day Saints (LDS Church).

Mormonman and Drags/Cheese share religious views, they aren't the same person ¬.¬

The Claw

2009-02-24 04:32:33

Haha oops :p I thought everyone was using "morman" as a nickname for "mormanman"

bullzeye95

2009-02-24 07:41:41

Sorry bout that, I misread o.O

Smartzkid

2009-02-24 16:30:03

Epic fail guys…