SRL Archive - Help and Support

Help with 'END' expected error


Waddo

2009-06-11 17:47:15

{.Script Info:
# ScriptName = Waddos Varrock East Miner
# Author = Waddo
# Version = 4.05
# Comments = Mines and banks or drops Iron or Copper.
# Features = Working Pickaxe replacer.
# Known bugs = Sometimes gets lost at bank, Sometimes walks past mine
# Instructions = Setup chars in mine or varrock east bank with
a pick equiped or in inventory, set up spare picks in
bank the best pick (that you want to use) first.
Run Script and fill out Srl Player Form.
/Script Info}


program automin3r;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
{.include SRL/SRL/skill/mining.scar}
{.include srl/srl/misc/users.scar}
{.include srl/srl/reflection/reflection.scar}

var
tinvents, troc, activen:integer;
invents,brokepick,pick,paws:integer;
roc, i, abt, atm:integer;
x, y, ran, vroadcolor, orec:integer;
oredtm, crdtmtol, crdtmarea, Pw1DtmArea:integer;//dtm's

const
//ore colours
copper=3692667;
iron=2239816;

procedure mainloop; forward;
procedure tobank; forward;
procedure tomine; forward;

procedure srlstuff;
begin
ReportVars[0] := ReportVars[0]+ CountItems(oredtm,'dtm',[0,0]);
ReportVars[1] := reportvars[1]+ 1;
srlrandomsreport;
end;


//findedges,edgeroadwalk, edgeroadwalkex idea by waddo created by nielsie95


procedure QuickSortExtendedTPA(var A: TExtendedArray; var B: TPointArray; iLo, iHi: Integer) ;
var
Lo, Hi: Integer;
P: TPoint;
T, M: Extended;
begin
Lo := iLo;
Hi := iHi;
M := A[(Lo + Hi) shr 1];
repeat
while (A[Lo] < M) do Inc(Lo);
while (A[Hi] > M) do Dec(Hi);
if (Lo <= Hi) then
begin
T := A[Lo];
P := B[Lo];
A[Lo] := A[Hi];
B[Lo] := B[Hi];
A[Hi] := T;
B[Hi] := P;
Inc(Lo);
Dec(Hi);
end;
until (Lo > Hi);
if (Hi > iLo) then QuickSortExtendedTPA(A, B, iLo, Hi);
if (Lo < iHi) then QuickSortExtendedTPA(A, B, Lo, iHi);
end;

procedure freport;
begin
cleardebug;
writeln ('script has worked for ' + timerunning);
writeln ('you have mined '+inttostr(troc)+' ores');
if (Players[CurrentPlayer].booleans[0])then
begin
writeln ('you have banked ' +inttostr(tinvents)+ ' loads');
end else
writeln ('you have dropped ' +inttostr(tinvents)+ ' loads');
end;

procedure scriptterminate;
begin
//logout;
//freport;
freedtm(oredtm);
freedtm(brokepick);
freedtm(pick);
//terminatescript;
end;

