SRL Archive - SRL Old School RuneScape

Objects in Reflection (PascalScript)


kingarabian

2015-01-14 14:37:46

Do they work? If so, how to use? I'm trying to interact with ground decorations, but they never work.

ineedbot

2015-01-14 14:41:22

ground decorations arnt really interactable, they are only used for reference tiles i guess. usually the intractable objects are ObjGame and ObjBoundery for doors.

Kyle

2015-01-14 14:43:54

From: kingarabian
Do they work? If so, how to use? I'm trying to interact with ground decorations, but they never work.


Well ground decorations aren't "interactable." They do not contain any options for them. If a object contains the "Examine" option then it is considered an "Interactable" object. There are some exceptions, but this holds true most of the time. In the lape include objGame = Interactable.

E: Ninja'd..

kingarabian

2015-01-14 15:52:03

Oh okay, thanks. So like a rock crab in its rock state would be considered as…?

rj

2015-01-14 15:55:45

From: kingarabian
Oh okay, thanks. So like a rock crab in its rock state would be considered as…?


still a npc i'm guessing because fishing spots and hunter traps are also NPCs

kingarabian

2015-01-14 16:32:57

Debugging objects through SMART gives rock crabs on their rock state an ID of 103 or 2993.

Debugging NPCs, only crabs that are active are given an ID.

rj

2015-01-14 16:45:08

From: kingarabian
Debugging objects through SMART gives rock crabs on their rock state an ID of 103 or 2993.

Debugging NPCs, only crabs that are active are given an ID.


hmm either way you could attack the rock crab by interacting with the tile

kingarabian

2015-01-14 17:48:50

From: Robert
hmm either way you could attack the rock crab by interacting with the tile


If the Crab is in its rock form, it could be on any random tile. They can turn into crabs and turn back into rocks and sit somewhere random. I just need to figure out how to detect those rocks.

kingarabian

2015-01-14 17:51:22


rj

2015-01-14 18:06:05

From: kingarabian
If the Crab is in its rock form, it could be on any random tile. They can turn into crabs and turn back into rocks and sit somewhere random. I just need to figure out how to detect those rocks.


How do you 'wake' rock crabs up?

kingarabian

2015-01-14 18:23:40

From: Robert
How do you 'wake' rock crabs up?

You would need to right click and walk over or next to the rock.

rj

2015-01-14 18:29:51

From: kingarabian
You would need to right click and walk over or next to the rock.


Then you can get the tile that it is at and walk there, and then attack the closest crab.

levunit

2015-01-14 18:31:37

A good technique for killing rock crabs would be to interact with the tile the unawoken ones are one(walk to it), then just let auto retaliate do the rest. Make sure you check that youre in combat though ^^

kingarabian

2015-01-14 19:51:27

From: Robert
Then you can get the tile that it is at and walk there, and then attack the closest crab.


That's the problem I'm facing, getting the Rocks - finding the rocks. Color works but it's really iffy and unreliable because the Rock Crabs share the same exact colors as their surroundings(floor, other mini rocks in the area, hob goblins). Color works for about 2-3 hours until the colors change and the script starts to search every single thing.

kingarabian

2015-01-14 19:54:40

Reflection has no problem finding the Rock Crabs in their NPC form.

Kyle

2015-01-14 21:42:46

From: kingarabian
Reflection has no problem finding the Rock Crabs in their NPC form.


I'm confused what your problem is? Via the debugger it doesn't seem like you have a problem finding them in rock form either?

kingarabian

2015-01-14 22:16:11

From: elfyyy
I'm confused what your problem is? Via the debugger it doesn't seem like you have a problem finding them in rock form either?


procedure FindRockObject;
var

RockObject : TRSObject;
begin
if R_FindObjectDistance(RockObject, 2991 ,OBJ_FLOORDECORATION, 8) then
begin
writeln('Found RockObject');
end else
writeln('Nothing Found');

end;

Doesn't work. Tried everything.

Like it doesn't find the object :/. Am I doing something wrong? lol

Brandon

2015-01-14 22:23:34

From: kingarabian
Doesn't work. Tried everything.



Name: "Rocks".. Those are RockCrabs.


var
I: Integer;
AllNpcs: TReflectNpcArray;
begin
InitAL;
SetupReflection;
ClearDebug;
AllNPcs.GetAll;

for I := 0 To High(AllNPCs) Do
begin
writeln(AllNPCs[I].Name, ' ', AllNPCs[I].ID, ' ', AllNPCs[I].ModelID, ' ', AllNPCs[I].Tile);
writeln();
writeln();
end;
end;


Larry 828 361616692 {X = 2707, Y = 3734}


Olaf Hradson 4488 361616684 {X = 2724, Y = 3729}


Rock Crab 102 361616676 {X = 2700, Y = 3728}


Rock Crab 100 361616668 {X = 2716, Y = 3721}


Rock Crab 102 361616660 {X = 2711, Y = 3715}


Rock Crab 100 361616652 {X = 2701, Y = 3720}


Rocks 101 361616644 {X = 2704, Y = 3727}


Rocks 103 361616636 {X = 2719, Y = 3719}


Rocks 103 361616628 {X = 2712, Y = 3725}


Rock Crab 102 361616620 {X = 2711, Y = 3715}


Rocks 103 361620900 {X = 2719, Y = 3719}

kingarabian

2015-01-14 22:29:18

From: Brandon
Name: "Rocks".. Those are RockCrabs.


var
I: Integer;
AllNpcs: TReflectNpcArray;
begin
InitAL;
SetupReflection;
ClearDebug;
AllNPcs.GetAll;

for I := 0 To High(AllNPCs) Do
begin
writeln(AllNPCs[I].Name, ' ', AllNPCs[I].ID, ' ', AllNPCs[I].ModelID, ' ', AllNPCs[I].Tile);
writeln();
writeln();
end;
end;


Larry 828 361616692 {X = 2707, Y = 3734}


Olaf Hradson 4488 361616684 {X = 2724, Y = 3729}


Rock Crab 102 361616676 {X = 2700, Y = 3728}


Rock Crab 100 361616668 {X = 2716, Y = 3721}


Rock Crab 102 361616660 {X = 2711, Y = 3715}


Rock Crab 100 361616652 {X = 2701, Y = 3720}


Rocks 101 361616644 {X = 2704, Y = 3727}


Rocks 103 361616636 {X = 2719, Y = 3719}


Rocks 103 361616628 {X = 2712, Y = 3725}


Rock Crab 102 361616620 {X = 2711, Y = 3715}


Rocks 103 361620900 {X = 2719, Y = 3719}


Thanks Brandon. Let me test!

kingarabian

2015-01-14 22:42:24

Thanks