Right, it's time for tactics here. You've got to A: temporarily tell your education to go f*ck itself inside your head and B: establish some method of self defense.
The weapons the trash are using are not the kind you can sidestep/block/duck away from. Bombs are going to create a large explosion. Bye all rights, the police should have run a scan for explosive materials bye now. If they haven't, then they're idiots and not fit to be protecting you.
I would suggest the best method of defending yourself is avoidance; if you're not there when a piece of napalm laced C4 goes off, you're not going to be missing any parts, are you? exactly.
The ways to tell some idiot is about to blow something up:
1: looks nervous or shifty, freaks at the sight of authority figures.
2: keeps to dark areas or appears to stand in a sheltered area.
3: hand in pocket/under jacket. If you see this, you should be gone like the winds.
If you can't get completely clear of the school in time, the best step is to avoid the building itself, take cover in an open space and possible behind obvious cover (EG cars, bike shed, wtf ever)
If someone pulls a shotgun or something even worse, the best thing to do is make sure you don't present a threat. Don't look like you're about to charge and save the day; look like you'd like to run but wouldn't dare. This reassures crazies and makes them think they probably won't have to pull any triggers.
Or, just pay attention to the weapon. Listen for sounds; if you here a twangy mechanical click, then it's probably the real deal. If you here the sound of a pellet gun having some rounds loaded into the ammo chamber, then it might be a plastic - just as likely to blow up in your hand as to fire a bullet.
Knives, on the other hand, aren't nearly as dangerous as ballistic weaponry or explosives. This may sound selfish, but you need to move slowly away from a knifer the second you see a weapon, and try to move behind other people in the vicinity. You won't feel sorry later, believe me.
and one last thing: remember; SCR'EW EDUCATION. Your life is a trillion times more important than getting into class. Don't ever bait an aggressor: the same doesn't go for cops. If they're doing a shabby job, scream at them.
If all this sounds insane for some reason, please give me some more info on the state of affairs and I can try and think out anything that's obviously silly.