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

21 lines
645 B
Plaintext

#include "quest_inc"
void main()
{
object oPC = GetPCSpeaker();
string sDB = CharacterDB(oPC);
string sItem = GetCampaignString(sDB, "QUEST_ITEM");
CreateItemOnObject(sItem, oPC);
if (GetCampaignInt(sDB, "QUEST_EVIL") == TRUE) AdjustAlignment(oPC, ALIGNMENT_EVIL, 5, FALSE);
int nReward = GetCampaignInt(sDB, "QUEST_REWARD");
GiveGoldToCreature(oPC, nReward);
int nExp = GetCampaignInt(sDB, "QUEST_EXP");
GiveXPToCreature(oPC, nExp);
string sToken = GetLocalString(oPC, "QuestToken");
RemoveJournalQuestEntry("random_quest"+sToken, oPC, FALSE);
DeleteCampaignVariable(sDB, "QUEST_JOURNAL");
}