PDA

View Full Version : Objects in Reflection (PascalScript)



kingarabian
01-14-2015, 07:37 PM
Do they work? If so, how to use? I'm trying to interact with ground decorations, but they never work.

ineedbot
01-14-2015, 07:41 PM
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
01-14-2015, 07:43 PM
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
01-14-2015, 08:52 PM
Oh okay, thanks. So like a rock crab in its rock state would be considered as...?

rj
01-14-2015, 08:55 PM
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
01-14-2015, 09:32 PM
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
01-14-2015, 09:45 PM
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
01-14-2015, 10:48 PM
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
01-14-2015, 10:51 PM
http://i.imgur.com/sOW8YlJ.png

rj
01-14-2015, 11:06 PM
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
01-14-2015, 11:23 PM
How do you 'wake' rock crabs up?
You would need to right click and walk over or next to the rock.

rj
01-14-2015, 11:29 PM
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
01-14-2015, 11:31 PM
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
01-15-2015, 12:51 AM
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
01-15-2015, 12:54 AM
Reflection has no problem finding the Rock Crabs in their NPC form.

Kyle
01-15-2015, 02:42 AM
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
01-15-2015, 03:16 AM
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
01-15-2015, 03:23 AM
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
01-15-2015, 03:29 AM
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
01-15-2015, 03:42 AM
Thanks