AOC_PRC8/_module/nss/npc_conv.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

240 lines
13 KiB
Plaintext

#include "onpercept_light"
void main()
{
object oPC = GetLastSpeaker();
object oMod = GetModule();
int iDice;
int iRate;
int iStatus;
int iChamp;
string sPossChamp;
float oDelay = 4.0;
float oDelay2 = 4.2;
int iModCount;
int iNPCduel, iNPCduel2;
int iConvSwitch;
int iJoin;
iRate = GetLocalInt(oPC, "pc_HWswing");
iStatus = GetLocalInt(oMod, "war_won");
iChamp = GetLocalInt(oPC, "champ_won");
iModCount = GetLocalInt(oMod, "champ_count");
sPossChamp = GetResRef(OBJECT_SELF)+"_ch";
iNPCduel = GetLocalInt(oPC, "npc_duel");
iNPCduel2 = GetLocalInt(oPC, "npc_duel2");
iConvSwitch = GetLocalInt(oPC, "conv_switch");
iJoin = GetLocalInt(oPC, "join_switch");
iConvSwitch = GetLocalInt(oPC, "conv_switch");
if ((iNPCduel==1)||(iNPCduel2==1)||(iConvSwitch==1))
{
SetLocalInt(oPC, "iHappy", 1);
}
//FloatingTextStringOnCreature(GetName(oPC), oPC);
//FloatingTextStringOnCreature(IntToString(iStatus), oPC);
//FloatingTextStringOnCreature(IntToString(iRate), oPC);
//FloatingTextStringOnCreature(IntToString(iChamp), oPC);
AssignCommand(OBJECT_SELF, SetFacingObject(oPC));
if (iStatus==1)
{
if (GetLocalInt(oMod,sPossChamp)==iModCount)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionPlayAnimation
(ANIMATION_FIREFORGET_BOW));
if (iNPCduel2==1)
{
iDice = d8();
switch (iDice)
{
case 1: {AssignCommand(oPC,SpeakString("Congratulations champion. You have served me well!"));}break;
case 2: {AssignCommand(oPC,SpeakString("You fought with great zeal. Congratulations holy champion!"));}break;
case 3: {AssignCommand(oPC,SpeakString("You honour me (and my wallet) with your might, great champion!"));}break;
case 4: {AssignCommand(oPC,SpeakString("You have made me a tidy coin, my friend!"));}break;
case 5: {AssignCommand(oPC,SpeakString("You were great. Now my gold bags are much heavier!"));}break;
case 6: {AssignCommand(oPC,SpeakString("Whew, I was worried that I'd lose my gold on you at first! Well done!"));}break;
case 7: {AssignCommand(oPC,SpeakString("Way to go, champ! Time to go collect. Hee hee!"));}break;
case 8: {AssignCommand(oPC,SpeakString("I bow to thee great champion!"));}break;
}
switch (iDice)
{
case 1: {DelayCommand(oDelay, SpeakString("I serve no-one, fool! I simply live to eradicate evil!"));}break;
case 2: {DelayCommand(oDelay, SpeakString("My zeal is merely testament to my hatred of evil!"));}break;
case 3: {DelayCommand(oDelay, SpeakString("Might is useless without strategy. And your wallet is useless without honour. Remember that!"));}break;
case 4: {DelayCommand(oDelay, SpeakString("Your reward is your life. Remember that before you impoverish your family with your senseless gamblng!"));}break;
case 5: {DelayCommand(oDelay, SpeakString("If the truth be known, I have a penchant for bloodshed!"));}break;
case 6: {DelayCommand(oDelay, SpeakString("That is the chance you take when you rest the task of creating personal wealth on another's shoulders!"));}break;
case 7: {DelayCommand(oDelay, SpeakString("Don't champ me, whelp! While I do not advocate gambling, I embrace combat!"));}break;
case 8: {DelayCommand(oDelay, SpeakString("Arise my bretheren. The Glory is yours on this victorious day! Now go collect your winnings!"));}break;
}
DelayCommand(oDelay2, AssignCommand(OBJECT_SELF, ClearAllActions()));
DelayCommand(oDelay2, AssignCommand(OBJECT_SELF, ActionPlayAnimation
(ANIMATION_FIREFORGET_VICTORY2)));
}
else
{
iDice = d8();
switch (iDice)
{
case 1: {AssignCommand(oPC,SpeakString("Congratulations champion. It was an honour to ally with you!"));}break;
case 2: {AssignCommand(oPC,SpeakString("You fought with great zeal. Congratulations holy champion!"));}break;
case 3: {AssignCommand(oPC,SpeakString("You honour us with your might, great champion!"));}break;
case 4: {AssignCommand(oPC,SpeakString("You fought deservingly of your championship!"));}break;
case 5: {AssignCommand(oPC,SpeakString("Your vigour on the battlefield is exceptional. Congratulations champion!"));}break;
case 6: {AssignCommand(oPC,SpeakString("Nice slicing and dicing! Congrats on the championship!"));}break;
case 7: {AssignCommand(oPC,SpeakString("Awesome work duudue! Like wo, you really rocked out there!"));}break;
case 8: {AssignCommand(oPC,SpeakString("I bow to thee great champion!"));}break;
}
switch (iDice)
{
case 1: {DelayCommand(oDelay, SpeakString("The honour was all mine, modest warrior!"));}break;
case 2: {DelayCommand(oDelay, SpeakString("My zeal was shared by all of us out there, but thanks anyway!"));}break;
case 3: {DelayCommand(oDelay, SpeakString("Might is useless without strategy. We are all champions today!"));}break;
case 4: {DelayCommand(oDelay, SpeakString("My true reward is my life. The championship prize is a mere trinket for collecting dust!"));}break;
case 5: {DelayCommand(oDelay, SpeakString("If the truth be known, I have a penchant for bloodshed!"));}break;
case 6: {DelayCommand(oDelay, SpeakString("What is this a cooking class? Get some honour, cowboy!"));}break;
case 7: {DelayCommand(oDelay, SpeakString("Please don't call me dude! You wouldn't like me when I'm angry!"));}break;
case 8: {DelayCommand(oDelay, SpeakString("Arise my bretheren. The Glory is ours on this victorious day!"));}break;
}
DelayCommand(oDelay2, AssignCommand(OBJECT_SELF, ClearAllActions()));
DelayCommand(oDelay2, AssignCommand(OBJECT_SELF, ActionPlayAnimation
(ANIMATION_FIREFORGET_VICTORY2)));
}
}
else if (iChamp==1)
{
SetLocalInt(oPC, "iHappy", 1);
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(OBJECT_SELF, ActionPlayAnimation
(ANIMATION_FIREFORGET_BOW));
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("Congratulations champion. It was an honour to fight with you!");}break;
case 2: {SpeakString("I've never seen such prowess!!!");}break;
case 3: {SpeakString("You do us a great honour by fighting with us, mighty champion!");}break;
case 4: {SpeakString("That was incredible!!! You cut through them like a warrior posessed!");}break;
case 5: {SpeakString("I am glad you were on our team!");}break;
case 6: {SpeakString("Well fought, champion! You can fight for us anytime!");}break;
case 7: {SpeakString("Have you ever thought of becomming a gladiator? You could make alot of gold with your skills!");}break;
case 8: {SpeakString("You wield your weapon like a god! Congratulations champion!");}break;
}
}
else if (iConvSwitch==1)
{
if (iJoin==1)
{
iDice = d4();
switch (iDice)
{
case 1: {SpeakString("We really didn't need your help, you know! You've gone and done your dough now!");}break;
case 2: {SpeakString("Now that was silly wasn't it? Do you have gold to burn?");}break;
case 3: {SpeakString("Was that really necessary! Now that Death character is even richer!");}break;
case 4: {SpeakString("Next time you might want to consider the fact that you forfeit your gold if you join the fight!");}break;
}
}
else
{
iDice = d4();
switch (iDice)
{
case 1: {SpeakString("Thankyou for your faith!");}break;
case 2: {SpeakString("Always bet on Light!");}break;
case 3: {SpeakString("Your bet was safe with us, friend!");}break;
case 4: {SpeakString("You weren't dissapointed were you, oh proponent of the light army!");}break;
}
}
}
else if (iRate<=9)
{
PercieveLight(oPC);
return;
}
else if ((iRate>9)&&(iRate<20))
{
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("What? Did you fall asleep?");}break;
case 2: {SpeakString("Were you afraid or do you just prefer to watch?");}break;
case 3: {SpeakString("Pfft! Call yourself a warrior!!!");}break;
case 4: {SpeakString("Maybe next time you could get off your ass and help eh!!!");}break;
case 5: {SpeakString("Where were you?");}break;
case 6: {SpeakString("I've never seen such a weak effort!!");}break;
case 7: {SpeakString("How many of us have to die before you decide to help out?");}break;
case 8: {SpeakString("Bah!I've seen more effort from a dead sloth!!! ");}break;
}
}
else if ((iRate>20)&&(iRate<51))
{
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("What happened? You were great until you abandoned us!");}break;
case 2: {SpeakString("Oh I see! You prefer to fight HALF battles!!!");}break;
case 3: {SpeakString("Did your weapon break half way through?");}break;
case 4: {SpeakString("Awwww! Were da bad monsters too skairwy for da widdle man?");}break;
case 5: {SpeakString("Nice start...Pathetic finish!!!");}break;
case 6: {SpeakString("Its highly dishonourable to join a team and then abandon it half way through a battle!!!");}break;
case 7: {SpeakString("What happened to you? One minute you were there, the next...gone!");}break;
case 8: {SpeakString("Pfft! We could have done without your 'help'");}break;
}
}
else if ((iRate>50)&&(iRate<81))
{
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("Nice work there! Pity you peppered out against the big guy!");}break;
case 2: {SpeakString("Oh I see, kill all the easy ones then slack off when the real work comes!");}break;
case 3: {SpeakString("Where were you when Lucifer was level draining me?");}break;
case 4: {SpeakString("Thanks friend, but we could have used your help with those last few!");}break;
case 5: {SpeakString("Even if you can't hit them, it still helps those of us who can if you join in!!!");}break;
case 6: {SpeakString("You fought bravely, but alas, your spirit wained when we needed you at the end!!!");}break;
case 7: {SpeakString("Those last few suckers were tough...Say!!! Where were you anyway!!!");}break;
case 8: {SpeakString("The battle is often decided by the last ones standing....please stand with us next time!");}break;
}
}
else if (iRate>80)
{
SetLocalInt(oPC, "iHappy", 1);
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("You never left our side!! Thankyou mysterious warrior!");}break;
case 2: {SpeakString("I thought that last guy would never die!!! Victory is ours brother!!!");}break;
case 3: {SpeakString("You fought long and hard. Thank you for your allegiance, brave warrior!");}break;
case 4: {SpeakString("The battle was arduous, but thanks to brave warriors like yourself, we prevailed!");}break;
case 5: {SpeakString("Your bravery will not be forgotten!");}break;
case 6: {SpeakString("Thanks to your bravery, we won a savage battle against all odds!");}break;
case 7: {SpeakString("Thankyou for seeing the whole battle through! I hate deserters!!!");}break;
case 8: {SpeakString("I enjoyed fighting along side a worthy warrior like yourself!");}break;
}
}
}
else
{
iDice = d8();
switch (iDice)
{
case 1: {SpeakString("We'd best save the chatter for after the battle!");}break;
case 2: {SpeakString("I'd love to chat, but I have some skulls to cleave!");}break;
case 3: {SpeakString("You'd best get back to the fight. We can chat later!");}break;
case 4: {SpeakString("Conversation is so much more interesting than carnage!");}break;
case 5: {SpeakString("Shall we go and cut us some enemies?");}break;
case 6: {SpeakString("I'm gonna have me some enemy pie!!!");}break;
case 7: {SpeakString("Are you all talk and no action? There is a battle on here!!!");}break;
case 8: {SpeakString("Watch out!!! here comes one now!");}break;
}
}
}