Files
Anphillia_PRC8/_module/nss/_item_migrate.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

22 lines
744 B
Plaintext

const string MIGRATE_RESREFS="hicdruidstafffem;hicdruidstaffmal;mahdruidstafffem;mahdruidstaffmal;oakdruidstafffem;oakdruidstaffmal;cnrplatrubyneck";
void main()
{
object oItem = OBJECT_SELF;
object oOwner = GetItemPossessor(oItem);
string sResRef = GetResRef(oItem);
if (FindSubString(MIGRATE_RESREFS, sResRef) >= 0)
{
if (GetLocalInt(oItem, "_migrate_ITEM") < 1)
{
SendMessageToPC(oOwner, "Your " + GetName(oItem) + " has been updated to new stats");
int nStackSize = GetItemStackSize(oItem);
DestroyObject(oItem);
object oNewItem = CreateItemOnObject(sResRef, oOwner, nStackSize);
SetLocalInt(oNewItem, "_migrate_ITEM", 1);
}
}
}