Quest persistence work

Quest persistence work.
This commit is contained in:
Jaysyn904 2022-07-06 00:35:22 -04:00
parent 4af27ed685
commit ee912d2da9
55 changed files with 3670 additions and 61 deletions

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 19
"value": 20
},
"Width": {
"type": "int",

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 6
"value": 7
},
"Width": {
"type": "int",

View File

@ -2913,7 +2913,7 @@
},
"Version": {
"type": "dword",
"value": 6
"value": 7
},
"Width": {
"type": "int",

View File

@ -2913,7 +2913,7 @@
},
"Version": {
"type": "dword",
"value": 13
"value": 14
},
"Width": {
"type": "int",

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 4
"value": 5
},
"Width": {
"type": "int",

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 7
"value": 8
},
"Width": {
"type": "int",

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 6
"value": 7
},
"Width": {
"type": "int",

View File

@ -158,7 +158,7 @@
},
"Script": {
"type": "resref",
"value": ""
"value": "ra_npc_talktimes"
},
"Sound": {
"type": "resref",

View File

@ -150,7 +150,11 @@
},
"Quest": {
"type": "cexostring",
"value": ""
"value": "kingsley"
},
"QuestEntry": {
"type": "dword",
"value": 3
},
"RepliesList": {
"type": "list",
@ -197,7 +201,7 @@
},
"Script": {
"type": "resref",
"value": "at_256"
"value": "qst_kngsly_3rd"
},
"Sound": {
"type": "resref",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8070,7 +8070,7 @@
},
"Conversation": {
"type": "resref",
"value": "oracle"
"value": "cv_oracle"
},
"CRAdjust": {
"type": "int",
@ -8108,7 +8108,7 @@
},
"FactionID": {
"type": "word",
"value": 7
"value": 1
},
"FeatList": {
"type": "list",
@ -8296,7 +8296,7 @@
"__struct_id": 0,
"Rank": {
"type": "byte",
"value": 11
"value": 0
}
},
{
@ -8331,7 +8331,7 @@
"__struct_id": 0,
"Rank": {
"type": "byte",
"value": 11
"value": 0
}
},
{
@ -8550,7 +8550,7 @@
},
"Subrace": {
"type": "cexostring",
"value": ""
"value": "Outsider"
},
"Tag": {
"type": "cexostring",

View File

@ -67787,7 +67787,7 @@
},
"Conversation": {
"type": "resref",
"value": "lostaltar"
"value": "pl_lostaltar"
},
"CurrentHP": {
"type": "short",

View File

@ -493,15 +493,15 @@
},
"X": {
"type": "float",
"value": 54.65568923950195
"value": 54.64530181884766
},
"Y": {
"type": "float",
"value": 45.72232055664063
"value": 45.71510314941406
},
"Z": {
"type": "float",
"value": 1.486903667449951
"value": 1.488233089447022
}
},
{
@ -2421,7 +2421,7 @@
},
"OnInvDisturbed": {
"type": "resref",
"value": ""
"value": "toship1"
},
"OnLock": {
"type": "resref",
@ -2594,7 +2594,7 @@
},
"XPosition": {
"type": "float",
"value": 43.11000061035156
"value": 42.65795516967773
},
"YOrientation": {
"type": "float",
@ -2602,11 +2602,11 @@
},
"YPosition": {
"type": "float",
"value": 45.0
"value": 44.88981246948242
},
"ZPosition": {
"type": "float",
"value": 1.0
"value": 1.000005722045898
}
}
]

View File

@ -1900,7 +1900,7 @@
"id": 14817,
"type": "cexolocstring",
"value": {
"0": "SP_SN01_SD60_RW_PC_SF_SU30_DS2_RH80"
"0": "SP_SN01_SD60_RW_PC_SF_DS2_RH80"
}
},
"MapNote": {
@ -1925,7 +1925,7 @@
},
"XPosition": {
"type": "float",
"value": 44.37037658691406
"value": 29.01668167114258
},
"YOrientation": {
"type": "float",
@ -1933,11 +1933,11 @@
},
"YPosition": {
"type": "float",
"value": 33.98986053466797
"value": 45.23405456542969
},
"ZPosition": {
"type": "float",
"value": -5.7220458984375e-006
"value": 0.006923675537109375
}
}
]

View File

