Hi,
If player move newbie item (for example robe), to main backpack and die, It will be no problem - after ressurect this robe still will be in backpack, BUT
If player move this robe to another container (example bag in main backpack), these robe is in corpse after player die.
Can you help me for script a function that every newbie items move to main backpack after character die?
I know how to do it, but my script need optimalization..
Thank you, Ciechu
Newbie (blessed) items problem on player death
Moderator: POL Developer
Re: Newbie (blessed) items problem on player death
misc/chrdeath.src
You'll have to be careful.
if the player has backpacks of newbie items
you'll have to get around this problem by creating backpacks and moving the newbie items in.
Code: Select all
program chrdeath(corpse,ghost)
var backpack := ghost.backpack;
MoveNewbieItemsFromTheBodyToBackpack(corpse,backpack);
endprogram
function MoveNewbieItemsFromTheBodyToBackpack(corpse,backpack)
foreach item in (EnumerateItemsInContainer(corpse))
SleepMS(10);
if(item.newbie)
MoveItemToContainer( item, backpack );
endif
endforeach
endfunction
if the player has backpacks of newbie items

you'll have to get around this problem by creating backpacks and moving the newbie items in.
Re: Newbie (blessed) items problem on player death
Ok, thank you.
That is what I wrote also. I think there was anything better than foreach.
Thank you!
That is what I wrote also. I think there was anything better than foreach.
Thank you!