:: KGOLgame
<<set $here = 'KGOLgame'>>
<<set $ARGS = $location_var[$here]>>
<<set $time.minutes += 1>>
<<if getvar("$KGOLset") == 0>>
	<<set $KGOLset = 'On the head there is nothing'>>

<</if>>
<<if getvar("$KGOLset2") == 0>>
	<<set $KGOLset2 = 'Body simple clothes'>>

<</if>>
<<if getvar("$KGOLset3") == 0>>
	<<set $KGOLset3 = 'Simple shoes on his feet'>>

<</if>>
<<if getvar("$KGOLset4") == 0>>
	<<set $KGOLset4 = 'No gloves on hands'>>

<</if>>
<<if getvar("$KGOLset5") == 0>>
	<<set $KGOLset5 = 'No weapon'>>

<</if>>
<<set $KGHPMAX = $KGOLvital * 10>>
<<set $KGManaMax = $KGOLintel * 10>>
<<if $KGHP > $KGHPMAX>>
	<<set $KGHP = $KGHPMAX>>

<</if>>
<<if $KGMana > $KGManaMax>>
	<<set $KGMana = $KGManaMax>>

<</if>>
<<set $KGOLbrona -= $KGOLbronaMod>>
<<set $KGOLbronaMod = 0>>
<<set $KGOLstren -= $KGOLstrenMod>>
<<set $KGOLstrenMod = 0>>
<<set $KGOLspeed -= $KGOLspeedMod>>
<<set $KGOLspeedMod = 0>>
<<set $KGOLvital -= $KGOLvitalMod>>
<<set $KGOLvitalMod = 0>>
<<set $KGOLintel -= $KGOLintelMod>>
<<set $KGOLintelMod = 0>>
<<set $KGOLwpower -= $KGOLwpowerMod>>
<<set $KGOLwpowerMod = 0>>
<<set $KGOLcooldown = 0>>
<<if $KGHP < $KGHPMAX and getvar("$KGOLhirka") > 0>>
	<<set $kghneed = $KGHPMAX - $KGHP>>
	<<if $KGOLhirka >= $kghneed>>
		<<set $KGOLhirka -= $kghneed>>
		<<set $KGHP = $KGHPMAX>>
	<<else>>
		<<set $KGHP = $KGOLhirka>>
		<<set $KGOLhirka = 0>>
	<</if>>
<</if>>
<<if getvar("$KGHP") < 0>>
	<<set $KGHP = 0>>

<</if>>
<<gs 'KGOLexpa'>>
<<link "Get out of the game">><<gt 'KGstart'>><</link>>
<<link "View Statistics">><<KGOLstat>><</link>>
<p>$KGOLname $KGOLrace $KGOLklass KGOLlvl level</p>
Life <<KGHP>>, the mana <<KGMana>>
<<if $KGHP < $KGHPMAX>>
	<p>You've got KGHP*100/KGHPMAX% of life</p>

<</if>>
<<if $KGMana < $KGManaMax>>
	<p>You've got KGMana*100/KGManaMax% of mana</p>

<</if>>
<<if getvar("$KGOLhirka") > 0>>
	Hirka can restore automatically <<KGOLhirka>> health units

<</if>>
<<if getvar("$KGOLPrizeM") > 0>>
	You have <<KGOLmoney>> coins

<</if>>
<<if getvar("$KGOLneedExp") <= 0>>
	<a href="exec:dynamic $KGOLrise"><font color="red">You need to increase the level.</font></a>

<</if>>
<<if getvar("$KGOLpoint") > 0>>
	<a href="exec:dynamic $KGOLrise"><font color="red">You have not allocated skill points.</font></a>

<</if>>
<<if getvar("$KGOLspellpoint") >= 4>>
	<a href="exec:dynamic $KGOLrise2"><font color="red">You can choose your skill.</font></a>

