Gunblade Bot Submission

A bot submission for Gunblade.
Forum Post:
http://forums.heroesofnewerth.com/showthread.php?550581-Gunblade-Submission&p=16211596#post16211596
Here it would be best to use the CustomRetreatExecute function, like so:
function behaviorLib.CustomRetreatExecute(botBrain)
	--  this is a great function to override with using retreating skills, such as blinks, travels, stuns or slows.
	--Energizer use
	if itemEnergizer and itemEnergizer:CanActivate() and behaviorLib.lastRetreatUtil >= object.nEnergizerThreshold then
		botBrain:OrderItem(core.itemEnergizer.object or core.itemEnergizer, false)
	end
	--Use demonicSheild when fleeing
	local abilDemonicShield = skills.DemonicShield
	if (abilDemonicShield:CanActivate() and behaviorLib.lastRetreatUtil >= object.nDemonicShieldThreshold) then
		core.OrderAbility(botBrain, abilDemonicShield, false, true)
	end
	
	return false -- false means we didn't do anything, which is true because shield and energizer don't take time
end