# indik
if Enable_scalepic = 1:
	!0=reverse, 1=100%, 2=value. copy from 1.2.5, modify by illume

	if ARGS[1] < 1: ARGS[1] = 1
	if ARGS[1] > 100: ARGS[1] = 100
	! scalewidth default = 120px

	if Enable_scalewidth > 1:
		max_width = Enable_scalewidth-1
	else
		max_width = 120
	end
	if Enable_scaleheight > 1:
		_height = Enable_scaleheight-1
	else
		_height = 15
	end
	_width = ARGS[1] * max_width / 100
	if ARGS[1] < 30: $_color = iif(ARGS[0] > 0,'green','red')
	if ARGS[1] >= 30 and ARGS[1] < 70 and ARGS[0] = 0: $_color = 'blue'
	! reverse colors
	if ARGS[1] >= 30 and ARGS[1] < 50 and ARGS[0] > 0: $_color = 'yellow'
	if ARGS[1] >= 50 and ARGS[1] < 70 and ARGS[0] > 0: $_color = 'orange'
	! ---
	if ARGS[1] >= 70: $_color = iif(ARGS[0]> 0,'red','green')
	$result = ' <img src="images/system/icon/'+$_color+'.png" height='+_height+' width=' + _width + '><img src="images/system/icon/blank.png" height='+_height+' width=' + (max_width-_width) + '> <font color='+$_color+'>'+ARGS[2]+'</font> '
	$ind = $result
	killvar 'max_width'
	killvar '_width'
	killvar '_height'
	killvar '$_color'
else
	if cheatStatusBars = 1:
		i = 2
	else
		i = 3
	end

	if Enable_statfsize > 0 and Enable_statfsize < i:i = Enable_statfsize
	
	a = ARGS[1]
	a1 = ARGS[2]
	if a > 100:a = 100
	if a < 0:a = 0
	if ARGS[3] > 0: indik_damage = ARGS[3]

	if $ARGS[0] = '1':
		if Enable_Android = 1:
			if a  >= 65:
				$ind = '<font color="green"><<a1>></font>'
			elseif a >= 35:
				$ind = '<font color="blue"><<a1>></font>'
			else
				$ind = '<font color="red"><<a1>></font>'
			end
		else
			j = a/5
			$ind = '<font face="courier new" size = <<i>>> </font>'
			indik_counter = 0
			:indik
			if indik_counter < j:
				$ind += '<font face="courier new" size = <<i>>>█</font>'
				indik_counter += 1
				jump 'indik'
			elseif indik_counter < 20:
				$ind += '<font face="courier new" size = <<i>>>_</font>'
				indik_counter += 1
				jump 'indik'
			end
			killvar 'indik_counter'
			killvar 'j'
			$ind += '<font face="courier new" size = <<i>>> </font>'
			if a >= 85:
				$ind = '<font color="green">' + $ind + '<<a1>></font>'
			elseif a >= 70:
				$ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
			elseif a >= 50:
				$ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
			elseif a >= 20:
				$ind = '<font color="blue">' + $ind + '<<a1>></font>'
			elseif a >= 10:
				$ind = '<font color=#ff6600>' + $ind + '<<a1>></font>'
			else
				$ind = '<font color="red">' + $ind + '<<a1>></font>'
			end
		end
	end

	if $ARGS[0] = '2':
		if Enable_Android = 1:
			if a  >= 85:
				$ind = '<font color="red"><<a1>></font>'
			elseif a >= 65:
				$ind = '<font color="orange"><<a1>></font>'
			elseif a >= 45:
				$ind = '<font color="yellow"><<a1>></font>'
			elseif a >= 25:
				$ind = '<font color="green"><<a1>></font>'
			else
				$ind = '<font color="blue"><<a1>></font>'
			end
		else
			j = a/5
			indik_damage = indik_damage/5
			$ind = '<font face="courier new" size = <<i>>> </font>'
			indik_counter = 0
			:indik2
			if indik_counter < j:
				$ind += '<font face="courier new" size = <<i>>>█</font>'
				indik_counter += 1
				jump 'indik2'
			elseif indik_counter < indik_damage:
				$ind += '<font face="courier new" size = <<i>>>░</font>'
				indik_counter += 1
				jump 'indik2'
			elseif indik_counter < 20:
				$ind += '<font face="courier new" size = <<i>>>_</font>'
				indik_counter += 1
				jump 'indik2'
			end
			killvar 'indik_counter'
			killvar 'j'
			killvar 'indik_damage'
			$ind += '<font face="courier new" size = <<i>>> </font>'
			if a >= 90:
				$ind = '<font color=#ff0000>' + $ind + '</font>'
			elseif a >= 80:
				$ind = '<font color=#ff1a1a>' + $ind + '</font>'
			elseif a >= 70:
				$ind = '<font color=#ff3333>' + $ind + '</font>'
			elseif a >= 60:
				$ind = '<font color=#ff4d4d>' + $ind + '</font>'
			elseif a >= 50:
				$ind = '<font color=#ff6666>' + $ind + '</font>'
			elseif a >= 40:
				$ind = '<font color=#ff8080>' + $ind + '</font>'
			elseif a >= 30:
				$ind = '<font color=#e68080>' + $ind + '</font>'
			elseif a >= 20:
				$ind = '<font color=#cc8080>' + $ind + '</font>'
			elseif a >= 10:
				$ind = '<font color=#b38080>' + $ind + '</font>'
			else
				$ind = '<font color=#998080>' + $ind + '</font>'
			end
		end
	end
	
	if $ARGS[0] = '3':
		if Enable_Android = 1:
			if a  >= 65:
				$ind = '<font color="green"><<a1>></font>'
			elseif a >= 35:
				$ind = '<font color="blue"><<a1>></font>'
			else
				$ind = '<font color="red"><<a1>></font>'
			end
		else
			j = a/5
			$ind = '<font face="courier new" size = <<i>>> </font>'
			indik_counter = 0
			:indik3
			if j < 10:
				if indik_counter < j:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter < 10:
					$ind += '<font face="courier new" size = <<i>>>█</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter < 20:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				end
			elseif j > 10:
				if indik_counter < 10:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter < j:
					$ind += '<font face="courier new" size = <<i>>>█</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter < 20:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				end
			else
				if indik_counter < 9:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter = 9 or indik_counter = 10:
					$ind += '<font face="courier new" size = <<i>>>▓</font>'
					indik_counter += 1
					jump 'indik3'
				elseif indik_counter < 20:
					$ind += '<font face="courier new" size = <<i>>>_</font>'
					indik_counter += 1
					jump 'indik3'
				end
			end
			killvar 'indik_counter'
			killvar 'j'
			$ind += '<font face="courier new" size = <<i>>> </font>'
			if a < 10:
				$ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
			elseif a < 30:
				$ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
			elseif a <= 70:
				$ind = '<font color="blue">' + $ind + '<<a1>></font>'
			elseif a <= 90:
				$ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
			else
				$ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
			end
		end
	end
end

--- indik ---------------------------------

