Ancordia_PRC8/_module/nss/quest_esreward.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

20 lines
613 B
Plaintext

#include "quest_inc"
void main()
{
object oPC = GetPCSpeaker();
string sDB = CharacterDB(oPC);
int nReward = GetCampaignInt(sDB, "QUEST_REWARD");
GiveGoldToCreature(oPC, nReward);
int nExp = GetCampaignInt(sDB, "QUEST_EXP");
GiveXPToCreature(oPC, nExp);
RemoveJournalQuestEntry("random_quest", oPC, FALSE);
RemoveHenchman(oPC, OBJECT_SELF);
DeleteCampaignVariable(sDB, "QUEST_JOURNAL");
SetLocalInt(OBJECT_SELF, "Quest_Halt", TRUE);
SetPlotFlag(OBJECT_SELF, TRUE);
if (GetCampaignInt(sDB, "QUEST_EVIL") == TRUE) AdjustAlignment(oPC, ALIGNMENT_EVIL, 3, FALSE);
}