Here you go:
void main()
{
object oPC = GetLastKiller();
if(!GetIsPC(oPC)) oPC = GetMaster(oPC);
if(GetIsObjectValid(oPC))
{
int nCounter;
object oItem;
//Get items in slots
for (nCounter = 0; nCounter <= NUM_INVENTORY_SLOTS; nCounter++)
{
//Skip creature items
if(nCounter != INVENTORY_SLOT_CARMOUR &&
nCounter != INVENTORY_SLOT_CWEAPON_B &&
nCounter != INVENTORY_SLOT_CWEAPON_L &&
nCounter != INVENTORY_SLOT_CWEAPON_R)
{
oItem = GetItemInSlot(nCounter, OBJECT_SELF);
if(GetIsObjectValid(oItem))
{
ActionGiveItem(oItem, oPC);
}
}
}
//Get items in inventory
oItem = GetFirstItemInInventory();
while(GetIsObjectValid(oItem))
{
ActionGiveItem(oItem, oPC);
oItem = GetNextItemInInventory();
}
}
ExecuteScript("nw_c2_default7", OBJECT_SELF);
}
-420
Modifié par 420, 27 octobre 2010 - 06:13 .