Waddo
2008-07-06 13:05:29
waddo - SRL Member Application Form
waddo
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
Programming Knowledge
VB, Pascal, SCAR, Delphi, HTML
Other Communitys
How Long have You Played Runescape
15 months
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
3rd entry I really want to get in this time most of you will already know that my scripting ability's are up to standard, but to to show I'm going to include 2 scripts.
And also a link to my tutorial.
My grammar is bad we know that so lets forget about that and not bring that up.
Can you post if you vote so i can see who has voted and also if you say no tell me why.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
My auto miner.
this does not need that many failsafes as it uses edgeroadwalk which is almost perfect
it has more faisafes tan you see at first it has a whole failsafe procedure "lost"
{.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}
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=2832990;
procedure mainloop; forward;
procedure tobank; forward;
procedure tomine; forward;
procedure DeclarePlayers;
begin
SRLPlayerForm(True, ['bank','multiplayer'], ['Loads', 'Time Between Clicks','minutes to sleep'], ['Ore Type', 'srl ID', 'srl pass'], []);
end;
procedure srlstuff;
begin
ReportVars[0] := ReportVars[0]+ CountItemsDtm('inv', oredtm);;
ReportVars[1] := reportvars[1]+ 1;
srlrandomsreport;
end;
//findedges,edgeroadwalk, edgeroadwalkex idea by waddo created by nielsie95
function FindTPAEdges(P: TPointArray): TPointArray;
var
b: array of array of Boolean;
i, x, y, l, c: Integer;
Box: TBox;
begin
SetLength(Result, 0);
l := Length(p);
Box := GetTPABounds(p);
x := (Box.x2 - Box.x1) + 3;
y := (Box.y2 - Box.y1) + 3;
SetLength(b, x);
for i := 0 to x -1 do
SetLength(b[i], y);
for i := 0 to l -1 do
b[p[i].x +1 - Box.x1][p[i].y +1 - Box.y1] := True;
SetLength(Result, l);
c := 0;
for i := 0 to l -1 do
for x := -1 to 1 do
for y := -1 to 1 do
try
if not b[p[i].x + 1 + x - Box.x1][p[i].y + 1 + y - Box.y1] then
begin
Result[c] := p[i];
Inc(c);
x := 2;
Break;
end;
except end;
SetLength(Result, c);
end;
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);
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
cleardebug;
writeln ('script has worked for ' + timerunning);
writeln ('you have mined '+inttostr(roc)+' ores');
if (Players[CurrentPlayer].booleans[0])then
begin
writeln ('you have banked ' +inttostr(invents)+ ' loads');
end else
writeln ('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 ((CountItemsDtm('inv', oredtm)=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, 10);
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+CountItemsDtm('inv', oredtm);
troc:=roc;
vroadcolor:=findvarrockroadcolor;
end;
function activeplayers:boolean;
var
activep:integer;
begin
for activep:= 0 to high(howmanyplayers) do
if players[activep].active then
activen:=activen-1;
Result := Activen <= 0;
end;
procedure nextp;
begin
nextPlayer(false);
if activeplayers then scriptterminate;
playerinfo;
report;
mainloop;
end;
procedure lost;
begin
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
mouse(x,y+50,3,3,true);
wait(1000);
fflag(0);
makecompass('5');
tomine;
end;
if findsymbol(x,y,'clothes shop') then
begin
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
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
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
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');
nextp;
end;
end;
end;
procedure setup;
begin
declareplayers;
{smartSetup('mn3', False, True);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100); }
setupsrl;
SetupMining;
loaddtms;
activen:=howmanyplayers-1;
writeln(inttostr(activen));
end;
procedure startup;
begin
if (not(loggedin))then
begin
loginplayer;
end;
cleardebug;
wait(10)
writeln('varrock miner created by waddo')
ActivateClient;
makecompass('N');
roc:=0;
report;
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
begin
if findsymbol(x, y, 'mining spot') then
mouse(x, y-5-random(5), 2, 2, true);
end else
begin
mmouse(x, y, 3, 3);
if gascheck(x,y) then mine2;
if isuptext('ine') then
begin
getmousepos(x, y);
mouse(x, y, 0, 0, false);
if ChooseOption('ine') then
begin
fflag(0);
marktime(mark);
repeat
antirandoms;
wait(100);
until ((FindBlackChatMessage('to mine some') or (TimeFromMark(mark) >= paws+random(2000))));
if FindBlackChatMessage('to mine some') then
begin
inc(roc);
inc(troc);
end;
end;
end;
end;
end;
procedure runwait;
begin
RunTo('E', false);
Wait(10000 + random(2840));
RunTo('W', false);
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 ((CountItemsDtm('inv', oredtm)=0)or(attempts>=5))
if attempts<5 then
begin
inc(invents);
inc(tinvents);
report;
end;
attempts:=0;
end;
//
procedure tobank;
var
i:integer;
begin
for i:=0 to 8 do
begin
writeln(inttostr(i));
case i of
0: begin
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
mouse(x, y, 3, 3, true);
wait(1000+random(100));
fflag(0);
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);
exit;
end;
atm:=atm+1;
until atm=10;
atm:=0;
freedtm(setpw1ddtm);
end;
2: if not EdgeRoadWalk(vroadcolor, 0, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 10, false, 0, 1);
3: if not EdgeRoadWalk(vroadcolor, 0, True, 0, 0) then
EdgeRoadWalk(vroadcolor, 0, false, 0, 0);
4: if not EdgeRoadWalk(vroadcolor, 0, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 0, false, 0, 1);
6: 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 EdgeRoadWalk(vroadcolor, 270, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 270, false, 0, 1);
8: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
writeln(inttostr(i));
case i of
0: linearwalk(vroadcolor, 0, 40, 2,2);
1: EdgeRoadWalk(vroadcolor, 90, True, 0, 1);
2: 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 EdgeRoadWalk(vroadcolor, 180, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 180, false, 0, 1);
4: 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 EdgeRoadWalk(vroadcolor, 180, True, 0, 1) then
EdgeRoadWalk(vroadcolor, 180, false, 0, 1);
6: 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 [url]http://stats.srl-forums.com[/url] and create an account');
end else
begin
SRLID := players[currentplayer].strings[1];
SRLPassword := players[currentplayer].strings[2];
end;
end;
procedure mainloop;
begin
playerinfo;
Repeat
if not loggedin then loginplayer;
If (Not (LoggedIn)) then
Begin
writeln('Not logged in, next player!');
NextP;
mainloop;
end;
if (invents = Players[CurrentPlayer].Integers[0]) then
if (players[currentplayer].Booleans[1]=false) then
sleep((players[currentplayer].integers[2]*60000)+random(120000))
else
begin
invents:=0;
nextplayer(true);
report;
mainloop;
end;
checks;
mine2;
report;
Until false;
end;
begin
setup;
startup;
playerinfo;
srlstats;
mainloop;
end.S.MA.R.T. Tools
Allows you to type/rotate cam in SMART with out unblocking works on RS but apparently crashes scar if used in smart but the main thing is that it has a ability to work i haven't actually been able to debug
as i dont have the use of SMART atm
but it theory it should work.
program smarttools;
{.include srl/srl.scar}
var
frmDesign : TForm;
TextBox : TEdit;
SendButton : TButton;
colorselect : TListBox;
EffectSelect : TListBox;
CancelButton : TButton;
ClockBut : TButton;
ACBut : TButton;
Cmbbox : TComboBox;
DirGo : TButton;
UpButton : TButton;
DownButton : TButton;
OkButton : TBitBtn;
CancelButton2 : TBitBtn;
GroupBox1 : TGroupBox;
DegGo : TButton;
degs : TEdit;
PageControl: TPageControl;
Page1, Page2: TtabSheet;
Colour : String;
Effect :string;
{*******************************************************************************
Procedure Send(sender: TObject);
By: Waddo
Description: Part of S.M.A.R.T Talk, Sends the message
*******************************************************************************}
Procedure Send(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
Wait(2000);
if ColorSelect.Items[ColorSelect.ItemIndex]<>'No Colour' then
Colour:=ColorSelect.Items[ColorSelect.ItemIndex]+':';
if EffectSelect.Items[EffectSelect.ItemIndex]<>'No Effect' then
Effect:=EffectSelect.Items[EffectSelect.ItemIndex]+':';
activateclient;
wait(10);
typesend(Colour+Effect+TextBox.Text);
end;
{*******************************************************************************
Procedure Cancel(sender: TObject);
By: Waddo
Description: Part of S.M.A.R.T Talk,
performed when SmartTalk form is canceled
*******************************************************************************}
Procedure Cancel(sender: TObject);
begin
Writeln('S.M.A.R.T Tools Canceled');
frmDesign.Caption:= frmDesign.Caption + '.';
FindWindowBySize(766,504);
activateclient;
frmDesign.ModalResult:= mrCancel;
end;
Procedure Cancel2(sender: TObject);
begin
Writeln('S.M.A.R.T Tools Canceled');
frmDesign.Caption:= frmDesign.Caption + '.';
FindWindowBySize(766,504);
activateclient;
frmDesign.ModalResult:= mrCancel;
end;
Procedure CamDir(sender: TObject);
begin
activateclient;
wait(200);
Makecompass(left(Cmbbox.Items[Cmbbox.ItemIndex],1));
writeln(Cmbbox.Items[Cmbbox.ItemIndex]);
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
procedure RotCamC(sender: TObject);
begin
activateclient;
wait(200);
keydown(vk_left);
wait(200+random(20));
keyup(vk_left);
GetApplication
FindWindowTitlePart('talk',false);
activateclient;
FindWindowBySize(766,504);
end;
procedure RotCamAC(sender: TObject);
begin
activateclient;
wait(200);
keydown(vk_right);
wait(200+random(20));
keyup(vk_right);
GetApplication
FindWindowTitlePart('talk',false);
activateclient;
FindWindowBySize(766,504);
end;
procedure CamUp(sender: TObject);
begin
activateclient;
wait(200);
keydown(vk_up);
wait(200+random(20));
keyup(vk_up);
GetApplication
FindWindowTitlePart('talk',false);
activateclient;
FindWindowBySize(766,504);
end;
procedure CamDown(sender: TObject);
begin
activateclient;
wait(200);
keydown(vk_down);
wait(200+random(20));
keyup(vk_down);
GetApplication
FindWindowTitlePart('talk',false);
activateclient;
FindWindowBySize(766,504);
end;
procedure CamDeg(sender: TObject);
begin
activateclient;
wait(200);
MakeCompass(inttostr(strtoint(degs.Text)+180));
frmDesign.ModalResult:= mrOk;
end;
{*******************************************************************************
Procedure InitForm;
By: Waddo
Description: S.M.A.R.T Talks Form
*******************************************************************************}
Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 372;
frmDesign.Top := 128;
frmDesign.Width := 369;
frmDesign.Height := 185;
frmDesign.Caption := 'S.M.A.R.T Talk By Waddo';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := false;
frmDesign.PixelsPerInch := 96;
TextBox := TEdit.Create(frmDesign);
TextBox.Parent := frmDesign;
TextBox.Left := 14;
TextBox.Top := 9;
TextBox.Width := 259;
TextBox.Height := 21;
TextBox.tabOrder := 0;
SendButton := TButton.Create(frmDesign);
SendButton.OnClick:= @Send;
SendButton.Parent := frmDesign;
SendButton.Left := 280;
SendButton.Top := 8;
SendButton.Width := 57;
SendButton.Height := 49;
SendButton.Caption := 'Send';
SendButton.tabOrder := 1;
colorselect := TListBox.Create(frmDesign);
colorselect.Parent := frmDesign;
colorselect.Left := 14;
colorselect.Top := 40;
colorselect.Width := 129;
colorselect.Height := 73;
colorselect.ItemHeight := 13;
colorselect.Items.Add('No Colour');
colorselect.Items.Add('Red');
colorselect.Items.Add('Green');
colorselect.Items.Add('White');
colorselect.Items.Add('Cyan');
colorselect.Items.Add('Purple');
colorselect.tabOrder := 10;
EffectSelect := TListBox.Create(frmDesign);
EffectSelect.Parent := frmDesign;
EffectSelect.Left := 152;
EffectSelect.Top := 40;
EffectSelect.Width := 121;
EffectSelect.Height := 73;
EffectSelect.ItemHeight := 13;
EffectSelect.Items.Add('No Effect');
EffectSelect.Items.Add('Flash1');
EffectSelect.Items.Add('Flash2');
EffectSelect.Items.Add('Flash3');
EffectSelect.Items.Add('Scroll');
EffectSelect.Items.Add('Shake');
EffectSelect.Items.Add('Wave');
EffectSelect.Items.Add('Wave2');
EffectSelect.Items.Add('Slide');
EffectSelect.Items.Add('Glow1');
EffectSelect.Items.Add('Glow2');
EffectSelect.Items.Add('Glow3');
EffectSelect.tabOrder := 11;
CancelButton := TButton.Create(frmDesign);
CancelButton.OnClick:= @Cancel;
CancelButton.Parent := frmDesign;
CancelButton.Left := 280;
CancelButton.Top := 64;
CancelButton.Width := 57;
CancelButton.Height := 49;
CancelButton.Caption := 'Cancel';
CancelButton.tabOrder := 12;
PageControl := TPageControl.Create(frmDesign);
PageControl.Parent := frmDesign;
PageControl.Align := alClient;
ClockBut := TButton.Create(frmDesign);
ClockBut.OnClick:= @RotCamC;
ClockBut.Parent := frmDesign;
ClockBut.Left := 150;
ClockBut.Top := 41;
ClockBut.Width := 97;
ClockBut.Height := 33;
ClockBut.Caption := 'Clockwise -->';
ClockBut.TabOrder := 0;
ACBut := TButton.Create(frmDesign);
ACBut.OnClick:= @RotCamAC;
ACBut.Parent := frmDesign;
ACBut.Left := 6;
ACBut.Top := 41;
ACBut.Width := 97;
ACBut.Height := 33;
ACBut.Caption := '<-- Anti Clockwise';
ACBut.TabOrder := 1;
Cmbbox := TComboBox.Create(frmDesign);
Cmbbox.Parent := frmDesign;
Cmbbox.Left := 232;
Cmbbox.Top := 17;
Cmbbox.Width := 63;
Cmbbox.Height := 21;
Cmbbox.ItemHeight := 13;
Cmbbox.ItemIndex := 0;
Cmbbox.TabOrder := 2;
Cmbbox.Text := 'North';
Cmbbox.Items.Add('North');
Cmbbox.Items.Add('East');
Cmbbox.Items.Add('South');
Cmbbox.Items.Add('West');
DirGo := TButton.Create(frmDesign);
DirGo.OnClick:= @CamDir;
DirGo.Parent := frmDesign;
DirGo.Left := 304;
DirGo.Top := 16;
DirGo.Width := 33;
DirGo.Height := 24;
DirGo.Caption := 'Go';
DirGo.TabOrder := 3;
UpButton := TButton.Create(frmDesign);
UpButton.OnClick:= @CamUp;
UpButton.Parent := frmDesign;
UpButton.Left := 102;
UpButton.Top := 9;
UpButton.Width := 49;
UpButton.Height := 33;
UpButton.Caption := 'UP';
UpButton.TabOrder := 4;
DownButton := TButton.Create(frmDesign);
DownButton.OnClick:= @CamDown;
DownButton.Parent := frmDesign;
DownButton.Left := 102;
DownButton.Top := 73;
DownButton.Width := 49;
DownButton.Height := 33;
DownButton.Caption := 'Down';
DownButton.TabOrder := 5;
OkButton := TBitBtn.Create(frmDesign);
OkButton.Parent := frmDesign;
OkButton.Left := 102;
OkButton.Top := 41;
OkButton.Width := 49;
OkButton.Height := 33;
OkButton.TabOrder := 6;
OkButton.Kind := bkOK;
CancelButton2 := TBitBtn.Create(frmDesign);
CancelButton2.OnClick:= @Cancel2;
CancelButton2.Parent := frmDesign;
CancelButton2.Left := 56;
CancelButton2.Top := 105;
CancelButton2.Width := 153;
CancelButton2.Height := 17;
CancelButton2.TabOrder := 7;
CancelButton2.Kind := bkCancel;
GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 240;
GroupBox1.Top := 81;
GroupBox1.Width := 105;
GroupBox1.Height := 41;
GroupBox1.Caption := 'degrees';
GroupBox1.TabOrder := 8;
DegGo := TButton.Create(GroupBox1);
DegGo.OnClick := @CamDeg;
DegGo.Parent := GroupBox1;
DegGo.Left := 64;
DegGo.Top := 12;
DegGo.Width := 33;
DegGo.Height := 24;
DegGo.Caption := 'Go';
DegGo.TabOrder := 0;
degs := TEdit.Create(GroupBox1);
degs.Parent := GroupBox1;
degs.Left := 8;
degs.Top := 13;
degs.Width := 49;
degs.Height := 20;
degs.TabOrder := 1;
Page1 := TTabSheet.Create(frmDesign);
Page1.Caption := 'S.M.A.R.T. Talk';
Page1.PageControl := PageControl;
Page2 := TTabSheet.Create(frmDesign);
Page2.Caption := 'Rotate Cam';
Page2.PageControl := PageControl;
CancelButton.Parent := Page1;
EffectSelect.Parent := Page1;
colorselect.Parent := Page1;
SendButton.Parent := Page1;
TextBox.Parent := Page1;
degs.Parent := GroupBox1;
DegGo.Parent := GroupBox1;
GroupBox1.Parent := Page2;
CancelButton2.Parent := Page2;
OkButton.Parent := Page2;
DownButton.Parent := Page2;
UpButton.Parent := Page2;
DirGo.Parent := Page2;
Cmbbox.Parent := Page2;
ACBut.Parent := Page2;
ClockBut.Parent := Page2;
end;
Procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
Procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
Procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
{*******************************************************************************
Procedure SmartTalk;
By: Waddo
Description: S.M.A.R.T Talk, enables a user to talk in runescape,
with out pausing there script or unblocking S.M.A.R.T.
To use put SmartTalk somewhere in your main loop that will be caled often,
then hold down Ctrl+1 until the window appears.
*******************************************************************************}
Procedure SmartTools;
begin
if ((isfunctionkeydown(1))and(IsKeyDown('1'))) then
begin
SafeInitForm;
SafeShowFormModal;
end;
end;
begin
repeat
smarttools;
wait(100);
until false;
end.My SCAR tutorial
if you don't remember i didn't get in last time because of spamming but since my last application i have written a few tutorials and haven't spammed as far as I know and I have had no infraction's (I've had 1 warning but that was given to me as a misunderstanding and RM will confirm that)
——————————————————
<!– END TEMPLATE: formanswers –>
