NPC Code:
function onActionServerside(command, arg) {
switch(params[0]) {
case "stats":
// player.chat = "boo";
switch (params[1]) {
case "hurt":
dmg = params[2];
hp = clientr.health[0];
clientr.health[0] = hp - dmg;
break;
}
break;
}
}
The script only works when the player.chat command is uncommented.
Anyway to fix this / is their a different way for triggeractions in GS2?