SRL Archive - OSR Help

DTM not detected sometimes


astoria1112000

2011-11-29 22:50:53

I made DTM for Potions in Runescape which work perfectly sometimes and fail sometimes, is this normal or I have messed something. I made DTM using YoHoJo Tutorials

RISK

2011-11-29 23:02:43

Set the tolerance for the main point (The point that's on the color part of the item) to about 5 ~ 7 when making the DTM, see if that helps you out.

YoHoJo

2011-11-29 23:09:49

It you made DTMs for items using my tutorials they should work 100% of the time.
Make sure the main point has a tolerance 255 (to work for ALL ores/logs/whatever item) or lower to only work for certain (around 30-50 as a guess).

Make sure all sub points are the BLACK OUTLINE COLOR and nothing else.

astoria1112000

2011-11-29 23:26:29

Ok now made new DTM using simba DTM Editor , but now its giving me Out of Memory at FinDTM function

YoHoJo

2011-11-29 23:28:15

wat, weird.
Show the script or the few lines about the dtm loading/finding please

RISK

2011-11-29 23:28:17

Can you show us your script, please?

E: Ninja, YoHoJo.

YoHoJo

2011-11-29 23:32:11

I feel like I've ninjad you a lot recently… or maybe I just ninja people in general a lot.

astoria1112000

2011-11-29 23:32:29

program New;
var PrayPot,x,y:integer;
begin
PrayPot := DTMFromString('mlwAAAHicY2dgYOAEYj4gFgFiDgYIYAFibiAWh9JiQCwNpXmhaso2LgCSTFjxfwbcgBEPhgIAPSUDmQ==');

if FindDTM(PrayPot, x, y, 545, 205, 740, 465) then
writeln('Congratz! You have just found your first DTM!')
end.

RISK

2011-11-29 23:34:57

Change the coords you have to: MIX1, MIY1, MIX2, MIY2. These are the inventory coordinates supplied by the SRL include. Or if you are trying to find the potion on the main screen, you'd use: MSX1, MSY1, MSX2, MSY2.

Also make sure you are freeing the DTM when you are done using it. Probably right after you find it.
FreeDTM(PrayPot);

From: astoria1112000
program New;
var PrayPot,x,y:integer;
begin
PrayPot := DTMFromString('mlwAAAHicY2dgYOAEYj4gFgFiDgYIYAFibiAWh9JiQCwNpXmhaso2LgCSTFjxfwbcgBEPhgIAPSUDmQ==');

if FindDTM(PrayPot, x, y, 545, 205, 740, 465) then
writeln('Congratz! You have just found your first DTM!')
end.


I'm going to ninja you one day, YoHoJo!

astoria1112000

2011-11-29 23:40:30

Its giving me Out of Memory Exception at my 'if' function so it wont go ahead to FreeDTM

RISK

2011-11-29 23:42:43

You have a space in your DTM.
PrayPot := DTMFromString('mlwAAAHicY2dgYOAEYj4gFgFiDgYIYAFibiAWh9JiQCwNpXmhaso2LgCSTFjxfwbcgBEPhgIAPSUDmQ==');

That is the proper one.

astoria1112000

2011-11-29 23:45:50

^^ :duh::duh: , Thanks

EDIT: Still Out of Mem Excp

RISK

2011-11-29 23:47:38

You are very welcome. If you have any more problems, please don't hesitate to request help with them, we love to help!

So did the fixed DTM I provided work this time around?

E: Nevermind. I see your edit. Hold on.

From: astoria1112000
^^ :duh::duh: , Thanks

YoHoJo

2011-11-29 23:49:47

Noticed there is a space in your DTM, not sure if they are suppoed to have spaces so either 1) remove the space located here "i A" OR 2) Remake the DTM again :D!

astoria1112000

2011-11-29 23:53:07

Ok, made the DTM again working now, Thank you all for helping