Try this.
-- Attack munchkins, call brawlers and ignore burls.
-- This function defines the hero's behaviour about enemies.
function dealEnemy(enemy)
-- If enemy.type is "munchkin":
if enemy.type == "munchkin" then
-- Then attack it:
hero:attack(enemy)
end
-- If the enemy's type is "brawler":
if enemy.type == "brawler" then
-- Then say something to call the brawler:
hero:say('Get Over HEEERRREEE')
end
end
while true do
local enemy = hero:findNearestEnemy()
if enemy then
dealEnemy(enemy)
else
hero:moveXY(30, 34)
end
end