Counterintuitively, setting the item to undroppable won't stop players from dropping it - that flag is for NPC drops. Use the scripting command SetCursed.
Funky
I find that the Undroppable flag on an
item template stops players from dropping the item, selling it or removing it from companions. Is that the same flag as SetCursed, or is there a loophole I've missed?
Not to be confused with the Droppable flag in
creature inventory, which determines whether the item is lootable.