Quest and script fixes for quest

This commit is contained in:
EpicValor
2023-10-12 22:59:45 -05:00
parent 043b9846f9
commit c3e1040894
43 changed files with 8051 additions and 1465 deletions

15
_module/nss/delete1.nss Normal file
View File

@@ -0,0 +1,15 @@
//::///////////////////////////////////////////////
//:: FileName delete1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 1
//:://////////////////////////////////////////////
#include "nw_i0_tool"
void main()
{
// Give the speaker some gold
RewardPartyGP(5000, GetPCSpeaker());
}

16
_module/nss/delete3.nss Normal file
View File

@@ -0,0 +1,16 @@
//::///////////////////////////////////////////////
//:: FileName delete3
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 1
//:://////////////////////////////////////////////
void main()
{
// Remove items from the player's inventory
object oItemToTake;
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "warlordshead");
if(GetIsObjectValid(oItemToTake) != 0)
DestroyObject(oItemToTake);
}

View File

@@ -14,7 +14,7 @@ void main()
if (DoOnce==1) return;
if (GetHitDice(oPC) >= 5) return;
if (GetHitDice(oPC) >= 6) return;
GiveXPToCreature(oPC, 150);
SetCampaignInt("150_xp3",GetTag(OBJECT_SELF),1,oPC);

View File

@@ -7,7 +7,13 @@
//:://////////////////////////////////////////////
void main()
{
object oPC = GetPCSpeaker();
object oParty = GetFirstFactionMember(oPC, TRUE);
if (GetIsPC(oParty))
{
// Give the speaker the items
CreateItemOnObject("sarumroyalseal", GetPCSpeaker(), 1);
SetLocalInt(GetPCSpeaker(), "sarumseal", 1);
CreateItemOnObject("sarumroyalseal", oParty, 1);
SetLocalInt(oParty, "sarumseal", 1);
}
oParty = GetNextFactionMember(oPC, TRUE);
}

View File

@@ -9,19 +9,29 @@
void main()
{
int DoOnce = GetCampaignInt("warlord_head",GetTag(OBJECT_SELF),GetPCSpeaker());
object oPC = GetPCSpeaker();
object oParty = GetFirstFactionMember(oPC, TRUE);
string sName = GetName(oPC);
string sName2 = GetName(oParty);
int DoOnce = GetCampaignInt("warlord_head",sName, GetPCSpeaker());
if (DoOnce==1) return;
// Give the speaker some gold
GiveGoldToCreature(GetPCSpeaker(), 5000);
// Give the speaker some XP
RewardPartyXP(5000, GetPCSpeaker(),FALSE);
RewardPartyXP(5000, GetPCSpeaker(),TRUE);
// Give the speaker some gold
RewardPartyGP(5000, GetPCSpeaker());
object oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "warlordshead"); // Place item Tag here
if(GetIsObjectValid(oItemToTake) != 0)
DestroyObject(oItemToTake);
SetCampaignInt("warlord_head",GetTag(OBJECT_SELF),1,GetPCSpeaker());
object oItemToTake;
oItemToTake = GetItemPossessedBy(oParty, "warlordshead"); // Place item Tag here
if (GetIsPC(oParty))
{
SetCampaignInt("warlord_head",sName2,1,oParty);
SetLocalInt(oParty, "warlord_head", 1);
DestroyObject(oItemToTake);
}
oParty = GetNextFactionMember(oPC, TRUE);
}

View File

@@ -7,10 +7,8 @@
//:://////////////////////////////////////////////
int StartingConditional()
{
// Inspect local variables
if(GetLocalInt(GetPCSpeaker(), "sarumseal") == 1)
return TRUE;
return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: FileName olina_getvar1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 10/10/2003 22:16:42
//:://////////////////////////////////////////////
int StartingConditional()
{
if(GetLocalInt(GetPCSpeaker(), "warlord_head") == 1)
return TRUE;
return FALSE;
// Inspect local variables
if(GetLocalInt(GetPCSpeaker(), "sarumseal") == 1)
return TRUE;
return FALSE;
}

View File

@@ -8,10 +8,11 @@ void main()
WalkWayPoints();
GenerateNPCTreasure();
// ***** END DEFAULT GENERIC BEHAVIOR ***** //
ClearAllActions();
// Sit in the assigned chair.
string sChairTag = "RoyalSeat";
object oChair = GetNearestObjectByTag(sChairTag);
DelayCommand(15.0, ActionSit(oChair));
DelayCommand(5.0, ActionSit(oChair));
DelayCommand(5.0, ActionSit(oChair));
}

View File

@@ -0,0 +1,23 @@
void main()
{
// If running the lowest AI, abort for performance reasons.
if ( GetAILevel() == AI_LEVEL_VERY_LOW )
return;
// If busy with combat or conversation, skip this heartbeat.
if ( IsInConversation(OBJECT_SELF) || GetIsInCombat() )
return;
// Get the PC who will be referenced in this event.
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1,
CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
// Only fire once.
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
// Have us perform a sequence of actions.
ActionSit(GetNearestObjectByTag("RoyalSeat"));
}

View File

@@ -0,0 +1,20 @@
void main()
{
object oPC = GetEnteringObject();
string sName = GetName(oPC, FALSE);
object oKingsGuard = GetNearestObjectByTag("KingsGuard");
// Only fire once.
if ( GetLocalInt(GetModule(), "DO_ONCE__" + sName))
return;
if (GetIsPC(oPC))
{
AssignCommand(oKingsGuard, ClearAllActions());
AssignCommand(oKingsGuard, ActionSpeakString(sName + " has entered the Court!", TALKVOLUME_TALK));
SetLocalInt(GetModule(), "DO_ONCE__" + sName, TRUE);
}
}

View File

@@ -0,0 +1,24 @@
//::///////////////////////////////////////////////
//:: FileName kingreward3
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 1
//:://////////////////////////////////////////////
#include "nw_i0_tool"
void main()
{
// Give the speaker some XP
RewardPartyXP(5000, GetPCSpeaker());
// Remove items from the player's inventory
object oItemToTake;
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "warlordshead");
if(GetIsObjectValid(oItemToTake) != 0)
DestroyObject(oItemToTake);
// Set the variables
SetLocalInt(GetPCSpeaker(), "warlordreward", 1);
}

View File

@@ -7,7 +7,12 @@
//:://////////////////////////////////////////////
void main()
{
// Give the speaker the items
CreateItemOnObject("innkeepersnote", GetPCSpeaker(), 1);
object oPC = GetPCSpeaker();
object oParty = GetFirstFactionMember(oPC, TRUE);
if (GetIsPC(oParty))
{
// Give the party the items
CreateItemOnObject("innkeepersnote", oParty, 1);
}
oParty = GetNextFactionMember(oPC, TRUE);
}