Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetObject(ObjectID: integer; Uptext: string): Boolean;
- var
- Objects: TRSObjectArray;
- Bp, ObjectLoc: Tpoint;
- I: integer;
- begin
- if (not LoggedIn) then
- Exit;
- Objects := R_GetObjectsDistance(OBJ_GAME, 40);
- for I := 0 to high(Objects) do
- begin
- if (Objects[I].Id = ObjectID) then
- begin
- ObjectLoc := (Objects[I].tile);
- if (R_DistanceFromTile(ObjectLoc) > 5) and (R_DistanceFromTile(ObjectLoc) < 25) then
- begin
- Bp.x := ObjectLoc.x + 1;
- Bp.Y := ObjectLoc.y - 1;
- R_WalkPath([Bp]);
- end;
- ObjectLoc := R_TileToMS(Objects[I].tile);
- Mouse(ObjectLoc.X, ObjectLoc.Y, 3, 3, Mouse_move);
- if (R_IsUpText(Uptext)) then
- begin
- result := true;
- end;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment