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
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
Thx Euphemism and Vinyl for the awesome siggy and avatar!
You could use objDTM's, as well as custom TPA's func's. +DDTMs
Last edited by Le Jingle; 08-06-2012 at 09:43 PM.
Most people use Object DTMs to check if they are in a specified area. A thread on installing it can be found here.
Alternatively, you could make a simple DTM of a portion on the minimap that will be visible at the location and have it check to see if the rotated DTM exists. Rotated, because likely, the compass won't be set to a perfect north at all times, especially after a 'movecompass' antiban.
Without chaos... There would be no organization.
Easiest way would be to use SPS_GetMyPos, and it's much easier to walk back with SPS too.
Get a box using SPS Points, if SPS_GetMyPos isn't in that box, walk back
Yes SPS_GetMyPos + PointInBox would work nice. But there might be a "better" way, post a screenshot of it.
I made and used this in my wildy agi script.
Simba Code: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;
Thanks for all the replies guys! Im probably going to try this SPS method. Gonna play around with it for a bit, and Ill let you guys know how it goes.
Thx Euphemism and Vinyl for the awesome siggy and avatar!
Best of luck.
Just something to add; I find lodestones to be very useful when walking back to an area. Especially in a case where a failed random event has teleported you away. Of course, this would be irrelevent if the account has not unlocked the specified lodestone.
Without chaos... There would be no organization.
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.
Thx Euphemism and Vinyl for the awesome siggy and avatar!
SPS will not work properly from time to time depending on the circumstances (eg. minimap flooded with players + monsters etc). And when that happens, your script will literally die. SPS will return point (-1, -1). Your script will say "oh, we are not in the box!" so your clever failsafe will try walking back. But you are already there; so SPS will return (-1, -1) over and over again every single time you call your procedure.
E: Just tell us the circumstances. What are you trying to script? +screenshot.
Last edited by Nebula; 08-06-2012 at 11:12 PM.
I assume you mean the area I will be in? its the area around daemonheim containing maple trees in f2p. My account is fletching atm, i can post a screeny of minimap and world map in a few minutes
Thx Euphemism and Vinyl for the awesome siggy and avatar!
I would say use something along the lines of a simple radial or linear walk, if the distance of SPS_GetMyPos is less than 50 x and y from the first point until it sees that point.
I haven't looked much into SPS, but a good alternative would be to add a few fail safes to make sure the script doesn't make you wonder too far off track.
Without chaos... There would be no organization.
If you use SPS_BlindWalk you can walk to points not visable on the minimap (it will click multiple times)
Yeah, ill just have to get it to check if its nearing the edge of the area, and If so, move closer to the centre. Im testing out some SPS stuff, never used it before. Im trying to get simba to output my SPS position, thats all, just to see what the format of it is, but I keep getting errors, 3 different errors so far. Can someone tell me why this wont work?
Simba Code:program SPSTesting;
{$i srl/srl.simba}
{$i sps/sps.simba}
begin
SetupSRL
sps_getmypos;
end.
E:
This could be helpful!
Thx Euphemism and Vinyl for the awesome siggy and avatar!
You need to call SPS_Setup and writeln(SPS_GetMyPos). Check out mat's SPS tutorial.
Post the screenshots......
I would post the screenies, but I dont have a sufficient dung. level to get into the resorce dungeon... Ill look up mats SPS guide, thanks!
Thx Euphemism and Vinyl for the awesome siggy and avatar!
Simba Code: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.
Thx Euphemism and Vinyl for the awesome siggy and avatar!
My miner uses DTM's on the minimap to determine if it is at a designated area. Works better than ODTM when there are lots of signs moving around(2 mining icons in my case)
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
There are currently 1 users browsing this thread. (0 members and 1 guests)