Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetNextStepZ

Calculates the expected Z level for the next step from (CurrX, CurrY) towards (DestX, DestY) in world WorldNum, starting from CurrZ.

Returns 0 if the character is disconnected or UO data files are not loaded.

Вычисляет ожидаемый уровень Z для следующего шага из (CurrX, CurrY) в направлении (DestX, DestY) в мире WorldNum, начиная с CurrZ.

Возвращает 0, если персонаж не подключён или файлы UO Data не загружены.

Pascal

function GetNextStepZ(CurrX: Word; CurrY: Word; DestX: Word; DestY: Word;
  WorldNum: Byte; CurrZ: ShortInt): ShortInt;

Python

def GetNextStepZ(CurrX: int, CurrY: int, DestX: int, DestY: int,
                 WorldNum: int, CurrZ: int) -> int: ...

Pascal Example

var
  NextZ: ShortInt;
begin
  NextZ := GetNextStepZ(SelfX, SelfY, SelfX + 1, SelfY, WorldNum, SelfZ);
  AddToSystemJournal('Next step Z: ' + IntToStr(NextZ));
end.

Python Example

next_z = GetNextStepZ(SelfX(), SelfY(), SelfX() + 1, SelfY(), WorldNum(), SelfZ())
AddToSystemJournal(f'Next step Z: {next_z}')

See Also

Step, IsWorldCellPassable