Initial upload
Initial upload.
This commit is contained in:
30
_module/nss/cheers.nss
Normal file
30
_module/nss/cheers.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
// 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("KILL HIM!");
|
||||
ActionWait(20.0);
|
||||
ActionSpeakString("OOOHHHH Thats gonna leave a mark hahahaa!");
|
||||
ActionWait(25.0);
|
||||
ActionDoCommand(
|
||||
SetLocalInt(OBJECT_SELF, "onUserDef_ALREADY_RUNNING", FALSE)
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user