SRL Archive - OSR Help

Need Help With DTM


makke

2012-01-11 13:52:22

Hi im looking for some help. i want to find the bank chest at castelwars with the help of DTM. I have made the dtm and tried it if it found The chest with the help of "Find Matching dtm's" and it pointed out an X over the chest. and now when im trying to do it by writing this
Procedure Banking;
var
BankChest, x, y: Integer;

Begin;

BankChest := DTMFromString('mAAEAAHiclcm9CoJQAEfxv3tjb+ISbdbS0uZYNPlIbpFwK8HgtoQg3MCPLEQCX6kzOLR64DedmSTrSRnOMLjgAYcnctxxGv8aITZYYYElAuyxw2EUYRv4yq1V65z6utb31airSh3jWDdjNHzeSpNENr2qKgrNNS1vov9+ZK0kCQ==');
if FindDTM(BankChest, x, y, MSCX, MSCY, MSCX, MSCY) Then
WriteLn('We found the chest');

FreeDTM(BankChest);
End;
It does not fin the chest. becouse i want it to write the line but the line never pops up.
Any Help is appreciated.

loser69

2012-01-11 22:11:13

DTM's are for static images that dont change much such as items in the inventory, the bank chest will look different depending on angles and where you are positioned so won't work very well with DTM's .

I suggest using findcolor or findobj.

putonajonny

2012-01-12 12:10:06

What loser said ^^

PM me a photo of the chest and I'll give you a hand

Rally

2012-01-12 13:41:36

Also this tutorial could help: http://villavu.com/forum/showthread.php?t=71077
Scroll down to chapter 5, there it's explained how to make dtms for objects and npcs.

footballjds

2012-01-12 13:49:25

i would use find colors. However, what you have is logically flawed. You're searching for a DTM in between the following coordinates:
(MSCX, MSCY) and (MSCX, MSCY) You're searching for a dtm in the center pixel of the screen… I believe you want:
(MSX1, MSY1) and (MSX2, MSY2)

m3gaman3g3nd

2012-01-14 20:48:15

your better off using tpas to find that chest