EtherFreak
2012-11-05 18:36:45
So a while back, I was having issues with radial walk, and SPS was down/not functioning. and I wanted to walk/run somewhere. The closest that srl had was the radial walk, but that still required a color. I wanted to be able to walk north, and did not care about colors, but just wanted to walk north, of a known radius. I threw the following together, and figured I would share it here, as it could be incorporated, and would be great for those times that you just wanted to walk in a direction.
Edit
As an afterthough, we could add an option to runaway that would not enable disable the run option and achive the same result…
//from SRL RunAway
//reused by etherfreak
//runs in a specified direction and a specified distance. direction is 0-360 degrees, with 0 being N
//rads is the radius from the character. try to keep this between 20-70.
//also, no randoms incorperated, so use your own randoms!
procedure RunDir(dir: variant; Rads: Integer);
var
Deg: extended;
begin
if (not LoggedIn) then exit;
Deg := variantToDirection(dir);
Deg := Deg + Random(2);
SetRun(True);
MFNF(Trunc(Rads * Sin(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCX + Random(5)),
Trunc(-Rads * Cos(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCY + Random(5)), 1, 1);
FFlag(0);
Wait(500 + Random(1500));
end; Edit
As an afterthough, we could add an option to runaway that would not enable disable the run option and achive the same result…