If you ever find yourself under attack, try and save yourself first. Being a hero is admirable, but it's more sensible to make sure you're safe before trying to assist others.
In a hostage situation
In case you are ever taken hostage, follow all the instructions of the terrorists. Don't try to oppose or anger them in any way. If they get angry, there’s no saying what they'll do -- rebelliousness may cost you your life.
Try to make contact with the outside world
Look out for all possible means to signal your location to anyone outside. Use whatever resources are at your disposal -- alarms, mobile phones, video sets. If you don't have access to any technology, throw a sheet of paper or a piece of outside your room. In this case, so many people were trapped inside the rooms, not giving us any signal as to where they were, or where the terrorists were. Just a small sign from one of them could have made our jobs so much easier.
Also see: Terror aftermath: How to cope with stress