Making an item essential on an NPC

Post » Wed Mar 03, 2010 9:11 pm

Can I make an item in an NPC's inventory un-removable? If I make it a quest item it doesn't work and if I transfer it I can't drop it.
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Wed Mar 03, 2010 3:16 pm

What exactly do you mean un-removable? Just that the player can't remove it when they are dead? If its armor or clothing you can remove the check mark "playable". If it's something else put "removeitem TheItem 1" in an ondeath block.
User avatar
trisha punch
 
Posts: 3410
Joined: Thu Jul 13, 2006 5:38 am

Post » Wed Mar 03, 2010 11:45 pm

It's for a companion. I want it so that the player cannot remove the item from their inventory.
User avatar
Jessie Butterfield
 
Posts: 3453
Joined: Wed Jun 21, 2006 5:59 pm

Post » Wed Mar 03, 2010 7:04 pm

Well something like this will work then since I'm guessing its not an item that can be flagged as not playable...Put this in the companions script.

short removeBegin MenuMode 1008if remove == 1   player.removeitem MyItem 1   additem MyItem 1   set remove to 0   message "you can not remove this item";remove this if you don't want the messageendif if player.getitemcount MyItem > 0   set remove to 1endifEnd

User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Wed Mar 03, 2010 3:16 pm

begin onadd playerRemoveme TheCompanionRefend
Is probably a bit easier.
User avatar
Mélida Brunet
 
Posts: 3440
Joined: Thu Mar 29, 2007 2:45 am

Post » Wed Mar 03, 2010 6:04 pm

How about this simple idea that doesn't require a script.
So go to the clothing item you want.
right click edit, change the ID (e.g. from MiddleClassPants01 to MiddleClasspants01Companion)

then uncheck the 'playable' box.
everything else doesn't matter for this.
then drag'MiddleClassPants01Companion' into the NPC's inventory rather than MiddleClassPants01.
Done.
Hope that helps :dancing:
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm

Post » Thu Mar 04, 2010 12:52 am

How about this simple idea that doesn't require a script.
So go to the clothing item you want.
right click edit, change the ID (e.g. from MiddleClassPants01 to MiddleClasspants01Companion)

then uncheck the 'playable' box.
everything else doesn't matter for this.
then drag'MiddleClassPants01Companion' into the NPC's inventory rather than MiddleClassPants01.
Done.
Hope that helps :dancing:

You are the master of not reading a whole thread before posting I see.
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm


Return to IV - Oblivion