Footy
2012-08-06 17:35:14
Is there a way to make sure you are in the correct area, e.g. an area of tree's, and if you arent, move back to the correct area?
Footy
Footy
2012-08-06 17:35:14
2012-08-06 17:41:40
2012-08-06 17:42:31
2012-08-06 17:52:11
2012-08-06 18:21:21
2012-08-06 18:27:42
2012-08-06 18:44:37
Function InsideArea(x1, y1, x2, y2: Integer): Boolean;
var
P: TPoint;
Box: TBox;
begin
P := SPS_GetMyPos;
Box := IntToBox(x1, y1, x2, y2);
if PointInBox(P, Box) then
begin
Result := True;
end;
end;
2012-08-06 18:59:05
2012-08-06 19:02:55
2012-08-06 19:06:42
2012-08-06 19:08:59
From: Nebula
post a screenshot of it.
2012-08-06 19:12:26
2012-08-06 19:16:05
From: Footy
Something to add, lets say My character finds himself out the top left section of this area I need him to be in. What if the first SPS point I need him to walk to isnt visable, what will he do? I could do a ring tele, as that would be most relevent in this situation, but It would seem kind of botty if everytime i wander out of the area, I use my ring.
2012-08-06 19:25:39
2012-08-06 19:26:10
program SPSTesting;
{$i srl/srl.simba}
{$i sps/sps.simba}
begin
SetupSRL
sps_getmypos;
end. From: putonajonny
If you use SPS_BlindWalk you can walk to points not visable on the minimap (it will click multiple times)
2012-08-06 19:29:04
2012-08-06 19:36:10
2012-08-07 00:47:02
procedure getmyposition;
var
P: TPoint;
begin
P := SPS_GetMyPos;
writeln('Point'+ToStr(P));
end;
2012-08-07 11:13:10
From: CephaXz
procedure getmyposition;
var
P: TPoint;
begin
P := SPS_GetMyPos;
writeln('Point'+ToStr(P));
end;
I used this to check my position, and repeat it in the main loop. Of course you will need to setup SPS first before repeating the loop. And just need to disable and enable SMART to walk to another point. You would just need to copy and paste the TPoints from the debug since it has 'Point' in front of the coordinates already.
2012-08-07 13:30:14