32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
#include "nw_i0_plotwizard"
|
|
void main()
|
|
{
|
|
// Give the speaker some XP
|
|
//RewardPartyXP(1000, GetPCSpeaker());
|
|
object oPartymember = GetFirstFactionMember(GetPCSpeaker());
|
|
while (GetIsObjectValid(oPartymember))
|
|
{
|
|
if (GetArea(oPartymember) == GetArea(GetPCSpeaker()) && GetXP(oPartymember) < 21000)
|
|
{
|
|
GiveGoldToCreature(oPartymember, 600);
|
|
GiveXPToCreature(oPartymember, 1000);
|
|
CreateItemOnObject("NW_IT_MRING014", oPartymember, 1);
|
|
}
|
|
if (GetArea(oPartymember) == GetArea(GetPCSpeaker()) && GetXP(oPartymember) > 21000)
|
|
{
|
|
CreateItemOnObject("NW_IT_MRING016", oPartymember, 1);
|
|
}
|
|
oPartymember = GetNextFactionMember(GetPCSpeaker());
|
|
}
|
|
|
|
|
|
// Remove items from the player's inventory
|
|
object oItemToTake;
|
|
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "LibraryBookQuest");
|
|
if(GetIsObjectValid(oItemToTake) != 0)
|
|
DestroyObject(oItemToTake);
|
|
// Set the variables
|
|
PWSetMinLocalIntPartyPCSpeaker("p000state_Librarian", 3);
|
|
PWSetMinLocalIntPartyPCSpeaker("p000state", 3);
|
|
}
|