Further PRC integration
Further PRC integration. Missed an event script.
This commit is contained in:
parent
2bf42182fd
commit
c1d6da2ed3
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@
|
|||||||
*.mod
|
*.mod
|
||||||
*.mod
|
*.mod
|
||||||
*.mod
|
*.mod
|
||||||
|
*.mod
|
||||||
|
_module/poa.mod
|
||||||
|
*.mod
|
||||||
|
@ -333,7 +333,7 @@
|
|||||||
},
|
},
|
||||||
"Version": {
|
"Version": {
|
||||||
"type": "dword",
|
"type": "dword",
|
||||||
"value": 72
|
"value": 73
|
||||||
},
|
},
|
||||||
"Width": {
|
"Width": {
|
||||||
"type": "int",
|
"type": "int",
|
||||||
|
BIN
_module/ncs/nw_c2_default5.ncs
Normal file
BIN
_module/ncs/nw_c2_default5.ncs
Normal file
Binary file not shown.
71
_module/nss/nw_c2_default5.nss
Normal file
71
_module/nss/nw_c2_default5.nss
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Default On Attacked
|
||||||
|
//:: NW_C2_DEFAULT5
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
If already fighting then ignore, else determine
|
||||||
|
combat round
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 16, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Modified By: Deva Winblood
|
||||||
|
//:: Modified On: Jan 4th, 2008
|
||||||
|
//:: Added Support for Mounted Combat Feat Support
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "nw_i0_generic"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ExecuteScript("prc_npc_physatt", OBJECT_SELF);
|
||||||
|
|
||||||
|
if (!GetLocalInt(GetModule(),"X3_NO_MOUNTED_COMBAT_FEAT"))
|
||||||
|
{ // set variables on target for mounted combat
|
||||||
|
SetLocalInt(OBJECT_SELF,"bX3_LAST_ATTACK_PHYSICAL",TRUE);
|
||||||
|
SetLocalInt(OBJECT_SELF,"nX3_HP_BEFORE",GetCurrentHitPoints(OBJECT_SELF));
|
||||||
|
} // set variables on target for mounted combat
|
||||||
|
|
||||||
|
if(GetFleeToExit()) {
|
||||||
|
// Run away!
|
||||||
|
ActivateFleeToExit();
|
||||||
|
} else if (GetSpawnInCondition(NW_FLAG_SET_WARNINGS)) {
|
||||||
|
// We give an attacker one warning before we attack
|
||||||
|
// This is not fully implemented yet
|
||||||
|
SetSpawnInCondition(NW_FLAG_SET_WARNINGS, FALSE);
|
||||||
|
|
||||||
|
//Put a check in to see if this attacker was the last attacker
|
||||||
|
//Possibly change the GetNPCWarning function to make the check
|
||||||
|
} else {
|
||||||
|
object oAttacker = GetLastAttacker();
|
||||||
|
if (!GetIsObjectValid(oAttacker)) {
|
||||||
|
// Don't do anything, invalid attacker
|
||||||
|
|
||||||
|
} else if (!GetIsFighting(OBJECT_SELF)) {
|
||||||
|
// We're not fighting anyone else, so
|
||||||
|
// start fighting the attacker
|
||||||
|
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL)) {
|
||||||
|
SetSummonHelpIfAttacked();
|
||||||
|
DetermineSpecialBehavior(oAttacker);
|
||||||
|
} else if (GetArea(oAttacker) == GetArea(OBJECT_SELF)) {
|
||||||
|
SetSummonHelpIfAttacked();
|
||||||
|
DetermineCombatRound(oAttacker);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Shout Attack my target, only works with the On Spawn In setup
|
||||||
|
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||||
|
|
||||||
|
//Shout that I was attacked
|
||||||
|
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT))
|
||||||
|
{
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_ATTACKED));
|
||||||
|
}
|
||||||
|
}
|
BIN
_module/poa.mod
BIN
_module/poa.mod
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user