Battledale_PRC8/_module/nss/jw_smith_usd.nss
Jaysyn904 e5b3f6ad61 Finished PRC8 integration
Finished PRC8 integration.  Moved creature abilities to top hak.  Setup tooling.  Created release archive
2024-03-12 21:27:23 -04:00

129 lines
2.3 KiB
Plaintext

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////::///////////////////////////////////////////////
//:: 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()
{
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
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);
}
}
}