SRL Archive - OSR Help

Finddtms(dtm,tpa,xs,ys,xe,ye)


m3gaman3g3nd

2012-01-11 19:26:01

Hi all okay so I have a fun inquiry
I made a DTM and used the find DTMS()
function.
What Happend was that it finds the DTM but Finds it Agin!!!

Let Me Explain =)




begin
rune := DTMFromString('mrAAAAHic42BgYHBgYmDwA2IjIHYEYnsg9gFiDyA2B+JeRgaGLkYIPRuI64B4KhA3AvFMIJ6lIAY0hQkPxg8YCWAYAADDPQd+');
if finddtms(rune,TPA,1 ,1,200,280) then

writeln(TPA)
end.


Compiled successfully in 32 ms.
[(76, 61), (77, 61), (78, 61), (76, 62), (77, 62), (78, 62), (76, 63), (77, 63), (78, 63)]
Successfully executed.


As you can see it finds them almost on the same point multiple times!!!

Is there a way to only get one? (some sort of a filter?)
I need a TPA when using more than one inventory slot but a way to sort out all these practically same points. Is there a way?



Main

2012-01-11 19:28:39

DTMTPoint := TPA[ 0];

Dynamite

2012-01-11 19:29:43

Have you tried FindDTM()?

-Boom

YoHoJo

2012-01-11 19:33:09

Yea because multiple points on the rune follow the restritions you gave the DTM, that is okay.
Just use FindDTM or like Main said just use TPA[0] (the first point found) and you'll be fine.

m3gaman3g3nd

2012-01-11 20:06:47

How About This Example…
possibly there is a different way…



Now I Have Multiple Inventory Slots like i said


Now Look Here
begin
rune := DTMFromString('mwQAAAHic42RgYLADYgMg9gFiByC2BWIvIDYGYk8gNgRiESAWhdIsQKwIxDxALAvEMkDMC8TZaWlAkokAJgwYicBwAAB1EAQ8');
if finddtms(rune,TPA,1 ,1,170,112) then
begin
freedtm(rune);
writeln(TPA);
end;
end.
[BANANA]Compiled successfully in 31 ms.
[(22, 22), (23, 22), (24, 22), (64, 22), (65, 22), (66, 22), (106, 22), (107, 22), (108, 22), (148, 22), (149, 22), (150, 22), (22, 23), (23, 23), (24, 23), (64, 23), (65, 23), (66, 23), (106, 23), (107, 23), (108, 23), (148, 23), (149, 23), (150, 23), (22, 24), (23, 24), (24, 24), (64, 24), (65, 24), (66, 24), (106, 24), (107, 24), (108, 24), (148, 24), (149, 24), (150, 24), (22, 58), (23, 58), (24, 58), (64, 58), (65, 58), (66, 58), (106, 58), (107, 58), (108, 58), (148, 58), (149, 58), (150, 58), (22, 59), (23, 59), (24, 59), (64, 59), (65, 59), (66, 59), (106, 59), (107, 59), (108, 59), (148, 59), (149, 59), (150, 59), (22, 60), (23, 60), (24, 60), (64, 60), (65, 60), (66, 60), (106, 60), (107, 60), (108, 60), (148, 60), (149, 60), (150, 60), (22, 94), (23, 94), (24, 94), (64, 94), (65, 94), (66, 94), (106, 94), (107, 94), (108, 94), (148, 94), (149, 94), (150, 94), (22, 95), (23, 95), (24, 95), (64, 95), (65, 95), (66, 95), (106, 95), (107, 95), (108, 95), (148, 95), (149, 95), (150, 95), (22, 96), (23, 96), (24, 96), (64, 96), (65, 96), (66, 96), (106, 96), (107, 96), (108, 96), (148, 96), (149, 96), (150, 96)]
Successfully executed.[/BANANA]

As there is too much to finish color I will just say LOOK
Now you can see my example
, Im looking for the same dtm in my inventory

but instead of finding just "12" points
it finds soo many more

so is there a way to filter this??
or am I just using the wrong method??

Brandon

2012-01-11 20:22:30

RAASTPAEx… It will store only one point for each object found..

YoHoJo

2012-01-11 20:25:01

Also, just you could search for each dtm within the bounds of just one inventory box.
Check out my power miner script, I do that in there. For the FindDTM bounds I use InvBox.
What are you trying to accomplish anyways? :D

Why not just find one ess, and right click, and deposit all or whatever?

KingKong

2012-01-11 21:31:16

From: YoHoJo
Also, just you could search for each dtm within the bounds of just one inventory box.


^What he said. When you call finddtms, it will search the entire inventory which means it is possible that it finds the black outlines of 4 nearby essences and thinks that its one essence.

DemiseScythe

2012-01-11 22:22:06

FindDTM? Returns 1 match, problem solved

m3gaman3g3nd

2012-01-11 22:32:56

HOLY SHIT THAT RASTTPAEX WORKED!! THANK YOU GGZZ and otheres for your suggestions…