PWE_PRC8/_module/nss/isitemonanvil.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

26 lines
805 B
Plaintext

int StartingConditional()
{
object oAnvil = GetNearestObjectByTag("NT_pAnvilOfWonder");
//Look for anvil object
if (oAnvil != OBJECT_INVALID)
{
//Make sure an item is on the anvil
object oItem = GetFirstItemInInventory(oAnvil);
if (oItem != OBJECT_INVALID)
{
//Make sure no extra items are on the anvil
object oNext = GetNextItemInInventory(oAnvil);
if (oNext == OBJECT_INVALID)
{
//Debug
int iValue = GetGoldPieceValue(oItem);
//Real
SetLocalObject(GetPCSpeaker(), "MODIFY_ITEM", oItem);
SetCustomToken(100, GetName(oItem));
return TRUE;
}
}
}
return FALSE;
}