HardRockers
2011-12-28 23:24:19
Hey, I am just a college football player that has been playing Runescape since the beginning of time. I used to just buy bots, and messed with scripting very little. I recently decided that that wasn't enough for me.
I am here for one purpose, to learn how to script my own bots, and to hopefully in the future help others with their Scripting.
My first script is a Yanille Iron Miner that will bank, and I have hit a big wall because I am having trouble with Walking to and from the bank and getting it to bank. I am literally a super n00b when it comes to scripting, but I am usually a pretty quick learner, so hopefully I pick it up quick.
This uses a lot of Yohojo's antiban and setup. I did not come up with that on my own, it is basically the same stuff he uses in his tutorials.
I am here for one purpose, to learn how to script my own bots, and to hopefully in the future help others with their Scripting.
My first script is a Yanille Iron Miner that will bank, and I have hit a big wall because I am having trouble with Walking to and from the bank and getting it to bank. I am literally a super n00b when it comes to scripting, but I am usually a pretty quick learner, so hopefully I pick it up quick.
This uses a lot of Yohojo's antiban and setup. I did not come up with that on my own, it is basically the same stuff he uses in his tutorials.
program HardRockinYanilleMiner;
//{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i sps/sps.simba} // has to be included after SRL
{$i SRL\SRL\Misc\Stats.simba}
Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
BreakEvery= 120; //How many players are you using
BreakFor= 5; //Player to start auoting with! (0 means first char)
Version= '1.0'; //NO TOUCHY!
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
end;
end;
procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Mine','ine'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;
procedure AntiBan;
begin
case random(2000) of
0..50: HoverSkill('mining',false);
51..80: PickupMouse;
81..100: RandomMovement;
101..220: BoredHuman;
221..240: ExamineInv;
241..260: RandomRClick;
end;
end;
Function MineOre:Boolean;
Var
x,y, PlusOne, MineCounter: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(x, y, ['Mine','Rocks','e R'], [2832738, 2502212, 2701150,2371667], 5) Then
Begin
WriteLn('Hurray we found ore');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False)
WaitOption('Mine', 500);
end;
end;
Repeat
MarkTime(MineCounter);
AntiBan;
wait(100);
If InvCount= PlusOne Then
WriteLn('We Got One!');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 5000);
end;
end;
var
t: integer;
pts: TPointArray;
begin
smart_server := 1;
smart_members := false;
smart_signed := true;
smart_superDetail := false;
clearDebug();
setupSRL();
SPS_Debug := true;
SPS_Setup(RUNESCAPE_SURFACE, ['5_10']);
pts := [Point(2336, 4074), Point(2314, 4123), Point(2295, 4181), Point(2264, 4230), Point(2262, 4262)];
{
repeat
inc(t);
if (SPS_WalkPath(pts)) then
writeLn(format('Walked %d times', [t]));
invertTPA(pts);
until(t = 50);
}
SPS_GetMyPos();
end.
procedure WalkToBank;
var
i: Integer;
begin
if not loggedin then exit; //this should be at the beginning of each of your procedures or functions
Setrun(true); //this turns run on
for i := 1 to 5 do //if you don't know what this is, look up my tut on loops ;)
begin
RadialWalking(i); //this means that the first loop through it will use RadialWalking(1), then the second time through, RadialWalking(2), etc. Remember, this is the procedure we made before?
end;
end;
Procedure Bank;
Begin
MakeCompass('e');
OpenBankNPC;
Wait(2500+randomrange(200,400));
DepositAll;
wait(1000+randomrange(200,400));
CloseBank;
end;
begin
SetupSRL;
DeclarePlayers;
SetAngle(true);
repeat;
MineOre;
Until (false);
If InvFull Then
Begin
WalkToBank;
If WalkToBank Then
Bank;
end;
end.