1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00
project-meteor-server/Data/scripts/commands/gm/setstate.lua
CuriousJorge 74713f3dd6 Misc GM command fixes + ChangeJobCommand.lua
Anim - Cleaned up some.  It had old code sitting in it for whatever reason despite not affecting anything.
Setstate, Warpplayer & Yolo - Fixed them up so they function again
ChangeJobCommand - Just the script filled out to handle the equipping/dequipping of job stones, but it can cause issues, particularly with how the server handles a 'job' vs. a class, along with checking against skill compatibility.
2022-03-13 20:35:29 -04:00

26 lines
No EOL
667 B
Lua

require("global");
properties = {
permissions = 0,
parameters = "s",
description =
[[
Changes appearance for equipment with given parameters.
!graphic <slot> <wID> <eID> <vID> <vID>
]],
}
function onTrigger(player, argc, state)
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
local sender = "[setstate] ";
local s = tonumber(state);
local actor = player.CurrentArea:FindActorInArea(player.currentTarget) or nil;
if player and actor then
actor:ChangeState(s);
wait(0.8);
player:SendMessage(0x20, "", "state: "..s);
else
player:SendMessage(0x20, "", "Error: No target selected.");
end;
end;