PGCC_PRC8/_module/nss/cc_propertyhelp.nss
Jaysyn904 e51634d39b Initial upload
Initial upload.
2024-10-09 14:17:22 -04:00

39 lines
951 B
Plaintext

/*
Thanks for help from PASSWORD PROTECTED DOOR by mod_urn@yahoo.com
*/
#include "nw_i0_generic"
void main()
{
int iListen = GetListenPatternNumber();
string sNewName;
if(iListen == 777) // listen pattern set in s_listener
{
sNewName = GetMatchedSubstring(0);
if (GetLocalInt(OBJECT_SELF, "iListenFlag") == TRUE)
{
//SpeakString("Echo = " + sNewName);
object oAnvil = GetNearestObjectByTag("pAnvilOfWonder");
object oItem = GetFirstItemInInventory(oAnvil);
string sOldName = GetName(oItem);
SetName(oItem, sNewName);
SpeakString(sOldName + " is renamed to " + sNewName);
}
}
else if (iListen == -1)
{
// Not a match -- start an ordinary conversation
if (GetCommandable(OBJECT_SELF))
{
ClearActions(CLEAR_NW_C2_DEFAULT4_29);
BeginConversation();
}
}
}