SRL Archive - Research & Development Lounge

Axe Detection


Bad Processor

2010-05-08 04:10:23

Quick procedure to find out where your axe is.
procedure LoadScriptDTMs;
begin
dragonaxe := DTMFromString('78DA633461606058C48006189148202D0F24B' +
'61050A382694EBCAD19AA1A5D20318780392035AB09A80119BB82' +
'08F7AC21A0468B08F768008995F8D50000DB210842');
axe := DTMFromString('78DA634C66626078C6C8800A98C0244C94B10' +
'8C87F4E404D1290FF95809A5420FF2D0135B140FE4F026AD280FC' +
'0704D4E403F98FF0AB01002955096A');
end;

function FindAxeIn(GameTabNo: Integer): Boolean;
var x, y: Integer;
begin
GameTab(GameTabNo);
Result := False;
if FindDTM(axe, x, y, MIX1, MIY1, MIX2, MIY2) or FindDTM(dragonaxe, x, y, MIX1, MIY1, MIX2, MIY2) then
Result := True;
end;
– BP

cycrosism

2010-05-08 05:39:38

Use bitmaps, they are better. Check my bitmap tutorial for more info.

Dgby714

2010-05-08 05:49:01

The current FindAxe in woodcutting.scar works if someone would update the bitmaps/DTMs

marpis

2010-05-08 06:18:19

From: cycrosism
Use bitmaps, they are better. Check my bitmap tutorial for more info.


Doesn't matter in this situation… In fact DTM can be faster in this case. Only a few points are needed with 0 tolerance and 0 area.

Bad Processor

2010-05-08 07:45:17

I'm glad people like it! Feel free to use in any of your own scripts, by the way. If you want to.
– BP