# automatics
$automatica = {
	gs 'stat'
	clr

	if AutoHapri = 0:$AutoHapri = 'OFF'
	if AutoHapri = 1:$AutoHapri = 'ON'
	if AutoMakeup = 0:$AutoMakeup = 'OFF'
	if AutoMakeup = 1:$AutoMakeup = 'ON'
	if AutoMakeupSleep = 0:$AutoMakeupSleep = 'Wash after waking then apply makeup'
	if AutoMakeupSleep = 1:$AutoMakeupSleep = 'Always apply makeup'
	if AutoLipBalm = 0:$AutoLipBalm = 'OFF'
	if AutoLipBalm = 1:$AutoLipBalm = 'ON'
	if AutoEnema = 0:$AutoEnema = 'OFF'
	if AutoEnema = 1:$AutoEnema = 'ON'
	if AutoTissue = 0:$AutoTissue = 'OFF'
	if AutoTissue = 1:$AutoTissue = 'ON'
	if AutoMakeupType = 2:$AutoMakeupType = 'Light'
	if AutoMakeupType = 3:$AutoMakeupType = 'Natural'
	if AutoMakeupType = 4:$AutoMakeupType = 'Heavy'
	if AutoVibrator = 0:$AutoVibrator = 'OFF'
	if AutoVibrator = 1:$AutoVibrator = 'ON'
	if AutoButtPlug = 0:$AutoButtPlug = 'OFF'
	if AutoButtPlug = 1:$AutoButtPlug = 'ON'
	if AutoVitamins = 0:$AutoVitamins = 'OFF'
	if AutoVitamins = 1:$AutoVitamins = 'ON'

	pl 'Automatic hair brushing <a href="exec:dynamic $auto_hapri"><<$AutoHapri>></a>'
	pl 'Automatic makeup <a href="exec:dynamic $auto_makeup_select"><<$AutoMakeupType>></a> <a href="exec:dynamic $auto_makeup"><<$AutoMakeup>></a>'
	pl '<a href="exec:dynamic $auto_makeupsleep"><<$AutoMakeupSleep>></a>'
	pl 'Automatic lip moisturizing <a href="exec:dynamic $auto_lipbalm"><<$AutoLipBalm>></a>'
	pl 'Automatic enema after waking <a href="exec:dynamic $auto_enema"><<$AutoEnema>></a>'
	!!pl 'Automatic tissue use <a href="exec:dynamic $auto_tissue"><<$AutoTissue>></a>'
}

$auto_hapri = {
	if AutoHapri = 0:
		AutoHapri = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoHapri = 1:
		AutoHapri = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_makeup = {
	if AutoMakeup = 0:
		AutoMakeup = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoMakeup = 1:
		AutoMakeup = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_makeup_select = {
	AutoMakeupType += 1

	if AutoMakeupType > 4:AutoMakeupType = 2

	dynamic $automatica
}

$auto_makeupsleep = {
	if AutoMakeupSleep = 0:
		AutoMakeupSleep = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoMakeupSleep = 1:
		AutoMakeupSleep = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_lipbalm = {
	if AutoLipBalm = 0:
		AutoLipBalm = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoLipBalm = 1:
		AutoLipBalm = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_enema = {
	if AutoEnema = 0:
		AutoEnema = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoEnema = 1:
		AutoEnema = 0
		gs 'stat'
		dynamic $automatica
	end
}
$auto_tissue = {
	if AutoTissue = 0:
		AutoTissue = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoTissue = 1:
		AutoTissue = 0
		gs 'stat'
		dynamic $automatica
	end
}
$auto_vibrator = {
	if AutoVibrator = 0:
		AutoVibrator = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoVibrator = 1:
		AutoVibrator = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_buttplug = {
	if AutoButtPlug = 0:
		AutoButtPlug = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoButtPlug = 1:
		AutoButtPlug = 0
		gs 'stat'
		dynamic $automatica
	end
}

$auto_vitamins = {
	if AutoVitamins = 0:
		AutoVitamins = 1
		gs 'stat'
		dynamic $automatica
		exit
	end

	if AutoVitamins = 1:
		AutoVitamins = 0
		gs 'stat'
		dynamic $automatica
	end
}
--- automatics ---------------------------------
