:: KGstart
<<set $here = 'KGstart'>>
<<set $ARGS = $location_var[$here]>>
<<set $time.minutes += 1>>
<<if getvar("$KFOnLineReaga") > 0>>
	Welcome to the game Vertep World. You can play for <<KFOnLineReaga>> more days
	At any time you can pay via online banking that would extend the duration of the account.
	<p>30 days for 1000 <b>₽</b> via online banking.</p>
	<<if getvar("$KGOLpers") > 0>>
		You can get in the game your character, or delete it
		<p>$KGOLname $KGOLrace $KGOLklass KGOLlvl level</p>
		<<act 'Play'>>
			<<gt 'KGOLgame'>>
		<</act>>
		<<actCLA 'Delete a character'>>
			<<set $KGOLpers = 0>>
			<<gt $curloc>>
		<</actCLA>>
	<<else>>
		You can create a character
		<<actCLA 'Create a character'>>
			<<set $KGOLname = input("Enter your nickname")>>
			<<if getvar("$KGOLname") <= 0>>
				<<msg 'Not valid nickname'>> <<gt $curloc>>

			<</if>>
			<p>Your nickname $KGOLname</p>
			You must select the player race
			<<actCLA 'Man'>>
				<<set $KGOLrace = 'Man'>> <<set $KGOLrace = 1>> <<KGOLklassvibor>>
			<</actCLA>>
			<<actCLA 'Elf'>>
				<<set $KGOLrace = 'Elf'>> <<set $KGOLrace = 2>> <<KGOLklassvibor>>
			<</actCLA>>
			<<actCLA 'Zveroid'>>
				<<set $KGOLrace = 'Zveroid'>> <<set $KGOLrace = 3>> <<KGOLklassvibor>>
			<</actCLA>>
		<</actCLA>>
	<</if>>
	<<if $finances.bankAvailable >= 1000>>
		<<actCLA 'Payment akkuaunta'>>
			<<set $finances.bank -= 1000>>
			<<set $KFOnLineReaga += 30>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
	<<if $finances.bankAvailable > 0>>
		<<actCLA 'Buy game coins (1 ₽ = 1 Game Coin)'>>
			<<set $KGOLdonat = input("How many coins do you wish to purchase?")>>
			<<if getvar("$KGOLdonat") <= 0 or $KGOLdonat > $finances.bank>>
				<<msg 'Not valid operation'>>
			<<else>>
				<<set $finances.bank -= $KGOLdonat>>
				<<set $KGOLmoney += $KGOLdonat>>
				<<msg '<<KGOLdonat>> coins have been added to your account.'>>
			<</if>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
<<else>>
	Welcome to the online game Vertep World
	<p>To play this game you have to pay 1, 000 <b>₽</b> for 30 days via online banking.</p>
	<<if $finances.bankAvailable >= 1000>>
		<<actCLA 'Payment'>>
			<<set $finances.bank -= 1000>>
			<<set $KFOnLineReaga += 30>>
			<<gt $curloc>>
		<</actCLA>>
	<</if>>
<</if>>
<<act 'Leave'>>
	<<gt 'computer'>>
<</act>>
:: KGOLklassvibor_macro[widget]
<<widget 'KGOLklassvibor'>>
	You must select a character class.
	<<if getvar("$KGOLrace") == 1>>
		For people available classes:Warrior, Thief, Mage.
		<<actCLA 'Warrior'>>
		<<set $KGOLklass = 'Warrior'>> <<set $KGOLklass = 1>> <<KGOLklassvibor2>>
	<</actCLA>>
		<<actCLA 'Thief'>>
		<<set $KGOLklass = 'Thief'>> <<set $KGOLklass = 2>> <<KGOLklassvibor2>>
	<</actCLA>>
		<<actCLA 'Magician'>>
		<<set $KGOLklass = 'Magician'>> <<set $KGOLklass = 3>> <<KGOLklassvibor2>>
	<</actCLA>>
	<<elseif getvar("$KGOLrace") == 2>>
		For elves available classes Priest, Archer.
		<<actCLA 'Priest'>>
		<<set $KGOLklass = 'Priest'>> <<set $KGOLklass = 4>> <<KGOLklassvibor2>>
	<</actCLA>>
		<<actCLA 'Archer'>>
		<<set $KGOLklass = 'Archer'>> <<set $KGOLklass = 5>> <<KGOLklassvibor2>>
	<</actCLA>>
	<<else>>
		Classes available for zveroidov Barbarian.
		<<actCLA 'Barbarian'>>
		<<set $KGOLklass = 'Barbarian'>> <<set $KGOLklass = 6>> <<KGOLklassvibor2>>
	<</actCLA>>
	<</if>>
<</widget>>
:: KGOLklassvibor2_macro[widget]
<<widget 'KGOLklassvibor2'>>
	<<set $KGOLexp = 0>>
	<<set $KGOLlvl = 1>>
	<<set $KGOLbrona = 0>>
	<<set $KGOLwpower = 0>>
	<p>$KGOLname $KGOLrace $KGOLklass KGOLlvl level</p>
	<<if getvar("$KGOLklass") == 1>>
		<<set $KGOLstren = 30>>
		<<set $KGOLspeed = 20>>
		<<set $KGOLvital = 30>>
		<<set $KGOLintel = 20>>
	<<elseif getvar("$KGOLklass") == 2>>
		<<set $KGOLstren = 20>>
		<<set $KGOLspeed = 30>>
		<<set $KGOLvital = 20>>
		<<set $KGOLintel = 30>>
	<<elseif getvar("$KGOLklass") == 3>>
		<<set $KGOLstren = 10>>
		<<set $KGOLspeed = 20>>
		<<set $KGOLvital = 20>>
		<<set $KGOLintel = 50>>
	<<elseif getvar("$KGOLklass") == 4>>
		<<set $KGOLstren = 10>>
		<<set $KGOLspeed = 10>>
		<<set $KGOLvital = 10>>
		<<set $KGOLintel = 70>>
	<<elseif getvar("$KGOLklass") == 5>>
		<<set $KGOLstren = 20>>
		<<set $KGOLspeed = 40>>
		<<set $KGOLvital = 10>>
		<<set $KGOLintel = 30>>
	<<else>>
		<<set $KGOLstren = 40>>
		<<set $KGOLspeed = 10>>
		<<set $KGOLvital = 40>>
		<<set $KGOLintel = 10>>
	<</if>>
	<<set $KGHP = $KGOLvital * 10>>
	<<set $KGMana = $KGOLintel * 10>>
	<<actCLA 'Play'>>
	<<set $KGOLpers = 1>> <<gt 'KGOLgame'>>
<</actCLA>>
	<<actCLA 'Delete a character'>>
		<<set $KGOLpers = 0>>
		<<gt $curloc>>
	<</actCLA>>
<</widget>>
