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:
126
_module/nss/jw_smith_usd.nss
Normal file
126
_module/nss/jw_smith_usd.nss
Normal file
@@ -0,0 +1,126 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////::///////////////////////////////////////////////
|
||||
//:: Custom User Defined Event
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//////:////////:////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//// //
|
||||
//:://///////////////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//::///////////////////////////////////////////////////////////////////////
|
||||
//#include "JW_HOMELIFE"
|
||||
//#include "NW_I0_GENERIC"
|
||||
|
||||
void jw_smith();
|
||||
//void jw_woken();
|
||||
//void jw_sleep();
|
||||
//void jw_wake();
|
||||
//void jw_general();
|
||||
//void jw_cook();
|
||||
//void jw_endcook();
|
||||
|
||||
void main()
|
||||
{
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
object oObject;
|
||||
int nCounter;
|
||||
|
||||
if(nUser == 1001) //HEARTBEAT
|
||||
{
|
||||
int nTime=GetTimeHour();
|
||||
SetLocalInt(OBJECT_SELF,"jw_time",nTime);
|
||||
|
||||
if ((!IsInConversation(OBJECT_SELF))&&(!GetIsInCombat(OBJECT_SELF))&&(GetMaxHitPoints(OBJECT_SELF)>(GetCurrentHitPoints(OBJECT_SELF)*2)))
|
||||
{
|
||||
ActionRest();
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
|
||||
if ((!IsInConversation(OBJECT_SELF))&&(!GetIsInCombat(OBJECT_SELF)))
|
||||
{
|
||||
jw_smith();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1002) // PERCEIVE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1003) // END OF COMBAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1004) // ON DIALOGUE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1005) // ATTACKED
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1006) // DAMAGED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1007) // DEATH
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1008) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
else if(nUser == 30) //Interrupted
|
||||
{
|
||||
|
||||
if (!IsInConversation(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
SetFacingPoint(GetPosition(GetLocalObject(OBJECT_SELF,"interrupter")));
|
||||
PlaySound("as_pl_yawningm1");
|
||||
|
||||
ClearAllActions();
|
||||
AssignCommand(GetLocalObject(OBJECT_SELF,"interrupter"),ClearAllActions());
|
||||
BeginConversation("",GetLocalObject(OBJECT_SELF,"interrupter"));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void jw_smith()
|
||||
{
|
||||
if ((!IsInConversation(OBJECT_SELF))&&(!GetIsInCombat(OBJECT_SELF)))
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
|
||||
ActionEquipMostDamagingMelee();
|
||||
DoPlaceableObjectAction(GetObjectByTag("jw_"+GetTag(OBJECT_SELF)+"_anvil"),PLACEABLE_ACTION_BASH);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user