Great and greatily confusing tutorial

The confusion sure helped me learn more about the script language (no sarcasm, really, would like more tutorials like this because you learn so much more this way, instead of just copying code), thanks!
I managed to adapt it quite well to my own needs, not bad for my first hour with scripting in hero engine i say
Now whenever i use W_InCombat = true after using an ability, my regen is swapped for another for a set time. Just like vanilla version of the game that must not be mentioned, just like we all secretly want it!
method E_regenTimer_tick()
if me.IsDead()
return
.
if me.IsInCombat()
return
.
if me.W_InCombat = true
me.E_hitPoints = MiscUtils:Min( me.E_hitPoints + 1, 100 )
me.W_manaPoints = MiscUtils:Min( me.W_manaPoints + 3, 100 )
me.SetCombat()
else
me.E_hitPoints = MiscUtils:Min( me.E_hitPoints + 20, 100 )
me.W_manaPoints = MiscUtils:Min( me.W_manaPoints + 20, 100 )
.
.
method SetCombat()
me.W_CombatTimer.initializeDefault()
me.W_CombatTimer.fireRate = 00:00:7 //Time before normal regen kicks in
me.W_CombatTimer.start()
.
method W_CombatTimer_tick()
me.W_InCombat = false
me.W_CombatTimer.stop() //No point having it count any further
.