SRL Archive - Research & Development Lounge

Some quick Questions about Reflection


Xenobitz

2014-04-02 12:48:30

1. Is Reflection Currently Working?
2. If an update to the client is made, does reflection temporarily break? (For example, sail skill yesterday)
3. Can Jagex detect use of reflection?

EDIT: Read through the documentation. How would I go about determining whether or not I've poisoned a monster?

Turpinator

2014-04-02 13:56:50

I dont believe that we currently have the hooks for that.

Currently (as 'seen' by simba, NPCs have… see below)
Type TNPC = Record
Name, OverHeadText: String;
Tile: TPoint;
Index, Level, NpcID: Integer;
Animation, HitPoints: Integer;
Interacting: Integer;
InCombat: Boolean;
end;

Xenobitz

2014-04-02 14:11:49

Okay, so if I can't directly see if a monster is poisoned, is there a way to detect "splashes" and whether or not they're poison?

Frement

2014-04-02 15:30:15


NPC is poisoned.
Succesfully freed SMART[412212]
Successfully executed.

function R_IsNPCPoisoned(Index: Integer): Boolean;
var
_Node, _HitTypeCount, I: Integer;
begin
_Node := SmartGetFieldArrayObject(SmartCurrentTarget, 0, client_npcs, Index);
_HitTypeCount := SmartGetFieldArraySize(SmartCurrentTarget, _Node, 'am', 0);
if (_HitTypeCount > 0) then
for I := 0 to _HitTypeCount - 1 do
if (SmartGetFieldArrayInt(SmartCurrentTarget, _Node, 'am', I) = 2) then
begin
Result := True;
Break;
end;
SmartFreeObject(SmartCurrentTarget, _Node);
end;

Xenobitz

2014-04-02 15:36:27

From: Frement

NPC is poisoned.
Succesfully freed SMART[412212]
Successfully executed.

function R_IsNPCPoisoned(Index: Integer): Boolean;
var
_Node, _HitTypeCount, I: Integer;
begin
_Node := SmartGetFieldArrayObject(SmartCurrentTarget, 0, client_npcs, Index);
_HitTypeCount := SmartGetFieldArraySize(SmartCurrentTarget, _Node, 'am', 0);
if (_HitTypeCount > 0) then
for I := 0 to _HitTypeCount - 1 do
if (SmartGetFieldArrayInt(SmartCurrentTarget, _Node, 'am', I) = 2) then
begin
Result := True;
Exit;
end;
SmartFreeObject(SmartCurrentTarget, _Node);
end;


You are amazing.

One more question:

I need to pick-lock a door and it fails several times before letting me through.

I plan to modify R_OpenDoor so that it "picks" it, and just run that in a loop until R_OnTile() returns the tile on the other side of the door. Is this a good way to determine if I successfully got through?

Frement

2014-04-02 15:44:11

From: Xenobitz
You are amazing.

One more question:

I need to pick-lock a door and it fails several times before letting me through.

I plan to modify R_OpenDoor so that it "picks" it, and just run that in a loop until R_OnTile() returns the tile on the other side of the door. Is this a good way to determine if I successfully got through?


Yes, I use a similar method for agility.

Xenobitz

2014-04-02 16:26:16

From: Frement
Yes, I use a similar method for agility.


Thanks for the help mate

Pakyakkistan

2014-04-02 18:25:21

From: Xenobitz
You are amazing.

One more question:

I need to pick-lock a door and it fails several times before letting me through.

I plan to modify R_OpenDoor so that it "picks" it, and just run that in a loop until R_OnTile() returns the tile on the other side of the door. Is this a good way to determine if I successfully got through?


After each LockPicking attempt, you could iterate yourself through the tile checking. Anything that checks your tile position in relation to your previous tile position should work fine.
Even something like this:

OutsideDoorTile := R_GetTileGlobal;
PickLock;
if R_GetTileGlobal = OutsideDoorTile then
PickLock;
if R_GetTileGlobal = InsideDoorTile then
DoNextStep;
Would work… Although something like:

While R_OnTile(OutsideDoorTile) do
Picklock;
Would probably work better