SRL Archive - OSR Help

DTM Finding problem (new update?)


bg5

2011-12-06 18:03:53

Yesterday was everything fine ,but today my scipt stucks on DTM finding. I use functions ExistsItemDTM , CountItems ,WithdrawItem and non of them works properly. Everytime i make new DTM it is detectable in few minutes ,but some time later or if I relog I got finding error.
It's only related to DTM of items in bank and inventory ,I don't have problem with DTM of spell icons.


I suspect it might be caused by recent update.
Anyone could confirm?

weequ

2011-12-06 18:07:18

I think the colors change slightly when you relog. Try making DTM of the black outlines. If even those change nowdays then add some tolerance to your DTM.

Brandon

2011-12-06 18:11:35

The colours are definitely changing more drastically now.. I have a script that withdrew graahk pouches PERFECTLY with dtm's.. I run it over night for 1 day.. no problem..

This morning, woke up, DTM no longer works.. had to make a whole new one. Not only that, SPS walking constantly says: "Sps walking failed" now.. sucks man.. happening to me a lot more often than before!

Oh and don't forget items in bank and invent change shape as well.. I opened my bank and saw half a pure essence in there I was flipping shit.. then I withdrew it, it was full size -__- I just thought it was a rare pure ess I had -_-

P.S. Jagex and their shape shifting shit is annoying.. Have u seen how sharks look now? oh man..

noidea

2011-12-06 18:17:21

From: ggzz
The colours are definitely changing more drastically now.. I have a script that withdrew graahk pouches PERFECTLY with dtm's.. I run it over night for 1 day.. no problem.

P.S. Jagex and their shape shifting shit is annoying.. Have u seen how sharks look now? oh man..


Do you think its annoying enough for legits to complain about it?

YoHoJo

2011-12-06 18:22:19

Hmm you guys need to give more info. 'made DTM' doesn't tell much. What points didi you use and did you use any tolerance?
Hmm I'm wondering if the outline color has changed again or even maybe is dynamic now!? Someone color pick item outline color and post!

YoHoJo

2011-12-06 18:29:21

Still getting 131072 , no idea why DTMs would be broken (Item DTMs at least)

mormonman

2011-12-06 18:30:06

I just noticed that things are having drastically different colors within the same client load/world.

Brandon

2011-12-06 18:35:30

From: YoHoJo
Still getting 131072 , no idea why DTMs would be broken (Item DTMs at least)



I always use a tolerance of 3-5 for every dtm I use.. sometimes I increase area as well though I usually leave it at one depending on what I'm looking for.

YoHoJo

2011-12-06 18:49:22

No tolerance needed for the black outline, but for the main point 3-5 is NOT enough at all!
Try more like 20-50 tol for the 'main' point of a dtm for items!
(At least in my experience)

bg5

2011-12-07 00:04:40

Higher tolerance (i use 20 now) helps a lot. I didn't care earlier too much about DTMs and I used to use 0 tolerance :P

mormonman

2011-12-07 00:17:27

I found myself making a new dtm or bitmap about every three days. I said screw it and now use CTS 2 with CountColorTolerance. These four functions are my food finding procedures. I ran a script that reloaded the client to test my min and max color counts.
function BankSearchBox(Index: Integer): TBox;
var
P: TPoint;
begin
if not LoggedIn then Exit;
if not BankScreen then Exit;
P := BankIndexToMSPoint(Index);
Result := IntToBox(P.x + 6, P.y + 12, P.x + 20, P.y + 25);
end;

function InvSearchBox(Index: Integer): TBox;
var
B: TBox;
begin
if not LoggedIn then Exit;
B := InvBox(Index);
Result := IntToBox(B.X1 + 6, B.Y1 + 11, B.X1 + 20, B.Y1 + 24);
end;

function FoodACI: TAutoColorInfo;
begin
case Players[CurrentPlayer].Integers[INT_FOOD] of
FOOD_TROUT:
begin
Result.Color := 5724517;
Result.LumTol := 12;
Result.HueMod := 0.10;
Result.SatMod := 0.07;
Result.MinCount := 130;
Result.MaxCount := 148;
end;
FOOD_SALMON:
begin
Result.Color := 2966183;
Result.LumTol := 14;
Result.HueMod := 0.05;
Result.SatMod := 2.13;
Result.MinCount := 135;
Result.MaxCount := 150;
end;
FOOD_TUNA:
begin
Result.Color := 5921639;
Result.LumTol := 8;
Result.HueMod := 0.26;
Result.SatMod := 0.13;
Result.MinCount := 155;
Result.MaxCount := 167;
end;
FOOD_LOBSTER:
begin
Result.Color := 1527969;
Result.LumTol := 12;
Result.HueMod := 0.02;
Result.SatMod := 0.12;
Result.MinCount := 130;
Result.MaxCount := 140;
end;
FOOD_SWORDFISH:
begin
Result.Color := 9130882;
Result.LumTol := 10;
Result.HueMod := 0.04;
Result.SatMod := 0.59;
Result.MinCount := 70;
Result.MaxCount := 85;
end;
end;
end;

function FindFoodIn(Box: TBox): Boolean;
var
ACI: TAutoColorInfo;
CTS, c: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
ACI := FoodACI;
SetColorspeed2Modifiers(ACI.HueMod, ACI.SatMod);
c := CountColorTolerance(ACI.Color, Box.X1, Box.Y1, Box.X2, Box.Y2, ACI.LumTol);
Result := (c >= ACI.MinCount) and (c <=ACI.MaxCount);
ColorToleranceSpeed(CTS);
SetColorspeed2Modifiers(0.2, 0.2);
end;

YoHoJo

2011-12-07 00:20:29

^ I do similar things in my scripts but for Main-screen Objects

DemiseScythe

2011-12-17 20:12:23

Use Tolerance 15 for every single point in your DTM and it should be fine. I don't think 15 is going to yield many false positives if you use enough points (6-10), good luck

YoHoJo

2011-12-17 21:13:50

From: DemiseScythe
Use Tolerance 15 for every single point in your DTM and it should be fine. I don't think 15 is going to yield many false positives if you use enough points (6-10), good luck


If you are talking about DTMs for items no need for tolerance on the child points (if they are made from the outline of the object) and you need more more than just 15 tolerance for the item itself though (the main point), I'd say 30-50.

DemiseScythe

2011-12-18 10:52:11

I agree, although I used your guide and made DTM for a Vial and had some false positives on a Woodwitch Icon also on that bank tab, must be based on pure
chance that this happened and they both have black points in the exact same pixels.

I just don't use the boundaries of the object for all my DTMs, I much prefer grabbing the main color in the area but that is just me. So I just make Tol = 15 for all
points and still get pretty precise finding although instead of 1 x, I get 10-12 x's but overlapping eachother, this gives some randomness to my clicking I believe,
could be a type of in-script antiban in a sence.

Look at runes in your inventory, sometimes the left side of the rune is completely flat for some reason. The boundary method would not find the left
boundary because it switched from round to flat and then the DTM would not be found. To each their own =) I just believe picking daughter points inside the
boundary is not bad idea at all.

I was using white boundaries for my DTM walking and other player points would mess it up and the boundaries of walls move around depending on angle so
I moved on to using assorted colors for the DTM, working good so far.

Look at the water rune missing a side ^.^ or these non-round runes
or squared on 2 sides runes?
Not sure if this only applies to runes but the shape changes when interacted with, I also noticed pouches would go corrupted once place into inventory,
may be they are messing with the item boundaries to throw us off.

Using your guide, I just made this DTM:
This is the matches it gave me:
May be I am doing it wrong but that is what happens when I use outlines with 255 Tol on mother point.

This is what I do for 15 Tol:
This is the result:
No false positives, randomization in coordinates but doesn't lose accuracy due to size of the object. What do you think?

Flight

2011-12-18 20:03:32

Yeah DTMs have been giving me fits as well. If the item has unique colors I suggest using one of those as the parent point with a high tolerance and using 3-5 sub points between the right-hand side of the item down to the bottom of the item. This is because items still sometimes change shape in the upper-left hand corner of the item when you interact with them.

Now if the item shares shape/colors with others I recommend doing what Mormonman did; DTMs/Bitmaps are hardly the only way to find items. ;)

KingKong

2011-12-18 20:08:57

If you ask me don't use dtm's. Use countcolor to find out the number of black pixels within a box or use a bitmap of the item. Actually if it was upto me, I would ditch item finding altogether for a private script. Because you should be able to setup the script to already know where items are.

DemiseScythe

2011-12-18 20:24:18

That approach works until you get random or misclick, and not having item finding is like not having failsafe, how will your script know you ran out of an item?

DTMs are perfectly fine if you know how to use make and use them correctly. I currectly script mainly using DTMs and plan on using DTMs as much as possible because I can see potential in them. To each their own =D just don't trash DTM's reputation

Brandon

2011-12-18 20:32:11

I have personally never had any problems at all with DTM's for 2 weeks straight.. Tbh, I've edited flight's nature script with my own DTM's.. they haven't been broken for 2 weeks now.. so :S Why not use DTM's? They are perfectly fine if you know what your doing.. My dtm's detect pouches, cosmic runes, laws, astrals, natures, pure essence, bloods, degraded pouches, Tiaras, rings of duelings, burthorpe games necklace.. All without fault.. If you like, I can share those or give them to you actually.. Or u can PM me and I can make you a custom DTM.. I do not use the black lines.. As the shapes of objects change.. I just pick unique colours and points on the object that Do NOT change/move..

DemiseScythe

2011-12-18 20:49:27

From: ggzz
I have personally never had any problems at all with DTM's for 2 weeks straight.. Tbh, I've edited flight's nature script with my own DTM's.. they haven't been broken for 2 weeks now.. so :S Why not use DTM's? They are perfectly fine if you know what your doing.. My dtm's detect pouches, cosmic runes, laws, astrals, natures, pure essence, bloods, degraded pouches, Tiaras, rings of duelings, burthorpe games necklace.. All without fault.. If you like, I can share those or give them to you actually.. Or u can PM me and I can make you a custom DTM.. I do not use the black lines.. As the shapes of objects change.. I just pick unique colours and points on the object that Do NOT change/move..


I find it comical that my water rune DTM found my Arma plate among other odd items in my bank =) My fault, ps stuff does not change shapes in software mode, why does Simba have to be in safe mode if anyone cares to explain, I'll be glad to read the response.