A good way to make traps is to look through spell lists. Pick a spell that you'd like and then think of a way you can have it triggered by an object or an effect. In this case, we'll take something that is particularly valuable and likely to warrant the players' attention, a small telescope looking out a window. This is like "Shave and a haircut" to a toon; no player can resist looking through that scope.
Color Spray Scope (CR 2)
A telescope looks out the window. The ends are capped.
Type: magical; Perception DC 26; Disable Device 26
Trigger touch; Reset None
If the eyepiece cap is removed, color spray at CL 1 (DC 11 Will Save) is cast originating at the eyepiece and towards the character that removed it.
When half the party wakes up, they may think twice about those random valuable objects in your dungeon. For bonus points, have this thing activate when they are trying to sell it to a merchant for the gold. That in and of itself could be the premise of a whole evening's adventures.