SRL Archive - OSR Help

Accurate building locating


GREEN GIANT

2013-09-19 08:32:19

Hi guys,

I basically want to create a function or procedure that finds a specified building, checks to see if a symbol can be found in or near the building and then click the centre of the building on the mini-map.

I know DTMs can be used to find straight walls to define buildings but im not too sure how i would go about this?

Can any recommend a good method of walking into a building via the mini-map?
(Please don't suggest reflection >.<)

Thanks.

Itankbots

2013-09-19 08:57:20

Isnt that already in the SRL include? Minimap shop symbol finding?

riwu

2013-09-19 09:00:15

Show us a screenshot of the building and its surroundings? Probably can be done with using TPA to locate the white boundaries of the building.

GREEN GIANT

2013-09-19 09:46:37

From: Itankbots
Isnt that already in the SRL include? Minimap shop symbol finding?


Well yes, but if i have it click the symbol (that moves outside of the building bounds) there's a good chance it won't actually walk into the building.

Moreover, I want to be able to perform a check that i am within the bounds of the building :)

GREEN GIANT

2013-09-19 09:48:10

From: riwu
Show us a screenshot of the building and its surroundings? Probably can be done with using TPA to locate the white boundaries of the building.


The building with the 'Runes' symbol.

[ATTACH=CONFIG]22217[/ATTACH]

Itankbots

2013-09-19 10:02:35

From: GREEN GIANT
The building with the 'Runes' symbol.

[ATTACH=CONFIG]22217[/ATTACH]


Can already see a fairly easy way to do it. There is a unique black colour that outlines only the building you're after, Make a box tpa of it. Click within the bounds. Boom, inside the building :)

GREEN GIANT

2013-09-19 10:38:28

From: Itankbots
Can already see a fairly easy way to do it. There is a unique black colour that outlines only the building you're after, Make a box tpa of it. Click within the bounds. Boom, inside the building :)


Sounds good, although i have worked with TPAs and ATPAs i'm not familiar with how to make a BoxTPA, can you help or point me to a tutorial?

Mark

2013-09-19 11:17:00

From: GREEN GIANT
Sounds good, although i have worked with TPAs and ATPAs i'm not familiar with how to make a BoxTPA, can you help or point me to a tutorial?


you should check the Function list in simba has everything you need


but here are the functions i guess you would need.
program new;
{$X+}

var TPA:TPointArray;
begin
var BuildingBounds:=GetTPABounds(TPA); //this get the bounds of your TPoint Array and creates TBox ie BuildingBounds
if PointInBox(PlayerPos,BuildingBounds)then writeln('Player is in House');//this checks is playerpos TPoint is withing the bounds of the TBox specified in BuildingBounds.
end.

GREEN GIANT

2013-09-19 11:41:52

From: CRU1Z1N
you should check the Function list in simba has everything you need


but here are the functions i guess you would need.
program new;
{$X+}

var TPA:TPointArray;
begin
var BuildingBounds:=GetTPABounds(TPA); //this get the bounds of your TPoint Array and creates TBox ie BuildingBounds
if PointInBox(PlayerPos,BuildingBounds)then writeln('Player is in House');//this checks is playerpos TPoint is withing the bounds of the TBox specified in BuildingBounds.
end.


Ahh cool that works, i'll have a play around with this. Thankyou :)