EN4_PRC8/_module/nss/qst_ed6.nss
Jaysyn904 b464d8da05 Initial Commit
Initial Commit [v1.32PRC8]
2025-04-03 13:38:45 -04:00

79 lines
1.6 KiB
Plaintext

#include "nw_i0_tool"
#include "rd_treasure"
void SetPartyVariables(object oPC);
void GivePartyMagicItem(object oPC);
void GivePartyQuestPoints(object oPC, int iQuestPoints);
void main()
{
int iDifficulty;
int iGold;
int iXP;
int iChance;
int iRandom;
int iMod;
int iLevel;
int iQuestPoints;
object oPC;
oPC = GetPCSpeaker();
iGold = 500;
iXP = 1000;
iChance = 5 * iDifficulty + GetHitDice(oPC);
RewardPartyXP(iXP, GetPCSpeaker());
RewardPartyGP(iGold, GetPCSpeaker());
GivePartyMagicItem(GetPCSpeaker());
iQuestPoints = 3;
GivePartyQuestPoints(oPC,iQuestPoints);
SetLocalInt(OBJECT_SELF,"Done",1);
}
void GivePartyQuestPoints(object oPC, int iQuestPoints)
{
int iQuest;
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
iQuest = GetLocalInt(oPartyMember,"QuestPoints");
iQuest = iQuest + iQuestPoints;
SetLocalInt(oPartyMember,"QuestPoints",iQuest);
SendMessageToPC(oPartyMember,"You have been given " + IntToString(iQuestPoints) + " quest points. You now have " + IntToString(iQuest) + ".");
oPartyMember = GetNextFactionMember(oPC, TRUE);
}
}
void GivePartyMagicItem(object oPC)
{
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
GetMagicItem(oPartyMember,TRUE,TRUE);
oPartyMember = GetNextFactionMember(oPC, TRUE);
}
}
void SetPartyVariables(object oPC)
{
int iDeaths;
int iLastQuest;
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
SetLocalInt(oPartyMember,"Edwards",2);
oPartyMember = GetNextFactionMember(oPC, TRUE);
}
}