Weakness trigger GM Command
Posted: Sun Nov 15, 2015 5:29 pm
I am trying to make a command to trigger the weakness packet. I had it working awhile back but forgot how I set it up.
Using the commands I found in mobutils.cpp and lua_baseentity.cpp I tried to setup a simple yellow trigger script like so:
but I cannot seem to get it working, does anybody see what I'm doing wrong?
Using the commands I found in mobutils.cpp and lua_baseentity.cpp I tried to setup a simple yellow trigger script like so:
Code: Select all
cmdprops =
{
permission = 1,
parameters = "s"
};
function onTrigger(player, WeaknessType)
local targ = player:getTargetID();
if (targ ~= nil) then
targ:WeaknessTrigger( yellow );
else
player:PrintToPlayer("You must select a valid target first.");
end
end;