More quest persistence
More quest persistence & cleanup.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// Give the speaker the items
|
||||
CreateItemOnObject("item062", GetPCSpeaker(), 1);
|
||||
// Give the speaker the items
|
||||
CreateItemOnObject("item062", GetPCSpeaker(), 1);
|
||||
|
||||
}
|
||||
|
@@ -7,10 +7,10 @@
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// Give the speaker some XP
|
||||
GiveXPToCreature(GetPCSpeaker(), 500);
|
||||
// Give the speaker some XP
|
||||
GiveXPToCreature(GetPCSpeaker(), 500);
|
||||
|
||||
// Give the speaker the items
|
||||
CreateItemOnObject("item073", GetPCSpeaker(), 1);
|
||||
// Give the PC Marthek's Charm
|
||||
CreateItemOnObject("item073", GetPCSpeaker(), 1);
|
||||
|
||||
}
|
||||
|
28
_module/nss/cv_pc_death.nss
Normal file
28
_module/nss/cv_pc_death.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:
|
||||
//:: cv_pc_death.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Kills the PC outright in a conversation
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables.
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
effect eDeath = EffectDeath();
|
||||
effect eDam = EffectDamage(9999);
|
||||
effect eLink = EffectLinkEffects(eDeath, eDam);
|
||||
|
||||
//:: Kills the PC.
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC);
|
||||
|
||||
}
|
25
_module/nss/cv_scramge_shift.nss
Normal file
25
_module/nss/cv_scramge_shift.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//::
|
||||
//:: qcv_scramge_shift.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Shifts Scramge into Rakshasa form.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
SetCreatureAppearanceType(oTarget, APPEARANCE_TYPE_RAKSHASA_TIGER_MALE);
|
||||
|
||||
}
|
243
_module/nss/marthek_ondeath.nss
Normal file
243
_module/nss/marthek_ondeath.nss
Normal file
@@ -0,0 +1,243 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//::
|
||||
//:: marthek_ondeath.nss
|
||||
//::
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Marthek's special NPC onDeath for the "Marthek
|
||||
the Madman" quest
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oKiller = GetLastKiller();
|
||||
|
||||
// Makes sure armor's droppable flag is set to 0
|
||||
SetDroppableFlag(GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF), 0);
|
||||
|
||||
if ((GetResRef(oNPC) == "ra_bandit001") ||
|
||||
(GetResRef(oNPC) == "ra_brigand001") ||
|
||||
(GetResRef(oNPC) == "ra_brigand002"))
|
||||
{
|
||||
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oNPC);
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oNPC);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oNPC);
|
||||
|
||||
// Give a 3% chance to drop armor &/or equipped weapon
|
||||
int bDroppableA = d100() > 97;
|
||||
int bDroppableW = d100() > 97;
|
||||
int bDroppableS = d100() > 97;
|
||||
|
||||
SetDroppableFlag(oArmor, bDroppableA);
|
||||
SetDroppableFlag(oWeapon, bDroppableW);
|
||||
SetDroppableFlag(oWeapon, bDroppableS);
|
||||
|
||||
}
|
||||
|
||||
int nVFX = GetLocalInt(OBJECT_SELF,"SpawnVFX");
|
||||
if(nVFX)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(nVFX)),OBJECT_SELF);
|
||||
}
|
||||
int nFirey = GetLocalInt(OBJECT_SELF,"FIREY");
|
||||
if (nFirey)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INFERNO_NO_SOUND);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nShadowy = GetLocalInt(OBJECT_SELF,"SHADOWY");
|
||||
if (nShadowy)
|
||||
{
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nStony = GetLocalInt(OBJECT_SELF,"STONY");
|
||||
if (nStony)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nWoody = GetLocalInt(OBJECT_SELF,"WOODY");
|
||||
if (nWoody)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_BARKSKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nIcy = GetLocalInt(OBJECT_SELF,"ICY");
|
||||
if (nIcy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nConcealed20 = GetLocalInt(OBJECT_SELF,"CONCEALED20");
|
||||
if (nConcealed20)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(20, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed50 = GetLocalInt(OBJECT_SELF,"CONCEALED50");
|
||||
if (nConcealed50)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(50, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nGlow = GetLocalInt (OBJECT_SELF,"GLOW_COLOR");
|
||||
if (nGlow == 1)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 2)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 3)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 4)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREY);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 5)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 6)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 7)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 8)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 9)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 10)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 11)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 12)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 13)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 14)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
else if (nGlow == 15)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 16)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("marthek", 2, oKiller);
|
||||
|
||||
|
||||
//:: Execute Default NPC OnDeath script
|
||||
ExecuteScript("nw_c2_default7", OBJECT_SELF);
|
||||
|
||||
|
||||
//:: Execute PRC NPC OnDeath script
|
||||
ExecuteScript("prc_npc_death", OBJECT_SELF);
|
||||
}
|
26
_module/nss/qst_ghost_end.nss
Normal file
26
_module/nss/qst_ghost_end.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ghost_end.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Ends & tracks the "Ghostly Geas" quest.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("ghost", 2, oPC);
|
||||
|
||||
//:: Give the PC the Archwizard's Key
|
||||
CreateItemOnObject("item062", oPC, 1);
|
||||
|
||||
}
|
25
_module/nss/qst_ghost_start.nss
Normal file
25
_module/nss/qst_ghost_start.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_ghost_start.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Start & tracks the "Ghostly Geas" quest
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("ghost", 1, oPC);
|
||||
|
||||
}
|
||||
|
||||
|
25
_module/nss/qst_marthek_4th.nss
Normal file
25
_module/nss/qst_marthek_4th.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_marthek_4th.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets stage 4 for the "Marthek the Madman" quest
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("marthek", 4, oPC);
|
||||
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ void main()
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("marthek", 2, oPC);
|
||||
AddPersistentJournalQuestEntry("marthek", 3, oPC);
|
||||
|
||||
//:: Give the PC some gold
|
||||
GiveGoldToCreature(oPC, 1000);
|
||||
|
@@ -6,8 +6,8 @@
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Makes sure the "Marthek the Madman" quest
|
||||
has been started.
|
||||
Makes sure the "Marthek the Madman" is on
|
||||
stage one.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
@@ -27,7 +27,7 @@ int StartingConditional()
|
||||
nInt = RetrieveQuestState("marthek", oPC);
|
||||
// nInt = GetLocalInt(oPC, "NW_JOURNAL_ENTRYmarthek");
|
||||
|
||||
if (nInt >= 1) return TRUE;
|
||||
if (nInt > 0 && nInt < 2) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ void main()
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("marthek", 4, oPC);
|
||||
AddPersistentJournalQuestEntry("marthek", 5, oPC);
|
||||
|
||||
//:: Give the PC some gold
|
||||
GiveGoldToCreature(oPC, 1500);
|
||||
|
25
_module/nss/qst_scramge_end.nss
Normal file
25
_module/nss/qst_scramge_end.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//::
|
||||
//:: qst_scramge_end.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Shifts Scramge into Rakshasa form.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
SetCreatureAppearanceType(oTarget, APPEARANCE_TYPE_RAKSHASA_TIGER_MALE);
|
||||
|
||||
}
|
29
_module/nss/qst_scramge_end2.nss
Normal file
29
_module/nss/qst_scramge_end2.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//::
|
||||
//:: qst_scramge_end2.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Updates quest stage & shifts Scramge into
|
||||
Rakshasa form after he betrays you.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
SetCreatureAppearanceType(oTarget, APPEARANCE_TYPE_RAKSHASA_TIGER_MALE);
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("scramge", 2, oPC);
|
||||
|
||||
}
|
29
_module/nss/qst_scramge_end3.nss
Normal file
29
_module/nss/qst_scramge_end3.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//::
|
||||
//:: qst_scramge_end3.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Updates quest stage & shifts Scramge into
|
||||
Rakshasa form after you refuse to help him.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
SetCreatureAppearanceType(oTarget, APPEARANCE_TYPE_RAKSHASA_TIGER_MALE);
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("scramge", 3, oPC);
|
||||
|
||||
}
|
28
_module/nss/qst_scramge_strt.nss
Normal file
28
_module/nss/qst_scramge_strt.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:
|
||||
//:: qst_scramge_strt.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Start & tracks the "Scramge the Orace" quest
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("scramge", 1, oPC);
|
||||
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ int StartingConditional()
|
||||
nInt = RetrieveQuestState("spiders", oPC);
|
||||
// nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders");
|
||||
|
||||
if (nInt == 1) return TRUE;
|
||||
if (nInt < 2 && nInt > 0) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
28
_module/nss/qst_spiders_end.nss
Normal file
28
_module/nss/qst_spiders_end.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: qst_spiders_end.nss
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Finished & rewards the PC for completing the
|
||||
"Mushroom of Youth" quest.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220620
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "pqj_inc"
|
||||
#include "nw_i0_tool"
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//:: Give the speaker some gold
|
||||
GiveGoldToCreature(GetPCSpeaker(), 500);
|
||||
|
||||
//:: Set quest stage & update DB.
|
||||
AddPersistentJournalQuestEntry("spiders", 3, oPC);
|
||||
}
|
||||
|
128
_module/nss/x2_mod_def_rest.nss
Normal file
128
_module/nss/x2_mod_def_rest.nss
Normal file
@@ -0,0 +1,128 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: x2_onrest
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The generic wandering monster system
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: June 9/03
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 28th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_restsys"
|
||||
#include "x2_inc_switches"
|
||||
#include "x3_inc_horse"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastPCRested();
|
||||
object oMount;
|
||||
|
||||
if (!GetLocalInt(GetModule(),"X3_MOUNT_NO_REST_DISMOUNT"))
|
||||
{ // make sure not mounted
|
||||
/* Deva, Jan 17, 2008
|
||||
Do not allow a mounted PC to rest
|
||||
*/
|
||||
if (HorseGetIsMounted(oPC))
|
||||
{ // cannot mount
|
||||
if (GetLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT"))
|
||||
{ // cancel message already played
|
||||
DeleteLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT");
|
||||
} // cancel message already played
|
||||
else
|
||||
{ // play cancel message
|
||||
FloatingTextStrRefOnCreature(112006,oPC,FALSE);
|
||||
SetLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT",TRUE); // sentinel
|
||||
// value to prevent message played a 2nd time on canceled rest
|
||||
} // play cancel message
|
||||
AssignCommand(oPC,ClearAllActions(TRUE));
|
||||
return;
|
||||
} // cannot mount
|
||||
} // make sure not mounted
|
||||
|
||||
if (!GetLocalInt(GetModule(),"X3_MOUNT_NO_REST_DESPAWN"))
|
||||
{ // if there is a paladin mount despawn it
|
||||
oMount=HorseGetPaladinMount(oPC);
|
||||
if (!GetIsObjectValid(oMount)) oMount=GetLocalObject(oPC,"oX3PaladinMount");
|
||||
if (GetIsObjectValid(oMount))
|
||||
{ // paladin mount exists
|
||||
if (oMount==oPC||!GetIsObjectValid(GetMaster(oMount))) AssignCommand(oPC,HorseUnsummonPaladinMount());
|
||||
else { AssignCommand(GetMaster(oMount),HorseUnsummonPaladinMount()); }
|
||||
} // paladin mount exists
|
||||
} // if there is a paladin mount despawn it
|
||||
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE)
|
||||
{
|
||||
/* Georg, August 11, 2003
|
||||
Added this code to allow the designer to specify a variable on the module
|
||||
Instead of using a OnAreaEnter script. Nice new toolset feature!
|
||||
Basically, the first time a player rests, the area is scanned for the
|
||||
encounter table string and will set it up.
|
||||
*/
|
||||
object oArea = GetArea (oPC);
|
||||
|
||||
string sTable = GetLocalString(oArea,"X2_WM_ENCOUNTERTABLE") ;
|
||||
if (sTable != "" )
|
||||
{
|
||||
int nDoors = GetLocalInt(oArea,"X2_WM_AREA_USEDOORS");
|
||||
int nDC = GetLocalInt(oArea,"X2_WM_AREA_LISTENCHECK");
|
||||
WMSetAreaTable(oArea,sTable,nDoors,nDC);
|
||||
|
||||
//remove string to indicate we are set up
|
||||
DeleteLocalString(oArea,"X2_WM_ENCOUNTERTABLE");
|
||||
}
|
||||
|
||||
|
||||
/* Brent, July 2 2003
|
||||
- If you rest and are a low level character at the beginning of the module.
|
||||
You will trigger the first dream cutscene
|
||||
*/
|
||||
if (GetLocalInt(GetModule(), "X2_G_LOWLEVELSTART") == 10)
|
||||
{
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
if (GetHitDice(oPC) >= 12)
|
||||
{
|
||||
ExecuteScript("bk_sleep", oPC);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStrRefOnCreature(84141 , oPC);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetLastRestEventType()==REST_EVENTTYPE_REST_STARTED)
|
||||
{
|
||||
if (!WMStartPlayerRest(oPC))
|
||||
{
|
||||
// The resting system has objections against resting here and now
|
||||
// Probably because there is an ambush already in progress
|
||||
FloatingTextStrRefOnCreature(84142 ,oPC);
|
||||
AssignCommand(oPC,ClearAllActions());
|
||||
}
|
||||
if (WMCheckForWanderingMonster(oPC))
|
||||
{
|
||||
//This script MUST be run or the player won't be able to rest again ...
|
||||
ExecuteScript("x2_restsys_ambus",oPC);
|
||||
}
|
||||
}
|
||||
else if (GetLastRestEventType()==REST_EVENTTYPE_REST_CANCELLED)
|
||||
{
|
||||
// No longer used but left in for the community
|
||||
// WMFinishPlayerRest(oPC,TRUE); // removes sleep effect, etc
|
||||
}
|
||||
else if (GetLastRestEventType()==REST_EVENTTYPE_REST_FINISHED)
|
||||
{
|
||||
// No longer used but left in for the community
|
||||
// WMFinishPlayerRest(oPC); // removes sleep effect, etc
|
||||
}
|
||||
}
|
||||
|
||||
ExportSingleCharacter(oPC);
|
||||
}
|
||||
|
Reference in New Issue
Block a user