Log in

View Full Version : How to check for dtm pos.



laakerules
02-19-2012, 03:23 AM
Okay, currently working on big project. But how would i make it see or tell once say something has happened ex, joined minigame, beat the level. And i alreday tried findnpcchat.

Runaway
02-19-2012, 03:31 AM
You could try making a DTM of the exact area that you start the minigame in and create a function that outputs true if it finds the DTM.

Works for me :P

EDIT: Example:

function AtBank(WaitTime: integer): boolean;
var
BankArea, i, x, y: integer;
Angle: extended;
begin
if not LoggedIn then Exit;
MarkTime(i);
BankArea := DTMFromString('mrAAAAHic42BgYFAGYi4gdgRiFyD2YoAAXS CWBWITILYAYhsgTgTiSCCOAGImqLr///8z+PsHg3FBfDTDvv3HwdjRwQWM/wPVSOLBjAQwDAAAXbAQ3A==');
repeat
Result := FindDTMRotated(BankArea, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, Angle);
if Result then
begin
Currently('At the bank!');
Break;
end;
Wait(200+Random(50));
until(i > WaitTime);
FreeDTM(BankArea);
end;

Brandon
02-19-2012, 03:34 AM
FindTextAtExWrap(.....)
FindDTMs(DTM, TPA.....)
TPAFromBox(...) and check the colours..
CountColours in Box..
RAASTPA and check each point for uptext