SRL Archive - Devs' Corner

What's working, and what's not.


Naike

2010-10-03 17:14:17

These are all script-wise, not if we got the correct hooks.

Red: Not working
Green: Working
Yellow: Not tested yet

TNPC
  • Index
  • ID
  • Level
  • Animation
  • Height
  • HPRatio
  • Interacting
  • Orientation
  • Tile
  • Pixel
  • Name
  • Actions
  • Moving
  • Fighting


TMe
  • Tile
  • MS
  • Animation
  • Speed
  • LoginIndex(always return as 0)
  • Interacting
  • HPRatio
  • Height
  • Level/Combat? (we got two integers for the same thing? I suggest keeping Combat, instead of Level, as it's more clear)
  • TurnDirection
  • Name
  • InFight
  • Experience
  • Levels
  • Equipment(array returns nothing at all)
  • Orientation


will add on stuff as I go along..

Naike

2010-10-03 17:48:08

Scripts used to test

TNPC

program TNPCTest;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}

const

{---SMART Setup Constants---}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{---------------------------}

var
NPCs: TNPCArray;
I, II: Integer;

begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;

SetupSRL;
Repeat
NPCs := SortNPCs(GetNPCs);
Writeln('--NPCs--');
For I:=0 to 0 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(1000);

ClearDebug;
Until(False);
end.


TMe

program TNPCTest;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}

const

{---SMART Setup Constants---}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{---------------------------}

var
Me: TMe;
I: Integer;

begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;

SetupSRL;
Repeat
Me := GetMe
Writeln('--Me--');
Writeln('Name: ' + Me.Name + '(' + ToStr(Me.Tile.X) + ', ' + ToStr(Me.Tile.Y) + ') LoginIndex: ' + ToStr(Me.LoginIndex) + ' - Speed:' + ToStr(Me.Speed));
Writeln(' Orientation: ' + ToStr(Me.Orientation) + ' - Combat: ' + ToStr(Me.Level) + ' - Animation:' + ToStr(Me.Animation) + + ' - HPRatio:' + ToStr(Me.HPRatio));
Writeln(' TurnDirection:' + ToStr(Me.TurnDirection) + ' - InFight:' + ToStr(Me.InFight) + ' - Interacting:' + ToStr(Me.Interacting) + ' - Height:' + ToStr(Me.Height));
Writeln(' Levels/Exp:');
For I:=0 to High(Me.Levels) do
Writeln(' Ind[' + ToStr(I) + '] Level:' + ToStr(Me.Levels[I]) + ' Experience: ' + ToStr(Me.Experience[I]));

Writeln('');
Writeln(' Equipment:');
For I:=0 to High(Me.Equipment)do
Writeln(' Ind[' + ToStr(I) + '] ID: ' + ToStr(Me.Equipment[I]));

Wait(1000);
ClearDebug;
Until(False);
end.


will add on stuff as I go along..

JPHamlett

2010-10-03 18:26:18

The hook for loginindex must be wrong here's the one that works for me


'hm.h'

Naike

2010-10-03 18:55:00

From: J_Pizzle
The hook for loginindex must be wrong here's the one that works for me


'hm.h'


I use the same, but it always return 0?

Edit:
Wow, seems like we don't use LoginIndex in the GetMe function?
Smooth..

I'll keep it red so I know it needs to be fixed.