SRL Archive - Reflection Help

Object Finding Problems


Bad Boy JH

2010-05-29 23:14:14

is there something wrong with Objects.simba, or am I trying to use it wrong, since Dairy Cows are technically objects, not NPCs, I assume that I need to use Objects to find them Not Characters. BUT when I tried that, it wouldn't find them. Nor will it find any other objects. Which I found out with this script
{$i srl/srl/reflection/Reflection.simba}

const
SmartWorld = 15; // Which World/Server do you want to use?
SmartMembers = False; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = False; // Use Super Detail?

var
I:Integer;
Objects:TRSObjectArray;

begin
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupReflection;
Objects := GetAllObjects(Interactable);
For I := 0 to High(Objects) do
begin
if (Objects[i].ID > -1) and (Objects[i].ID <> 65535) then
begin
Writeln('Object Id is: ' + IntToStr(Objects[i].ID));
Writeln('Object Type is: ' + IntToStr(Objects[i].objType));
Writeln('Tile: '+ ToStr(Objects[i].Tile));
end;
end;
end.

btw are there simba tags yet?

Everything was returning -1 (which was at tile, (-1, -1)) or 65535 (which is FFFF in Hexidecimal, see the Object.simba for why thats important). Is that something I am doing wrong, or something wrong with Objects.simba?

on a side not, I just cracked 10M gp on my main….W00t…green looks so cool!

cohen

2010-05-29 23:19:04

Objects are like Trees, the grass on the ground etc.
Dairy cows would be Npc's. (You can use RSBot or any other bot to debug the npc to get their ids).

Bad Boy JH

2010-05-29 23:49:52

if u mosue over any NPC, such as cows, Men, etc, it gives yellow text, as does Fishing spots, (which comes up when I run a simmilar thing)

GetAllNPCs(Variable);
DumpNPCS(Variable);
Dairy Cows have blue text, similar to trees and other things..Dairy cows do NOT show up in the procedure above.

lordsaturn

2010-05-29 23:57:07

Perhaps they are of objType 'FloorDecor' rather than 'Interactable'
try this

{$i srl/srl/reflection/Reflection.simba}

const
SmartWorld = 15; // Which World/Server do you want to use?
SmartMembers = False; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = False; // Use Super Detail?

var
I, j:Integer;
Objects:TRSObjectArray;

begin
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupReflection;
for j := 0 to 3 do
begin
Objects := GetAllObjects(j);
For I := 0 to High(Objects) do
begin
if (Objects[i].ID > -1) and (Objects[i].ID <> 65535) then
begin
Writeln('Object Id is: ' + IntToStr(Objects[i].ID));
Writeln('Object Type is: ' + IntToStr(Objects[i].objType));
Writeln('Tile: '+ ToStr(Objects[i].Tile));
end;
end;
end;
end.

cohen

2010-05-30 00:04:11

Yeah sorry, I just debugged it using Homonculus (A bot i'm developing) and found out that it is an InteractableObject. If this helps you at all, its id is 8689 (or 8986, one of them two :P).
If that still isnt working, drags probably did something wrong again with the Reflecting the groundobjects, and if he did i'll help him fix it

Bad Boy JH

2010-05-30 00:31:05

I used:

If GetObjectsIdEx(Objects, [8689, 8986], Interactable, 10) then
begin
Writeln('Found Objects');
For I := 0 to High(Objects) do
begin
if (Objects[i].ID > -1) and (Objects[i].ID <> 65535) then
begin
Writeln('Object Id is: ' + IntToStr(Objects[i].ID));
Writeln('Object Type is: ' + IntToStr(Objects[i].objType));
Writeln('Tile: '+ ToStr(Objects[i].Tile));
end;
end;
end;
It Didn't say it found any objects, so I think it may lie with the objects.simba

Drakan

2010-05-30 08:33:01

is your reflection folder completely updated? Are you within 10 tiles of the cows? I'll test this function too.

Bad Boy JH

2010-05-30 08:48:22

I was testing when standing next to them…

Drakan

2010-05-30 08:54:31

What revision is your folder at?

Bad Boy JH

2010-05-30 08:55:50

both the most recent, Simba is most recent.

Drakan

2010-05-30 09:13:23

Can you pastebin your objects.simba to me?

Ok, So i took a look at it, and 65535 is the unsigned -1. For some reason, it does not pick up the dairy cows even though they are indeed objects. It does however, pick up all of the other interactables, so that isnt a problem. I would recommend just using TileToMS and using their tiles.