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

27 lines
808 B
Plaintext

#include "quest_inc"
#include "nw_i0_plot"
void main()
{
object oPC = GetPCSpeaker();
string sDB = CharacterDB(oPC);
int nReward = GetCampaignInt(sDB, "QUEST_REWARD");
//if the PC has enough gold to pay
if (GetGold(oPC) >= nReward/10)
{
TakeGoldFromCreature(nReward/10, oPC, TRUE);
SetLocalInt(oPC, "BanditsPaid", TRUE);
object oObject = GetFirstObjectInArea(GetArea(OBJECT_SELF));
while (oObject != OBJECT_INVALID)
{
if (GetTag(oObject) == "anc_roadbandit")
{
SetPlotFlag(oObject, TRUE);
AssignCommand(oObject, ClearAllActions());
AssignCommand(oObject, EscapeArea(TRUE));
}
oObject = GetNextObjectInArea(GetArea(OBJECT_SELF));
}
}
}