(s)okkr7
2012-08-30 22:30:17
How Long have You Played Runescape?
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
GOOGLE
What is your general programming knowledge?
Pascal script, a little SQL (beginning) , and java too.
Are you a member of any other communities?
Powerbot, hardly
Tell us about yourself…
Please show us one (or multiple) of your scripts.
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal script, a little SQL (beginning) , and java too.
Are you a member of any other communities?
Powerbot, hardly
Tell us about yourself…
From: (s)okkr7
My name is Matt. I like computers, duh, and sports such as: soccer, basketball, tennis, and disc golf! My hobby is to find old bicycles and restore them, then sell them for profit. I like to play runescape on my downtime, and I never like to give up on a challenge. I am employed at a local grocery store as customer service, and I love to help people no matter how hard the task. I like to solve things on my own as best as I can to better my knowledge, and as a last resort, I ask for help. Being a junior in high school, I have a full schedule and I'm going to a local college for computer sciences/programming (as my school has no such curriculum). I plan to take a route of computers in college, and I feel as this community is already helping, so why not apply to better myself. Thanks.
~(s)okkr7
Please show us one (or multiple) of your scripts.
program sApeAgility_v1;
{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/misc/smartgraphics.simba}
const
NumberOfLaps=0; //disregard for now
EatAt = 50; //percentage NOT actual #
var
X, Y, Stone, FirstTree, Bars, Fallen, Slope, TopOfSlope,
MMToSwing, Swing, Treefailsafe, DownToEarth, MMToStone,
TimesFailed, PickIt, CutP, EatP,FromPineapple,
StoneFailsafe, Tree2fail: integer;
FoundIt: extended;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name :='';
Pass :='';
Active := true;
end;
end;
{***********************************************}
{|| Credits to Flight for the procedure ||}
{***********************************************}
Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;
{***********************************************}
{|| Credits to Flight for the procedure ||}
{***********************************************}
procedure BrakeWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, targetArea: extended);
var
veloX,veloY,windX,windY,veloMag,dist,randomDist,lastDist: extended;
lastX,lastY,MSP,W,maxStep,D: integer;
sqrt2,sqrt3,sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
repeat
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
D := Random((Round(dist)/3));
if (D > 100) then
D := RandomRange(90, 100);
if (D < 5) then
D := RandomRange(5, 8);
maxStep := D;
if dist >= targetArea then
begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
end;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
end;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
W := (Random(100/MSP))*3;
if (W < 5) then
W := 5;
wait(W);
lastdist:= dist;
until(hypot(xs - xe, ys - ye) < 1)
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;
{***********************************************}
{|| Credits to Flight for the procedure ||}
{***********************************************}
procedure BrakeMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y: integer;
begin
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
GetMousePos(X, Y);
BrakeWindMouse(X, Y, eX, eY, 9, 5, 10.0 / randSpeed, 15.0 / randSpeed, 10.0 * randSpeed);
end;
{********************************************}
{ Credits for DTMs go to RyGuy who left SRL! }
{********************************************}
procedure Calls;
begin
Stone := DTMFromString('mwQAAAHic42RgYNBmhGB9INYCYnUgFgNiNSC2AWIdoJptQLwZiHcA8S4o/zAQnwLiM0BcC8QpUToMaTG6DBlxegyhPmpg3NC7iqG2eyVD66S1DHkZhgxcQHXoWAQNA61kYCKA4QAAp4oTFA==');
StoneFailsafe := DTMFromString('mrAAAAHic42BgYNBkZGDQBWJVIJYCYmUg1gdiSxANlN8CxDuAeCsQ7wXiY0B8AogPA3EFEIuJiTNEB2mCcUXbEoaGvjUM1V1LGZr7VjEUZBkxcAHVwLAIFgy0hoEJD4YBAO33EVM=');
FirstTree := DTMFromString('mggAAAHicY2NgYJBkgABFIFYFYjkoWxyIOaFyIDXyQCwAxFmh+gyvPnxnCHVQZegttGPICzZgiHJWZ+ABymHDjDgwBAAAebwIxQ==');
Bars := DTMFromString('mggAAAHicY2NgYNBgZGBwBGIpKOYEYlkgjgfKpQNxGhA3MUD4ukDcUeTL4GWnxRDsps/g56TDUNE6nyEqTo6BCyiHjEWgGGgUAzMWDAEAytEJWQ==');
Fallen := DTMFromString('mggAAAHicY2NgYMhmYmBoA2I/IM4C4iQgrgDiaUC5SUBcA8T1QFwNxJVAHGXIzqAcIcjgaSXI0DFxFhxzAeVgmB8JMwIxExYMAQALBAzO');
Slope := DTMFromString('m6wAAAHic42ZgYChmgIByIC4E4jIonQPEc4B4AhB3AHEtEMsBcSoQm0D1qAKxBBArAbEwEPMCsTgQC4HMyTJhqOtZyeBlr8AQ46fBEBMtw5CRrsCQlCjHkJNkwJARpwdWU5FjysADVC8CxPxImAcHZgRiViBmQsIsODASAABpuxIH');
TopOfSlope := DTMFromString('mbQAAAHicY2VgYAhnZGBIB+JqIO4G4ttAXAAUzwTiFCCOB2JfIA7wsmWIDnVjCPF3BOPkMlUGVqA4MuYHYhY0DDQOAgCYLAla');
MMToSwing := DTMFromString('mQwAAAHicY2ZgYOBjgAAYzQXEHEDc0DWTQSFMjCE2tYiBB8iHYUYkDAQAgskDvA==');
Swing := DTMFromString('mlwAAAHicY2dgYLgPxJeh+AoU7wHixYwMDM1AejYQLwPirUC8H4jjofJZtaYMy1o9GCbm2jPMKnZmmF/vylDTtYzBP1GLgQsoj45FoJgRBwapgQIAl20TVw==');
Treefailsafe := DTMFromString('mrAAAAHic42BgYHgDxC+A+C0QnwHiY0C8CYg/APFHIJZmZGAQB2IlIOYA4rtAsctArAtkWwHx7Fo3hroES4aGREsGz0gxhsBkMYagVDGGpCR5hoRobQYuoFoY5sGCGZEwMxJmgmIYAAAd/hF5');
Tree2fail := DTMFromString('mrAAAAHic42BgYGBkZGBgAmJ+RghbHIhfA8XfAnEIEF8H4nNA/JABIn4LiK8B8XOoWLyPFoOflRJDfLwsQ2SIOkNSoiyDkRo/GNuaSDHwA9Xgw4xQzISEmZEwDAAAsGkPPQ==');
DownToEarth := DTMFromString('mggAAAHicY2NgYAhkYmBIBeIgII4H4glAvBiIVYByGkBsAsRdQGwExNZA3NYzDQX72MszpIZoMfAD5bBhRiTMgoQhAAD5kAy6');
MMToStone := DTMFromString('mWAAAAHicY2FgYNjExMCwBIhXAPE0IDYFipkBsQoQmwNxTXMfQ1q4PoNpkgRDiIc6Az9QDBkzomEQAAC7JweS');
PickIt := DTMFromString('mbQAAAHicY2VgYJAGYjkobQnEdkB8B4hvAvEDIP4JxMeAWHSCBMP3RSoM+2ulGYratRiaJ+ky8APF0TEjFgwGAALkC6s=');
CutP := DTMFromString('mggAAAHicY2NgYMhmYmAoY4LQiUCcDMRFQMzFyMDAA8TiUPoXUO1vIN7RJg0kmTAwF5DEhhmxqoYBAF1YBnE=');
EatP := DTMFromString('mggAAAHicY2NgYMhlYmDIAuIyIM4G4iQgzgDiJ0C5u0D8EIjfMED4zxlAgAkD758hzcAFZGHDjFh1wAAAeO0JsQ==');
FromPineapple := DTMFromString('mggAAAHicY2NgYGhhZGBoAOJaIO4A4j4gbgbi+UC5GUC8BoinA/EcIN4AxFY6Qgy9U/QY9FT4GLytxBnK4k0Z/OyUGLiAcuiYH4gZoZgJCbMywAAAAMcLtg==');
end;
procedure Frees;
begin
FreeDTM(Stone);
FreeDTM(StoneFailsafe);
FreeDTM(FirstTree);
FreeDTM(Bars);
FreeDTM(Fallen);
FreeDTM(Slope);
FreeDTM(TopOfSlope);
FreeDTM(MMToSwing);
FreeDTM(Swing);
FreeDTM(TreeFailsafe);
FreeDTM(Tree2fail);
FreeDTM(DownToEarth);
FreeDTM(MMToStone);
FreeDTM(PickIt);
FreeDTM(CutP);
FreeDTM(EatP);
FreeDTM(FromPineapple);
end;
procedure WaitAt();
begin
end;
procedure StepDatStone;
begin
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(StoneFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
FFlag(5);
HumanMMouse(X, Y, 1, 1);
if IsUpText('stone')then
ClickMouse2(true);
Wait(125 + random(25));
begin
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(StoneFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) then
HumanMMouse(X, Y, 0, 0);
ClickMouse2(True);
Wait(4250 + random(150));
end;
end;
end;
procedure ClimbTree;
begin
if FindDTMRotated(FirstTree, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) then
repeat
Mouse(X, Y, 5, 5, True);
Wait(1);
until Not FindDTMRotated(FirstTree, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) and FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, FoundIt);
end;
procedure BarHop;
var
Fails: integer;
begin
repeat
Inc(Fails);
if FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, FoundIt)then
HumanMMouse(x, y, 2, 2);
Wait(150 + random(50));
until IsUpText('wing') or (Fails > 10);
if IsUpText('wing')then
begin
ClickMouse2(True);
Wait(6550 + random(250));
end;
end;
procedure Scale;
var
Scales: integer;
begin
repeat
Inc(Scales);
x := MSCX;
y := MSCY;
if FindColorSpiralTolerance(x, y, 3435383, MSX1, MSY1, MSX2, MSY2, 4)then
HumanMMouse(x, y, 0, 0);
Wait(randomrange (25, 50));
until IsUpText('slope') or (Scales > 30);
if IsUpText('slope')then
begin
ClickMouse2(True);
Wait(100 + random(50));
HumanMMouse(580, 45, 10, 10);
Wait(800 + random(100));
While (IsMoving) do (WaitAt);
end;
end;
procedure ToSwing;
begin
if FindDTMRotated(MMToSwing, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt)then
Mouse(x, y, 5, 5, True);
Wait(750 + random(250));
HumanMMouse(221, 128, 5, 5);
FFlag(2);
if FindDTMRotated(Swing, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
HumanMMouse(X, Y, 2, 2);
ClickMouse2(true);
Wait(1550 + random(125));
end;
procedure HopWater;
begin
if FindDTMRotated(Swing, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
HumanMMouse(x, y, 5, 5);
Wait(150 + random(50));
if (IsUpText('Rope'))then
begin
ClickMouse2(True);
Wait(100 + random(50));
HumanMMouse(232, 261, 4, 4);
Wait(3350 + random(150));
end;
end;
end;
procedure SlideDown;
var
times: integer;
begin
HumanMMouse(222, 264, 1, 1);
If IsUpText('Tropical') then
begin
writeln('Sliding down');
ClickMouse2(true);
Wait(8750 + Random(250));
end else
if FindDTMRotated(Treefailsafe, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(Tree2fail, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) and IsUpText('Tropical') then
begin
HumanMMouse(X, Y, 2, 2);
ClickMouse2(True);
repeat
wait(1);
until FindDTMRotated(MMToStone, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt) or (times > 5) or (FindSymbol(X, Y, Symbol_Agility));
end;
if FindDTMRotated(Treefailsafe, X, Y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(Tree2fail, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
repeat
Inc(times);
HumanMMouse(X, Y, 5, 5);
Wait(150 + random(50));
if (IsUpText('tree'))then
begin
ClickMouse2(True);
Wait(100 + random(50));
TimesFailed := 0;
Wait(10975 + random(175));
end;
until FindDTMRotated(MMToStone, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt) or (times > 5) or (FindSymbol(X, Y, Symbol_Agility));
end;
end;
procedure ToStart;
begin
if FindDTMRotated(MMToStone, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt) or (FindSymbol(X, Y, Symbol_Agility)) or (not(isMoving)) then
begin
Mouse(x, y, 5, 5, True);
Wait(100 + random(50));
HumanMMouse(295, 180, 25, 25);
Wait(1000 + random(100));
Flag;
Wait(1000 + random (250));
end;
end;
procedure GrabFood;
begin
If HPPercent < 50 then
begin
Wait(400 + random(50));
if FindDTM(PickIt, x, y, MSX1, MSY1, MSX2, MSY2)then
Mouse(x, y, 5, 5, True);
Wait(2000 + random(100));
end;
begin
if FindDTM(CutP, x, y, MIX1, MIY1, MIX2, MIY2)then
Mouse(x, y, 5, 5, False);
WaitOption('lice', 300);
Wait(400 + random(50));
Mouse(190, 430, 20, 20, True);
Wait(300 + random(50));
end;
begin
if FindDTMRotated(FromPineapple, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
Mouse(x, y, 4, 4, True);
Wait(1750 + random(100));
end;
end;
function CurrentHP:integer;
var
p: string;
begin
Result := GetMMLevels('health', p);
end;
procedure Location;
var
X, Y: integer;
begin
WriteLn('Failed ' + IntToStr(TimesFailed) + ' Times');
Inc(TimesFailed);
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(StoneFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Hopping across');
StepDatStone;
end;
if FindDTMRotated(FirstTree, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Climbing trunk');
ClimbTree;
end;
if FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Look at those muscles');
BarHop;
end;
if FindDTMRotated(Slope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Scaling!');
Scale;
end;
if FindDTMRotated(TopOfSlope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('We scaled');
ToSwing;
end;
if FindDTMRotated(Swing, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Found Swing');
HopWater;
end;
if FindDTMRotated(TreeFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(Tree2fail, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Found Tree two');
SlideDown;
end;
if (HPPercent < 30) and (InvCount < 15)then
begin
WriteLn('Grabbing a Pineapple for safety');
GrabFood;
end;
if FindDTMRotated(DownToEarth, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('Touched home');
GrabFood;
ToStart;
end;
if FindDTMRotated(Fallen, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt)then
begin
WriteLn('You fell.. back to dat stone!')
ToStart;
end;
if TimesFailed > 15 then
begin
WriteLn('Logging out for safety');
Logout;
TerminateScript;
end;
end;
{procedure MainLoop;
var
Place: Integer;
begin
Case Place of
'Stone' :
begin
if FindDTMRotated(Stone, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(StoneFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//StepDatStone;
end;
'Tree' : begin
if FindDTMRotated(FirstTree, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//ClimbTree;
end;
'Bars' : begin
if FindDTMRotated(Bars, x, y, 180, 0, 420, 340, -Pi, Pi, Pi/30, FoundIt)then
//BarHop;
end;
'Slope' : begin
if FindDTMRotated(Slope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//Scale;
end;
'TSlope' : begin
if FindDTMRotated(TopOfSlope, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//ToSwing;
end;
'Rope' : begin
if FindDTMRotated(Swing, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//HopWater;
end;
'Vine' : begin
if FindDTMRotated(TreeFailsafe, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt) or FindDTMRotated(Tree2fail, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, FoundIt)then
//SlideDown;
end;
'BOR' : begin
if FindDTMRotated(DownToEarth, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt)then
//GrabFood;
//ToStart;
end;
'Fell' : begin
if FindDTMRotated(Fell, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, FoundIt)then
//ToStart;
end;
end;
end; }
begin
SRL_SixHourFix := true;
Smart_FixSpeed := true;
SetupSRL;
DeclarePlayers;
LoginPlayer;
If not (MakeCompass('S')) then
ClickNorth(SRL_ANGLE_HIGH);
MakeCompass('S');
GameTab(tab_inv);
repeat
Calls;
if (HPPercent < EatAt)then
repeat
begin
FindDTM(EatP, x, y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 5, 5, True);
end;
until (CurrentHP > EatAt);
Location;
//MainLoop;
Frees;
until Not(loggedin);
end.
//next script I whipped up in a day or two, kinda lame//
program sHunterKitter;
{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/misc/smartgraphics.simba}
{[******************************************]
[*********Sokkr7's Hunter Kit Opener*******]
[****** Fill out the Const & start in *****]
[********Soulwars w/ earth staff on********]
[******************************************]}
const
AmountOfKits = 8000;
{^^ # of astrals divided by two. Always round up!}
TimeToRun = 18000000; //until break (default 5 hours)
TimeRunTotal = 90000000; //set really high if using for awhile!
Break = True; // Yes=true, No=false
BreakFor = 6000; //How long to break for? (In milliseconds) [default 5 minutes]
OpenKits = true; //set to true if you want to cast and open
var
X, Y, Invy, Stop, First, Time, Kits, Magic, Profit, Astral: Integer;
{**************************************}
{ Fill in declares | And the const ^^ }
{**************************************}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name :=''; //Username
Pass :=''; //Password
Pin :=''; //Leave blank if none
Member := true; //no touchy
Active := true; //no touchy
end;
end;
procedure Callthings;
begin
Astral := BitmapFromString(4, 6, 'meJw7tvr4MRJRampmWnp2RmZuYmJq' +
'cnI6hAsASeUuIQ==');
end;
procedure Freethings;
begin
FreeBitmap(Astral);
end;
{***************************************
|* Major Credits to Flight for this *|
****************************************}
Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;
{***************************************
|* Major Credits to Flight for this *|
****************************************}
procedure BrakeWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, targetArea: extended);
var
veloX,veloY,windX,windY,veloMag,dist,randomDist,lastDist: extended;
lastX,lastY,MSP,W,maxStep,D: integer;
sqrt2,sqrt3,sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
repeat
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
D := Random((Round(dist)/3));
if (D > 100) then
D := RandomRange(90, 100);
if (D < 5) then
D := RandomRange(5, 8);
maxStep := D;
if dist >= targetArea then
begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
end;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
end;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
W := (Random(100/MSP))*3;
if (W < 5) then
W := 5;
wait(W);
lastdist:= dist;
until(hypot(xs - xe, ys - ye) < 1)
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;
{***************************************
|* Major Credits to Flight for this *|
****************************************}
procedure BrakeMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y: integer;
begin
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
GetMousePos(X, Y);
BrakeWindMouse(X, Y, eX, eY, 9, 5, 10.0 / randSpeed, 15.0 / randSpeed, 10.0 * randSpeed);
end;
{****************************************}
{ My Custom Antiban, will add more later }
{ Props to Kyle for providing a link! }
{****************************************}
procedure AntiBan;
begin
case(Random(10)) of
1: begin
GameTab(tab_Stats);
HoverSkill(skill_Magic, False);
end;
2: begin
GameTab(tab_Stats);
GetSkillLevel(skill_magic);
XPTillNextLevel(skill_Magic);
end;
3: begin
BoredHuman;
end;
4: begin
CompassMovement(40, 120, true);
end;
5: begin
GameTab(tab_Inv);
ExamineInv;
end;
6: begin
PickUpMouse;
RandomRClick;
end;
7: begin
SetScreenMouse('W', 6);
end;
8: begin
GameTab(tab_Friends);
Wait(1000 + Random(650));
end;
9: begin
InvMouse(1, 2);
ClickMouse2(false);
end;
10: begin
GameTab(tab_Music);
ScrollMouse(634, 308, 2);
end;
end;
end;
{**************************************}
{ Author:Sokkr7 | Clicks the spell }
{**************************************}
procedure ClickSpell;
begin
GameTab(tab_Magic);
MarkTime(Invy);
if (OpenKits = false) then
repeat
begin
Mouse(629, 262, 10, 5, Mouse_Left);
if (FindBlackChatMessage('You do not have enough astral runes to cast this spell')) then
break;
if (Not(FindBlackChatMessage('You do not have enough astral runes to cast this spell'))) then
wait(250 + Random (50));
end;
until (TimeFromMark(Invy) > 71000) and (IsChatBoxTextAnyLine('You need at least one free inventory space to cast this spell', clBlack));
if (OpenKits = true) then
begin
repeat
GameTab(tab_magic);
Mouse(629, 262, 10, 5, Mouse_Left);
until (InvCount = 4)
if (InvCount = 4) then
begin
GameTab(tab_Inv);
Wait(Random(50));
Mouse(622, 230, 7, 7, Mouse_left);
Wait(Random(50));
Mouse(663, 230, 7, 7, Mouse_left);
Wait(Random(50));
Mouse(704, 230, 7, 7, Mouse_left);
Wait(Random(350));
end;
end;
end;
{****************************************}
{ My own custom banking procedure for SW }
{****************************************}
procedure Bank;
begin
if (Not(FindNormalRandoms)) then
MakeCompass('W');
repeat
OpenBankChest(SRL_BANK_SW);
until (BankScreen) Or (PinScreen)
Wait(1000);
if FindBitmaptoleranceIn(Astral, X, Y, MSX1, MSY1, MSX2, MSY2, 25) then
begin
HumanMMouse(X, Y, 4, 4);
ClickMouse2(False);
ChooseOption('Withdraw-All');
end else
if Not(FindBitmaptoleranceIn(Astral, X, Y, MSX1, MSY1, MSX2, MSY2, 25)) then
Deposit(2, 28, true);
Wait(350);
CloseBank;
end;
{****************************************}
{ Prints a progress report below }
{****************************************}
procedure Proggy;
begin
Kits := Kits + 27
Magic := Magic + 1890
Profit := Profit + (46*27)
WriteLn('[*******************************************************]');
WriteLn('[************** Sokkr7''s Hunter Kitter ****************]');
WriteLn('[*******************************************************]');
WriteLn('[***************[' + IntToStr(Kits) + (' hunter kits made!' + ']******************]'));
WriteLn('[*****[' + ('Player has gained ' + IntToStr(Magic) + (' experience in magic!' + (']*****]'))));
WriteLn('[****************[' + ('Player has Made ' + IntToStr(Profit) + (' GP' + ']***************]')));
WriteLn('[********[' + ('Running for ' + (TimeRunning) +']*********]'));
WriteLn('[*******************************************************]');
end;
procedure PrintOnSmart;
var
TR, Made, Gained, Earned: String;
Pic: Integer;
begin
Proggy;
SmartSetDebug(true);
TR := TimeRunning;
Made := IntToStr(Kits);
Gained := IntToStr(Magic);
Earned := IntToStr(Profit);
\\had a bitmap image for proggy here, but was too long sadly!
SMART_DrawBitmap(True, pic, Point(MCX1, MCY1));
Smart_DrawText(91, 390, StatChars, TR, clAqua);
Smart_DrawText(91, 409, StatChars, Made, clAqua);
Smart_DrawText(91, 431, StatChars, Gained, clAqua);
Smart_DrawText(91, 453, StatChars, Earned, clAqua);
FreeBitmap(Pic)
end;
{****************************************}
{ Mainloop | Written by: (s)okkr7 :) }
{****************************************}
begin
SRL_SixHourFix:= True;
Smart_FixSpeed:= True;
repeat
SetupSRL;
Callthings;
DeclarePlayers;
Loginplayer;
MarkTime(First);
ClearDebug;
SetAngle(SRL_ANGLE_HIGH);
MouseSpeed:= 60;
if (not LoggedIn) then
TerminateScript();;
begin
repeat
begin
if (Not(LoggedIn)) then
begin
LoginPlayer;
end;
Bank;
case(random(15)) of
1: Antiban;
2: ;
3: ;
4: ;
5: ;
6: ;
7: ;
8: ;
9: ;
10: ;
11: ;
12: ;
13: ;
14: ;
15: ;
end;
ClickSpell;
ClearDebug;
PrintOnSmart;
Wait(2500);
end;
until (Kits >= AmountOfKits) or (TimeFromMark(First) > TimeToRun) or (FindBlackChatMessage('You do not have enough astral runes to cast this spell'));
if (TimeFromMark(First) > TimeToRun) and (Break = True) then
begin
ExitToLobby;
MarkTime(Time);
WriteLn('Breaking for your amount of time!');
repeat
Wait(1);
until (TimeFromMark(Time) > BreakFor);
repeat
begin
if (Not(LoggedIn)) then
begin
LoginPlayer;
end;
Bank;
AntiBan;
ClickSpell;
ClearDebug;
PrintOnSmart;
Wait(2500);
end;
until (Kits >= AmountOfKits) or (TimeFromMark(First) > TimeToRun) or (FindBlackChatMessage('You do not have enough astral runes to cast this spell'));
end;
end;
until (TimeFromMark(Stop) > (TimeRunTotal))
Freethings;
Logout;
TerminateScript;
end.