RemoveUserStatic
Removes a user-created static object by its ID from the local map data.
ID — identifier of the user static, as returned by AddUserStatic (Python: CreateUserStatic).
Returns True if the static was found and removed, False otherwise.
User statics are local additions to the map’s static tile data (added via AddUserStatic). They extend the UOData static cell information and affect map rendering and pathfinding locally.
Returns False if the character is not connected or UO data is not loaded.
Удаляет пользовательский статический объект по его идентификатору из локальных данных карты.
ID — идентификатор пользовательского статика, возвращённый AddUserStatic (Python: CreateUserStatic).
Возвращает True, если статик найден и удалён, False — в противном случае.
Пользовательские статики — это локальные дополнения к данным статических тайлов карты (добавляемые через AddUserStatic). Они расширяют информацию UOData о статических ячейках и влияют на отрисовку карты и поиск пути локально.
Возвращает False, если персонаж не подключён или данные UO не загружены.
function RemoveUserStatic(ID: Integer): Boolean;
def RemoveUserStatic(StaticID: int) -> bool: ...
var
SID: Integer;
Item: TStaticItem;
begin
Item.Tile := $0EED;
Item.Color := $0000;
Item.X := GetX(Self);
Item.Y := GetY(Self);
Item.Z := GetZ(Self);
SID := AddUserStatic(Item, WorldNum);
AddToSystemJournal('Created user static ID: ' + IntToStr(SID));
Wait(5000);
if RemoveUserStatic(SID) then
AddToSystemJournal('User static removed')
else
AddToSystemJournal('Failed to remove');
end.
sid = CreateUserStatic(0x0EED, 0x0000, GetX(Self()), GetY(Self()), GetZ(Self()), WorldNum())
AddToSystemJournal(f'Created user static ID: {sid}')
Wait(5000)
if RemoveUserStatic(sid):
AddToSystemJournal('User static removed')
else:
AddToSystemJournal('Failed to remove')