Originally Posted by
trips
I have this right now. I tried making a test script to see if it found my DTM or not. But even when the DTM isn't on screen it still says it found it.
How can I make this so it tells me whether the DTM was found or not?
Code:
program BloodRune;
{$I SRL-6/SRL.simba}
var
icon : integer;
begin//Begins program.
ClearDebug;
SetupSRL;
icon := DTMFromString('mbQAAAHicY2VgYPBnYmDwYYLQvkDsCcStjBDcBcQNQFwPxFyBU4CqHSB0qQgYiwFF0DEjFgwGACNaB8s=');
Writeln('Located Icon');
FreeDTM(icon);
end.//
You're missing a couple of bits. You created a variable called "icon" and you also correctly assigned the DTM to this "icon" variable but this by itself doesn't do anything. You then need to prompt the script to look for the DTM you assigned to "icon" within an area using findDTM. I haven't scripted in colour for a while but this might work, have a read through it.
Simba Code:
program BloodRune;
{$I SRL-6/SRL.simba}
var
icon : integer;
boxToLookIn : TBox;
begin//Begins program.
ClearDebug;
SetupSRL;
icon := DTMFromString('mbQAAAHicY2VgYPBnYmDwYYLQvkDsCcStjBDcBcQNQFwPxFyBU4CqHSB0qQgYiwFF0DEjFgwGACNaB8s=');
boxToLookIn := intToBox(0, 0, 800, 600) //The area to look for "icon" between in pixels
if findDTM(icon, x, y, boxToLookIn) then //if we find the DTM called "icon" then
Writeln('Located Icon');
FreeDTM(icon);
end.//