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
begin onadd playerRemoveme TheCompanionRefendIs probably a bit easier.