RATDOG/_module/nss/sc_search_dc10.nss
Jaysyn904 84d583b489 Added Mine & Caverns raise & lower functionality
Added Mine & Caverns raise & lower functionality.  Revamped Level 1 events to match PnP.  Updated Level 1: Core.  Added new Footcatcher trap type. Added Underwater heartbeat to Glop Lake Underwater.  Full compile.
2023-09-16 09:04:37 -04:00

84 lines
1.3 KiB
Plaintext

#include "x0_i0_partywide"
//:: Returns true if PC passes a DC 10 search check.
//:: Only allows one chance to search
int StartingConditional()
{
object oPC = GetPCSpeaker();
string sPlacableTag = GetTag(OBJECT_SELF);
int nPartySearched = GetLocalInt(oPC, "PartySearched_" + sPlacableTag); // Unique flag for each placable
// Check if the party has already successfully searched at this placable
if (nPartySearched == 1)
{
return FALSE;
}
// Check if the player's search skill check is successful against DC 10
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 10))
{
// Set the flag on every member of the party to ensure it's only run once per party
SetLocalIntOnAll(oPC, "PartySearched_" + sPlacableTag, 1);
return TRUE; // Condition met, continue with the conversation
}
else
{
return FALSE;
}
}
//:: Returns true if PC passes a DC 10 search check
/*int StartingConditional()
{
//:: Declare major variables
object oPC = GetPCSpeaker();
// Check if the player's search skill check is successful against DC 10
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 10))
{
//:: Player passed the search check
return TRUE;
}
else
{
//:: Player failed the search check
return FALSE;
}
} */