Initial Commit
Initial Commit
This commit is contained in:
23
_module/nss/quest_payransom.nss
Normal file
23
_module/nss/quest_payransom.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "x4_inc_functions"
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
string sDB = CharacterDB(oPC);
|
||||
int nRansom = StringToInt(GetCampaignString(sDB, "QUEST_EXTRA2"));
|
||||
|
||||
if (GetGold(oPC) < nRansom) return;
|
||||
|
||||
TakeGoldFromCreature(nRansom, oPC, TRUE);
|
||||
SetLocalInt(OBJECT_SELF, "Quest_Halt", TRUE);
|
||||
|
||||
object oObject = GetFirstObjectInArea(GetArea(OBJECT_SELF));
|
||||
while (oObject != OBJECT_INVALID)
|
||||
{
|
||||
if (GetLocalInt(oObject, "RansomQuest") == TRUE)
|
||||
{
|
||||
SetLocalInt(oObject, "Rescued", TRUE);
|
||||
break;
|
||||
}
|
||||
oObject = GetNextObjectInArea(GetArea(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user