SRL Archive - MSI Archives

Quest-Runner Team


benjaa

2008-12-11 09:16:39

Quest Runner Team

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

Magiic

2008-12-11 10:22:49

this is for MSI :p not this, you should have posted it somewhere else

Blumblebee

2008-12-11 10:32:57

From: sandos
this is for MSI :p not this, you should have posted it somewhere else


MSI died a long time ago though, and hes talking about scripting with other people, so wouldnt this somewhat count?

Anyways, I'll see how things go in the next few weeks, but i tihnk i have some free time so i could offer some help, just pm with the details.

Magiic

2008-12-11 12:11:19

MSI was posted in 2-3 weeks ago and no it doesn't this would be a new scripting group not MSI

Sir R. M8gic1an

2008-12-11 12:23:20

heh, if you guys use reflection it won't rally take you long :p otherwise you'll have some challenging walks to do ;)

and my advice is use GE for items;)

~RM

Naum

2008-12-11 12:26:12

Its not that hard. You can use part of my sheep shearer quester. I have around about 600 fresh accounts with haven't done it (lost passes sry :p). If you want to use some of it you might have to ask squig to Pm you it :).

Good Luck!

benjaa

2008-12-11 18:01:59

So this isnt MSI…? Woops

If an admin/mod could move this please


Anyways, I'll see how things go in the next few weeks, but i tihnk i have some free time so i could offer some help, just pm with the details.


Awesome, will do

and my advice is use GE for items


LOL, that pretty much goes against the whole idea of the script

Its not that hard. You can use part of my sheep shearer quester. I have around about 600 fresh accounts with haven't done it (lost passes sry ). If you want to use some of it you might have to ask squig to Pm you it .


600?! Woah, that could be reallly useful
And I'm searching for shearer now

Blumblebee

2008-12-11 19:27:27

From: sandos
MSI was posted in 2-3 weeks ago and no it doesn't this would be a new scripting group not MSI


MSI-Group Forums are opened. - 05-25-2007, 08:41 PM


just a tad longer than 2-3 weeks im thinking…

benjaa

2008-12-11 20:05:40

…what..?

Blumblebee

2008-12-11 20:07:04

just proving a statement haha, he said that this was in the wrong section and MSI was posted 2-3 weeks ago, when its over a year old :/

Lalaji

2008-12-11 20:19:50

I suppose I can be a :
- Devoted Testers
- Honest People
- A LOT of noob accounts

srry, I dont really comsider my self as a very experienced. I lost my touch with scar. I am, however, trying to be more active.

please PM me anything you need.

[-jesus-]

2008-12-11 20:43:32

From: Lalaji
I suppose I can be a :
- Devoted Testers
- Honest People
- A LOT of noob accounts

srry, I dont really comsider my self as a very experienced. I lost my touch with scar. I am, however, trying to be more active.

please PM me anything you need.



Same as Lalaji^
I have 23 accounts(& might make some more..) right now with no quests except Rune Mysteries done on a few of them. Msg me if you need any testing/accounts.

Blumblebee

2008-12-11 20:57:59

benjaa: Quick Question, reflection or color? I dont mind either of them, a mix would be nice(quickens up walking), but im confident with my color walking abilities too.

benjaa

2008-12-11 22:09:58

From: Blumblebee
benjaa: Quick Question, reflection or color? I dont mind either of them, a mix would be nice(quickens up walking), but im confident with my color walking abilities too.


im thinking more colors, radial walking, etc

not a big fan of reflection


thanks to you guys for joining, im starting scripts in 1 week
i will pm you all when we start

Hugolord

2008-12-14 07:20:57

Me can test on my bots ( around 15 bots I think)

Raskolnikov

2008-12-14 17:30:32

Yes I can test and script and stuff. RL is getting in the way right now but over the holidays I have a huge amount of time so pm me details.

Cut em2 it

lordsaturn

2008-12-14 21:26:40

Why not use reflection? It's flawless…
And if you did use it, then why back it up with color methods?

benjaa

2008-12-19 21:26:09

i need to get into reflection
i havent really looked at it yet (took too long to dl)

gonna download now

also, i just got back from the beach, might start scripting in a week or two



EDIT: Is anyone really interested? Or should I abandon?

Naike

2008-12-21 12:13:11

I can do it if your doing it reflection, otherwise to much waste.

Blumblebee

2008-12-21 18:34:05

ill do it if its in reflection too i guess, too much work other wise (lots of walking in quests)

benjaa

2008-12-21 20:07:02

I could do the majority of walking if you like…
Because don't you still need Smart minimized to use reflection??

thats full incovenient

Kyle Undefined

2008-12-21 22:02:31

From: benjaa
I could do the majority of walking if you like…
Because don't you still need Smart minimized to use reflection??

thats full incovenient


Making the walking with reflection doesn't require Smart to be minimized. I just leave it up to see if the walking is right. I only minimize it when I'm autoing.

~Camo

NiCbaZ

2008-12-23 02:41:11

Just use the path maker for walking..

benjaa

2008-12-27 18:29:53

Downloaded Reflection, starting to learn the ropes of it

Decided all walking will be reflection

Blumblebee

2008-12-27 18:54:23

sorry, your going to have to count me out now, I'm nearly done scripting now. Volleyball is starting soon, and so is my job again. Sorry.

benjaa

2008-12-29 05:14:10

Ok! Thread re-written, gonna try to get this boat moving.

Do you guys think it should be all bought in GE? Or done manually?

Naum

2008-12-29 07:56:43

