disableAi(0) createUnit('mage_tower', 1, startLocation(1)) setCameraPosition(unitPosition(lastCreatedUnit())) createUnit('energy_source', 1, startLocation(1)) createUnit('initiate', 1, startLocation(1)) createUnit('initiate', 1, startLocation(1)) giveResource('gold', 1, 500); giveResource('stone', 1, 500); giveResource('wood', 1, 500); showMessage('Welcome', 'GlestAdvancedTutorial') showMessage('MagicBrief', 'GlestAdvancedTutorial') showMessage('InitiateBrief', 'GlestAdvancedTutorial') showMessage('InitiatePromotion', 'Promoting') setDisplayText('PromoteInitiate') objective= 'produce_battlemage' combatUnitCount= 0;
if objective=='produce_battlemage' then showMessage('BattlemageBrief', 'WellDone') showMessage('EnergyBrief', 'Energy') setDisplayText('BuildEnergySource') objective= 'build_energy_source'

end
if objective=='build_energy_source' then showMessage('EnergyBrief2', 'WellDone') showMessage('SummonedUnitsBrief', 'Summoning') setDisplayText('ProduceSummoner') objective= 'produce_summoner' end
if objective=='produce_summoner' then showMessage('SummonerBrief', 'WellDone') setDisplayText('ProduceDaemon') objective= 'produce_daemon' end
if objective=='produce_daemon' then showMessage('DaemonBrief', 'WellDone') showMessage('OtherSummonedCreatures', 'Summoning') showMessage('GhostArmorRequirements', 'Summoning') setDisplayText('ProduceGhostArmor') objective= 'produce_ghost_armor' end
if objective=='produce_ghost_armor' then showMessage('GhostArmorBrief', 'WellDone') showMessage('RitualBrief', 'Ritual') setDisplayText('ProduceGolem') objective= 'produce_golem' end
if objective=='produce_golem' then showMessage('GolemBrief', 'WellDone') showMessage('ArmyManagement', 'Armies') showMessage('DoubleClickBrief', 'Armies') showMessage('GroupSelectBrief', 'Armies') showMessage('FinalMission', 'Armies') objective= 'defeat_enemy' setDisplayText('DefeatEnemy') createUnit('farm', 0, startLocation(0)) createUnit('barracks', 0, startLocation(0)) createUnit('swordman', 0, startLocation(0)) createUnit('swordman', 0, startLocation(0)) createUnit('archer', 0, startLocation(0)) end
if objective=='defeat_enemy' and unitCount(0)==0 then clearDisplayText() setPlayerAsWinner(1) endGame() end