2016-08-11 20:02:01 -04:00
|
|
|
require("global");
|
|
|
|
|
2016-06-16 01:50:13 +01:00
|
|
|
properties = {
|
|
|
|
permissions = 0,
|
|
|
|
parameters = "sssss",
|
2016-08-11 20:02:01 -04:00
|
|
|
description =
|
|
|
|
[[
|
|
|
|
Changes appearance for equipment with given parameters.
|
|
|
|
!graphic <slot> <wID> <eID> <vID> <vID>
|
|
|
|
]],
|
2016-06-16 01:50:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function onTrigger(player, argc, slot, wId, eId, vId, cId)
|
2016-08-11 20:02:01 -04:00
|
|
|
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
|
|
|
local sender = "[graphic] ";
|
|
|
|
|
2016-06-16 01:50:13 +01:00
|
|
|
slot = tonumber(slot) or 0;
|
|
|
|
wId = tonumber(wId) or 0;
|
|
|
|
eId = tonumber(eId) or 0;
|
|
|
|
vId = tonumber(vId) or 0;
|
|
|
|
cId = tonumber(cId) or 0;
|
|
|
|
|
2016-08-11 20:02:01 -04:00
|
|
|
if player and argc > 0 then
|
2018-02-15 13:20:46 -06:00
|
|
|
if argc > 2 then
|
|
|
|
player:GraphicChange(slot, wId, eId, vId, cId);
|
|
|
|
player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
|
|
|
|
else
|
|
|
|
player:GraphicChange(slot, wId);
|
|
|
|
end
|
2016-06-16 01:50:13 +01:00
|
|
|
player:SendAppearance();
|
2016-08-11 20:02:01 -04:00
|
|
|
else
|
|
|
|
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
|
2016-06-16 01:50:13 +01:00
|
|
|
end;
|
|
|
|
end;
|