SRL Archive - OSR Help

Reflection ID's


doom0791

2011-01-21 19:27:16

Do the ID's of stationary objects change over time with the servers?

Last night I recorded a set of ID's for a script I'm working on, and then today roughly half of those ID's are different. It is possible that I made a mistake when recording, as I didnt write an efficient script for finding ID's until just now.

Heysus

2011-01-21 19:30:10

They don't change so most likely you made a mistake.

doom0791

2011-01-21 19:35:20

Awesome, thank you! That means I don't have to add functions to initially detect and set the ID's.

TomTuff

2011-01-21 19:56:23

You could just use a script that dumps the area's NPCs (see below) or use RSBot to get ID's so you know you're being 100% accurate.

NPC Dumper:
program new;
{$i SRL\SRL\Misc\Smart.scar}
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}

// The big epic debug procedure for finding all those NPC's around you
// By Naike
procedure DoNPC;
var
NPCs: TNPCArray;
I, II: integer;
begin
Repeat
NPCs := SortNPCs(GetNPCs);
Writeln('--NPCs--');
For I:=0 to high(GetNPCs) do
begin
Writeln('[' + ToStr(I) + ']Name: ' + NPCs[I].Name + '(' + ToStr(NPCs[I].Tile.X) + ', ' + ToStr(NPCs[I].Tile.Y) + ') ID: ' + ToStr(NPCs[I].ID) + ' - Index:' + ToStr(NPCs[I].Index));
Writeln(' Orientation: ' + ToStr(NPCs[I].Orientation) + ' - Level: ' + ToStr(NPCs[I].Level) + ' - Animation:' + ToStr(NPCs[I].Animation) + + ' - HPRatio:' + ToStr(NPCs[I].HPRatio));
Writeln(' Moving:' + ToStr(NPCs[I].Moving) + ' - InFight:' + ToStr(NPCs[I].Fighting) + ' - Interacting:' + ToStr(NPCs[I].Interacting) + ' - Height:' + ToStr(NPCs[I].Height));
Writeln(' Actions:');
For II:=0 to High(NPCs[I].Actions) do
Writeln(' ' + NPCs[I].Actions[II]);
end;
Wait(3000);

ClearDebug;
Until(False);
end;


begin
Smart_Members := false;
Smart_Server := 32;
Smart_Signed := true;

SetupSRL;
SetupReflectionEx(true);

DoNPC;
end.

doom0791

2011-01-21 20:47:29

Thank you, TomTuff! Very useful script. My compliments and thanks to Naike for writing it!

TomTuff

2011-01-21 22:00:30

Not a problem! CStrike's reflection tutorial has more like it.

This is offtopic, but confirm your e-mail change if you don't want to have the same color username as a banned user.