<</if>>
<<KGOLspellpoint>>
<p></p>
<center><b>Countryside</b></center>
You are in the picturesque village where to spawn characters stand motionless. NPC standing pillars and in the distance one can see the monsters.
<<actCLA 'Approach the NPC'>>
	<<set $time.minutes += 1>>
	<<if getvar("$KGOLmqw") == 12 and getvar("$KGOLlvl") >= 5>>
		<<set $KGOLmqw = 13>>
		<p>(NPS) - $KGOLname you need to kill the royal 10t beetles. Reward 200 experience.</p>
	<<elseif getvar("$KGOLmqw") == 13 and getvar("$KGOLqwvip") >= 10>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 14>>
		<<set $KGOLexp += 200>>
		<p>(NPS) - $KGOLname congratulations, that's a reward of 200 experience.</p>
	<<elseif getvar("$KGOLmqw") == 10 and getvar("$KGOLlvl") >= 5>>
		<<set $KGOLmqw = 11>>
		<p>(NPS) - $KGOLname you need to kill toads 10t. Reward 100 experience.</p>
	<<elseif getvar("$KGOLmqw") == 11 and getvar("$KGOLqwvip") >= 10>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 12>>
		<<set $KGOLexp += 100>>
		<p>(NPS) - $KGOLname congratulations, that's a reward of 100 experience.</p>
	<<elseif getvar("$KGOLmqw") == 8>>
		<<set $KGOLmqw = 9>>
		<p>(NPS) - $KGOLname you need to kill 30t young cacti. Then I'll give you a helmet.</p>
	<<elseif getvar("$KGOLmqw") == 9 and getvar("$KGOLqwvip") >= 30>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 10>>
		<<set $KGOL = 1>>
		<<set $KGOLbrona += 2>>
		<<set $KGOL = 'Helm of rough skin'>>
		<p>(NPS) - $KGOLname congratulations, here's your helmet.</p>
	<<elseif getvar("$KGOLmqw") == 6>>
		<<set $KGOLmqw = 7>>
		<p>(NPS) - $KGOLname you need to kill wolves 25t toothless. Then I'll give you mittens.</p>
	<<elseif getvar("$KGOLmqw") == 7 and getvar("$KGOLqwvip") >= 25>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 8>>
		<<set $KGOLset4 = 1>>
		<<set $KGOLbrona += 2>>
		<<set $KGOLset4 = 'Gauntlets of rough skin'>>
		<p>(NPS) - $KGOLname congratulations, here's your mittens.</p>
	<<elseif getvar("$KGOLmqw") == 4>>
		<<set $KGOLmqw = 5>>
		<p>(NPS) - $KGOLname you need to kill 20t sundews. Then I will give you boots.</p>
	<<elseif getvar("$KGOLmqw") == 5 and getvar("$KGOLqwvip") >= 20>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 6>>
		<<set $KGOLset3 = 1>>
		<<set $KGOLbrona += 2>>
		<<set $KGOLset3 = 'Rugged Leather Boots'>>
		<p>(NPS) - $KGOLname congratulations, here are your boots.</p>
	<<elseif getvar("$KGOLmqw") == 2>>
		<<set $KGOLmqw = 3>>
		<p>(NPS) - $KGOLname you need to kill 10t rainbow beetles. Then I will give you armor.</p>
	<<elseif getvar("$KGOLmqw") == 3 and getvar("$KGOLqwvip") >= 10>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 4>>
		<<set $KGOLset2 = 1>>
		<<set $KGOLbrona += 10>>
		<<set $KGOLset2 = 'Simple armor'>>
		<p>(NPS) - $KGOLname congratulations, here's your armor.</p>
	<<elseif getvar("$KGOLmqw") == 0>>
		<<set $KGOLmqw = 1>>
		<p>(NPS) - $KGOLname you need to kill prey 5t colors. Then I'll give you a weapon.</p>
	<<elseif getvar("$KGOLmqw") == 1 and getvar("$KGOLqwvip") >= 5>>
		<<set $KGOLqwvip = 0>>
		<<set $KGOLmqw = 2>>
		<<set $KGOLset5 = 1>>
		<<set $KGOLwpower = 10>>
		<<if getvar("$KGOLklass") == 1 or getvar("$KGOLklass") == 6>>
			<<set $KGOLset5 = 'In the hands of a simple sword'>>

		<</if>>
		<<if getvar("$KGOLklass") == 2>>
			<<set $KGOLset5 = 'In the hands of ordinary daggers'>>

		<</if>>
		<<if getvar("$KGOLklass") == 3 or getvar("$KGOLklass") == 4>>
			<<set $KGOLset5 = 'In the hands of a simple staff'>>

		<</if>>
		<<if getvar("$KGOLklass") == 5>>
			<<set $KGOLset5 = 'In the hands of a simple bow'>>

		<</if>>
		<p>(NPS) - $KGOLname congratulations, here's your gun.</p>
	<</if>>
	<<actCLA 'Leave'>>
		<<gt $curloc>>
	<</actCLA>>
