MysteryMuffin
2014-05-12 16:18:04
Background (Not too important to read)
I just started dabbling into reflection this morning with the goal of making my own custom version of reflection walking that has the capability of being able to click everywhere a human would possibly click to get from point A to point B.
So instead of picking a tile and adding randomization for walking, instead I want to create a TPA of every tile a real human player may possibly click on when trying to get from point A to point B and using that TPA as a path for walking.
Or in other words…
I'm trying to create multiple TBoxes to cover all of the area someone may click when trying to get from point A to point B, then using TPAFromBox to convert all of the tiles in those areas into a TPA. (If that makes any more sense)
Then the walking will work by selecting a random point that is in the TPA that will get you closer to your destination, I'm still working out the specifics on how this is going to work, but I think I have a halfway decent idea.
Question
Before I got started, I figured I would throw together a quick debugging script for path creation to visually see what the path will look like, that's when I ran into the problem.
Here's the script if your curious:
Whenever I log out and log in, the points R_TileToMM displays keep skewin to a slightly different angle every time:
(The dots should run parallel with the wall)

Note: When I rotate the camera the points are always slightly off to the same angle.
I hope all that makes sense.
Does anybody have any idea what may be causing this?
Also do you think this is just a problem with the points being displayed wrong, or do you think think this is where Simba/SMART thinks the points are actually located?
Any help with be greatly appreciated!
Thanks
Update: Just reading this over, it looks like the points are running perfectly inline with the compass itself, it looks like Jagex may purposefully skew the mini map just a bit, probably just for the purpose of throwing bots off, is there any way to compensate for this?
I just started dabbling into reflection this morning with the goal of making my own custom version of reflection walking that has the capability of being able to click everywhere a human would possibly click to get from point A to point B.
So instead of picking a tile and adding randomization for walking, instead I want to create a TPA of every tile a real human player may possibly click on when trying to get from point A to point B and using that TPA as a path for walking.
Or in other words…
I'm trying to create multiple TBoxes to cover all of the area someone may click when trying to get from point A to point B, then using TPAFromBox to convert all of the tiles in those areas into a TPA. (If that makes any more sense)
Then the walking will work by selecting a random point that is in the TPA that will get you closer to your destination, I'm still working out the specifics on how this is going to work, but I think I have a halfway decent idea.
Question
Before I got started, I figured I would throw together a quick debugging script for path creation to visually see what the path will look like, that's when I ran into the problem.
Here's the script if your curious:
program MarkATile;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR\SRL\misc\SmartGraphics.simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
procedure MarkLocations();
var
area1: TBox;
area1TPA: TpointArray;
WholeTPA: TpointArray;
drawPoint: Tpoint;
i: integer;
begin
area1 := PointToBox(Point(3173, 3385), Point(3180, 3396));//making a TBox of the area
{note: for whatever reason when creating the box, when compass is facing north, you
need to get the location of the lower left and top right of the box you want to create as
opposed to the standard top left and bottom right. this had me messed up for a little bit.
It would seem 0, 0 is actually in the bottom left as opposed to top left when facing north in
RS.
}
area1TPA := TPAFromBox(area1);// Creating a TPA of every point inside the box
CombineTPAWrap(WholeTPA, area1TPA, WholeTPA);{ a combination of all of the TPAs for the
whole path will be held in WholeTPA, as for now I only have 1 box so it's pretty useless}
for i := 0 to high(WholeTPA) do { This will loop through every point in Whole TPA.
Note: that's likely not the most efficient way to accomplish marking all of the points close
to me, for larger TPA's I'll likely do this differently}
if R_NearTile(WholeTPA[i], 15) then {if the point in the TPA is withing 15 mystery units of
measurement from where I am, it will then mark them for me}
begin
drawPoint := R_TileToMM(WholeTPA[i]);// <--This is what's causing me trouble
SMART_DrawTextEx(false, drawPoint.X, drawPoint.Y, 'UpChars07', '.', clYellow);{ points
would be near impossible to see so I marked all of the tiles with a yellow . instead}
end;
end;
begin
ClearDebug();
setupsrl;
SetupReflection;
repeat
MarkLocations();
Wait(4000);
SMART_ClearCanvas();
until(false);
end.
Whenever I log out and log in, the points R_TileToMM displays keep skewin to a slightly different angle every time:
(The dots should run parallel with the wall)
Note: When I rotate the camera the points are always slightly off to the same angle.
I hope all that makes sense.
Does anybody have any idea what may be causing this?
Also do you think this is just a problem with the points being displayed wrong, or do you think think this is where Simba/SMART thinks the points are actually located?
Any help with be greatly appreciated!
Thanks
Update: Just reading this over, it looks like the points are running perfectly inline with the compass itself, it looks like Jagex may purposefully skew the mini map just a bit, probably just for the purpose of throwing bots off, is there any way to compensate for this?