Rune_PRC8/_module/nss/library4.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

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);
}