Could you say me if i keep my "PC player SKIN" with that scripts?

It takes all inventay, the" PC PLAYER SKIN" too?

void main()
{
object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));

if (DoOnce==TRUE) return;

SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);

object oItem;

// Get the PC who is in this conversation.


// Relieve the PC of its possessions.
oItem = GetFirstItemInInventory(oPC);
while ( oItem != OBJECT_INVALID )
{
    DestroyObject(oItem);
    oItem = GetNextItemInInventory(oPC);
}

// Relieve the PC of its gold.
TakeGoldFromCreature(GetGold(oPC), oPC, TRUE);

oItem = GetItemInSlot( INVENTORY_SLOT_CHEST,oPC);//cota de malas//NW_AARCL011

if (GetIsObjectValid(oItem))
DestroyObject(oItem);

ect…ect…ect

}
Thanks :smiley:

In the inventory loop, replace

    DestroyObject(oItem);

with

        if (GetBaseItemType(oItem) != BASE_ITEM_CREATUREITEM)
         DestroyObject(oItem);

When processing the slots, omit INVENTORY_SLOT_CARMOUR.

Alternatively, you can do all inventory slots in one loop, omitting skins and other creature slots:

int nSlot = -1;

while (++nSlot <= INVENTORY_SLOT_BOLTS)
  {
    oItem = GetItemInSlot(nSlot, oPC);
    if (GetIsObjectValid(oItem))
      DestroyObject(oItem);
  }

You can use a “for” loop there if you prefer.

2 Likes

thanks, guy!!! :smiley: