Yes, you can. Just use the script attribute in the monster xml tag.
The script can handle:
onThink(self, interval) -- Maybe this is the most important for give a behavior to the boss
onCreatureAppear(self, creature) -- Maybe you can give bonus to make the boss more strong based on how much players coming to his area
onCreatureDisappear(self, creature) -- Or remove theses bonus if only a small party is attacking him
onCreatureMove(self, creature, oldPosition, newPosition) -- Ops, a player coming near the eggs of boss dragon? Set the target, throw the fire, kill him
onCreatureSay(self, creature, type, message) -- Well, the boss was not aggressive. But the player call him by a bad name, then he get angry and start to attack everyone, oh my gosh
You can also use all of creature events as onDeath, onKill, onPrepareDeath, onHealthChange, to make your boss unique, with invulnerability, random loot, get more strong as much as he kill players and etc...
Example:
<monster name="Dragon Boss" ... attributes ... script="dragon_boss.lua">
and put the dragon_boss.lua script on data/monsters/scripts/dragon_boss.lua with something like
Lua:
function onThink(self, interval)
print("I like FIRE! I'm a DRAGON! FEAR ME!")
end
The rest is with you. Just try to be creative, good luck