EtherFreak
2011-03-06 19:24:56
How Long have You Played Runescape?
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
N/A
What is your general programming knowledge?
Basic, Matlab
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
N/A
What is your general programming knowledge?
Basic, Matlab
Are you a member of any other communities?
No
Tell us about yourself…
From: EtherFreak
I am a senior college student, that will be graduating this June. I started to take an interest in botting as a hobby, due to becoming board with the game as it was (after they took away wilderness). Wilderness has returned, but the hobby of botting is still more fun.
The uploaded script attached is a crandor island addy and coal miner and superheater bar maker. It will take the bars back to drainer bank, deposit them, and head back to the mine to make more. The setup is to start at drainer bank OR the mine with a fire staff equip. If you start at the mine, you must have 18 nature runes on you and a pickaxe on you. The bank must have the nature runes in the (0,1) slot, the gold in the (1,0) slot, and the pickaxe in the (2,0) slot. Should you wish to stop or start in the middle of mining, you may, and there is an ore count to pick up where you left off. This script will not be made public due to the limited number of rocks on the island, and I no longer have members status.
It is a bit complicated of a setup, but then it is a several part script too. Any questions or comments, feel free to ask.
P.S. The attachment option for scripts does not work due to the fact I do not have forum clearance with my current rank.
Please show us one (or multiple) of your scripts.
program minerbasic;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/magic.scar}
Const
// ----------------SETUP-----------------------------
ropecolor=401705;
shipmaster= 11488844 ;
RockColor=855309 ; //color picker for tree
addycolor=6188382;
entrancerock= 8750731 ;
Rockuptext='ock' ; //
loadcount= 5 ; //total loads to complete
wtime= 60 ; //total time to wait between mining rocks
//setting this too low results in clicking a tree multiple times
// ---------------END SETUP----------------------------------------
var
x, y: integer;
other, count: integer;
kill: integer;
TPA:TPointArray;
AddyLoc, ItemLocOld, nonaddy, ItemLocCur:TIntegerArray;
ATPA:T2DPointArray;
I: Integer;
addycount,barcount, gemcount, coalcount, counter: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
// ----------------SETUP-----------------------------
Name := '';
Pass := '';
Nick := '';
Active := True;
end;
end;
// ---------------END SETUP----------------------------------------
Procedure invspots;
begin
count:=0;
repeat
count:=count+1;
if ExistsItem(count) then
ItemLocCur[count]:=1 else
ItemLocCur[count]:=0;
until count=28
end;
Procedure invspotsold;
begin
count:=0;
repeat
count:=count+1;
if ExistsItem(count) then
ItemLocold[count]:=1 else
ItemLocold[count]:=0;
until count=28
end;
Procedure findshipmaster;
begin
findcolortolerance(x,y,shipmaster,MSX1,MSY1,MSX2,MSY2,4);
mmouse(x,y,5,5);
wait(200);
getmousepos(x,y);
if ( WaitUpTextMulti(['aman', 'apt'], 200) ) then
begin
mouse(x,y,1,1,false);
Writeln('clicking to pay fare');
wait(300);
FindText(x, y, 'are', UpChars, msx1, msy1, msx2, msy2);
wait(200);
mouse((18+x),(y+2),16,2,true);
wait(6000);
if (IsChatBoxTextBetween('board',clblack,5,8))then
writeln('paid')else
begin
writeln('failed to pay, trying again');
findshipmaster;
end;
end else
begin
kill:=kill+1;
writeln('could not find shipmaster');
if kill<9 then
begin
writeln('trying again');
findshipmaster;
end;
kill:=0;
exit;
end;
wait(3000);
end;
Procedure Addyspots;
begin
invspots;
count:=0;
repeat
count:=count+1;
AddyLoc[count]:=(ItemLocCur[count]-(ItemLocOld[count])+AddyLoc[count]);
until count=28
writeln('addyloc');
writeln(addyloc);
end;
procedure findtpa(Color: integer);
begin
mousespeed:=(7+random(3));
FindColorsspiralTolerance(MSX2/2,MSY2/2,TPA, Color, MSX1, 40, MSX2,MSY2,4);
ATPA := TPAToATPAEx(TPA, 20, 20);
end;
procedure findtpaaddy(Color: integer);
begin
mousespeed:=(7+random(3));
FindColorsspiralTolerance(MSX2/2,MSY2/2,TPA, Color, (MSX2/2)-60, (MSY2/2)-70, (MSX2/2)+80,(MSY2/2)+70,4);
ATPA := TPAToATPAEx(TPA, 20, 20);
end;
procedure getxy;
begin
if length(ATPA)=0 then
exit;
SortATPAFrom(ATPA, Point(MSCX, MSCY));
MiddleTPAEx(ATPA[i], x, y);
end;
procedure orecount;
begin
writeln('Ore Count Initiated');
gemcount:=0;
addycount:=0;
coalcount:=0;
count:=0;
barcount:=0;
repeat
mousespeed:=(17+random(3));
count:=count+1;
InvMouse(count,3)
wait(100);
if ( WaitUpTextMulti(['tite'], 200) ) then //addy
begin
addycount:=addycount+1;
AddyLoc[count]:=1;
end;
if ( WaitUpTextMulti(['oal'], 200) ) then
coalcount:=coalcount+1;
if ( WaitUpTextMulti(['bar'], 200) ) then
barcount:=barcount+1;
if ( WaitUpTextMulti(['cut'], 200) ) then
gemcount:=gemcount+1;
until invcount=addycount+coalcount+barcount+2+gemcount
writeln('You have '+IntToStr(gemcount)+' gems, '+IntToStr(coalcount)+' coal, '+IntToStr(addycount)+' addy ore, and '+IntToStr(barcount)+' addy bars.');
end;
procedure superheat;
begin
if (addycount>0) and (coalcount>5) then
begin;
writeln('Lets make a bar');
writeln('You have '+IntToStr(addycount)+' addy ore and '+IntToStr(coalcount)+' coal.');
if barcount>17 then
begin
writeln('The max number of bars have been made')
exit;
end;
cast('superheat item',false);
mousespeed:=(13+random(3));
wait(500);
count:=1+barcount;
repeat
count:=count+1;
until (AddyLoc[count]=1)
InvMouse(count,3);
wait(200);
if ( WaitUpTextMulti(['tite'], 200) ) then
writeln('over addy') else
begin
writeln('failed finding addy')
getmousepos(x,y);
mouse(x,y,1,1,true);
orecount;
exit;
end;
if ( WaitUpTextMulti(['heat'], 200) )then
begin
InvMouse(count,1);
wait(4000);
other:=4;
if barcount=17 then
begin
other:=5;
end;
if invcount=coalcount+addycount+barcount+gemcount-other then
begin
writeln('Superheat Complete');
coalcount:=coalcount-6;
addycount:=addycount-1;
barcount:=barcount+1;
AddyLoc[count]:=0
writeln(barcount);
writeln('addy bars in inv');
writeln(addyloc);
end else
begin
writeln('Failed superheating');
writeln('# of items in inv(should be '+IntToStr(invcount)+')');
orecount;
end;
end;
end;
end;
Procedure initrun;
begin
wait(200);
Smart_Members := False;
Smart_Server := 1;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
kill:=0;
SetLength(AddyLoc,29);
SetLength(ItemLocCur,29);
SetLength(ItemLocOld,29);
wait(4000);
setangle(true);
end;
Procedure mineaddy;
begin
findtpaaddy(addycolor);
if length(TPA)>0 then
begin
InvSpotsOld;
writeln('Mining Addy');
getxy;
begin
if length(ATPA)=0 then
exit;
MMouse(x, y, 20, 20);
MMouse(x, y-4, 8, 8);
wait(random(300)+300);
getmousepos(x,y);
begin
if ( WaitUpTextMulti([rockuptext], 200) ) then
begin
writeln('Clicking Addy');
Mouse(x,y,1,1,true);
wait(500);
end else
begin
wait(1000);
writeln('Failed to click, trying again...');
exit;
end;
end;
end;
count:=invcount+1;
kill:=0;
repeat
wait(100);
kill:=kill+1;
if (kill=80) then
exit;
until (IsChatBoxTextBetween('swing',clblack,8,8))
writeln('swinging at addy');
kill:=0;
repeat
wait(100);
if (IsChatBoxTextBetween('found',clblack,8,8)) then
begin
writeln('You found a gem');
gemcount:=gemcount+1;
wait(100);
exit;
writeln('exit after found a gem failed');
end;
kill:=kill+1;
if (kill=6000) then
exit;
until(IsChatBoxTextBetween('ore',clblack,8,8)) or (invcount=count)
addycount:=addycount+1;
writeln('You have'+IntToStr(addycount)+' addy ore');
AddySpots;
writeln(AddyLoc);
end;
end;
Procedure minecoal;
begin
findtpa(RockColor);
if length(TPA)>0 then
begin
getxy;
begin
if length(ATPA)=0 then
exit;
MMouse(x, y, 20, 20);
MMouse(x, y, 8, 8);
wait(random(300)+300);
getmousepos(x,y);
begin
if ( WaitUpTextMulti([rockuptext], 200) ) then
begin
writeln('Clicking Coal');
Mouse(x,y,1,1,true);
wait(500);
end else
begin
wait(1000);
writeln('Failed to click, trying again...');
exit;
end;
end;
end;
count:=invcount+1;
kill:=0;
repeat
wait(100);
kill:=kill+1;
if kill=40 then
exit;
until (IsChatBoxTextBetween('swing',clblack,8,8))
kill:=0;
repeat
wait(100);
if (IsChatBoxTextBetween('found',clblack,8,8)) then
begin
writeln('You found a gem');
gemcount:=gemcount+1;
exit;
end;
kill:=kill+1;
if (kill>3000) then
exit;
until (invcount=count)
coalcount:=coalcount+1;
writeln('you have '+IntToStr(coalcount)+' coal');
end;
end;
Procedure tobank; //unfinished!
begin
writeln('heading to lumbridge');
cast('lumbridge home teleport',false);
SymbolAccuracy := 0.7;
mousespeed:=(7+random(3));
repeat
wait(100);
until findsymbol(x,y,'water');
wait(1000);
SetRun(True);
mouse(680,60,15,15,true);
repeat
wait(100);
until findsymbol(x,y,'rest')
wait(3000);
findsymbol(x,y,'rest');
mouse(x,y,5,5,true);
wait(10000);
setangle(true);
writeln('resting');
RestUntil(95+random(4));
setrun(true);
mouse(560,50,10,10,true);
repeat
wait(100);
until findsymbol(x,y,'shop')
writeln('shop');
wait(1000);
findsymbol(x,y,'shop');
mouse(x,y-5,5,5,true);
wait(10000);
mouse(565,80,7,7,true);
wait(10000);
mouse(565,80,7,7,true);
wait(10000);
mouse(565,80,7,7,true);
SymbolAccuracy := 0.5;
repeat
wait(100);
until findsymbol(x,y,'dungeon')
wait(1000);
writeln('dung');
findsymbol(x,y,'dungeon');
SymbolAccuracy := 0.7;
mouse(x,y-15,5,5,true);
wait(10000);
mouse(565,80,7,7,true);
repeat
wait(100);
until findsymbol(x,y,'tree')
wait(1000);
writeln('tree');
findsymbol(x,y,'tree');
mouse(x,y+10,5,15,true);
wait(10000);
mouse(565,80,7,7,true);
wait(10000);
mouse(565,80,7,7,true);
repeat
wait(100);
until findsymbol(x,y,'rest')
wait(500);
findsymbol(x,y,'rest');
mouse(x-5,y,5,5,true);
wait(15000);
RestUntil(95+random(4));
setrun(true);
mouse(565,100,7,7,true);
repeat
wait(100);
until findsymbol(x,y,'bank')
wait(500);
findsymbol(x,y,'bank');
mouse(x,y,5,5,true);
wait(15000);
end;
Procedure Banking;
begin
openbankfast('db');
wait(1000);
DepositAll;
withdraw(0,1,18);//nature
wait(1000);
withdraw(2,0,1);//pick
wait(200);
withdraw(1,0,30);//gold
wait(1000);
if invcount=3 then
writeln('Banking Complete') else
exit;
end;
Procedure downrock;
begin
kill:=kill+1;
findcolorspiraltolerance(x,y,entrancerock,MSX1,MSY1,MSX2,MSY2,4)
mmouse(x,y,5,5);
if ( WaitUpTextMulti(['ock'], 200) ) then
begin
getmousepos(x,y);
mouse(x,y,1,1,true);
writeln('entering the cave');
wait(5000);
end else
begin
writeln('failed to find the rock enterance, trying again');
if kill=8 then
begin
writeln('logging out, could not get in rocks');
logout;
exit;
end;
downrock;
end;
if findsymbol(x,y,'mine') then
writeln('In cave') else
begin
writeln('failed to enter the cave');
logout;
exit;
end;
end;
Procedure uprope;
begin
kill:=kill+1;
findcolorspiraltolerance(x,y,ropecolor,MSX1,MSY1,MSX2,MSY2,4)
mmouse(x+4,y+15,5,5);
if ( WaitUpTextMulti(['ope'], 200) ) then
begin
getmousepos(x,y);
mouse(x,y,1,1,true);
writeln('exiting the cave');
wait(5000);
end else
begin
writeln('failed to find the rope, trying again');
wait(200);
if kill=8 then
begin
writeln('logging out, could not get up rope');
logout;
exit;
end;
uprope;
end;
if findsymbol(x,y,'mine') then
writeln('Exited cave') else
begin
writeln('failed to exit the cave');
logout;
exit;
end;
end;
Procedure wallcross;
begin
mmouse(260,150,5,5);
wait(4000);
if ( WaitUpTextMulti(['all', 'pen'], 200) ) then
begin
getmousepos(x,y);
mouse(x,y,1,1,true);
writeln('Wall opened');
wait(1000);
end else
begin
writeln('failed at wall, logging out');
logout;
exit;
end;
end;
Procedure exitship;
begin
mmouse(260,150,5,5);
wait(4000);
if ( WaitUpTextMulti(['oss', 'lan'], 200) ) then
begin
getmousepos(x,y);
mouse(x,y,1,1,true);
writeln('exiting ship');
wait(1000);
end else
begin
writeln('failed exiting ship, logging out');
logout;
exit;
end;
end;
Procedure tomine;
begin
mouse(565,50,10,10,true);
wait(10000);
mouse(560,50,10,10,true);
wait(19000);
mouse(590,135,10,10,true);
wait(10000);
repeat
mouse(590,140,5,5,true);
wait(5000+random(5000));
until findsymbol(x,y,'transportation')
writeln('Going to shipmasters');
wait(2000);
findsymbol(x,y,'transportation')
mouse(x,y,5,5,true);
wait(6000);
kill:=0;
findshipmaster;
wait(8000);
exitship;
wait(2000);
SymbolAccuracy := 0.5;
repeat
mouse(565,74,7,7,true);
wait(3000+random(5000));
until findsymbol(x,y,'dungeon')
writeln('dungeon found');
wait(2000);
findsymbol(x,y,'dungeon');
SymbolAccuracy := 0.7;
mouse(x,y,5,5,true);
wait(9000);
kill:=0;
downrock;
mouse(600,30,10,10,true);
wait(8000);
mouse(600,30,10,10,true);
wait(12000);
RestUntil(95+random(4));
setrun(true);
mouse(620,30,10,10,true);
wait(12000);
wallcross;
kill:=0;
repeat
kill:=kill+1;
mouse(620,30,10,10,true);
wait(5000+random(3000));
until kill>4
kill:=0;
uprope;
kill:=0;
repeat
wait(100)
until findsymbol(x,y,'mine');
mouse(x,y,5,5,true);
wait(15000);
end;
Procedure mainloop;
begin
initrun;
repeat
findnormalrandoms;
if findsymbol(x,y,'bank') then
begin
writeln('you are at the bank');
if invcount=3 then
writeln('you have pick, nature and gold')else
banking;
tomine;
end;
if findsymbol(x,y,'mine')then
writeln('You are at the mine')else
begin
writeln('You are not at the mine, logging out');
logout;
exit;
end;
orecount;
repeat
superheat;
findnormalrandoms;
mineaddy;
findnormalrandoms;
superheat;
if random(100)=1 then
begin
writeln('taking a rest');
wait(10000+random(30000));
end;
minecoal;
superheat;
if invfull then
if barcount<18 then
begin
writeln('Droppin last coal, more bars to make');
coalcount:=coalcount-1;
dropitem(28);
wait(1000);
mmouse(x,y,30,30);
if invfull then
if invfull then
begin
writeln('Invfull, but should be 27 items now...');
logout;
writeln('Logged out due to an inv issue');
exit;
end;
end;
if invfull then
writeln('Inventory is Full');
until invfull;
tobank;
until 1=2 //plans to add load count or time here
end;
begin
mainloop;
end.