Wanted Posted October 31, 2011 Share Posted October 31, 2011 (edited) So I finished all the flag functions These Flag functions are amazing and the distance wait will actually be spot on accurate! Checkout the sauce on github Here's what you can test/use in Map.scar so far {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Official SCAR Include Runescape 2 Map Routines -------------------------------------------------------------------------------- * function OnMM(X, Y: Integer): Boolean; By: Wanted * function FindMMColorTolerance(var X, Y: Integer; Color, Tol: Integer): Boolean; By: Wanted * function FindMMColorsTolerance(var Points: TPointArray; Color, Tol: Integer): Boolean; By: Wanted * function GetCompassAngleRadians: Extended; By: Wanted * function GetCompassAngleDegress: Extended; By: Wanted * function MakeCompass(Angle: Extended): Boolean; By: Wanted * procedure SetAngle(Highest: Boolean); By: Naum * procedure ClickCompass(AdjustToHigh: Boolean); By: Wanted * function FindFlag(var X, Y: Integer): Boolean; By: Wanted * function FlagExists: Boolean; By: Wanted; * function GetFlagDistanceEx(FromX, FromY: Extended): Extended; By: Wanted * function GetFlagDistance: Extended; By: Wanted; * function FlagEx(Distance: Extended): Boolean; By: Wanted * function Flag: Boolean; By: Wanted * function MouseFlagEx(X, Y, RX, RY: Integer; Distance: Extended): Boolean; By: Wanted * function MouseFlag(X, Y, RX, RY: Integer): Boolean; By: Wanted * function RadarRoadWalk(var TPA: TPointArray; SRad, ERad, SAng, EAng, FlagD: Extended; XOffset, YOffset, RX, RY: Integer): Boolean; By: Wanted =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} I will also soon fix the problem where if you click in a really weird place and you end up walking forever and the flag goes off the map temporarily. Stay tuned! Edited November 4, 2011 by Wanted Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 1, 2011 Share Posted November 1, 2011 Nice work mate Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 1, 2011 Share Posted November 1, 2011 I have been soooo waiting for these. Wrote my own but rather use the "official" ones. Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 4, 2011 Author Share Posted November 4, 2011 Still haven't done the special addition to flag yet to make it invincible to weird flag placements that require you walk way around something However I did push RadarRoadWalk but I haven't posted how to use it yet, hopefully I will soon. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 4, 2011 Share Posted November 4, 2011 (edited) Hopefully I will have time to play with this this weekend. Edit: Ugh!!! That was a painful few minutes trying to wrap my head around what the params for FilterPointsPie do/represent so I could understand what your code is doing. Now just need to figure out what the offsets do/why they are needed? Getting too old for this crap. Edited November 4, 2011 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 4, 2011 Author Share Posted November 4, 2011 The x/y offsets are used to move the end result point slightly. I was in the process of writing a tutorial on how to use RadarRoadWalk but discovered they may be a problem with FilterPointsPie/TPAExtractPie so I'll get back to you on this once I've resolved that. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 4, 2011 Share Posted November 4, 2011 Yeah I figured out where might use the offsets as I was driving home from work (lots of time to think). Assuming the walk function will function properly at some point started to whip up a quick map point generator to use. Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 5, 2011 Author Share Posted November 5, 2011 (edited) I'll get back to you on that as soon as I can. New compass functions https://github.com/OSI1/OSI1/commit/e0e0e080c82af176891d3065e4ac03629ee3cab1 Edit: Ok I fixed FilterPointsPie and Freddy fixed ExtractTPAPie, so you need 3.29 alpha or newer and latest OSI. I'll be posting the tutorial for radarroadwalk shortly. Edit2: http://forums.scar-divi.com/showthread.php?291-RadarRoadWalk.-A-new-generation-in-walking Edited November 5, 2011 by Wanted Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 11, 2011 Share Posted November 11, 2011 Not sure I 100% agree with the logic of ClickCompass. When I call it passing in TRUE I am expecting the end result to accomplish two things: make the compass north and set the camera angle to its highest. The way it is implemented if the compass is already close to north, it exits without checking whether the camera needs to be panned up. If your starting angle is 5 and the camera is at its lowest angle the end result is no change at all. This would be fine if there were a function to check what height the camera is currently set to, so you had something to fall back on. Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 11, 2011 Author Share Posted November 11, 2011 (edited) Not sure I 100% agree with the logic of ClickCompass. When I call it passing in TRUE I am expecting the end result to accomplish two things: make the compass north and set the camera angle to its highest. The way it is implemented if the compass is already close to north, it exits without checking whether the camera needs to be panned up. If your starting angle is 5 and the camera is at its lowest angle the end result is no change at all. This would be fine if there were a function to check what height the camera is currently set to, so you had something to fall back on. Hmm I'll change that I suppose it won't make a difference for those not wanting it to be adjusted. It's really not practical to make a function that detects camera height lol, there was a guy once who used the 'character blob' method, but honestly was unreliable/inaccurate and impractical. Edit: Hows that https://github.com/OSI1/OSI1/commit/6082c57ffd9c93a10a78c05f180cfcd6f9a59dbf it's not on the SVN (includes manager) yet though. I'll bundle it up with the next include change will likely to be very soon. Edited November 11, 2011 by Wanted Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 11, 2011 Share Posted November 11, 2011 Figured there was a reason the camera angle wasn't included. I couldn't for the life of me figure out a reliable way to do it. Quote Link to comment Share on other sites More sharing options...