SRL Archive - Help

How to check for dtm pos.


laakerules

2012-02-18 22:23:46

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

2012-02-18 22:31:25

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('mrAAAAHic42BgYFAGYi4gdgRiFyD2YoAAXSCWBWITILYAYhsgTgTiSCCOAGImqLr///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

2012-02-18 22:34:39

FindTextAtExWrap(…..)
FindDTMs(DTM, TPA…..)
TPAFromBox(…) and check the colours..
CountColours in Box..
RAASTPA and check each point for uptext