RequestStats
Sends a status request packet to the server for the specified mobile.
ObjID — serial (ID) of the mobile whose stats are requested.
This is used to force the server to send updated status information (HP, Mana, Stamina, Str, Dex, Int, etc.) for a mobile. After the server responds, methods like GetHP, GetStr, GetDex, GetInt will return the updated values.
Note that GetHP automatically sends a stats request if it detects zero HP/MaxHP on a living mobile, so explicit calls to RequestStats are mainly needed when you want to ensure fresh data for other stats or for mobiles whose HP is already known.
Does nothing if the character is not connected.
Отправляет серверу пакет запроса статуса для указанного мобайла.
ObjID — serial (ID) мобайла, для которого запрашивается статус.
Используется для принудительного получения обновлённой информации о статусе (HP, Mana, Stamina, Str, Dex, Int и т.д.) мобайла. После ответа сервера методы GetHP, GetStr, GetDex, GetInt вернут обновлённые значения.
Обратите внимание, что GetHP автоматически отправляет запрос статуса, если обнаруживает нулевые HP/MaxHP у живого мобайла, поэтому явные вызовы RequestStats в основном нужны для получения свежих данных других статов или для мобайлов, у которых HP уже известны.
Не выполняет действий, если персонаж не подключён.
procedure RequestStats(ObjID: Cardinal);
def RequestStats(ObjID: int) -> None: ...
begin
RequestStats(Self);
Wait(500);
AddToSystemJournal('STR: ' + IntToStr(Str));
AddToSystemJournal('DEX: ' + IntToStr(Dex));
AddToSystemJournal('INT: ' + IntToStr(Int));
AddToSystemJournal('HP: ' + IntToStr(HP) + '/' + IntToStr(MaxHP));
end.
RequestStats(Self())
Wait(500)
AddToSystemJournal(f'STR: {Str()}')
AddToSystemJournal(f'DEX: {Dex()}')
AddToSystemJournal(f'INT: {Int()}')
AddToSystemJournal(f'HP: {HP()}/{MaxHP()}')