GetMobile
Returns detailed data about the mobile with ID as a TMobileData record.
Возвращает детальные данные о мобайле с ID в виде записи TMobileData.
function GetMobile(ID: Cardinal): TMobileData;
Type definition:
TMobileData = packed record
serial: Cardinal;
graphic: Word;
color: Word;
x: Word;
y: Word;
z: ShortInt;
direction: Byte;
world: Byte;
flags: Byte;
notoriety: Byte;
hp: Integer;
hp_max: Integer;
sp: Integer; // stamina
sp_max: Integer;
mp: Integer; // mana
mp_max: Integer;
end;
def GetMobile(MobID: int) -> MobileData: ...
var
Mob: TMobileData;
begin
Mob := GetMobile(Self);
AddToSystemJournal('HP: ' + IntToStr(Mob.hp) + '/' + IntToStr(Mob.hp_max));
end.
mob = GetMobile(Self())
AddToSystemJournal(f'HP: {mob.hp}/{mob.hp_max}')