<</actCLA>>
<<actCLA 'Go to the store'>>
	<<set $time.minutes += 1>>
	<<if getvar("$KGOLmoney") >= 300>>
		<<actCLA 'Buy health potion 300'>>
			<<set $KGOLmoney -= 300>>
			<<set $KGOLpotionH += 1>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
	<<if getvar("$KGOLmoney") >= 300>>
		<<actCLA 'Buy a potion of mana 300'>>
			<<set $KGOLmoney -= 300>>
			<<set $KGOLpotionM += 1>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
	<<if getvar("$KGOLmoney") >= 1500 and getvar("$KGOLhirka") <= 0>>
		<<actCLA 'Buy hirka 1500'>>
			<<set $KGOLmoney -= 1500>>
			<<set $KGOLhirka += 10000>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
	<<actCLA 'Leave'>>
		<<gt $curloc>>
	<</actCLA>>
<</actCLA>>
<<if $KGHP < $KGHPMAX or $KGMana < $KGManaMax>>
	<<actCLA 'Regenerate (1:00)'>>
		<<set $time.minutes += 60>>
		<<set $KGHP = $KGHPMAX>>
		<<set $KGMana = $KGManaMax>>
		It was very sad. You've been sitting for an hour to regenerate your character. But free.
		<<actCLA 'Leave'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
<</if>>
<<if getvar("$KGHP") > 0>>
	<<actCLA 'Farm near the village'>>
		<<set $time.minutes += 1>>
		<<set $KGOLdist = rand(1, 10)>>
		On a variety of monsters roam the field
		<<actCLA 'Predatory flower'>>
			<<gs 'KGOLenemy' '0'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Iridescent beetle'>>
			<<gs 'KGOLenemy' '1'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Sundew'>>
			<<gs 'KGOLenemy' '2'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Toothless dog'>>
			<<gs 'KGOLenemy' '3'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Young cactus'>>
			<<gs 'KGOLenemy' '4'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
	<</actCLA>>
<</if>>
<<if getvar("$KGOLlvl") >= 5 and getvar("$KGHP") > 0>>
	<<actCLA 'Farm near the mill'>>
		<<set $time.minutes += 1>>
		<<set $KGOLdist = rand(1, 10)>>
		Mill about a variety of monsters roam
		<<actCLA 'Toad'>>
			<<gs 'KGOLenemy' '5'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Royal beetle'>>
			<<gs 'KGOLenemy' '6'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Spotted mantis'>>
			<<gs 'KGOLenemy' '7'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Plague Rat'>>
			<<gs 'KGOLenemy' '8'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
		<<actCLA 'Prickly cactus'>>
			<<gs 'KGOLenemy' '9'>>
			<<gt 'KGOLfight'>>
		<</actCLA>>
	<</actCLA>>
	<<actCLA 'Boss Level 5'>>
		<<gs 'KGOLboss' '1'>>
		<<gt 'KGOLfight'>>
	<</actCLA>>
<</if>>
:: KGOLstat_macro[widget]
<<widget 'KGOLstat'>>
		<p>$KGOLname $KGOLrace $KGOLklass KGOLlvl level</p>
	<<link "Close Statistics">><<KGOLstat2>><</link>>
	<<if getvar("$KGOLneedExp") > 0>>
	Total experiment <<KGOLexp>>, it is necessary to next level <<KGOLneedExp>> experience

