Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
55
_module/nss/inn2_hb.nss
Normal file
55
_module/nss/inn2_hb.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
void main()
|
||||
{
|
||||
int iHB;
|
||||
int iHB2;
|
||||
int iHeartbeatCheck;
|
||||
object oWaitress;
|
||||
object oWP;
|
||||
string sTable;
|
||||
string sSpeak;
|
||||
int iRandom;
|
||||
int iTable;
|
||||
|
||||
iHB = GetLocalInt(OBJECT_SELF,"Heartbeat");
|
||||
iHB++;
|
||||
SetLocalInt(OBJECT_SELF,"Heartbeat",iHB);
|
||||
|
||||
if (iHB % 2 == 1)
|
||||
{
|
||||
iHB2 = GetLocalInt(OBJECT_SELF,"Heartbeat2");
|
||||
iHB2++;
|
||||
SetLocalInt(OBJECT_SELF,"Heartbeat2",iHB2);
|
||||
|
||||
iHeartbeatCheck = iHB2 % 5;
|
||||
|
||||
oWaitress = GetObjectByTag("inn2_waitress");
|
||||
iTable = iHeartbeatCheck + 1;
|
||||
sTable = "inn2_table" + IntToString(iTable);
|
||||
|
||||
sSpeak = "What can I get ya?";
|
||||
iRandom = Random(6)+1;
|
||||
switch (iRandom)
|
||||
{
|
||||
case 1: sSpeak = "What can I get ya?"; break;
|
||||
case 2: sSpeak = "How ya doing?"; break;
|
||||
case 3: sSpeak = "Can I get ya something?"; break;
|
||||
case 4: sSpeak = "What'll ya have?"; break;
|
||||
case 5: sSpeak = "Need a refill?"; break;
|
||||
case 6: sSpeak = "How's that ale?"; break;
|
||||
}
|
||||
|
||||
if (iTable >3)
|
||||
sTable = "inn2_kitchen";
|
||||
|
||||
oWP = GetObjectByTag(sTable);
|
||||
|
||||
if (iTable < 4)
|
||||
{
|
||||
DelayCommand(0.5f,AssignCommand(oWaitress,ActionForceMoveToObject(oWP)));
|
||||
DelayCommand(5.0f,AssignCommand(oWaitress,ActionSpeakString(sSpeak)));
|
||||
} else {
|
||||
if (iTable == 4)
|
||||
DelayCommand(0.5f,AssignCommand(oWaitress,ActionForceMoveToObject(oWP)));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user