Waddo
2008-05-27 16:40:29
waddo - SRL Member Application Form
waddo
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Pascal, Scar and small amounts of Html and Java
Other Communitys
Sythe, Runespot and a Bebo
How Long have You Played Runescape
14 months
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I have been on Srl forums now for almost 2 months.
Many of you will have had some form of interaction with me,
I'm a fast learner and will continue to improve, but I am a bit to ambitious and sometimes attempt things that are way above my level.
I'm an active contibutor and have created a few scripts,
the last time I applyed it was with this same script, but since my application I have improved it greatly and have vastly improved my knowledge.
This does not contain everything i can do i can also
Use Bmp's , DTM's , Forms and a few other stuff, which alot of you may have already seen.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{.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.
# Credits
NaumanAkhlaQ
Hermpie
Nielsie95
Mixster
Jukka
N3ss3s
Lots of other people to
/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;
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 := 932;
dtmMainPoint.y := 163;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := vroadcolor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 932;
dtmSubPoints[0].y := 163;
dtmSubPoints[0].AreaSize := CrDtmArea;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := vroadcolor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 947;
dtmSubPoints[1].y := 169;
dtmSubPoints[1].AreaSize := CrDtmArea;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 6390414;
dtmSubPoints[1].Tolerance := CrDtmTol;
dtmSubPoints[2].x := 938;
dtmSubPoints[2].y := 183;
dtmSubPoints[2].AreaSize := CrDtmArea;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := vroadcolor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 916;
dtmSubPoints[3].y := 165;
dtmSubPoints[3].AreaSize := CrDtmArea;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := vroadcolor;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 937;
dtmSubPoints[4].y := 148;
dtmSubPoints[4].AreaSize := CrDtmArea;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := vroadcolor;
dtmSubPoints[4].Tolerance := 0;
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;
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;
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;
end;
attempts:=attempts+1;
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;
procedure nextp;
var
activep:integer;
begin
nextPlayer(false);
for activep:= 0 to howmanyplayers-1 do
if players[activep].active then
begin
activen:=activen-1;
end;
if activen<=0 then
begin
freport;
terminatescript;
end;
playerinfo;
report;
mainloop;
end;
procedure lost;
begin
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 nextplayer');
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 2 do
begin
FindNormalRandoms;
FindFightEx;
wait(1);
end;
end;
procedure mine2;
var
mark:integer;
begin
if not findrock(450, 350) 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
roc:=roc+1;
troc:=troc+1;
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);
for i := 3 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;
invents:=invents+1
tinvents:=tinvents+1
end;
procedure usebank;
var
attempts:integer;
begin
repeat
if FindBank('veb') then
begin
wait(1000+random(100));
srlstuff;
Deposit(3, 28, true);
closebank;
end;
attempts:=attempts+1;
until ((CountItemsDtm('inv', oredtm)=0)or(attempts>=5))
if attempts<5 then
begin
invents:=invents+1;
tinvents:=tinvents+1;
report;
end;
attempts:=0;
end;
procedure tobank2;
begin
if (not(radialwalk(vroadcolor, 260, 280, 72, 2, 2))) then
mouse(564, 86, 7,7, true);
wait(2000);
fflag(0);
if (not(radialwalk(vroadcolor, 265, 275, 50, 2, 2))) then
radialwalk(vroadcolor, 260, 280, 50, 2, 2);
wait(1000+random(100));
fflag(0);
if findsymbol(x, y, 'bank') then
begin
mouse(x, y, 2, 2, true);
wait(2000);
fflag(0);
end else
if findsymbol(x,y,'training dummy') then
begin
mouse(x,y+50,3,3,true);
wait(1000);
fflag(0);
end;
end; //
procedure tobank;
begin
if dtmrotated(setpw1ddtm, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
mouse(x, y-55, 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;
if(not(radialwalk(vroadcolor, 355, 370, 72, 2, 2)))then
mouse(626, 13,10,10,true);
wait(1000);
fflag(0);
if(not(radialwalk(vroadcolor, 355, 400, 72, 2, 2)))then
radialwalk(vroadcolor, 350, 410, 72, 2, 2);
wait(1000+random(100));
fflag(0);
if(not(radialwalk(vroadcolor, 350, 390, 72, 2, 2)))then
radialwalk(vroadcolor, 330, 400, 72, 2, 2);
wait(1000+random(100));
fflag(0);
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+5;
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;
tobank2;
end;
procedure tomine;
var
x, y:integer;
begin
if (not(radialwalk(vroadcolor, 60, 110, 72, 2, 2))) then
begin
mouse(692, 64, 3, 3, true);
end;
wait(5000);
fflag(1);
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
radialwalk(vroadcolor, 80, 100, 30, 2, 2);
wait(100);
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;
lost;
if (not(radialwalk(vroadcolor, 140, 210, 70, 2, 2)))then
radialwalk(vroadcolor, 130, 220, 70, 2, 2);
wait(1000);
fflag(1);
if (not(radialwalk(vroadcolor, 155, 192, 70, 2, 2))) then
radialwalk(vroadcolor, 150, 200, 70, 2, 2);
wait(1000);
fflag(1);
if (not(radialwalk(vroadcolor, 170, 192, 60, 2, 2))) then
begin
mouse(686, 384,5,5,true);
end;
wait(600+random(100));
fflag(0);
radialwalk(vroadcolor, 170, 192, 60, 2, 2);
wait(1000);
fflag(0);
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, 170, 210, 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;
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;
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
begin
sleep((players[currentplayer].integers[2]*60000)+random(120000));
end;
if (players[currentplayer].Booleans[1]=true) then
begin
invents:=0;
nextplayer(true);
report;
mainloop;
end;
checks;
mine2;
report;
Until(Not LoggedIn);
end;
begin
setup;
startup;
srlstats;
mainloop;
freport;
freedtm(oredtm);
freedtm(brokepick);
freedtm(pick);
end.——————————————————
<!– END TEMPLATE: formanswers –>