SRL Archive - Reflection Help

R_FFlag


Awkwardsaw

2010-07-30 10:17:26

it doesnt seem to be working. here is my function:


function A_WalkPath : Boolean;
var
temppath : TTileArray;
i, c : Integer;
tp, ntp : TPoint;
begin
case CheckLoc of
LOC_TANNER : temppath := tantobank;
LOC_BANK : temppath := banktotan;
LOC_LOST :
begin
writeln('player is lost, D:');
exit;
end;
end;
checkrest;
for i := 0 to high(temppath) do
begin
tp := TileToMM(temppath[i]);
if i < high(temppath) then
begin
ntp := TileToMM(temppath[i + 1]);
if rs_OnMinimap(ntp.x, ntp.y) then
continue;
end;
if not rs_OnMinimap(tp.x, tp.y) then
begin
debug('tile not on map: ' + inttostr(i));
continue;
end;
mouse(tp.x, tp.y, 1, 1, true);
if i < high(temppath) then
begin
ntp := TileToMM(temppath[i + 1]);
while not rs_OnMinimap(ntp.x, ntp.y) do
begin
ntp := TileToMM(temppath[i + 1]);
wait(100 + random(50));
r_findrandoms;
inc(c);
if c > 500 then
begin
result := false;
debug('took to long to walk, exiting');
exit;
end;
if not ismoving then continue;
end;
end;
end;
//while ismoving do wait(1 + random(3));
r_fflag(0); //this is where it messes up
wait(600 + random(600)); //if r_fflag actually gets to the last tile, it still needs to wait
debug('finished walking path');
result := true;
end;

my problem is that after the script clicks the last tile, it breaks out of the loop like its suposed to, and when it gets to r_fflag, it just skips it and says "finished walking path"

lordsaturn

2010-07-30 18:09:30

OK, so instead of posting a fix you post a function that has nothing to do with R_FFlag?

GJ i guess.

Check out MMWalk.simba in the reflection repo.

3Garrett3

2010-07-30 18:11:58

From: lordsaturn
OK, so instead of posting a fix you post a function that has nothing to do with R_FFlag?

GJ i guess.

Check out MMWalk.simba in the reflection repo.


He posted a function that shows where it messes up, silly.

Awkwardsaw

2010-07-30 18:30:50

From: 3Garrett3
He posted a function that shows where it messes up, silly.


:p

yeah. i was using ismoving, but thats terribly slow :(

also what puzzled me, was that it used to work, but then suddenly didnt

lordsaturn

2010-07-30 18:34:48

Has the client version changed? Are the Flag hooks working correctly or is it just the function R_FFlag that is stuffing up? Have you tried using R_Flag?

ZephyrsFury

2010-07-31 03:32:34

Check if R_FFlag is getting the distance from flag properly. The X and Y hooks were switched, perhaps they are still switched in the updater.

pyroryan

2010-07-31 10:29:30

From: ZephyrsFury
Check if R_FFlag is getting the distance from flag properly. The X and Y hooks were switched, perhaps they are still switched in the updater.


You're right

These hooks should work.

RS#614
hook_character_WalkQueueX = 'uc';
hook_character_WalkQueueY = 'oc';

Awkwardsaw

2010-07-31 16:47:35

From: pyroryan
You're right

These hooks should work.

RS#614
hook_character_WalkQueueX = 'uc';
hook_character_WalkQueueY = 'oc';


yep. thanks :)