Initial Commit
Initial Commit
This commit is contained in:
26
_module/nss/quest_bandgiveg.nss
Normal file
26
_module/nss/quest_bandgiveg.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
#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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user