Runescapian321
2009-08-28 01:53:34
It's not completely broken, just occasionally malfunctions. I think this may be the main reason some scripts, even though they should be flawless, have the tendency to fail every once in a while. Or maybe it's just me, run this script
And just click around the minimap (I think it occurs in some places more often than others). Sooner or later you'll find a spot where if you try walking to it, GetFlag will return false (Though I believe it still returns the correct tile) even though the flag is clearly present.
EDIT:
Temp fix here, it's not the most efficient but it should get the job done until the problem is completely solved.
program GetFlagTest;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl\srl/reflection/reflection.scar}
procedure DoTest;
var
FlagP : TPoint;
begin
repeat
writeln(BoolToStr(GetFlag(FlagP)));
writeln(IntToStr(FlagP.x)+','+IntToStr(FlagP.y));
wait(1000);
until(false);
end;
begin
Smart_Members := false;
Smart_Signed := true;
Smart_Server := 30;
SetupSRL;
SetupReflection;
Dotest;
end. And just click around the minimap (I think it occurs in some places more often than others). Sooner or later you'll find a spot where if you try walking to it, GetFlag will return false (Though I believe it still returns the correct tile) even though the flag is clearly present.
EDIT:
Temp fix here, it's not the most efficient but it should get the job done until the problem is completely solved.
{*******************************************************************************
function GetFlag(var TFlag: TPoint): Boolean;
By: TheGuyWhoGotOn modded by Timer and Tad
Description: Gets your destination (Tiles)
*******************************************************************************}
function GetFlag(var TFlag: TPoint): Boolean;
var
xFlag, yFlag: LongInt;
begin
xFlag := SmartGetFieldInt(0, FlagX);
yFlag := SmartGetFieldInt(0, FlagY);
TFlag := Point((SmartGetFieldInt(0, BaseX) + xFlag), (SmartGetFieldInt(0, BaseY) + yFlag));
WaitToMove(150);
Result := CharacterMoving;
end;