128 lines
3.2 KiB
Plaintext
128 lines
3.2 KiB
Plaintext
|
//:://////////////////////////////////////////////////
|
||
|
//:: Custom User Defined Event
|
||
|
//:: FileName
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By:
|
||
|
//:: Created On:
|
||
|
//::///////////////////////////////////////////////
|
||
|
#include "NW_I0_GENERIC"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oObject;
|
||
|
int nCounter;
|
||
|
int nIdx;
|
||
|
location lLoc;
|
||
|
|
||
|
int nUser = GetUserDefinedEventNumber();
|
||
|
|
||
|
if(nUser == 1001) //HEARTBEAT
|
||
|
{
|
||
|
|
||
|
}
|
||
|
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 == 50) //Make a new lever
|
||
|
{
|
||
|
location lLoc=GetLocation(GetObjectByTag("jw_trap2"));
|
||
|
DestroyObject(GetObjectByTag("jw_trap_lever2"));
|
||
|
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_trap_lever2",lLoc);
|
||
|
}
|
||
|
|
||
|
else if(nUser == 100) //Delay making a new Wulgar
|
||
|
{
|
||
|
DelayCommand(230.0,SignalEvent(OBJECT_SELF,EventUserDefined(101)));
|
||
|
}
|
||
|
|
||
|
else if(nUser == 101) //Make a new wulgar
|
||
|
{
|
||
|
lLoc=GetLocation(GetObjectByTag("jw_ore_object"));
|
||
|
CreateObject(OBJECT_TYPE_CREATURE,"wulgar002",lLoc);
|
||
|
}
|
||
|
|
||
|
else if(nUser == 200) //Boulder has died
|
||
|
{
|
||
|
|
||
|
object oDoor=GetObjectByTag("jw_drow_door");
|
||
|
location lSpawn=GetLocation(GetObjectByTag("jw_drowspawn_wp"));
|
||
|
// ActionWait(0.2);
|
||
|
//ActionDoCommand(AssignCommand(GetObjectByTag("jw_drow_speak"),SpeakString("What's going on out there? Get back to work!")));
|
||
|
// ActionWait(0.5);
|
||
|
// for (nIdx=1;nIdx<=2;nIdx++)
|
||
|
// {
|
||
|
// ActionDoCommand(AssignCommand(oDoor,PlaySound("fs_stone_hard1")));
|
||
|
// ActionWait(0.1);
|
||
|
// ActionDoCommand(AssignCommand(oDoor,PlaySound("fs_stone_hard2")));
|
||
|
// ActionWait(0.1);
|
||
|
|
||
|
// }
|
||
|
// ActionWait(0.3);
|
||
|
|
||
|
ActionDoCommand(AssignCommand(oDoor,SetLocked(oDoor,FALSE)));
|
||
|
ActionDoCommand(AssignCommand(oDoor,ActionOpenDoor(oDoor)));
|
||
|
// ActionWait(0.1);
|
||
|
|
||
|
lSpawn=GetLocation(GetObjectByTag("jw_drowspawn_wp"));
|
||
|
CreateObject(OBJECT_TYPE_CREATURE,"jw_drow_mage",lSpawn);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE,"jw_drow_rogue",lSpawn);
|
||
|
CreateObject(OBJECT_TYPE_CREATURE,"jw_drow_militia",lSpawn);
|
||
|
//ActionWait(0.1);
|
||
|
ActionDoCommand(AssignCommand(GetObjectByTag("jw_drow_mage"),SpeakString("Intruders! kill them now!")));
|
||
|
|
||
|
|
||
|
if (!GetIsInCombat(GetObjectByTag("jw_drow_mage")))
|
||
|
{
|
||
|
ActionDoCommand(AssignCommand(GetObjectByTag("jw_drow_mage"),ActionMoveToLocation(GetLocation(GetWaypointByTag("jw_boulder_wp")),1)));
|
||
|
}
|
||
|
if (!GetIsInCombat(GetObjectByTag("jw_drow_rogue")))
|
||
|
{
|
||
|
ActionDoCommand(AssignCommand(GetObjectByTag("jw_drow_rogue"),ActionMoveToLocation(GetLocation(GetWaypointByTag("jw_boulder_wp")),1)));
|
||
|
}
|
||
|
|
||
|
if (!GetIsInCombat(GetObjectByTag("jw_drow_militia")))
|
||
|
{
|
||
|
ActionDoCommand(AssignCommand(GetObjectByTag("jw_drow_militia"),ActionMoveToLocation(GetLocation(GetWaypointByTag("jw_boulder_wp")),1)));
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|