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.
64 lines
2.4 KiB
Plaintext
64 lines
2.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Default: On User Defined
|
|
//:: NW_C2_DEFAULTD
|
|
//:: Copyright (c) 2002 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Determines the course of action to be taken
|
|
on a user defined event.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Don Moar
|
|
//:: Created On: April 28, 2002
|
|
//:://////////////////////////////////////////////
|
|
|
|
|
|
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
|
|
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
|
|
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
|
|
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
|
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
|
|
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
|
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
|
|
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
|
|
|
|
#include "NW_I0_GENERIC"
|
|
|
|
void main()
|
|
{
|
|
// enter desired behaviour here
|
|
int nUser = GetUserDefinedEventNumber();
|
|
object oTarget = GetLocalObject(OBJECT_SELF, "oTarget");
|
|
|
|
if (nUser == 1001)
|
|
{
|
|
if (GetIsObjectValid(oTarget))
|
|
{
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionMoveToObject(oTarget));
|
|
ActionDoCommand(ActionUseSkill(SKILL_PICK_POCKET, oTarget));
|
|
ActionDoCommand(ActionUseSkill(SKILL_HIDE, OBJECT_SELF));
|
|
ActionDoCommand(ActionMoveAwayFromObject(oTarget));
|
|
SetIsTemporaryEnemy(oTarget);
|
|
SetLocalObject(OBJECT_SELF, "oTarget", OBJECT_INVALID);
|
|
}
|
|
}
|
|
|
|
if (nUser == 1002)
|
|
{
|
|
if (!GetIsObjectValid(oTarget))
|
|
{
|
|
object oTarget = GetLastPerceived();
|
|
if (GetIsPC(oTarget))
|
|
{
|
|
SendMessageToPC(oTarget, "You're the target of a thief!!");
|
|
SetLocalObject(OBJECT_SELF, "oTarget", oTarget);
|
|
ActionDoCommand(ActionUseSkill(SKILL_HIDE, OBJECT_SELF));
|
|
}
|
|
}
|
|
}
|
|
|
|
return;
|
|
|
|
}
|