So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?
So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?
Just reverse the search coordinates (I think), so like thisSimba Code:FindDTM(DTM, X, Y, MSX2, MSY2, MSX1, MSY1)
<3
Originally Posted by Eminem
(Scripts outdated until I update for new SRL changes)
AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
Summer = me busy, won't be around much.
Ah fair enough. In that case I guess you could do multiple searches working upwards.
Eg.
And increase that 100 in intervals until you find what you want. Could be done easier in an for to do loop or a while do.Simba Code:FindDTM(DTM, X, Y MSX2-100, MSY2-100, MSX2, MSY2)
<3
Originally Posted by Eminem
Or, is there a way to skip the found DTMs until the last one is reached?
?Simba Code:function FindLowDTM(DTM : LongInt, var X : LongInt, var Y : LongInt, XS, YS, XE, YE : LongInt) : Boolean;
var
sX, sY : Integer;
begin
sX:= XS;
sY:= YS;
repeat
if FindDTM(DTM, X, Y, sX, sY, XE, YE) then
begin
Result:= True;
sX:= X;
sY:= Y;
end;
until(not(FindDTM(DTM, X, Y, sX, sY, XE, YE)))
end;
Something I just whipped up quickly. Haven't tested it but hopefully it'll work if I've thought it through properly...
Last edited by Rich; 05-04-2012 at 07:48 PM.
<3
Originally Posted by Eminem
Wow...Didn't even know about FindDTMs.
<3
Originally Posted by Eminem
There are currently 1 users browsing this thread. (0 members and 1 guests)