mixster
2009-06-22 19:46:03
Found in MapWalk.scar, it rotates co-ordinates taken when facing North so that they click in the same position on the minimap regardless of which direction you're currently facing, with set randomness.
procedure MouseMM(x, y, randX, randY: Integer);
x and y are the desired co-ordinates to click while randX and randY are values that add to randomness. The x and y are rotated then passed to Mouse along with randX and randY and as it is the minimap, it will always left click. It also includes a check to ensure it is a valid point for the minimap.
Should be used primarily as a walking failsafe, but can also be used in other areas, such as finding a minimap symbol, rotating the map so you face a different direction (for some reason that makes perfect sense) then using MouseMM to ensure you still click on the symbol.
An example:
As a failsafe, it should be used after all other method of walking have failed. In this example, if the radial walk and DTM fail, it uses MouseMM to click a spot and then checks afterwards to see if it managed to get to the right place (in this case, FindSymbol would be the check, so if it found the bank symbol then it succeeded in getting you to the bank).
Overall, it should be rarely used but a nice backup that doesn't require setting direction to North to ensure it works, so can just be slotted in as a one liner.
procedure MouseMM(x, y, randX, randY: Integer);
x and y are the desired co-ordinates to click while randX and randY are values that add to randomness. The x and y are rotated then passed to Mouse along with randX and randY and as it is the minimap, it will always left click. It also includes a check to ensure it is a valid point for the minimap.
Should be used primarily as a walking failsafe, but can also be used in other areas, such as finding a minimap symbol, rotating the map so you face a different direction (for some reason that makes perfect sense) then using MouseMM to ensure you still click on the symbol.
An example:
if (not RadialWalk()) then
if (not FindDTM()) then
begin
MouseMM(560, 15, 3, 3);
if (FindSymbol()) then
Writeln('All other walking failed, but blind faith has saved us!')
else
Writeln('I knew we should''ve taken that last left...');
end;
As a failsafe, it should be used after all other method of walking have failed. In this example, if the radial walk and DTM fail, it uses MouseMM to click a spot and then checks afterwards to see if it managed to get to the right place (in this case, FindSymbol would be the check, so if it found the bank symbol then it succeeded in getting you to the bank).
Overall, it should be rarely used but a nice backup that doesn't require setting direction to North to ensure it works, so can just be slotted in as a one liner.