Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
21
_module/nss/_item_migrate.nss
Normal file
21
_module/nss/_item_migrate.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user