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.
This commit is contained in:
123
_module/nss/jw_birdy_usd.nss
Normal file
123
_module/nss/jw_birdy_usd.nss
Normal file
@@ -0,0 +1,123 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Custom User Defined Event
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oObject;
|
||||
string sString;
|
||||
object oCreate;
|
||||
object oLoot;
|
||||
int nCounter;
|
||||
int nGold;
|
||||
object oBlood;
|
||||
object oShouter;
|
||||
object oSeen;
|
||||
int nRandom;
|
||||
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
|
||||
if(nUser == 1001) //HEARTBEAT
|
||||
{
|
||||
if (d6()!=1)
|
||||
{return;}
|
||||
|
||||
nRandom=d2();
|
||||
sString="as_an_birdflap"+IntToString(nRandom);
|
||||
PlaySound(sString);
|
||||
|
||||
}
|
||||
else if(nUser == 1002) // PERCEIVE
|
||||
{
|
||||
oSeen=GetLastPerceived();
|
||||
|
||||
|
||||
|
||||
ClearPersonalReputation(oSeen,OBJECT_SELF);
|
||||
|
||||
if (GetReputation (OBJECT_SELF,oSeen)<50)
|
||||
{
|
||||
AdjustReputation(oSeen,OBJECT_SELF,20);
|
||||
}
|
||||
|
||||
|
||||
if (GetLastPerceptionSeen())
|
||||
{
|
||||
|
||||
if (GetIsPlayableRacialType(oSeen))
|
||||
{
|
||||
int iDC = 22;
|
||||
int iBonus = GetSkillRank(SKILL_ANIMAL_EMPATHY, oSeen);
|
||||
if ((d20() + iBonus) >= iDC)
|
||||
{
|
||||
ClearAllActions();
|
||||
SetFacingPoint(GetPosition(oSeen));
|
||||
ActionPlayAnimation(ANIMATION_FIREFORGET_BOW);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearAllActions();
|
||||
ActionMoveAwayFromObject(oSeen,TRUE,40.0);
|
||||
SpeakString("JW_RUN_AWAY",TALKVOLUME_SILENT_TALK);
|
||||
PlaySound("as_an_hawk1");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else if(nUser == 1003) // END OF COMBAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1004) // ON DIALOGUE
|
||||
{
|
||||
if (GetListenPatternNumber()==30)
|
||||
{
|
||||
ClearAllActions();
|
||||
oShouter=GetLastSpeaker();
|
||||
ActionMoveAwayFromObject(oShouter,TRUE,40.0);
|
||||
}
|
||||
}
|
||||
else if(nUser == 1005) // ATTACKED
|
||||
{
|
||||
ClearAllActions();
|
||||
SpeakString("JW_RUN_AWAY",TALKVOLUME_SILENT_TALK);
|
||||
|
||||
ActionMoveAwayFromObject(GetLastAttacker(),TRUE,40.0);
|
||||
}
|
||||
else if(nUser == 1006) // DAMAGED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1007) // DEATH
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if(nUser == 1008) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
else if(nUser == 50) // Destory self
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user