<</if>>
	<<if getvar("$KGOLneedExp") <= 0>>
	<a href="exec:dynamic $KGOLrise"><font color="red">You need to increase the level.</font></a>

<</if>>
	Power <<KGOLstren>>, speed and evasion <<KGOLspeed>>, endurance <<KGOLvital>>Intelligence <<KGOLintel>>, armor protection <<KGOLbrona>>, the bonus damage from weapons <<KGOLwpower>>
	<p></p>
	<center>Exodus</center>
	<<$KGOLset>>
	<<$KGOLset2>>
	<<$KGOLset3>>
	<<$KGOLset4>>
	<<$KGOLset5>>
	<p></p>
	<center>Equipment</center>
	<!-- FAILED TO CONVERT
	if KGOLpotionH > 0:pl 'Health potions <<KGOLpotionH>> pieces. <a href="exec:KGOLpotionH -= 1 & KGHP += 100 & gs ''stat'' & gt $curloc"><font color="red">Drink.</font></a>'
-----
	<<if getvar("$KGOLpotionH") > 0>>
	<!-- FAILED TO CONVERT
	pl 'Health potions <<KGOLpotionH>> pieces. <a href="exec:KGOLpotionH -= 1 & KGHP += 100 & gs ''stat'' & gt $curloc"><font color="red">Drink.</font></a>'
-----
	<<set ERROR: FAILED TO CONVERT LITERAL: """'Health potions <<KGOLpotionH>> pieces. <a href""" = ERROR: FAILED TO CONVERT LITERAL: """"exec:KGOLpotionH""" - ERROR: FAILED TO CONVERT LITERAL: """= 1""">> <<setn $KGHP += 100>>  <<set ERROR: FAILED TO CONVERT LITERAL: """gt $curloc"><font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">Drink.<""" / ERROR: FAILED TO CONVERT LITERAL: """font><""" / ERROR: FAILED TO CONVERT LITERAL: """a>'""">>

-->
<<warn "CONVERSION ERROR 00b0b76c5866c51ff007154c823cb13a">>

<</if>>

-->
<<warn "CONVERSION ERROR 96db43473ce4ef5c18114ada19c5a37f">>
	<!-- FAILED TO CONVERT
	if KGOLpotionM > 0:pl 'Mana potions <<KGOLpotionM>> pieces. <a href="exec:KGOLpotionM -= 1 & KGMana += 100 & gs ''stat'' & gt $curloc"><font color="red">Drink.</font></a>'
-----
	<<if getvar("$KGOLpotionM") > 0>>
	<!-- FAILED TO CONVERT
	pl 'Mana potions <<KGOLpotionM>> pieces. <a href="exec:KGOLpotionM -= 1 & KGMana += 100 & gs ''stat'' & gt $curloc"><font color="red">Drink.</font></a>'
-----
	<<set ERROR: FAILED TO CONVERT LITERAL: """'Mana potions <<KGOLpotionM>> pieces. <a href""" = ERROR: FAILED TO CONVERT LITERAL: """"exec:KGOLpotionM""" - ERROR: FAILED TO CONVERT LITERAL: """= 1""">> <<setn $KGMana += 100>>  <<set ERROR: FAILED TO CONVERT LITERAL: """gt $curloc"><font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">Drink.<""" / ERROR: FAILED TO CONVERT LITERAL: """font><""" / ERROR: FAILED TO CONVERT LITERAL: """a>'""">>

-->
<<warn "CONVERSION ERROR f28692b1be04c9b334391d0387b12e38">>

<</if>>

-->
<<warn "CONVERSION ERROR fefeb69191128b4c9241a88d4f19ee4d">>
	<center>PVE</center>
	Ratio <<KGOLWin>>, losses <<KGOLLoss>>
	<center>PVP</center>
	Ratio <<KGOLpvpWin>>, losses <<KGOLpvpLoss>>
<</widget>>
:: KGOLstat2_macro[widget]
<<widget 'KGOLstat2'>>
<</widget>>
