LoT_PRC8/_module/nss/cheers6.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

31 lines
836 B
Plaintext

// Script: sc_oldmanudef
// Function: Set the behaviour of the oldman NPC on heartbeat
// Author: Nathan Laing
// E-Mail: nazz@bigpond.com
void main()
{
int nCalledBy = (GetUserDefinedEventNumber());
int iIsAlreadyRunning = GetLocalInt(OBJECT_SELF, "onUserDef_ALREADY_RUNNING");
switch(nCalledBy)
{
case 1001: // Called by OnHeartbeat
if (!IsInConversation(OBJECT_SELF) && !iIsAlreadyRunning)
{
SetLocalInt(OBJECT_SELF, "onUserDef_ALREADY_RUNNING", TRUE);
ActionSpeakString("GET HIM DAD!");
ActionWait(32.0);
ActionSpeakString("IT'S OK IT WILL GROW BACK!");
ActionWait(55.0);
ActionDoCommand(
SetLocalInt(OBJECT_SELF, "onUserDef_ALREADY_RUNNING", FALSE)
);
}
break;
}
}