Starbridge wrote...
All equipped items were deleted and the gold amount was added to starting pool, but I kinda like that about the gold. Still need to figure out a way to get rid of everything in inventory.
Sorry, my bad. Copied it from another script and forgot to replace a default variable:
//Goes in module's OnClientEnter event
void main()
{
object oPC = GetEnteringObject();
if(GetXP(oPC) == 0)
{
SetXP(oPC, 1);
int iCounter;
object oItem;
//Strip equipped items
for (iCounter = 0; iCounter <= NUM_INVENTORY_SLOTS; iCounter++)
{
oItem = GetItemInSlot(iCounter, oPC);
DestroyObject(oItem);
}
//Strip inventory items
oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
TakeGoldFromCreature(GetGold(), oPC, TRUE);
//Give the PC gold
int nAmount = 10;
CreateItemOnObject("nw_it_gold001", oPC, nAmount);
//Give the PC items
CreateItemOnObject("item_resref_1", oPC);
CreateItemOnObject("item_resref_2", oPC);
CreateItemOnObject("item_resref_3", oPC);
}
}
-420