235 lines
7.9 KiB
Plaintext
235 lines
7.9 KiB
Plaintext
#include "NW_I0_GENERIC"
|
|
|
|
|
|
|
|
void NPCspeak(object oSelf)
|
|
{
|
|
int iDice;
|
|
int iVoice;
|
|
iDice = d6();
|
|
switch (iDice)
|
|
{
|
|
case 1: iVoice = VOICE_CHAT_ATTACK;break;
|
|
case 2: iVoice = VOICE_CHAT_BATTLECRY1;break;
|
|
case 3: iVoice = VOICE_CHAT_BATTLECRY2;break;
|
|
case 4: iVoice = VOICE_CHAT_BATTLECRY3;break;
|
|
case 5: iVoice = VOICE_CHAT_THREATEN;break;
|
|
case 6: iVoice = VOICE_CHAT_ATTACK;break;
|
|
}
|
|
AssignCommand(oSelf, PlayVoiceChat(iVoice));
|
|
}
|
|
|
|
|
|
|
|
void TeamSpeak()
|
|
{
|
|
object oTeam2;
|
|
float oDelay;
|
|
|
|
oTeam2 = GetFirstFactionMember(OBJECT_SELF, FALSE);
|
|
while (GetIsObjectValid(oTeam2))
|
|
{
|
|
oDelay = IntToFloat(d3()+1);
|
|
DelayCommand(oDelay, NPCspeak(oTeam2));
|
|
oTeam2 = GetNextFactionMember(OBJECT_SELF, FALSE);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void SetFacingObject(object oTarget)
|
|
{
|
|
vector vFace=GetPosition(oTarget);
|
|
SetFacingPoint(vFace);
|
|
}
|
|
|
|
|
|
|
|
void AttackPlayer(object oPC)
|
|
{
|
|
object oTeam;
|
|
object oMod = GetModule();
|
|
SetLocalInt(oMod, "turn_flag", 1);
|
|
|
|
oTeam = GetFirstFactionMember(OBJECT_SELF, FALSE);
|
|
while (GetIsObjectValid(oTeam))
|
|
{
|
|
if (!GetIsDead(oTeam))
|
|
{
|
|
//ClearAllActions();
|
|
//AdjustReputation(oPC, oTeam, -100);
|
|
SetIsTemporaryEnemy(oPC, oTeam);
|
|
DetermineCombatRound(oPC);
|
|
ActionAttack(oPC);
|
|
}
|
|
oTeam = GetNextFactionMember(OBJECT_SELF, FALSE);
|
|
}
|
|
}
|
|
|
|
void AllFacePC(object oPC)
|
|
{
|
|
object oTeam2;
|
|
|
|
oTeam2 = GetFirstFactionMember(OBJECT_SELF, FALSE);
|
|
while (GetIsObjectValid(oTeam2))
|
|
{
|
|
|
|
AssignCommand(oTeam2, SetFacingObject(oPC));
|
|
oTeam2 = GetNextFactionMember(OBJECT_SELF, FALSE);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void PercieveDark(object oPC)
|
|
{
|
|
|
|
object oMod = GetModule();
|
|
object oTeam2;
|
|
int iDice;
|
|
int iDice2;
|
|
int iRate;
|
|
int iStatus;
|
|
int iTCount=0;
|
|
|
|
float oDelay1 = 0.2; // First Animation after first line
|
|
float oDelay2 = 4.0; // PC reaction speach
|
|
float oDelay3 = 10.0; // NPC Attack cry speech
|
|
float oDelay4 = 12.0; // All NPCs face PC
|
|
float oDelay5 = 14.0; // Team war cries
|
|
float oDelay6 = 18.0; // Team attacks
|
|
|
|
int iModCount;
|
|
int iFireFlag;
|
|
object oPC2 = GetFirstPC();
|
|
iRate = GetLocalInt(oPC, "pc_HWswing");
|
|
iStatus = GetLocalInt(oMod, "war_won");
|
|
|
|
//FloatingTextStringOnCreature(GetName(oPC), oPC);
|
|
//FloatingTextStringOnCreature(IntToString(iStatus), oPC);
|
|
//FloatingTextStringOnCreature(IntToString(iRate), oPC);
|
|
|
|
|
|
// Set flag to indicate that allies have turned on the PC
|
|
|
|
SetLocalInt(oMod, "turn_flag", 1);
|
|
|
|
|
|
oTeam2 = GetFirstFactionMember(OBJECT_SELF, FALSE);
|
|
while (GetIsObjectValid(oTeam2))
|
|
{
|
|
if (!GetIsDead(oTeam2))
|
|
{
|
|
++iTCount;
|
|
}
|
|
oTeam2 = GetNextFactionMember(OBJECT_SELF, FALSE);
|
|
}
|
|
|
|
iDice = d8();
|
|
switch (iDice)
|
|
{
|
|
case 1: {SpeakString("What treason is this? You join us but you don't fight!!!");}break;
|
|
case 2: {SpeakString("Didn't want to get your hands dirty eh?...You must be punished for your poor effort!");}break;
|
|
case 3: {SpeakString("Pfft! Call yourself a warrior!!! You just stood there and watched!");}break;
|
|
case 4: {SpeakString("Join those holy fools next time! Don't waste our time!!");}break;
|
|
case 5: {SpeakString("You must be punished for your complacency!");}break;
|
|
case 6: {SpeakString("Death comes to ye who is idle!!...and YOU were idle for most of the battle!");}break;
|
|
case 7: {SpeakString("You must pay for your treachery!");}break;
|
|
case 8: {SpeakString("Idle hands are his work *motions at Lord Lucifer* You must be punished in any case!!!");}break;
|
|
}
|
|
if ((GetResRef(OBJECT_SELF)=="death")|| (GetResRef(OBJECT_SELF)=="bard2")||
|
|
(GetResRef(OBJECT_SELF)=="darcher"))
|
|
{
|
|
DelayCommand(oDelay1, AssignCommand(OBJECT_SELF, ActionPlayAnimation
|
|
(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0f, 5.0f)));
|
|
}
|
|
else
|
|
{
|
|
DelayCommand(oDelay1, AssignCommand(OBJECT_SELF, ActionPlayAnimation
|
|
(ANIMATION_FIREFORGET_TAUNT)));
|
|
}
|
|
|
|
|
|
iDice = d8();
|
|
switch (iDice)
|
|
{
|
|
case 1: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("But...but...but...!")));}break;
|
|
case 2: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("Oh shit!!")));}break;
|
|
case 3: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("Oh crap!!!")));}break;
|
|
case 4: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("Give me a chance...I'll...I'll...!")));}break;
|
|
case 5: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("But...but...but...!")));}break;
|
|
case 6: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("um......Oops? *wry smile*")));}break;
|
|
case 7: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("ha ha ha...nice one guys...........guys?.....?")));}break;
|
|
case 8: {DelayCommand(oDelay2, AssignCommand(oPC, ActionSpeakString("Does this mean dinner's off?")));}break;
|
|
}
|
|
DelayCommand(18.0, AssignCommand(oPC, ClearAllActions()));
|
|
DelayCommand(18.5, AssignCommand(oPC, ActionPlayAnimation
|
|
(ANIMATION_LOOPING_TALK_PLEADING, 1.0f, 5.0f)));
|
|
|
|
if (iTCount>1)
|
|
{
|
|
iDice = d10();
|
|
switch (iDice)
|
|
{
|
|
case 1: {DelayCommand(oDelay3, SpeakString("Attaaaaack the traitor!"));
|
|
;}break;
|
|
case 2: {DelayCommand(oDelay3, SpeakString("Kill the traitor!"));
|
|
;}break;
|
|
case 3: {DelayCommand(oDelay3, SpeakString("Death to the betrayer!"));
|
|
;}break;
|
|
case 4: {DelayCommand(oDelay3, SpeakString("Make the betrayer paaaaay!"));
|
|
;}break;
|
|
case 5: {DelayCommand(oDelay3, SpeakString("Grrrrrraaahhhhh!!!!!!!!!"));
|
|
;}break;
|
|
case 6: {DelayCommand(oDelay3, SpeakString("Kiiiiiiilllllllll!!"));
|
|
;}break;
|
|
case 7: {DelayCommand(oDelay3, SpeakString("Off with the betrayor's head!"));
|
|
;}break;
|
|
case 8: {DelayCommand(oDelay3, SpeakString("Make the traitor pay in blood!"));
|
|
;}break;
|
|
case 9: {DelayCommand(oDelay3, SpeakString("Don't let the traitor escape!"));
|
|
;}break;
|
|
case 10: {DelayCommand(oDelay3, SpeakString("Deeeeeath to the traitorrrr!!!"));
|
|
;}break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
iDice = d10();
|
|
switch (iDice)
|
|
{
|
|
case 1: {DelayCommand(oDelay3, SpeakString("Attaaaaack!"));
|
|
;}break;
|
|
case 2: {DelayCommand(oDelay3, SpeakString("Time to diiiie!"));
|
|
;}break;
|
|
case 3: {DelayCommand(oDelay3, SpeakString("Death to yoooou!"));
|
|
;}break;
|
|
case 4: {DelayCommand(oDelay3, SpeakString("You will pay for your complacency!"));
|
|
;}break;
|
|
case 5: {DelayCommand(oDelay3, SpeakString("Grrrrrraaahhhhh!!!!!!!!!"));
|
|
;}break;
|
|
case 6: {DelayCommand(oDelay3, SpeakString("I'm gonna enjoy killing kill you!!!!!!"));
|
|
;}break;
|
|
case 7: {DelayCommand(oDelay3, SpeakString("Off with your head!"));
|
|
;}break;
|
|
case 8: {DelayCommand(oDelay3, SpeakString("This will cost you your life!"));
|
|
;}break;
|
|
case 9: {DelayCommand(oDelay3, SpeakString("You may have escaped the battle, but you will not escape me!!!"));
|
|
;}break;
|
|
case 10: {DelayCommand(oDelay3, SpeakString("Deeeeeath for yoooou!!!"));
|
|
;}break;
|
|
}
|
|
}
|
|
|
|
DelayCommand(oDelay4, AllFacePC(oPC));
|
|
DelayCommand(oDelay5, TeamSpeak());
|
|
DelayCommand(oDelay6, AttackPlayer(oPC));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
//void main() {}
|
|
|