52 lines
2.4 KiB
Plaintext
52 lines
2.4 KiB
Plaintext
|
#include "NW_I0_GENERIC"
|
||
|
#include "nw_i0_tool"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
{
|
||
|
if (GetTag(OBJECT_SELF) == "ORC_FROSTMNT1") {
|
||
|
object oArea = GetArea (GetWaypointByTag("FRST_SPWN_1"));
|
||
|
vector vPosition = GetPosition (GetWaypointByTag("FRST_SPWN_1"));
|
||
|
float fOrientation = GetFacing (GetWaypointByTag("FRST_SPWN_1"));
|
||
|
location lSpawn = Location (oArea, vPosition, fOrientation);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE, "glacfrost", lSpawn, TRUE);
|
||
|
} else if (GetTag(OBJECT_SELF) == "ORC_FROSTMNT2") {
|
||
|
object oArea = GetArea (GetWaypointByTag("FRST_SPWN_2"));
|
||
|
vector vPosition = GetPosition (GetWaypointByTag("FRST_SPWN_2"));
|
||
|
float fOrientation = GetFacing (GetWaypointByTag("FRST_SPWN_2"));
|
||
|
location lSpawn = Location (oArea, vPosition, fOrientation);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE, "glacfrost001", lSpawn, TRUE);
|
||
|
} else if (GetTag(OBJECT_SELF) == "ORC_FROSTMNT3") {
|
||
|
object oArea = GetArea (GetWaypointByTag("FRST_SPWN_3"));
|
||
|
vector vPosition = GetPosition (GetWaypointByTag("FRST_SPWN_3"));
|
||
|
float fOrientation = GetFacing (GetWaypointByTag("FRST_SPWN_3"));
|
||
|
location lSpawn = Location (oArea, vPosition, fOrientation);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE, "glacfrost002", lSpawn, TRUE);
|
||
|
} else if (GetTag(OBJECT_SELF) == "ORC_FROSTMNT4") {
|
||
|
object oArea = GetArea (GetWaypointByTag("FRST_SPWN_4"));
|
||
|
vector vPosition = GetPosition (GetWaypointByTag("FRST_SPWN_4"));
|
||
|
float fOrientation = GetFacing (GetWaypointByTag("FRST_SPWN_4"));
|
||
|
location lSpawn = Location (oArea, vPosition, fOrientation);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE, "glacfrost003", lSpawn, TRUE);
|
||
|
}
|
||
|
|
||
|
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
||
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||
|
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
|
||
|
{
|
||
|
object oKiller = GetLastKiller();
|
||
|
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
|
||
|
}
|
||
|
|
||
|
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
|
||
|
//Shout Attack my target, only works with the On Spawn In setup
|
||
|
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||
|
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
|
||
|
{
|
||
|
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
|
||
|
}
|
||
|
//ExecuteScript("sha_xpsystem", OBJECT_SELF); //:: Replaced by PWFXP
|
||
|
DelayCommand(0.0f, ExecuteScript("pwfxp", OBJECT_SELF));
|
||
|
}
|
||
|
}
|