From: Sabzi
I heard summer is a one click garden. Just need very good timing and trying.
But my thieving is not enough for that, yet.
http://runescape.wikia.com/wiki/Sorceress%27s_Garden#One-Clicking
Wait for good tiles and go.
const
CharMotion = 'Ac';
MyPlayer = 'f.U';
BaseX = 'sc.h';
BaseY = 'pr.e';
CurrentX = 'r';
CurrentY = 'h';
NPCCount = 'cp.h';
NPCIndexArray = 'le.i';
NPCArray = 'ie.m';
NPCComposite = 'Xc';
NPCName = 'ob';
NPCID = 'ib';
LoopCycle = 'np.y';
LoopCycleStatus = 'Ob';
BaseLayer = 'ni.d';
GroundSettings = 'av.c';
GroundHeights = 'rl.gb';
CamX = 'it.j';
CamY = 'cf.e';
CamZ = 'kj.k';
CamPitch = 'cf.e';
CamYaw = 'ek.e';
CharHeight = '';
type
TNPC = record
Tile, MS, MM: TPoint;
Name: string;
InFight, IsMoving: Boolean;
end;
Function StringFromString(StringPtr: Integer): String;
Begin
SetLength(Result, 256);
SetLength(Result, SmartStringFromString(StringPtr, Result));
End;
function GetMyPos:TPoint;
var
me: Integer;
begin
me := SmartGetFieldObject(0, MyPlayer);
Result.x := SmartGetFieldInt(0, BaseX) + SmartGetFieldInt(me, CurrentX) shr 7;
Result.y := SmartGetFieldInt(0, BaseY) + SmartGetFieldInt(me, CurrentY) shr 7;
SmartFreeObject(me);
end;
function TileToMM(Tile: TPoint): TPoint;
var
Angle: extended;
TempX, TempY: integer;
TempXY: TPoint;
begin
Angle := rs_GetCompassAngleRadians;
TempXY := GetMyPos;
TempX := (Tile.x - TempXY.x) * 4 - 2;
TempY := (TempXY.y - Tile.y) * 4 - 2;
Result := Point((Round(TempX * Cos(Angle) - TempY * Sin(Angle)) + 629), (Round(TempX * Sin(Angle) + TempY * Cos(Angle)) + 85));
end;
function GetNPCs:array of TNPC;
var
i, NumNPCs, TheNPC, TheNPCDef, Index, TheBytes, Hei: integer;
TempMMXY, TempMSXY: TPoint;
begin
NumNPCs := SmartGetFieldInt(0,NPCCount);
if (NumNPCs < 1) then Exit;
SetArrayLength(Result,NumNPCs);
for i := 0 to (NumNPCs-1) do
try
Index := SmartGetFieldArrayInt(0,NPCIndexArray,i);
TheNPC := SmartGetFieldArrayObject(0, NPCArray, Index);
TheNPCDef := SmartGetFieldObject(TheNPC, NPCComposite);
TheBytes := SmartGetFieldObject(TheNPCDef, NPCName);
Result[i].Name := StringFromString(TheBytes);
Result[i].Tile.x := SmartGetFieldInt(0, BaseX) + SmartGetFieldInt(TheNPC, CurrentX) shr 7;
Result[i].Tile.y := SmartGetFieldInt(0, BaseY) + SmartGetFieldInt(TheNPC, CurrentY) shr 7;
TempMMXY := TileToMM(Result[i].Tile);
Result[i].MM := TempMMXY;
Hei := iabs(SmartGetFieldInt(TheNPC, CharHeight));
TempMSXY := TileToMS(Result[i].Tile, Hei*2/3);
Result[i].MS := TempMSXY;
Result[i].InFight := (SmartGetFieldInt(0,LoopCycle) < SmartGetFieldInt(TheNPC,LoopCycleStatus));
Result[i].IsMoving := (SmartGetFieldInt(TheNPC,CharMotion)>0);
finally
SmartFreeObject(TheNPC);
SmartFreeObject(TheNPCDef);
SmartFreeObject(TheBytes);
end;
end;
function OnMainScreen(x, y: Integer): Boolean;
var
twmp: TPoint;
boxx: TBox;
begin
twmp := Point(x, y);
with boxx do
begin
x1 := MSx1;
y1 := MSy1;
x2 := MIx2;
y2 := MIy2;
end;
Result := PointInBox(twmp, boxx);
end;