benjaa
2008-12-11 09:16:39
S.M.A.R.T. Reflection Scripts
So, some interest has been thrown around about the idea of making team quest runners. Lately, I've been thinking to myself which quest we should kick it off with. I was thinking starting simple, seeing how the whole idea of sharing goes. I was planning to have each piece of script posting here, and cutting and pasting the best elements into the final one.
The idea is back on track! Although it has some alterations. Firstly, a version of Doric's Anvil, submitted by NaumanAkhlaQ will be completed and made 100% success rate.
Here is the script. Post your suggestions.
program Doric_QuestRunner;
{.include SRL/SRL.scar}
{.include srl/srl/misc/users.scar}
{
Type
Ores Set Of }
Var DirtColor, Road_Color, Before : Integer;
x, y, I, Z, Num : Integer;
QuestComplete : Variant;
var
// ProgressBar variables.
frmDesign : TForm;
GroupBox1 : TGroupBox;
Label1, Label2, Label6 : TLabel;
Labelx : Array [3..5] Of TLabel;
Edit1 : TEdit;
Button1, Button2, Button3, Button4,
Button5 : TButton;
CheckBox1 : TCheckBox;
Procedure UpDateGEPrice;
Var Update : String;
Options : Array Of String;
I : Integer;
Begin
Options := ['xxx', 'xxx', 'xxx', 'iron+ore', 'copper+ore', 'clay'];
PlaySound('tada.wav');
For I := 3 to 5 Do
Begin
Update := GetPage('http://itemdb-rs.runescape.com/results.ws?query='+Options[i]+'&price=all&members=no');
If Options[i] = 'iron+ore' Then
Labelx[i].Caption := 'Current Iron Ore Price : '+GetNumbers(Between('ore</a></td>', '<td><span class="', Update))+' Gp |';
If Options[i] = 'copper+ore' Then
Labelx[i].Caption := 'Current Copper Ore Price : '+GetNumbers(Between('ore</a></td>', '<td><span class="', Update))+' Gp |';
If Options[i] = 'clay' Then
Labelx[i].Caption := 'Current Clay Price : '+GetNumbers(Between('lay</a></td>', '<td><span class="', Update)) +' Gp |';
End;
End;
Procedure OkiClick(Send0r : TObject);
Begin
Case Send0r Of
Button1 : SRLPlayerForm(True, [], [], ['Pin'], []);
Button2 : OpenWebPage('');
Button3 : Begin
FrmDesign.Close;
TerminateScript;
End;
Button4 : FrmDesign.ModalResult := MrOk;
Button5 : UpdateGEPrice;
End;
End;
// This form was parsed using: DFM Form Parser v.25 by Ron.
procedure DoricsForm;
var
TimeProgressBar : Integer;
begin
TimeProgressBar := GetSystemTime;
frmDesign := CreateForm;
with frmDesign do
begin
Position := poScreenCenter;
BorderStyle := bsSingle;
BorderIcons := [biMinimize];
ClientWidth := 365;
ClientHeight := 234;
Caption := 'frmDesign';
Color := 15102;
Font.Color := clBlack;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
PixelsPerInch := 96;
end;
GroupBox1 := TGroupBox.Create(frmDesign);
with GroupBox1 do
begin
Parent := frmDesign;
Left := 0;
Top := 0;
Width := 361;
Height := 233;
Caption :=
' NaumanAkhlaQ'#39's - Doric'#39's Quest Runner! ' +
' '
TabOrder := 0;
end;
Label1 := TLabel.Create(GroupBox1);
with Label1 do
begin
Parent := GroupBox1;
Left := 216;
Top := 112;
Width := 127;
Height := 13;
Caption := '^ Select this if you want to ';
end;
Label2 := TLabel.Create(GroupBox1);
with Label2 do
begin
Parent := GroupBox1;
Left := 216;
Top := 124;
Width := 120;
Height := 13;
Caption := 'buy the ores from the GE!';
end;
Labelx[3] := TLabel.Create(GroupBox1);
with Labelx[3] do
begin
Parent := GroupBox1;
Left := 16;
Top := 216;
Width := 116;
Height := 13;
Caption := 'Current Iron Ore Price : |';
end;
Labelx[4] := TLabel.Create(GroupBox1);
with Labelx[4] do
begin
Parent := GroupBox1;
Left := 16;
Top := 192;
Width := 132;
Height := 13;
Caption := 'Current Copper Ore Price : |';
end;
Labelx[5] := TLabel.Create(GroupBox1);
with Labelx[5] do
begin
Parent := GroupBox1;
Left := 200;
Top := 192;
Width := 98;
Height := 13;
Caption := 'Current Clay Price : |';
end;
Label6 := TLabel.Create(GroupBox1);
with Label6 do
begin
Parent := GroupBox1;
Left := 200;
Top := 216;
Width := 116;
Height := 13;
Caption := 'Form By NaumanAkhlaQ';
end;
Edit1 := TEdit.Create(GroupBox1);
with Edit1 do
begin
Parent := GroupBox1;
Left := 0;
Top := 16;
Width := 361;
Height := 21;
TabOrder := 0;
Text := '~~~~~~~~~~~~~~Fill Out Your Player Information~~~~~~~~~~~~~~~~';
Enabled := False;
end;
Button1 := TButton.Create(GroupBox1);
with Button1 do
begin
Parent := GroupBox1;
Left := 16;
Top := 48;
Width := 137;
Height := 41;
Caption := 'Set Up Player Infromation';
TabOrder := 1;
OnClick := @OkiClick;
end;
Button2 := TButton.Create(GroupBox1);
with Button2 do
begin
Parent := GroupBox1;
Left := 16;
Top := 96;
Width := 137;
Height := 41;
Caption := 'Visit Script Thread';
TabOrder := 2;
OnClick := @OkiClick;
end;
Button3 := TButton.Create(GroupBox1);
with Button3 do
begin
Parent := GroupBox1;
Left := 200;
Top := 48;
Width := 137;
Height := 41;
Caption := 'End Script';
TabOrder := 3;
OnClick := @OkiClick;
end;
Button4 := TButton.Create(GroupBox1);
with Button4 do
begin
Parent := GroupBox1;
Left := 16;
Top := 152;
Width := 185;
Height := 33;
Caption := 'Start Script!!!';
TabOrder := 4;
OnClick := @OkiClick;
end;
CheckBox1 := TCheckBox.Create(GroupBox1);
with CheckBox1 do
begin
Parent := GroupBox1;
Left := 200;
Top := 96;
Width := 89;
Height := 17;
Caption := 'Buy Materials';
Color := clBlue;
TabOrder := 5;
end;
Button5 := TButton.Create(GroupBox1);
with Button5 do
begin
Parent := GroupBox1;
Left := 232;
Top := 160;
Width := 81;
Height := 25;
Caption := 'Update Prices';
TabOrder := 6;
OnClick := @OkiClick;
end;
WriteLn('DoricsForm compiled in ' + IntToStr(GetSystemTime - TimeProgressBar) + ' milliseconds!');
end;
procedure SafeDoricsForm;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('DoricsForm', V);
end;
procedure ShowDoricsFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowDoricsFormModal;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowDoricsFormModal', V);
end;
procedure Form;
begin
try
SafeDoricsForm;
SafeShowDoricsFormModal;
except
WriteLn('An error seems to have occurred in: DoricsForm');
end;
end;
Procedure TerminatePlayer(Actif : Boolean);
Begin
WriteLn('Player Failed!');
QuestComplete := False;
LogOut;
NextPlayer(Actif);
Exit;
End;
Function LinearWalkX(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
Var TPA : TPointArray;
Begin
If LinearWalkEx(tpa, MMCX, MMCY, TheColor, 10, Direction, Radius) Then
For i := 0 To High(tpa) Do
If MFNF(tpa[i].x, tpa[i].y - 10, Xmod, Ymod) Then
Begin
FFlag(10);
Result := True;
Break;
End;
End;
{
Function FindWallColor : Integer; //My own :)
Var TPA : Array Of TPoint;
ATPA : Array Of Array Of TPoint;
Begin
ColorToleranceSpeed(0);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 15658734, MMX1, MMY1, MMX2, MMY2, 2);
If Length(TPA) > 0 Then
Begin
ATPA := SplitTPA(TPA, 1);
For I := 0 to High(ATPA) Do
If MiddleTPAEx(ATPA[i], x, y) Then
If GetColor(x, y) > 0 Then
Begin
Result := GetColor(x, y);
WriteLn('WallColor = '+IntToStr(Result));
Exit;
End;
End;
End; }
function FindWallColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 15331312, MMX1, MMY1, MMX2, MMY2, 10);
if (Length(arP) = 0) then
begin
Writeln('Couldn'#39't FindWallColor!');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 237) and (R <= 242) and (G >= 237) and (G <= 241) and (B >= 227) and (B <= 239) then
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 0.00) and (H <= 15.40) and (S >= 0.00) and (S <= 31.73) and (L >= 91.94) and (L <= 93.35) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 81.24) and (X <= 81.46) and (Y >= 85.48) and (Y <= 86.64) and (Z >= 85.79) and (Z <= 93.11) then
begin
Result := arC[i];
Writeln('WallColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure W(Time : LongInt);
Begin
Wait(Time + Random(800));
End;
Function FindGEMan : Boolean;
Begin
Result := FindObj(x, y, 'lerk', 4466226, 10);
End;
Procedure ClickSlot;
Begin
MouseBox(70, 346, 128, 356, 1);
End;
Procedure Confirm;
Begin
Wait(100 + Random(200));
ClickText('Confirm Offer', UpChars, MSX1, MSY1, MSX2, MSY2, True);
Wait(200 + Random(200));
If FindBlackChatMessage('enough coins') Then
TerminatePlayer(False);
End;
Function Buy(What : Integer) : Boolean;
Label lOL;
Begin
W(600);
Case What Of
0 : Num := 2;
1 : Num := 4;
2 : Num := 6;
End;
For I := 0 to Num -1 Do
Mouse(245, 191, 4, 4, True);
W(700);
Mouse(391, 220, 5, 5, True);
W(700);
Confirm;
Repeat
W(200);
Until(GetColor(101, 175) = 1999423) Or (I >= 55);
If I >= 55 Then TerminatePlayer(False)
Else
W(100);
If GetColor(101, 175) = 1999423 Then
Begin
Mouse(62, 130, 50, 50, True);
W(400);
If (CountColorTolerance(2176579, 400, 281, 437, 314, 5) < 1180) Then
Mouse(406, 286, 5, 5, True);
W(200);
Mouse(471, 302, 10, 10, True);
W(300);
If Z > 2 Then GoTo lOL;
If FindColorTolerance(x, y, 247475, 35, 84, 77, 146, 15) Then
Mouse(x, y, 5, 5, True);
End;
lOL :
Wait(1);
I := 0;
Result := True;
End;
procedure Withdraw2(col, row, Amount: Integer); //Edit from SRL
Var
BBox: TBox;
begin
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col - 1, Row - 1)));
If Amount = 1 Then
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
// Wait(RandomRange(50, 150));
End
Else
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if InIntArray([5, 10], Amount) then
ChooseOption('Withdraw-' +IntToStr(Amount))
else if Amount = 0 then
ChooseOption('Withdraw-All')
else
if (ChooseOption('Withdraw-X')) then
begin
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
End;
Wait(1000 + Random(500));
end;
Function BuyItems : Boolean;
Var Option : Array Of String;
Notes : Integer;
Label Lol;
Begin
Notes := DTMFromString('78DA6374626260E06264400653EB4218FE036' +
'990E87F2060B405AAF9CD800618914820ED075423C6885F8D2950' +
'8D0801358140357F09D8650654C386DF1C0084550A3F');
Option := ['iron ore', 'copper ore', 'clay'];
If Not CheckBox1.Checked Then GoTo Lol;
If FindGEMan Then
Begin
Mouse(x, y, 1, 1, False);
W(500);
If PinScreen Then InPin(Players[CurrentPlayer].Strings[0]);
ChooseOption('xchan');
End;
W(1000);
If FindText(x, y, 'rand Ex', TradeChars, 206, 34, 316, 48) Then
Begin
If FindColorTolerance(x, y, 247475, 35, 84, 77, 146, 15) Then
Mouse(x, y, 5, 5, True);
W(1000);
End;
If FindText(x, y, 'Item Search', TradeChars, MCX1, MCY1, MCX2, MCY2) Then
Begin
If Random(2) = 0 Then
MouseBox(36, 456, 479, 459, 1);
Z := 0;
Repeat
W(200);
TypeSend(Option[Z]);
W(500);
ClickSlot;
If Not Buy(Z) Then Result := False
Else
WriteLn('Bought '+IntToStr(Num)+' '+Capitalize(Option[Z]));
W((Z*10)+300);
Inc(Z);
Until(Z > 2);
If Z > 2 Then WriteLn('Bought All Items!');
End;
Begin
CloseWindow;
If FlagPresent Then WriteLn('Thingy has spazzed up :p');
FFlag(0);
End;
Lol :
If FindObjCustom(x, y, ['anker'], [1275035], 10) Then
Begin
Mouse(x, y, 0, 0, False);
W(100);
If FindBitmap(BitmapFromString(16, 1, 'beNr7z/AfBhjAIDbEHQ0BZSCSIDYA' +
'W8EVug=='), x, y) Then
Mouse(x, y, 5, 5, True);
FFlag(0);
W(1200);
If BankScreen Then
Repeat
If FindDTM(Notes, x, y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(x, y, 5, 5, False);
ChooseOption('All');
W(800);
End;
Until(Not FindDTM(Notes, x, y, MIX1, MIY1, MIX2, MIY2));
MMouse(253, 305, 10, 10);
W(200);
If IsUpText('item') Then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
End Else
Begin
W(200);
MMouse(Random(MSCX), Random(MSCY), 50, 50);
End;
Z := 0;
Repeat
Begin
Mouse(79, 304, 12, 12, True);
W(1000);
If Not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2) Then
Mouse(79, 304, 12, 12, True)
Else
If FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2) Then
Begin
TypeSend(Option[Z]);
W(200);
Case Option[Z] Of
'iron ore' : Withdraw2(1, 1, 2);
'copper ore' : Withdraw2(1, 1, 4);
'clay' : Withdraw2(1, 1, 6);
End;
Inc(Z);
End;
End;
Until(Z > 2);
If Z > 2 Then
Begin
CloseWindow;
Result := True;
End Else
Result := False;
End;
FreeDTM(Notes);
End;
function DirtRoadColor_GE : Integer; //Modded Zepyrs Function
var //Changed color
CTS, II, Count, PCount: Integer;
ColourDensity: Extended;
TPA, CPts: TPointArray;
TIA: TIntegerArray;
TB: TBox;
begin
Result := 0;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.44, 1.42);
if (FindColorsTolerance(TPA, 6784921, MMX1, MMY1, MMX2, MMY2, 10)) then
begin
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 76.0, MMCX, MMCY);
TIA := GetColors(TPA);
ClearSameIntegersAndTPA(TIA, TPA);
for II := 0 to High(TIA) do
begin
FindColorsTolerance(CPts, TIA[II], MMX1, MMY1, MMX2, MMY2, 0);
TB := GetTPABounds(CPts);
Count := Length(CPts);
try
ColourDensity := Count / ((TB.x2 - TB.x1) * (TB.y2 - TB.y1));
except end;
if (Count < 300) or (ColourDensity < 0.08) or (Count <= PCount) then Continue;
Result := TIA[II];
PCount := Count;
end;
end;
if (Result > 0) then WriteLn('Dirt Road Color = ' + IntToStr(Result))
else Result := AutoColorThis(BitmapFromString(3, 3,
'beNori+0uw4EAq6IMTw=='), 70, MMX1, MMY1, MMX2, MMY2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
end;
Procedure GEToDoric;
Label Lolx;
Begin
GoTo Lolx;
lolx :
//If Not BuyItems Then TerminatePlayer(False) Else
Begin
SetRun(True);
MouseFlag(598, 132, 10, 10, 0);
If FindSymbol(x, y, 'guide') Then MouseFlag(x + 5, y, 3, 3, 0);
Begin
If Not RadialWalk(DirtColor, 187, 127, 72, 0, 0) Then
If Not RadialWalk(DirtColor, 200, 100, 72, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('1');
End;
Begin
If Not RadialWalk(DirtColor, 135, 197, 72, 0, 0) Then
If Not RadialWalk(DirtColor, 130, 210, 72, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
If Not FindSymbol(x, y, 'Bank') Then TerminatePlayer(False)
Else
Begin
Road_Color := FindVarrockRoadColor;
If Not RadialWalk(Road_Color, 180, 220, 70, 0, 0) Then
If Not RadialWalk(Road_Color, 190, 226, 72, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('2');
End;
End;
If Not FindSymbol(x, y, 'cook') Then TerminatePlayer(False) Else
Begin
If Not RadialWalk(Road_Color, 200, 250, 64, 0, 0) Then
If Not RadialWalk(Road_Color, 200, 268, 70, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('3');
If Not RadialWalk(Road_Color, 240, 310, 69, 0, 0) Then
If Not RadialWalk(Road_Color, 200, 340, 70, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('4');
End;
Begin
If Not FindRoadColor > 0 Then TerminatePlayer(False) Else
Road_Color := FindRoadColor;
For I := 0 to 1 Do
Begin
If Not RadialWalk(Road_Color, 240, 350, 70, 0, 0) Then
If Not RadialWalk(Road_Color, 180, 359, 70, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('5');
End;
End;
Begin
MouseFlag(MMCX - 65, MMCY - 20, 10, 10, 30);
If Not FlagPresent Then TerminatePlayer(False)
Else
FFlag(0);
WriteLn('6');
If FindStoneColor < 0 Then
MouseFlag(MMCX - 65, MMCY, 10, 10, 0);
If Not FindColor(x, y, FindStoneColor, MMX1, MMY1, MMX2, MMY2) Then
MouseFlag(MMCX - 65, MMCY - 5, 10, 0, 0);
If Not FindColor(x, y, FindStoneColor, MMX1, MMY1, MMX2, MMY2) Then
TerminatePlayer(False)
Else
MouseFlag(x, y, 5, 5, 0);
MouseFlag(MMCX - 65, MMCY, 10, 10, 0);
WriteLn('7');
Begin
Road_Color := FindWallColor;
If Not LinearWalkX(Road_Color, 190, 40, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('8');
If Not LinearWalkX(Road_Color, 220, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('9');
If Not LinearWalkX(Road_Color, 320, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('10');
If Not LinearWalkX(Road_Color, 340, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('11');
If Not LinearWalkX(Road_Color, 270, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('12');
If Not LinearWalkX(Road_Color, 300, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('13');
If Not LinearWalkX(Road_Color, 270, 188, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('14');
End;
SetRun(True);
Begin
FindWindowBySize(766, 504);
Road_Color := FindRoadColor;
If Not FindColor(x, y, FindRoadColor, MMX1, MMY1, MMX2, MMY2) Then
Begin
W(400);
MouseFlag(590, 113, 10, 10, 0);
End Else
If Not FindColor(x, y, FindRoadColor, MMX1, MMY1, MMX2, MMY2) Then
TerminatePlayer(False)
Else
If Not FindColor(x, y, FindRoadColor, MMX1, MMY1, MMX2, MMY2) Then
MFF(x + 5, y, 3, 5);
FFlag(0);
WriteLn('15');
End;
If FindColor(x, y, FindRoadColor, MMX1, MMY1, MMX2, MMY2) Then
WriteLn('We made it to fally')
Else
TerminatePlayer(False);
Begin
Road_Color := FindRoadColor;
If Not RadialWalk(Road_Color, 270, 320, 68, 0, 0) Then
If Not RadialWalk(Road_Color, 260, 350, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
WriteLn('16');
If Not RadialWalk(Road_Color, 294, 359, 70, 0, 0) Then
If Not RadialWalk(Road_Color, 240, 350, 68, 0, 0) Then
Wait(1)
Else
FFlag(0);
WriteLn('17');
If Not LinearWalkX(Road_Color, 0, 68, 0, 0) Then
TerminatePlayer(False)
Else
FFlag(0);
If Not FindSymbol(x, y, 'quest') Then TerminatePlayer(False)
Else
WriteLn('We are outside Dorics House!');
Mouse(x - 15, y, 5, 5, True);
FFlag(0);
End;
SetRun(False);
End;
End;
End;
Procedure C2C;
Begin
If Random(2) = 1 Then IdleTime(500, 50, 0.67);
ClickToContinue;
W(300);
IdleTime(500, 50, 0.67);
End;
Function DoorClosed : Boolean;
Begin
If FindObj(x, y, 'oor', 1591646, 10) Then
If IsUpText('pen') Then
Result := True
Else
Result := False;
End;
Function OpenDoor : Boolean;
Begin
MakeCompass('E');
If DoorClosed Then
Begin
GetMousePos(x, y);
If IsUpText('pen') Then
Mouse(x, y, 0, 0, True);
End Else
Begin
If FindSymbol(x, y, 'quest') Then
MouseFlag(x, y + 10, 0, 0, 0);
Result := True;
End;
End;
Procedure TalkToDoric(ConvoType : Integer);
Label Again;
Var F : Integer;
Begin
F := 0;
GoTo Again;
Again :
If FindObjCustom(x, y, ['oric', 'alk-to'], [2568084, 7960962, 9016212], 10) Then
Begin
Inc(F);
If F >= 10 Then
TerminatePlayer(False)
Else
Mouse(x, y, 0, 0, True);
W(300);
If Not FindNPCChatText('oric', Nothing) Then GoTo Again;
End;
Case ConvoType Of
0 : If FindNPCChatText('ello', Nothing) Then
Begin
C2C;
FindNPCChatText('I wanted to use your anvils.', ClickLeft);
W(300);
C2C;
C2C;
FindNPCChatText('will get you the materials', ClickLeft);
W(300);
C2C;
FindNPCChatText('ertainly', ClickLeft);
W(300);
C2C;
End;
1 : If FindNPCChatText('ave', Nothing) Then
Begin
F := 0;
Repeat
C2C;
Inc(F);
Until(FindText(x, y, 'ompleted', SmallChars, MSX1, MSY1, MSX2, MSY2)) Or (F>=10)
If FindText(x, y, 'ompleted', SmallChars, MSX1, MSY1, MSX2, MSY2) Then
Begin
WriteLn('Quest Completed');
WriteLn('Got :');
WriteLn('1 Quest Point');
WriteLn('1,300 Mining Xp');
WriteLn('180 Coins :)');
WriteLn('You Gained ' + IntToStr(GetSkillLevel('mining') - Before) + ' Mining Level[s]!!');
WriteLn('OOOOO.. and the use of ''Dorics'' anvils xD');
Mouse(443, 74, 6, 6, True);
QuestComplete := True;
End;
End;
End;
End;
Procedure Setup;
Begin
If Not LoggedIn Then LoginPlayer;
Begin
MakeCompass('N');
DirtColor := DirtRoadColor_GE;
SymbolAccuracy := 0.4;
Before := GetSkillLevel('mining');
GameTab(4);
End;
End;
Procedure MainLoop;
Begin
SetupSRL;
Form;
ActivateClient;
SRLPlayerForm(False, [], [], ['Pin'], []);
Wait(999);
Repeat
Begin
Repeat
Setup;
GEToDoric;
OpenDoor;
For I := 0 to 1 Do
TalkToDoric(I);
Until(QuestComplete) Or (Not (QuestComplete));
If LoggedIn Then LogOut;
Begin
If Not QuestComplete Then NextPlayer(False)
Else
Begin
NextPlayer(True);
Inc(QuestComplete);
End;
End;
End;
Until(AllPlayersInactive);
End;
Begin
MainLoop;
If QuestComplete Then
WriteLn('Got '+IntToStr(QuestComplete)+' Players to Complete The Quest Out Of '+IntToStr(HowManyPlayers));
End.
Next on the list will be: Cook's Assistant