:: KGDexp
<<set $here = 'KGDexp'>>
<<set $ARGS = $location_var[$here]>>
<<set $KGDneedExpNextLvl = ($KGDlvl * 10) * $KGDlvl>>
<<set $KGDneedExp = $KGDneedExpNextLvl - $KGDexp>>
<<if getvar("$KGDneedExp") <= 0 and $KGDlvl > $KGDlvlr>>
	<<set $KGDlvlr = $KGDlvl>> <<setn $KGDlvl += 1>> <<set $KGDexp = 0>> <<setn $KGDHP += 10>> <<setn $KGDdam += 5>>

<</if>>
<<set $KGDneedExpNextLvl2 = ($KGDlvl2 * 10) * $KGDlvl2>>
<<set $KGDneedExp2 = $KGDneedExpNextLvl2 - $KGDexp2>>
<<if getvar("$KGDneedExp2") <= 0 and $KGDlvl2 > $KGDlvlr2>>
	<<set $KGDlvlr2 = $KGDlvl2>> <<setn $KGDlvl2 += 1>> <<set $KGDexp2 = 0>> <<setn $KGDHP2 += 10>> <<setn $KGDdam2 += 5>>

<</if>>
<<set $KGDneedExpNextLvl3 = ($KGDlvl3 * 10) * $KGDlvl3>>
<<set $KGDneedExp3 = $KGDneedExpNextLvl3 - $KGDexp3>>
<<if getvar("$KGDneedExp3") <= 0 and $KGDlvl3 > $KGDlvlr3>>
	<<set $KGDlvlr3 = $KGDlvl3>> <<setn $KGDlvl3 += 1>> <<set $KGDexp3 = 0>> <<setn $KGDHP3 += 10>> <<setn $KGDdam3 += 5>>

<</if>>
<<set $KGDneedExpNextLvl4 = ($KGDlvl4 * 10) * $KGDlvl4>>
<<set $KGDneedExp4 = $KGDneedExpNextLvl4 - $KGDexp4>>
<<if getvar("$KGDneedExp4") <= 0 and $KGDlvl4 > $KGDlvlr4>>
	<<set $KGDlvlr4 = $KGDlvl4>> <<setn $KGDlvl4 += 1>> <<set $KGDexp4 = 0>> <<setn $KGDHP4 += 10>> <<setn $KGDdam4 += 5>>

<</if>>
<<set $KGDneedExpNextLvl5 = ($KGDlvl5 * 10) * $KGDlvl5>>
<<set $KGDneedExp5 = $KGDneedExpNextLvl5 - $KGDexp5>>
<<if getvar("$KGDneedExp5") <= 0 and $KGDlvl5 > $KGDlvlr5>>
	<<set $KGDlvlr5 = $KGDlvl5>> <<setn $KGDlvl5 += 1>> <<set $KGDexp5 = 0>> <<setn $KGDHP5 += 10>> <<setn $KGDdam5 += 5>>

<</if>>
<<set $KGDneedExpNextLvl6 = ($KGDlvl6 * 10) * $KGDlvl6>>
<<set $KGDneedExp6 = $KGDneedExpNextLvl6 - $KGDexp6>>
<<if getvar("$KGDneedExp6") <= 0 and $KGDlvl6 > $KGDlvlr6>>
	<<set $KGDlvlr6 = $KGDlvl6>> <<setn $KGDlvl6 += 1>> <<set $KGDexp6 = 0>> <<setn $KGDHP6 += 10>> <<setn $KGDdam6 += 5>>

<</if>>