function EdgeRoadWalkEx(var rx, ry: Integer; Color, Tolerance, Degree: Integer; SameRoad: Boolean): Boolean;
var
p, c: TPointArray;
q, z: T2DPointArray;
i, ii, l, ll, Dist, cc, ec: Integer;
d: TExtendedArray;
begin
FindColorsTolerance(p, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
Degree := Degree mod 360;
q := SplitTPAEx(p, 2, 2);
SetLength(p, Length(q));
ll := 0;
for ii := 0 to High(q) do
begin
if (Length(q[ii]) < 200) then Continue;
c := FindTPAEdges(q[ii]);
l := Length(c);
//DebugTPA(c);
//Wait(3000);
cc := 0;
ec := 0;
for i := 0 to l -1 do
begin
Dist := Distance(MMCX, MMCY, c[i].x, c[i].y);
//WriteLn(IntTostr(Dist));
if (Dist < 4) then
Inc(cc);
if (Dist < 65) then


c[i] := Point(-1, -1)
else
Inc(ec);
end;
//WriteLn(IntToStr(ec)+', '+IntToStr(cc));
if (ec > 5) and (((cc > 5) and SameRoad) or (not SameRoad)) then
begin
z := SplitTPAEx(c, 3, 3);
for ec := 0 to High(z) do
if (Length(z[ec]) > 6) and (z[ec][0].x > -1) then
begin
SetLength(p, ll + 1);
p[ll] := MiddleTPA(z[ec]);
Inc(ll);
end;
end;
end;
if (ll = 0) then Exit;
if (ll > 1) then
begin
SetLength(p, ll);
SetLength(d, ll);
for i := 0 to ll -1 do
begin
d[i] := Degrees(ArcTan2(p[i].y - MMCY, p[i].x - MMCX) + 1.570796);
while (d[i] < 0.0) do
d[i] := d[i] + 360.0;
d[i] := MinE(Abs(Degree - d[i]), MinE(Abs((Degree + 360) - d[i]), Abs(Degree - (d[i] + 360))));
end;
QuickSortExtendedTPA(d, p, 0, ll -1);
end;
rx := p[0].x;
ry := p[0].y;
SetLength(d, 1);
d[0] := Degrees(ArcTan2(ry - MMCY, rx - MMCX) + 1.570796);
while (d[0] < 0.0) do
d[0] := d[0] + 360.0;
Result := (MinE(Abs(Degree - d[0]), MinE(Abs((Degree + 360) - d[0]), Abs(Degree - (d[0] + 360)))) < 30.0);
end;

function EdgeRoadWalk(Color, Degree: Integer; SameRoad: Boolean; xMod, yMod: Integer): Boolean;
var
x, y: Integer;
begin
if EdgeRoadWalkEx(x, y, Color, 0, Degree, SameRoad) then
begin
MFNF(x, y, xMod, yMod);
wait(100);
FFlag(10);
Result := True;
end;
end;



function Setpw1DDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
Pw1DtmArea:=1;
begin
dtmMainPoint.x := 861;
dtmMainPoint.y := 255;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := vroadcolor;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 861;
dtmSubPoints[0].y := 255;
dtmSubPoints[0].AreaSize := Pw1DtmArea;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := vroadcolor;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 871;
dtmSubPoints[1].y := 242;
dtmSubPoints[1].AreaSize := Pw1DtmArea;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := vroadcolor;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 869;
dtmSubPoints[2].y := 267;
dtmSubPoints[2].AreaSize := Pw1DtmArea;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := vroadcolor;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 883;
dtmSubPoints[3].y := 280;
dtmSubPoints[3].AreaSize := Pw1DtmArea;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := vroadcolor;
dtmSubPoints[3].Tolerance := 0;

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

function SetcrDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
CrDtmArea:=1;
CrDtmTol:=30;

dtmMainPoint.x := 1126;
dtmMainPoint.y := 278;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := vroadcolor;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 1126;
dtmSubPoints[0].y := 278;
dtmSubPoints[0].AreaSize := CrDTMArea;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := VRoadColor;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 1107;
dtmSubPoints[1].y := 275;
dtmSubPoints[1].AreaSize := CrDTMArea;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := VRoadColor;
dtmSubPoints[1].Tolerance := CrDTMTol;

dtmSubPoints[2].x := 1131;
dtmSubPoints[2].y := 265;
dtmSubPoints[2].AreaSize := CrDtmArea;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := vroadcolor;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 1128;
dtmSubPoints[3].y := 286;
dtmSubPoints[3].AreaSize := CrDtmArea;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := vroadcolor;
dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 1135;
dtmSubPoints[4].y := 278;
dtmSubPoints[4].AreaSize := CrDtmArea;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 5074298;
dtmSubPoints[4].Tolerance := 25;

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

procedure loaddtms;
begin
oredtm := DTMFromString('78DA63CC636260D065644006F7EACC19FE036' +
'990E87F20602C01AA5142550391859140BA02A8C698809A78A01A' +
'53026AE2806AB408A8C904AAB1C2AF06009ACB0A4D');

brokepick := DTMFromString('78DA630C60646078C680020C95D8187480C24' +
'0C4F01F08188381ACC70C6880118904D23140D64B026AE280AC57' +
'04D4440059AF09A8F103B2DE1150E30664FD25A0C607C87A41408' +
'D2B90F504BF1A00E7310FBE');

pick := DTMFromString('78DA635464646078C980022CD4D8197480C24' +
'0C4F01F08181580ACA70C6880118904D2EA40D62B026A7481AC8F' +
'04D4C801595F08A81103398E11BF1A2920EB3301732481ACD704D' +
'4480059CFF1AB0100450F0D2A');
end;

procedure getorecolour;
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'copper' : orec:= copper;

'iron' : orec:= iron;
end;
end;

procedure report;
begin
ClearReport;
AddToReport ('script has worked for ' + timerunning);
AddToReport ('you have mined '+inttostr(roc)+' ores');
if (Players[CurrentPlayer].booleans[0])then
begin
AddToReport ('you have banked ' +inttostr(invents)+ ' loads');
end else
AddToReport ('you have dropped ' +inttostr(invents)+ ' loads');
end;



function ispickbroke:boolean;
begin
gametab(4);
if finddtm(brokepick,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
result:=true;
end else
gametab(5);
if finddtm(brokepick,x,y,MIX1,MIY1,MIX2,MIY2) then
result:=true;
end;

procedure replacepick;
var
attempts:integer;
begin
tobank;
begin //
repeat
if FindBank('veb') then
begin
wait(1000+random(100));
srlstuff;
Deposit(3, 28, true);
closebank;
attempts:=attempts+1;
end;
until ((CountItems(oredtm,'dtm',[0,0])=0)or(attempts>=5))
if attempts<5 then
exit;
if (not(invfull)) then
begin
gametab(5);
if finddtm(brokepick,x,y,MIX1,MIY1,MIX2,MIY2) then
mouse(x,y,2,2,true);
end;
if FindBank('veb') then
begin
wait(1000+random(100));
Deposit(1, 28, true);
if finddtm(pick,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
mmouse(x, y, 3, 3);
wait(1000+random(500));
if isuptext('ick') then
begin
getmousepos(x, y);
mouse(x, y, 0, 0, false);
if ChooseOption('1') then
closebank;
end;
end;
end;
end;
tomine;
end;

Function findrock (var TempX, TempY:Integer):Boolean;
Var
TempTpa: TpointArray;
Temp: T2DPointArray;
H, CTS, I:Integer;
Begin
If Not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(TempX, TempY, TempTPA, orec,MSX1, MSY1, MSX2-100, MSY2-100, 25);
Temp:= TPAtoATPAEx(TempTPA, 25, 25);
SortATPASize(Temp, True);
H:=High(Temp);
For I := 0 To H Do
Begin
MiddleTPAEx(Temp[i], TempX, TempY);
MMouse(TempX, TempY, 3, 3);
wait(50);
Result:=IsUpText('ine');
If Result Then Break;
End;
ColorToleranceSpeed(CTS);
End;

procedure playerinfo;
begin
if not loggedin then exit;
invents:=0;
getorecolour;
paws:=(players[currentplayer].Integers[1]*1000);
roc:=roc+CountItems(oredtm,'dtm',[0,0]);
troc:=roc;
vroadcolor:=findvarrockroadcolor;
end;

function activeplayers:boolean;
var
activep:integer;
begin
for activep:= 0 to howmanyplayers-1 do
if players[activep].active then
begin
activen:=activen-1;
end;
if activen<=0 then
result:=true;
end;
procedure nextp;

begin
nextPlayer(false);
if activeplayers then scriptterminate;
playerinfo;
report;
mainloop;
end;

procedure lost;
begin
writeln('We Are Lost');
x:=MSCX
y:=MSCY
if findcolorspiral(x,y,VRoadColor,MMX1,MMY1,MMX2,MMY2) then
mouse(x,y,2,2,true);
if findsymbol(x,y,'training dummy') then
begin
writeln('Found training Dummy');
mouse(x,y+50,3,3,true);
wait(1000);
fflag(0);
makecompass('5');
writeln('Continuing to mine');
tomine;
end;
if findsymbol(x,y,'clothes shop') then
begin
writeln('Found Clothes shop symbol');
mouse(x+40,y,3,3,true);
wait(1000);
fflag(0);
mouse(655, 150,6,6,true);
wait(1000+random(100));
fflag(1);
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
writeln('Found setPW1DDTM');
atm:=0;
mouse(x, y, 3, 3, true);
wait(100);
fflag(0);
end else
repeat
radialwalk(vroadcolor, 180, 200, 30, 2, 2);
wait(1000+random(100));
fflag(0);
Pw1DtmArea:=Pw1DtmArea+1;
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
writeln('Found setPW1DDTM');
atm:=0;
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
exit;
end;
atm:=atm+1;
until atm>=10;
atm:=0;
if findsymbol(x, y, 'mining spot') then
begin
writeln('Found Mining spot symbol');
mouse(x, y-15, 2, 2, true);
writeln('we got lost but we are ok now =]');
exit;
end else
begin
writeln('we facked up Im sorry Next Player');
nextp;
end;
end;
end;

Procedure SetupSMART;
Begin
SmartSetupEx(11, false, false, False);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (RSReady) Do
Wait(100);
writeln('Smart Loaded');
End;

procedure startup;
begin
if (not(loggedin))then
begin
writeln('Player not logged in logging in player');
loginplayer;
end;
cleardebug;
wait(10)
writeln('Varrock miner created by waddo')
ActivateClient;
makecompass('N');
roc:=0;
report;
end;

procedure setup;
begin
SetupSMART;
SRLPlayerForm(True, ['bank','multiplayer'], ['Loads', 'Time Between Clicks','minutes to sleep'], ['Ore Type', 'srl ID', 'srl pass'], []);
setupsrl;
setupreflection;
SetupMining;
loaddtms;
activen:=howmanyplayers-1;
end;



Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Writeln('Our player is being attacked!')
Writeln('Lets run away!')
Begin
WriteLn('Running....')
RunAway('E', False, 1, 8000+Random(3000))
WriteLn('Successfully ran away from fight!')
end;
end;
end;

Procedure AntiRandoms;
var
i : Integer;
Begin
if (not(loggedin)) then exit;
for i := 0 to 3 do
begin
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;
end;

procedure mine2;
var
mark:integer;
begin
if not findrock(x,y) then exit
else
begin
mmouse(x, y, 0, 0);
//if findgas(x,y) then mine2;
if isuptext('ine') then
begin
writeln('Rock found');
getmousepos(x, y);
mouse(x, y, 0, 0, false);
if ChooseOption('ine') then
begin
writeln('Mining ore');
fflag(0);
marktime(mark);
repeat
antirandoms;
wait(100);
if FindBlackChatMessage('ailable')then
begin
writeln('Mining Failed. Reason: No Ore Available');
break;
end;
until ((FindBlackChatMessage('to mine some') or (TimeFromMark(mark) >= paws+random(2000))));
if FindBlackChatMessage('to mine some') then
begin
writeln('Ore successfully mined');
inc(roc);
inc(troc);
end else
writeln('Failed to mine ore Reason: Timed out');
end;
end;
end;
end;


procedure drop;
begin
srlstuff;
gametab(4);
srlstuff;
for i := 2 to 28 do
begin
DropItem(i);
wait(100+random(10))
end;
ran:= Random(3);
case ran of
0:typesend('iron dropped here');

1:typesend('droping iron here');

2:typesend('droped ore');
end;
inc(invents);
inc(tinvents);
end;

procedure usebank;
var
attempts:integer;
begin
repeat
if FindBank('veb') then
begin
wait(1000+random(100));
srlstuff;
Deposit(3, 28, true);
closebank;
inc(attempts);
end;
until ((CountItems(oredtm,'dtm',[0,0])=0)or(attempts>=5))
if attempts<5 then
begin
inc(invents);
inc(tinvents);
report;
end;
attempts:=0;
end;

procedure tobank;
var
i:integer;
begin
writeln('Going to Bank');
for i:=0 to 8 do
begin
case i of
0: if walktotile(point(3292, 3369),1,10) then
writeln('Goto Bank Step 1 Reflection(Walk to Tile) : Succesfull');
else
begin
writeln('Goto Bank Step 1 Reflection(Walk to Tile) : Failed');
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
writeln('Goto Bank Step 1 DDTM(SetPW1DDTM) : Succesfull');
end else
repeat
Pw1DtmArea:=Pw1DtmArea+1;
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
atm:=0;
mouse(x, y-55, 3, 3, true);
wait(1000+random(100));
fflag(0);
writeln('Goto Bank Step 1 DDTM(SetPW1DDTM) : Succesfull');
exit;
end;
writeln('Goto Bank Step 1 DDTM(SetPW1DDTM) : Failed');
atm:=atm+1;
until atm=10;
atm:=0;
freedtm(setpw1ddtm);
end;

2: if walktotile(point(3292, 3384),1,10) then
writeln('Goto Bank Step 2 Reflection(Walk to Tile) : Succesfull');
else
begin
writeln('Goto Bank Step 2 Reflection(Walk to Tile) : Failed');
if EdgeRoadWalk(vroadcolor, 0, True, 0, 1) then
writeln('Goto Bank Step 2 EdgeRoadWalk(True) : Succesfull');
else
begin
writeln('Goto Bank Step 2 EdgeRoadWalk(True) : Failed');
if EdgeRoadWalk(vroadcolor, 0, false, 0, 1) then
writeln('Goto Bank Step 2 EdgeRoadWalk(False) : Succesfull');
else
writeln('Goto Bank Step 2 EdgeRoadWalk(False) : Failed');
end;
end;

3: if walktotile(point(3290, 3403),1,10) then
writeln('Goto Bank Step 3 Reflection(Walk to Tile) : Succesfull');
else
begin
writeln('Goto Bank Step 3 Reflection(Walk to Tile) : Failed');
if EdgeRoadWalk(vroadcolor, 0, True, 0, 0) then
writeln('Goto Bank Step 3 EdgeRoadWalk(True) : Succesfull');
else
begin
writeln('Goto Bank Step 3 EdgeRoadWalk(True) : Failed');
if EdgeRoadWalk(vroadcolor, 0, false, 0, 0) then
writeln('Goto Bank Step 3 EdgeRoadWalk(False) : Succesfull');
else
writeln('Goto Bank Step 3 EdgeRoadWalk(False) : Failed');
end;
end;

4: if walktotile(point(3285, 3414),1,10) then
writeln('Goto Bank Step 4 Reflection(Walk to Tile) : Succesfull');
else
begin
writeln('Goto Bank Step 4 Reflection(Walk to Tile) : Failed');
if EdgeRoadWalk(vroadcolor, 0, True, 0, 1) then
writeln('Goto Bank Step 4 EdgeRoadWalk(True) : Succesfull');
else
begin
writeln('Goto Bank Step 4 EdgeRoadWalk(True) : Failed');
if EdgeRoadWalk(vroadcolor, 0, false, 0, 1) then
writeln('Goto Bank Step 4 EdgeRoadWalk(False) : Succesfull');
else
writeln('Goto Bank Step 4 EdgeRoadWalk(False) : Failed');
end;
end;

6: if not walktotile(point(3280, 3429),1,10) then
begin
if dtmrotated(setcrddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
atm:=0;
end else
repeat
radialwalk(vroadcolor,280,410,40,5,5);
wait(1000+random(100));
fflag(0);
crDtmArea:=crDtmArea+1;
crDtmtol:=crDtmtol+3;
if dtmrotated(setcrddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
atm:=0;
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
exit;
end;
atm:=atm+1;
wait(100);
until atm=15;
atm:=0;
freedtm(setcrddtm);
end;

7: if not walktotile(point(3264, 3428),1,10) then
if not EdgeRoadWalk(vroadcolor, 270, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 270, false, 0, 1);

8: if not walktotile(point(3253, 3423),1,10) then
if not EdgeRoadWalk(vroadcolor, 270, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 270, false, 0, 1);
end;
end;
end;

procedure tomine;
var
x, y,i:integer;
begin
for i:=0 to 7 do
begin
case i of
0: if not walktotile(point(3264, 3428),1,10) then
linearwalk(vroadcolor, 0, 40, 2,2);

1: if not walktotile(point(3280, 3429),1,10) then
EdgeRoadWalk(vroadcolor, 90, True, 0, 1);

2: if not walktotile(point(3285, 3414),1,10) then
begin
if dtmrotated(setcrddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
wait(2000); //
mouse(x, y, 3, 3, true);
wait(2000+random(100));
fflag(0);
atm:=0;
end else
repeat
mouse(504, 164,50,70,true);
wait(1000);
fflag(1);
crDtmArea:=crDtmArea+1;
crDtmtol:=crDtmtol+3;
if dtmrotated(setcrddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
atm:=0;
mouse(x, y, 3, 3, true);
wait(2000+random(100));
fflag(0);
exit;
end;
atm:=atm+1;
until atm=10;
atm:=0;
freedtm(setcrddtm);
end;

3: if not walktotile(point(3290, 3403),1,10) then
if not EdgeRoadWalk(vroadcolor, 180, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 180, false, 0, 1);

4: if not walktotile(point(3292, 3384),1,10) then
if not EdgeRoadWalk(vroadcolor, 180, True, 0, 1) then
if not EdgeRoadWalk(vroadcolor, 180, false, 0, 1) then
if findsymbol(x,y,'Quest') then
radialroadwalk(vroadcolor,180,260,572,5,5);

5: if not walktotile(point(3292, 3369),1,10) then
if not EdgeRoadWalk(vroadcolor, 180, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 180, false, 0, 1);

6: if not walktotile(point(3287, 3367),1,10) then
begin
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
atm:=0;
mouse(x, y, 3, 3, true);
wait(100);
fflag(0);
end else
repeat
radialwalk(vroadcolor, 200, 270, 20, 2, 2);
wait(100);
fflag(0);
Pw1DtmArea:=Pw1DtmArea+1;
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
atm:=0;
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
exit;
end;
atm:=atm+1;
until atm>=10;
atm:=0;
freedtm(setpw1ddtm);
end;

7: if findsymbol(x, y, 'mining spot') then
begin
mouse(x, y-15, 2, 2, true);
wait(1000+random(100));
fflag(0);
writeln('ores banked back at mining spot');
end else
writeln('we facked up on the way to mining spot');
end;
end;
end;

procedure droporbank;
begin
if invfull then
if Players[currentplayer].Booleans[0] then
Begin
tobank;
usebank;
tomine;
end else
drop;
end;

procedure antiban;
var
noban: Integer;
Begin
If Not (LoggedIn) Then Exit;
noban := Random(25);
Case noban Of
0, 9, 17, 23: PickUpMouse;
1, 13, 16: RandomRclick;
2, 10, 18, 22, 24: randomMovement;
//4, 12, 19: AlmostLogout;
5, 11, 8: ChooseOption('cancel');
6, 15, 21: MMouse(Random(MSX2), Random(MSY2), 0, 0);
7, 14, 3: HoverSkill('woodcutting', false);
end;
abt:=0;
end;

procedure checks;//checks you are not under attack and performs antibans
var
a:integer;
begin
if not loggedin then exit;
wait(100);
for a:=0 to 10 do
case a of
1:lost;

2:findfightex;

3:antirandoms;

4:if abt>=8 then antiban;

5:if abt=4+random(2) then if (ispickbroke) then replacepick;

6:findpick;

7:makecompass('N');

8:setangle(true);

9:mousespeed:=7+random(8);

10:droporbank;
end;
abt:=abt+1;
end;

procedure srlstats;
begin
ScriptID := '800';
if ((players[currentplayer].strings[1] = '')or (players[currentplayer].strings[1] = ''))then
begin
writeln('DONT leech!');
writeln('go to <a href="http://stats.srl-forums.com" target="_blank">http://stats.srl-forums.com</a> and create an account');
end else
begin
SRLID := players[currentplayer].strings[1];
SRLPassword := players[currentplayer].strings[2];
end;
end;



procedure mainloop;
begin
Repeat
loginplayer;
if (invents = Players[CurrentPlayer].Integers[0]) then
begin
logout;
invents:=0;
report;
end;
checks;
mine2;
report;
Until false;
end;

begin
cleardebug;
setup;
startup;
loginplayer;
playerinfo;
srlstats;
mainloop;
end.
http://nathan.pastebin.com/m4c0d0dc8

Line 698: [Error] (29053:1): 'END' expected in script D:\Program Files\SCAR 3.15\Scripts\my scripts\m-q\auto miner V5.scar

procedure tobank;
writeln('Goto Bank Step 1 DDTM(SetPW1DDTM) : Failed');
atm:=atm+1;
until atm=10;
atm:=0;
freedtm(setpw1ddtm);
end;

698: 2: if walktotile(point(3292, 3384),1,10) then
writeln('Goto Bank Step 2 Reflection(Walk to Tile) : Succesfull');
else

any ideas? and its not just needing to shove an end on the end and if i do that i end the case which means i get
Line 699: [Error] (29054:1): Identifier expected in script D:\Program Files\SCAR 3.15\Scripts\my scripts\m-q\auto miner V5.scar

ShowerThoughts

2009-06-11 18:11:48

We fixed it on msn. It's a weird fix.
Better said a stupid typing bug :p, if you use correct standards you might put a ;(end) at
if something then
Procedure;//<---- REMOVE.
else something.

Waddo

2009-06-11 18:28:16

rep for the help :)