First off, let me give you a great scripting resource: [url=
http://nwn1.nwn2lexicon.com/:1avfraui]NWN Lexicon[/url:1avfraui].
It's for NWN1 scripting, but almost everything also still applies to NWN2 (and as I understand it they're working on a version specific to NWN2). Particularly the simpler examples you mentioned you should be able to do with that resource.
Anyway, on to the examples. I'm doing things mostly from memory here so might not be 100% accurate, but should be close enough to follow I hope.
[quote="DragonMind":1avfraui]1)
when a creature reaches(or passes) a specific amount of health, a scripting event should be triggered, this script should do stuff, tha could be: forcing creature to cast spell, spawn mobs, move or spawn objects/obstacles (barrels, book cases, statues...) etc.[/quote:1avfraui]
Create have an On Damage even that you can put a script in. In this script you can then check how many hitpoints the creature has left and if that fits your criteria (is equal to or smaller than the specific amount) then you can fire another script (ExecuteScript function) that could do all kinds of stuff.
Some slightly more advanced stuff to make it even neater...
You could put that specific amount as a variable on the creature and then use GetLocal... to read the value when checking. This way it's easy to change the value without having to recompile and you could use the same script for various creatures even if they have different amounts to react to.
You could also base the name of the script to fire on a variable you set on the creature. Again this helps with making the script usable in multiple situations; then whenever you want something to happen when a creature reaches a certain number of hitpoints you could use the same base script and just set different variables on the creature for different actions taken. Heck, you could even use scripts to dynamically modify these values to get a chain of events (do one thing when under 50 HP, another when under 20, etc, etc).
Anyway, probably best start with the basis.
[quote="DragonMind":1avfraui]2)
Another thing I thought about is doors being locked/unlocked, by putting into and taking stuff from, a container (barrel, chest...)[/quote:1avfraui]
As I recall placeables have an "On Close" event or such. This is generally a good place to check the contents of the container (since the player likely just altered it). Go through the inventory on this script and see what items are in it (and which are not). Then when the right item(s) are in it you can either call another script from it or just directly lock/unlock the door and such.
And again a slightly more advanced use here is using the variables on the container to do things like change the tag of the item it checks, change the tag of the door it unlocks, etc. Write one script and use it in a dozen different places.
I hope that helps.
Love -x-x-x-
Shir'le