RenameMobile
Sends a rename request for the specified mobile to the server.
MobID — serial (ID) of the mobile to rename.
NewName — the new name to assign.
Renaming is only possible for mobiles that the server allows renaming (typically pets owned by the player). The server will silently reject the request if the mobile cannot be renamed. Use MobileCanBeRenamed to check beforehand.
Does nothing if the character is not connected.
Отправляет серверу запрос на переименование указанного мобайла.
MobID — serial (ID) мобайла для переименования.
NewName — новое имя.
Переименование возможно только для мобайлов, для которых сервер разрешает переименование (обычно — собственные питомцы игрока). Сервер молча отклонит запрос, если мобайл не может быть переименован. Используйте MobileCanBeRenamed для предварительной проверки.
Не выполняет действий, если персонаж не подключён.
procedure RenameMobile(MobID: Cardinal; NewName: String);
def RenameMobile(MobID: int, NewName: str) -> None: ...
begin
if MobileCanBeRenamed(FindItem) then
begin
RenameMobile(FindItem, 'MyPet');
AddToSystemJournal('Renamed mobile to MyPet');
end
else
AddToSystemJournal('Cannot rename this mobile');
end.
if MobileCanBeRenamed(FindItem()):
RenameMobile(FindItem(), 'MyPet')
AddToSystemJournal('Renamed mobile to MyPet')
else:
AddToSystemJournal('Cannot rename this mobile')