Remade Dungeon Level One: Central
Remade Dungeon Level One: Central. Added Didiamus' creature overrides. Full compile.
This commit is contained in:
28
_module/nss/sc_search_dc20.nss
Normal file
28
_module/nss/sc_search_dc20.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
string sPlacableTag = GetTag(OBJECT_SELF);
|
||||
int nPlayerSearched = GetLocalInt(oPC, "PlayerSearched_" + sPlacableTag); // Unique flag for each player
|
||||
|
||||
// Check if the player has already attempted searching this placable
|
||||
if (nPlayerSearched == 1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Check if the player's search skill check is successful against DC 20
|
||||
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 20))
|
||||
{
|
||||
// Set the flag on the player to ensure it's only run once per player
|
||||
SetLocalInt(oPC, "PlayerSearched_" + sPlacableTag, 1);
|
||||
|
||||
return TRUE; // Condition met, continue with the conversation
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the flag on the player to ensure it's only run once per player
|
||||
SetLocalInt(oPC, "PlayerSearched_" + sPlacableTag, 1);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user