2019-06-19 01:10:15 -04:00
|
|
|
require("global");
|
|
|
|
|
|
|
|
properties = {
|
|
|
|
permissions = 0,
|
|
|
|
parameters = "s",
|
|
|
|
description =
|
|
|
|
[[
|
|
|
|
Changes appearance for equipment with given parameters.
|
|
|
|
!graphic <slot> <wID> <eID> <vID> <vID>
|
|
|
|
]],
|
|
|
|
}
|
|
|
|
|
2022-02-13 18:48:22 -05:00
|
|
|
function onTrigger(player, argc, actorClassId)
|
2019-06-19 01:10:15 -04:00
|
|
|
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
|
|
|
local sender = "[setappearance] ";
|
|
|
|
|
2022-02-13 18:48:22 -05:00
|
|
|
local actorClassId = tonumber(actorClassId) or 0;
|
|
|
|
player:SendMessage(messageID, sender, string.format("appearance %u", actorClassId));
|
2019-06-19 01:10:15 -04:00
|
|
|
|
2022-02-13 18:48:22 -05:00
|
|
|
local actor = player.CurrentArea:FindActorInArea(player.currentTarget);
|
|
|
|
|
|
|
|
if actor then
|
|
|
|
actor:ChangeNpcAppearance(actorClassId);
|
|
|
|
player:SendMessage(messageID, sender, string.format("appearance %u", actorClassId));
|
2022-02-13 18:57:08 -05:00
|
|
|
end
|
|
|
|
end
|