Initial Commit
Initial Commit [v1.01]
This commit is contained in:
56
_module/nss/amonstombtrigger.nss
Normal file
56
_module/nss/amonstombtrigger.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: X0_O2_SEC_TDOOR2
|
||||
//:: This is an OnEntered script for a generic trigger.
|
||||
//:: When a PC enters the trigger area, it will perform
|
||||
//:: a check to determine if the secret item is revealed,
|
||||
//:: then make it appear if so.
|
||||
//::
|
||||
//:: Secret item to be revealed: Secret Stone Trap Door
|
||||
//:: Checking for: SKILL_SEARCH
|
||||
//::
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 12/08/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
|
||||
#include "x0_i0_secret"
|
||||
#include "nw_i0_tool"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oEntered = GetEnteringObject();
|
||||
if (HasItem(oEntered, "AmonsTombKey"))
|
||||
{
|
||||
|
||||
|
||||
object oEntered = GetEnteringObject();
|
||||
|
||||
if (GetIsSecretItemRevealed())
|
||||
{return;}
|
||||
|
||||
if ( DetectSecretItem(oEntered))
|
||||
{
|
||||
if (!GetIsPC(oEntered))
|
||||
{
|
||||
// If a henchman, alert the PC if we make the detect check
|
||||
object oMaster = GetMaster(oEntered);
|
||||
if (GetIsObjectValid(oMaster)
|
||||
&& oEntered == GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oMaster))
|
||||
{
|
||||
AssignCommand(oEntered, PlayVoiceChat(VOICE_CHAT_SEARCH));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// It's a PC, reveal the item
|
||||
AssignCommand(oEntered, PlayVoiceChat(VOICE_CHAT_LOOKHERE));
|
||||
RevealSecretItem("AmonsTomb");
|
||||
object oItemToTake1;
|
||||
oItemToTake1 = GetItemPossessedBy(oEntered, "AmonsTombKey");
|
||||
DestroyObject(oItemToTake1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user