View Full Version : Location finder
Boreas
10-02-2006, 02:29 AM
Are there functions for knowing whether you're in certain locations? I was thinking about the new lumby tele and how it would be cool if the script could know when it worked. Also would be useful combining scripts.
If not, I'm gonna try making one for lumby but I'm not sure how to go about this. I was thinking something to do with the 2 water symbols, any other ideas?
WhiteShadow
10-02-2006, 02:45 AM
Are there functions for knowing whether you're in certain locations? I was thinking about the new lumby tele and how it would be cool if the script could know when it worked. Also would be useful combining scripts.
If not, I'm gonna try making one for lumby but I'm not sure how to go about this. I was thinking something to do with the 2 water symbols, any other ideas?
Yea.
function InLumb : Boolean;
begin
Result:= FindSymbol(x, y, 'water);
end;
xxlegitxx
10-11-2006, 01:27 AM
Yea. You could also use a DTM or bitmap, as that might be more reliable.
Boreas
10-11-2006, 01:42 AM
Whiteshadow is that code already in srl or did you just make it up? Either way that would return a false positive whereever there is water. I'm talking about relative positional relationships between multiple things like the 2 waters in lumby courtyard.
Legit do you think theres a dtm/bitmap thats non color dependent, non compass rotation dependent, and unique to only 1 spot? Perhaps a combination of several where if most of them are found it returns true.
Sumilion
10-11-2006, 01:42 PM
Usually you could do a number of checks so that the odds of you being in a different place and still resulting true is slim. I made a script that walks into the mine of Between the rock or something like that, and you've got 2 entries, one where you can walk to the left and 1 where you can walk to the right. So i did
Function AreWeInRightCave : boolean;
Begin
If GetColor(600, 100) = 0 Then Result := true;
else result := false;
End;
600,100 being somewhere to the right, cause i needed to get into the cave where you can walk to the left. And if i can walk to the right then the getcolor isnt 0. That's one way, or with 2/3 dtm's or FindSymbols.
Pentti
10-11-2006, 02:53 PM
Yea. You could also use a DTM or bitmap, as that might be more reliable.
These wont work, i think.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.