Umm I can join the project, I have loads of time to kill now it is holidays :)

benjaa

2008-12-29 08:14:58

Sweet, nice to have you on-board Nauman

P1nky

2009-01-05 22:32:19

just wondering how is this PROJECT going?

benjaa

2009-01-06 02:27:57

…yet to start

after i update my Jug Buyer and Powerminer
I will start pushing by posting bits and pieces

Ejjman

2009-01-07 23:07:54

benjaa, here's how I suggest starting.

Make a list of what needs to be done. Take sheep shearer for example:
(haven't done quest in forever)

Items required: shearing tools
Walks required: lumby to quest start, start to next point, etc, etc,
Actions required: Talk to quest Npc, shear sheep, spin wheel, bank excess, etc, etc..


But nicer format. Then let people start posting what they have.

benjaa

2009-01-07 23:37:48

Ejjman, genius idea

Ok, been decided (by me because no-one responded) to start with Cook's Assistant

Let's start throwing ideas around

kingarabian

2009-01-08 21:05:25

Can reflection be used?

Tniffoc

2009-01-08 22:33:09

If you ask monk, you might be able to pull stuff out of forefeathers to kill the chickens… or Tara's Chicken Killer. Then build your own egg-getter.

benjaa

2009-01-08 23:38:00

egg's appear on the ground, not by killing chickens

mormonman

2009-03-07 22:54:58

BUMP! with MSI active I would like this project to start up again :p

Special Ed

2009-03-07 22:55:36

I agree! I would love this to get going!

http://runehq.com/guide.php?type=quest&id=00170

There is our resources, not too hard or complicated. Great for something to get everyone started!

mormonman

2009-03-07 23:10:20

What quest should I attempt?

Special Ed

2009-03-07 23:11:57

I believe the consensus was reached that we'd be doing "Cook's Assistant". Either with reflection or color clicking.

P.S. are you signed up on sourceforge?

mormonman

2009-03-07 23:15:03

Yes… with mormonman

Edit: ill talk with you about this later. i have to go.

Iron Man

2009-03-07 23:20:13

I'll help out if you're going to get this going again. Assign me something(s) to do and tell me if it's reflection or color.

EDIT: I do realize it might take a while to get this re-organized, but I'm just saying.

Naum

2009-03-08 06:35:54

I've already made a doric's quest runner :p

{Start in the GE, with 1.2k in first Inv Slot :)}

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.

I'm set to release it but maybe someone could incorporate it into the project.
It has a 70% sucess rate ATM, I just need more testers :)

Special Ed

2009-03-08 23:12:15

So are we doing cooks assistant or are we going to build off of Naumans quest? That is the real question we need to answer first.

mormonman

2009-03-09 01:32:27

I suggest that we build of off Nauman's quest, then tackle some others :D

Iron Man

2009-03-09 01:39:19

I have some of Cooks Assistant done, if you want I can release what I have so far (it's just the start of the quest and some object finding, pretty much).

benjaa

2009-03-09 03:55:16

i started doing Demon Slayer
but then i had to go back to school

i found a way to solve the incantation, and solve it

but getting the keys was too long for me

ZaSz

2009-03-09 21:39:39

We should make a new thread with each quest. Easier that way, people could choose what quests they want to work on and just work on them that way.

Special Ed

2009-03-09 22:42:02

Sounds like a plan or if benjaa wouldn't mind updating the first post in this thread with all that's going on. The thread started with doing Cook's Assistant however since I don't believe a lot of work has been done on it yet I suggest we put that on hold, finish Doric's Anvil and then move onto Cook's Assistant.

Starting too many projects at one time accomplishes nothing and then people end up drifting away.

EDIT: Remember add all of your stuff to the SVN so everyone can access it. If you need me to add you to the SVN pm me with your info or post it here.

benjaa

2009-03-10 01:56:12

good idea special ed, updating now

Special Ed

2009-03-10 18:22:16

Added the script to the SVN, gonna make a noob and get some money on him to test with.

Iron Man

2009-03-11 02:57:21

I know you don't want to many projects starting Special Ed, but
Remember add all of your stuff to the SVN so everyone can access it.
so I put in what I have so far of Cook's Assistant. I'm sure it won't hurt a lot to put it in there, but sorry if you didn't want me to add it in yet. I think I'll forget to add it in later before people started working on it later when we're done Doric's quest. :p

There might be some bugs, but not a whole lot (the chat with the cook is probably the only place). It is of course, unfinished. There is still a large portion to do, but I did the start of it.

Special Ed

2009-03-11 16:39:17

No, that's fine! :) As far as Doric's quest, it hasn't made it yet. It makes it to lumby and then it dies. Maybe a problem with the path color?

Dusk412

2009-03-11 23:03:03

Hmmm. I am in on the project :D. Let me take a look at what we got…

Edit: I have been on hiatus for about a year and a half now, so forgive me for a little while so I can catch up on the new functions and such. Reflection is the biggest new thing I think.

Special Ed

2009-03-11 23:27:20

No worries I'm just re-acquainting myself with scripting as well. So is everyone's SVN working fine, anyone still need to register who's on the project?

Tniffoc

2009-03-26 00:50:37

From: Special Ed
No worries I'm just re-acquainting myself with scripting as well. So is everyone's SVN working fine, anyone still need to register who's on the project?


I would like to join!
[email]tniffoc@gmail.com[/email]

Special Ed

2009-04-01 16:43:04

Awesome just PM me with your sourceforge username once you've registered.

(Sorry about the absence I've been really sick lately / busy with school).