sm0k3
2013-03-09 00:52:14
ok so ive pretty much just thrown this together at high speed so im not suprised im having problems realy
but i just cant figure it out ,
its a tar collecter altho at the moment it just runs around in circles and im sure its an easy fix but im knackered and just cant find the problem…
just hoping someone could have a quick look and see where im going wrong as far as i can tell its getting stuck when clicking the red dots on minimap as this is a far as it gets .. takes a few steps along sps path then just runs around manically clicking the mini-map ,, probably shouldnt run it for to long if u test it tho …
but i just cant figure it out ,
its a tar collecter altho at the moment it just runs around in circles and im sure its an easy fix but im knackered and just cant find the problem…
just hoping someone could have a quick look and see where im going wrong as far as i can tell its getting stuck when clicking the red dots on minimap as this is a far as it gets .. takes a few steps along sps path then just runs around manically clicking the mini-map ,, probably shouldnt run it for to long if u test it tho …
program TarCollect;
//The walking code was generated with the path generator for SPS version 2.5.8 by Cynic
// Gota giv him credit due ... ;)
// Made By: Sm0k3
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i sps/sps.simba}
Cons
DEBUGS = True;
totalrun = 2; // total times you want it to run
var
truns, TarBMP: integer;
Status, CurrTask: string;
tarPath: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
with Players[0] do
begin
Name:='';
Pass:='';
BoxRewards:=[''];
LampSkill:=SKILL_PRAYER;
Pin:='';
Active:=true;
end;
end;
procedure WalkToClosest;
var
i: TPointArray;
begin
writeln('Walking');
i := GetMiniMapDots('red'); //Populate the 'i' point array with all the NPC dots
SortTPAFrom(i, Point(MMCX, MMCY)); //Now sort the 'i' array starting from the center of the MM
Mouse(i[0].X,i[0].Y,2,2,mouse_left);
wait(300);
end;
procedure DoCollect;
var
xe,ye: integer;
aFound: Extended;
begin
WalkToClosest;
wait(300);
FindBitmapToleranceIn(tarBMP, xe, ye, MSX1, MSY1, MSX2-90, MSY2-90, 5);
wait(200);
MMouse(xe,ye,2,1);
if ( IsUpText('tar') = True ) then
begin
writeln('found tar ;)')
ClickMouse(xe,ye,1);
end;
end;
procedure DontActLikeAbot;
begin
DoCollect;
end;
procedure WalkLoop;
var
i: integer;
begin
i := 0;
while not ( i = 6 ) do
begin
SPS_BlindWalk(tarPath[i]);
wait(400);
DoCollect;
i := i + 1;
end;
i := 0;
end;
procedure SetupScript;
begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Wait(774+ Random(277));
ClickNorth(SRL_ANGLE_HIGH);
SRL_Procs[SRL_Antiban] := @DontActLikeAbot;
SRL_Procs[srl_OnRandomCall] := @DontActLikeAbot;
SPS_Setup(RUNESCAPE_SURFACE,['11_9']);
SPS_AnyAngle := True;
tarPath :=[Point(4464,3814),Point(4445,3847),Point(4478,3899),Point(4518,3940),Point(4583,3930),Point(4576,3878),Point(4517,3855)];
end;
procedure MainLoop;
begin
while ( CurrTask = 'WalkLoop' ) Do
begin
WalkLoop;
if ( truns = totalrun ) then CurrTask := 'STOP';
end;
end;
begin
tarBMP := BitmapFromString(33, 27, 'meJytVu1Kw0AQjD5BhQqVSmmxWC' +
'yGhPaPCFIRxPd/I0cGh2F3m8QPmB+BbGZudvbu0j+/9WO4bJoSox+' +
'O4nB6J/92ew9sNnfAarUGlstb4F9UJLHbPUiFQlIB2qfXX5MTlNjv' +
'HyVEfoBatHN8+fgpMwkJSrRt53bYNFeZyI9PFoubUoJGsgok+Mkw+' +
'UXTEOwDPgkSIi/TR/18fu0qnBaCYeGtFkkjQSKQ5wEDZrOrcyNNfg' +
'WqZYu2ZPYsCCxMCCpBgjxBxQlLfg0YwKat133mlwSKXWKKBYD21bF' +
'SgmwKN/TKvciOS6A/rGGjJOFZo0B2JMGHsP7QGQVxTsJ3nDeNz4C6' +
'F/g1sZJgWZ5hjm6WcC8+otLSeaVBcgkm4vyqz70Sf0hc6ehUDC5CH' +
'KzX1h7YGqR1dT94BfDnxKniLga2Ht+6C6Us5HuB9aVESJxdCmdImb' +
'JLqD7sRMKPlxx9dhHOwCCB4uACNwWg6fX+h7hzf8qt4bcSQH6g6w7' +
'ZwkC+2QjgSQFf9/I3PxAscIYH8p14CWqD5z2OzofjrsToz4NUPGhY' +
'wIM2lySOp/oPYYpKPkPK4fkLyr/BifyftPeMVg==');
SetupScript;
CurrTask := 'WalkLoop';
while ( truns <= totalrun ) do
begin
MainLoop;
truns := truns + 1;
end;
CurrTask := 'NONE';
FreeBitmap(tarBMP);
end.