Quest persistence work
Quest persistence work.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
// Set destroyable.
|
||||
// Set destroyable.
|
||||
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||||
// Remove plot/immoral/lootable flags JUST in case.
|
||||
SetPlotFlag(OBJECT_SELF, FALSE);
|
||||
|
@@ -53,4 +53,11 @@ void main()
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
|
||||
}
|
||||
craft_drop_items(oKiller);
|
||||
}
|
||||
|
||||
//:: Execute Default NPC OnDeath script
|
||||
ExecuteScript("nw_c2_default7", OBJECT_SELF);
|
||||
|
||||
|
||||
//:: Execute PRC NPC OnDeath script
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
}
|
||||
|
37
_module/nss/qst_altar_2nd.nss
Normal file
37
_module/nss/qst_altar_2nd.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_altar_2nd.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets stage #2 for the "Lost Altar" quest.
|
||||
This destroys the altar.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("lostaltar", 2, oPC);
|
||||
|
||||
//:: Destroy Altar
|
||||
//:: Set destroyable.
|
||||
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||||
|
||||
//:: Remove plot/immoral/lootable flags JUST in case.
|
||||
SetPlotFlag(OBJECT_SELF, FALSE);
|
||||
SetImmortal(OBJECT_SELF, FALSE);
|
||||
SetLootable(OBJECT_SELF, FALSE);
|
||||
|
||||
//:: Destroy Altar
|
||||
DestroyObject(OBJECT_SELF);
|
||||
}
|
||||
|
24
_module/nss/qst_altar_3rd.nss
Normal file
24
_module/nss/qst_altar_3rd.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_altar_3rd.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets stage #3 for the "Lost Altar" quest.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("lostaltar", 3, oPC);
|
||||
|
||||
}
|
33
_module/nss/qst_altar_end.nss
Normal file
33
_module/nss/qst_altar_end.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_altar_start.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Ends & rewards the "Lost Altar" quest.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tolen
|
||||
//:: Created On: 8/15/2005 10:59:16 PM
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
#include "nw_i0_tool"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oItemToTake;
|
||||
|
||||
//:: Give the PC's party some XP
|
||||
RewardPartyXP(250, oPC);
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("lostaltar", 4, oPC);
|
||||
|
||||
//:: Remove plot item from PC's inventory
|
||||
oItemToTake = GetItemPossessedBy(oPC, "ZEP_HOLYSYMBOLhec");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
}
|
24
_module/nss/qst_altar_start.nss
Normal file
24
_module/nss/qst_altar_start.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_altar_start.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Start & tracks the "Lost Altar" quest.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("lostaltar", 1, oPC);
|
||||
|
||||
}
|
30
_module/nss/qst_ch_altar04.nss
Normal file
30
_module/nss/qst_ch_altar04.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_altar04.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks that the "Lost Altar" quest has been
|
||||
completed with the altar of Hecate intact.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
|
||||
//:: Inspect quest state
|
||||
nInt = RetrieveQuestState("lostaltar", oPC);
|
||||
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYlostaltar");
|
||||
if (nInt >= 4)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
29
_module/nss/qst_ch_altar_nf.nss
Normal file
29
_module/nss/qst_ch_altar_nf.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_altar_nf.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks that the "Lost Altar" quest hasn't
|
||||
been completed.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220702
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
|
||||
//:: Inspect quest state
|
||||
nInt = RetrieveQuestState("lostaltar", oPC);
|
||||
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYlostaltar");
|
||||
if (nInt >= 4)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
36
_module/nss/qst_ch_door01.nss
Normal file
36
_module/nss/qst_ch_door01.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_door01.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks for the "Master of the Door" quest
|
||||
having been started.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tolen
|
||||
//:: Created On: ???
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
int nGP = GetGold(oPC);
|
||||
|
||||
//:: Check to see if the PC has 1000 gp.
|
||||
if ( GetGold(oPC) < 1000 )
|
||||
return FALSE;
|
||||
|
||||
//:: Inspect local variables
|
||||
nInt = RetrieveQuestState("door", oPC);
|
||||
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYdoor");
|
||||
|
||||
if (!nInt == 1)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
36
_module/nss/qst_ch_door01g.nss
Normal file
36
_module/nss/qst_ch_door01g.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_door01g.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks for the "Master of the Door" quest
|
||||
having been started & if the PC has 1000gp.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tolen
|
||||
//:: Created On: ???
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
int nGP = GetGold(oPC);
|
||||
|
||||
//:: Check to see if the PC has 1000 gp.
|
||||
if ( GetGold(oPC) < 1000 )
|
||||
return FALSE;
|
||||
|
||||
//:: Inspect local variables
|
||||
nInt = RetrieveQuestState("door", oPC);
|
||||
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYdoor");
|
||||
|
||||
if (!nInt == 1)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
28
_module/nss/qst_ch_kngsly01.nss
Normal file
28
_module/nss/qst_ch_kngsly01.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_kngsly01.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks for Stage #1 of the "Saving Sir
|
||||
Kingsley" quest.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
|
||||
//:: Inspect quest state
|
||||
nInt = RetrieveQuestState("kingsley", oPC);
|
||||
if (!nInt == 1)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
34
_module/nss/qst_ch_kngsly01g.nss
Normal file
34
_module/nss/qst_ch_kngsly01g.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ch_kngsly01g.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks for Stage #1 of the "Saving Sir
|
||||
Kingsley" quest & if the PC has 1000gp for
|
||||
the Oracle.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nInt;
|
||||
int nGP = GetGold(oPC);
|
||||
|
||||
//:: Check to see if the PC has 1000 gp.
|
||||
if ( GetGold(oPC) < 1000 )
|
||||
return FALSE;
|
||||
|
||||
//:: Inspect quest state
|
||||
nInt = RetrieveQuestState("kingsley", oPC);
|
||||
if (!nInt == 1)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
27
_module/nss/qst_door_end.nss
Normal file
27
_module/nss/qst_door_end.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_door_end.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Ends "Master of the Door" quest.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220705
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
#include "nw_i0_tool"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("door", 2, oPC);
|
||||
|
||||
//:: Give the PC's party XP
|
||||
RewardPartyXP(1000, oPC);
|
||||
|
||||
}
|
24
_module/nss/qst_kngsly_2nd.nss
Normal file
24
_module/nss/qst_kngsly_2nd.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_kngsly_2nd.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets stage #2 for the "Saving Sir Kingsley"
|
||||
quest from Sir Jerry.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tolen
|
||||
//:: Created On: 9/7/2005 10:02:59 PM
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("kingsley", 2, oPC);
|
||||
|
||||
}
|
27
_module/nss/qst_kngsly_3rd.nss
Normal file
27
_module/nss/qst_kngsly_3rd.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_kngsly_3rd.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets stage #3 for the "Saving Sir Kingsley"
|
||||
quest from Sir Jerry.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tolen
|
||||
//:: Created On: 9/7/2005 10:02:59 PM
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("kingsley", 1, oPC);
|
||||
|
||||
//:: Give the PC Kingley's Amulet
|
||||
CreateItemOnObject("item066", oPC, 1);
|
||||
|
||||
}
|
@@ -14,12 +14,11 @@
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("kingsley", 1, oPC);
|
||||
|
||||
}
|
||||
AddPersistentJournalQuestEntry("kingsley", 1, oPC);
|
||||
|
||||
}
|
||||
|
@@ -9,10 +9,18 @@
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
//: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
int nGP = GetGold(oPC);
|
||||
|
||||
// Make sure the PC speaker has these items in their inventory
|
||||
if(!HasItem(GetPCSpeaker(), "TeakwoodBox"))
|
||||
return FALSE;
|
||||
//:: Check to see if the PC has 1000 gp.
|
||||
if ( GetGold(oPC) < 1000 )
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
// Make sure the PC speaker has these items in their inventory
|
||||
if(!HasItem(GetPCSpeaker(), "TeakwoodBox"))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -1,11 +1,28 @@
|
||||
// Port PC
|
||||
///////////////////////////////////////////////////
|
||||
// Clears all actions and jumps the caller to the provided object.
|
||||
// (Useful when this needs to be delayed.)
|
||||
void ClearAndJumpToObject(object oDestination);
|
||||
|
||||
void ClearAndJumpToObject(object oDestination)
|
||||
{
|
||||
ClearAllActions();
|
||||
JumpToObject(oDestination);
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy(); // Get the user of the object
|
||||
object oDest = GetObjectByTag("pirate1"); // way point tag.
|
||||
if(GetIsPC(oPC))
|
||||
{
|
||||
AssignCommand(oPC,JumpToObject(oDest));
|
||||
}
|
||||
effect eVFX;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_PIRATE01");
|
||||
|
||||
// Teleport the PC.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);
|
||||
DelayCommand(1.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user