SRL Archive - OSR Help

Help with targets


Sax

2012-11-17 08:53:21

Hi. Im making a range guild script and I need help on finding the targets.
These are the targets and I want to click this specific target:

How do I do it?

I think DTM's would do it. I could make the main point in the target I want and then the other points in other targets and in other things. What is the best/flawless way?

Footy

2012-11-17 08:57:36

Find a unique color on the target, store points in TPA, Splittpaex to make 5 boxes, sort these boxes from left to right, use TargetATPA[1]. If you need help, let me know.

riwu

2012-11-17 08:58:21

DTM is the most flawful way, any slight difference in angle/direction break it completely. Get ATPA of the yellow/red bulls-eye, sort it by x (preferably with direction compatibility) and choose index 1.

Markus

2012-11-17 10:03:38

Easiest way would be to look for the blue circles, splittpa, middletpa and bam you got the middle of the target.

Sax

2012-11-18 08:25:32

How can I sort the ATPA's from the x coordinate??

I want to sort TPA's from left to right. How do I do it?

riwu

2012-11-18 08:30:25

SortTPAByX

Rezozo

2012-11-18 08:31:49

I would take a look at Riyyi's old script for this (if it is still there). IDk, check that out, it had some good stuff.

Sax

2012-11-18 08:35:06

From: riwu
SortTPAByX


does it work for ATPA's too??

riwu

2012-11-18 08:38:49

From: Nirvana
does it work for ATPA's too??

SortATPAFromMidPoint, but that sorts from a point only so you've to make your own function to sort by X.

Footy

2012-11-18 08:41:58

SortATPAFrom(TargetATPA, 0, 100);

Sax

2012-11-18 08:51:14

This is just stupid I used that and this is what gives me:





The numbers are from ATPA[0], ATPA[1], …
Isnt it supposed to be sorted from the x coord?

riwu

2012-11-18 08:56:50

From: Nirvana
This is just stupid I used that and this is what gives me:





The numbers are from ATPA[0], ATPA[1], …
Isnt it supposed to be sorted from the x coord?

Why wouldn't you believe me? :(
No existing function to sort ATPA by x relative to their midpoint.
If you can't make it, you can just use SortATPAFromFirstPointX, theoretically incorrect, but practically they would return the same result in most cases on RS.

Sax

2012-11-18 09:00:03

From: riwu
Why wouldn't you believe me? :(
No existing function to sort ATPA by x relative to their midpoint.


no no you got it wrong. I do believe you I am just mad that this is not working because it is supposed to work. that's why I think it is stupid!

plus all the points from the first target are all to the left of the second and so on.. so why this wouldn't work?

KeepBotting

2012-11-18 09:08:57

If you can make the camera angle constant, MouseBox it :P