EN6_PRC8/_module/nss/t1_done.nss
Jaysyn904 a6f6db7303 Initial commit
Initial commit.  Updated release archive.
2024-06-13 15:08:33 -04:00

62 lines
1.6 KiB
Plaintext

#include "qst_include"
void SetMQAccomplishment(object oPC,object oQuestNPC);
void main()
{
object oPC;
object oHenchman;
int iFavor;
oPC=GetPCSpeaker();
if (GetLocalInt(OBJECT_SELF,"QuestLevel")<6)
RewardPartyXP(750, oPC);
else
RewardPartyXP(1250, oPC);
RewardPartyFame(2, oPC);
SetMQAccomplishment(oPC,OBJECT_SELF);
SetLocalInt(OBJECT_SELF,"QuestComplete",1);
SetPartyInt(oPC,"OnQuest",0);
AddJournalQuestEntry("jQuest",21,oPC);
SetPartyVariables(oPC);
SetLocalInt(GetModule(),"Theme1",1);
}
void SetMQAccomplishment(object oPC,object oQuestNPC)
{
string sZone;
string sAccomplishment;
string sZoneAccomplishment;
int iAccomplishment;
sZone = GetLocalString(oQuestNPC,"QuestZone");
sAccomplishment = "helped " + GetName(oQuestNPC) + " take care of a " + GetLocalString(OBJECT_SELF,"QuestStep1MobName");
if (sAccomplishment != "")
{
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
iAccomplishment = GetLocalInt(oPartyMember,"Accomplishments");
iAccomplishment++;
SetLocalInt(oPartyMember,"Accomplishments",iAccomplishment);
SetLocalString(oPartyMember,"Accomplishment" + IntToString(iAccomplishment),sAccomplishment);
sZoneAccomplishment = GetLocalString(oPartyMember,sZone + "_Accomplishment");
if (sZoneAccomplishment == "")
SetPartyString(oPartyMember,sZone + "_Accomplishment",sAccomplishment);
else
if (Random(2)==0)
SetPartyString(oPartyMember,sZone + "_Accomplishment",sAccomplishment);
oPartyMember = GetNextFactionMember(oPC, TRUE);
}
}
}