1. Script Name: npc_random_talk
2. What It Does: Makes an npc randomly say 1 of 6 user-defined
phrases.
3. Notes: This is a modified version of Lenkyl Greatstorm's Trash
Talk Script. I've lowered the choices down to 6, and I've added in
support for Low Intelligence Phrases. (for half-orcs and such.) As with
the original, works best if placed in OnHeartBeat on an NPC.
4. The Script:
NWScript:
string sSayThis;
int iNPCInt = GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE);
int iTalkVolume = TALKVOLUME_TALK;
int iRollSix = d6(1);
int iTalkFlag = 0;
void main()
{
if(d100(1) > 50)
{
if(iRollSix != 0)
{
switch(iRollSix)
{
case 1:
if(iNPCInt <= 8)
{
sSayThis = "Low Int One.";
}
else
{
sSayThis = "One.";
}
break;
case 2:
if(iNPCInt <= 8)
{
sSayThis = "Low Int Two.";
}
else
{
sSayThis = "Two.";
}
break;
case 3:
if(iNPCInt <= 8)
{
sSayThis = "Low Int Three.";
}
else
{
sSayThis = "Three.";
}
break;
case 4:
if(iNPCInt <= 8)
{
sSayThis = "Low Int Four.";
}
else
{
sSayThis = "Four.";
}
break;
case 5:
if(iNPCInt <= 8)
{
sSayThis = "Low Int Five.";
}
else
{
sSayThis = "Five.";
}
break;
case 6:
if(iNPCInt <= 8)
{
sSayThis = "Low Int Six.";
}
else
{
sSayThis = "Six.";
}
break;
}
ActionSpeakString(sSayThis, iTalkVolume);
}
}
}
_________________
There on the battlefield he stands
Down on the battlefield he's lost
And on the battlefield it ends
[ Edited By Asigoth: Friday, 19 July 11:03PM (GMT) ]
|