Initial Commit
Initial Commit
This commit is contained in:
21
_module/nss/quest_item1.nss
Normal file
21
_module/nss/quest_item1.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "x4_inc_functions"
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
string sDB = CharacterDB(oPC);
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF, "Quest_Halt") == TRUE) return FALSE; //We don't want to speak to anyone if the quest was halted
|
||||
|
||||
if (GetLocalString(OBJECT_SELF, "sPC") != sDB) return FALSE; //We don't want to speak to anyone but the questing PC
|
||||
|
||||
if (GetCampaignString(sDB, "QUEST_TEMPLATE") != "item") return FALSE; //We don't want to speak this line if we're not a target of an item quest
|
||||
|
||||
if (Random(3) != 0) return FALSE; //We don't want to speak this line 1/3 of the time
|
||||
|
||||
string sName = GetLocalString(OBJECT_SELF, "sName");
|
||||
string sLastName = GetLocalString(OBJECT_SELF, "sLastName");
|
||||
SetCustomToken(11001, sName);
|
||||
SetCustomToken(11002, sLastName);
|
||||
|
||||
return TRUE;
|
||||
}
|
Reference in New Issue
Block a user