Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

105 lines
2.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: swt_NPC_random
//:: swt_NPC_random.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 09-07-2002
//:://////////////////////////////////////////////
void main()
{
//if(d3() == 1)
{ object oPC=GetLastSpeaker();
if (!GetIsPC(oPC))
{
return;
}
object oMe=OBJECT_SELF;
ClearAllActions();
AssignCommand(oPC,ClearAllActions());
AssignCommand(oPC,SetFacingPoint(GetPosition(oMe)));
SetFacingPoint(GetPosition(oPC));
int nRandom=Random(6)+1;
string sText;
switch (nRandom)
{
case 1: sText="The Zhents destroyed half the town when they invaded, and then they destroyed half the remaning houses in revenge for the attack on their headquarters";
break;
case 2: sText="The resistance is hiding out in the mage tower.";
break;
case 3: sText="A few of our leaders and militia managed to escape when the Zhentarim invaded.";
break;
case 4: sText="The Zhents turned the town hall into their headquarters, but it's severely damaged now.";
break;
case 5: sText="The barracks by the town hall have been taken over by the Zhentarim.";
break;
case 6: sText="Reinforcements are arriving all the time. My poor town may never know freedom again.";
break;
}
int nDisguised=0;
if (GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))=="jw_zhent_splint"||GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))=="jw_new_zh_robe")
{
nDisguised=1;
}
if (nDisguised==0)
{
if (GetTag(GetArea(OBJECT_SELF))=="jw_brighthaven_area")
{
switch (nRandom)
{
case 1: sText="*Greets you quietly and quickly turns away*";
break;
case 2: sText="*Glances around nervously*";
break;
case 3: sText="Ah, aye . . hail. I regret I cannot talk right now.";
break;
case 4: sText="What is there to talk about?!";
break;
case 5: sText="*Glances at you and moves on*";
break;
case 6: sText="*Pretends not to have seen you*";
break;
}
SpeakString(sText);
ActionMoveAwayFromObject(oPC,FALSE,40.0);
ActionRandomWalk();
}
else
{
ActionSpeakString(sText,TALKVOLUME_WHISPER);
}
}
else
{
ActionSpeakString("If there's anything I can do for you, I will");
}
}
}