@ -1166,7 +1166,7 @@
},
"XPosition": {
"type": "float",
"value": 79.99504852294922
"value": 79.96379852294922
},
"YOrientation": {
"type": "float",
@ -1174,11 +1174,11 @@
},
"YPosition": {
"type": "float",
"value": 79.99504852294922
"value": 80.05738830566406
},
"ZPosition": {
"type": "float",
"value": -5.7220458984375e-006
"value": -4.813075065612793e-006
}
}
]

View File

@ -50,7 +50,7 @@
"__struct_id": 4,
"Appearance_Type": {
"type": "word",
"value": 750
"value": 871
},
"BodyBag": {
"type": "byte",
@ -86,7 +86,7 @@
},
"Conversation": {
"type": "resref",
"value": ""
"value": "cv_charmed"
},
"CRAdjust": {
"type": "int",
@ -1021,6 +1021,116 @@
"type": "byte",
"value": 0
},
"ItemList": {
"type": "list",
"value": [
{
"__struct_id": 0,
"AddCost": {
"type": "dword",
"value": 0
},
"BaseItem": {
"type": "int",
"value": 29
},
"Charges": {
"type": "byte",
"value": 0
},
"Cost": {
"type": "dword",
"value": 0
},
"Cursed": {
"type": "byte",
"value": 0
},
"DescIdentified": {
"type": "cexolocstring",
"value": {
"0": "Proof that you have slain the mighty Hydra of Grezneck."
}
},
"Description": {
"type": "cexolocstring",
"value": {
"0": ""
}
},
"Dropable": {
"type": "byte",
"value": 1
},
"Identified": {
"type": "byte",
"value": 1
},
"LocalizedName": {
"type": "cexolocstring",
"value": {
"0": "Hydra's Heart"
}
},
"ModelPart1": {
"type": "byte",
"value": 10
},
"Plot": {
"type": "byte",
"value": 1
},
"PropertiesList": {
"type": "list",
"value": []
},
"Repos_PosX": {
"type": "word",
"value": 0
},
"Repos_Posy": {
"type": "word",
"value": 0
},
"StackSize": {
"type": "word",
"value": 1
},
"Stolen": {
"type": "byte",
"value": 0
},
"Tag": {
"type": "cexostring",
"value": "HydrasHeart"
},
"TemplateResRef": {
"type": "resref",
"value": "item045"
},
"XOrientation": {
"type": "float",
"value": 0.0
},
"XPosition": {
"type": "float",
"value": -1.0
},
"YOrientation": {
"type": "float",
"value": 1.0
},
"YPosition": {
"type": "float",
"value": -1.0
},
"ZPosition": {
"type": "float",
"value": -1.0
}
}
]
},
"LastName": {
"type": "cexolocstring",
"value": {
@ -1163,7 +1273,7 @@
},
"Rank": {
"type": "byte",
"value": 13
"value": 0
}
},
{
@ -1501,7 +1611,7 @@
},
"WalkRate": {
"type": "int",
"value": 5
"value": 7
},
"willbonus": {
"type": "short",

View File

@ -25145,7 +25145,9 @@
"LocalizedName": {
"id": 14817,
"type": "cexolocstring",
"value": {}
"value": {
"0": "Waypoint"
}
},
"MapNote": {
"type": "cexolocstring",
@ -25157,7 +25159,7 @@
},
"Tag": {
"type": "cexostring",
"value": "pirate1"
"value": "WP_PIRATE01"
},
"TemplateResRef": {
"type": "resref",
@ -25169,7 +25171,7 @@
},
"XPosition": {
"type": "float",
"value": 45.14072799682617
"value": 44.95029830932617
},
"YOrientation": {
"type": "float",
@ -25177,7 +25179,7 @@
},
"YPosition": {
"type": "float",
"value": 11.4395923614502
"value": 11.74355697631836
},
"ZPosition": {
"type": "float",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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);

View File

@ -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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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);
}

View 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);
}

View 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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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)));
}

Binary file not shown.

View File

@ -42,7 +42,7 @@
},
"Conversation": {
"type": "resref",
"value": ""
"value": "cv_oracle"
},
"CRAdjust": {
"type": "int",
@ -272,7 +272,7 @@
"__struct_id": 0,
"Rank": {
"type": "byte",
"value": 11
"value": 0
}
},
{
@ -307,7 +307,7 @@
"__struct_id": 0,
"Rank": {
"type": "byte",
"value": 11
"value": 0
}
},
{
@ -526,7 +526,7 @@
},
"Subrace": {
"type": "cexostring",
"value": ""
"value": "Outsider"
},
"Tag": {
"type": "cexostring",