{1}{[You open the chest, which reveals a treasure map! You slowly unfold the map and read it]}{[You open the chest, which reveals a treasure map! You slowly unfold the map and read it]}{}{}{}{}
{2}{This map shows a treasure horde buried near Rainbow Rock!}{}{8}{}{10}{}
{3}{Lots of money near Rainbow Rock! Sounds like happy place!}{}{-7}{}{10}{}
{10}{[You scan the map, looking for some geographic location you recognise. Your eyes settle on a small village with an ancient battlefield nearby.]}{[You scan the map, looking for some geographic location you recognise]}{}{}{}{game.areas[5] = 1}
{11}{Hmm, Emridy Meadows. And the nearest village is some little place called Hommlet. Never heard of it.}{}{8}{}{20}{}
{12}{Hmm, Emridy Meadows. It look like village called Omelet nearby, too. That funny name. Must have chickens there.}{}{-7}{}{20}{}
{20}{[You carefully roll up the map]}{[You carefully roll up the map]}{}{}{}{}
{21}{I am going to be rich! Hommlet, here I come!}{}{8}{}{0}{start_game_with_quest(27)}
{22}{Me soon rich! Omelet, here me come!}{}{-7}{}{0}{start_game_with_quest(27)}


{1000}{[you open the control box and a bright light appears before you]}{[You open the control box and a bright light appears before you]}{}{}{}{}
{1001}{Epiphany}{}{8}{game.global_flags[813] == 1}{1800}{}
{1002}{Apeany}{}{-7}{game.global_flags[813] == 1}{1011}{}
{1004}{Epwhiffany}{}{-7}{game.global_flags[813] == 1}{1011}{}

{1008}{[look for the control mechanism]}{}{1}{pc.skill_level_get(skill_disable_device) >= 5 and game.global_flags[820] == 0}{1500}{}
{1009}{[talk to the light]}{}{1}{game.global_flags[813] == 0}{1011}{}
{1010}{[close box]}{}{1}{}{}{npc.destroy(); game.global_vars[707] = 3}


{1011}{[nothing happens]}{[nothing happens]}{}{}{}{}
{1012}{Epiphany}{}{8}{game.global_flags[813] == 1}{1800}{}
{1013}{Apiffanny}{}{-7}{game.global_flags[813] == 1}{1011}{}
{1014}{Eapnifey}{}{-7}{game.global_flags[813] == 1}{1011}{}
{1018}{[look for the control mechanism]}{}{1}{pc.skill_level_get(skill_disable_device) >= 5 and game.global_flags[820] == 0}{1500}{}
{1019}{[talk to the light]}{}{1}{game.global_flags[813] == 0}{1011}{}
{1020}{[close box]}{}{1}{}{}{npc.destroy(); game.global_vars[707] = 3}


{1500}{[the box is filled with gears and gadgets of strange origin]}{[the box is filled with gears and gadgets of strange origin]}{}{}{}{}
{1501}{[Disarm the trap]}{}{1}{pc.skill_level_get(skill_disable_device) <= 11}{0}{zap(npc,pc); npc.destroy(); game.global_vars[707] = 3}
{1502}{[Disarm the trap]}{}{1}{pc.skill_level_get(skill_disable_device) <= 15 and pc.skill_level_get(skill_disable_device) >= 12}{1600}{}
{1503}{[Disarm the trap]}{}{1}{pc.skill_level_get(skill_disable_device) >= 16}{1700}{}
{1510}{Epiphany}{}{8}{game.global_flags[813] == 1}{1800}{}
{1511}{Epwhiffany}{}{-7}{game.global_flags[813] == 1}{1011}{}
{1512}{Aidifany}{}{-7}{game.global_flags[813] == 1}{1011}{}

{1520}{[talk to the light]}{}{1}{game.global_flags[813] == 0}{1011}{}
{1521}{[close box]}{}{1}{}{}{npc.destroy(); game.global_vars[707] = 3}


{1600}{[you failed]}{[you failed]}{}{}{}{}
{1610}{try again}{}{1}{}{1600}{}
{1611}{Epiphany}{}{8}{game.global_flags[813] == 1}{1800}{}
{1612}{Apeany}{}{-7}{game.global_flags[813] == 1}{1011}{}

{1619}{[talk to the light]}{}{1}{game.global_flags[813] == 0}{1011}{}
{1620}{[close box]}{}{1}{}{}{npc.destroy(); game.global_vars[707] = 3}


{1700}{[you have disarmed the trap]}{[you have disarmed the trap]}{}{}{}{game.global_flags[820] = 1}
{1720}{[close box]}{}{1}{}{}{npc.destroy()}

{1800}{[the light speaks] I await instructions, master.}{[the light speaks] I await instructions, master.}{}{}{}{}
{1820}{Please disarm.}{}{8}{game.global_flags[820] == 0}{}{game.global_flags[820] = 1; npc.destroy()}
{1821}{Please activate.}{}{8}{game.global_flags[820] == 1}{}{game.global_flags[820] = 0; game.global_vars[707] = 3; npc.destroy()}
{1822}{[close box]}{}{1}{}{}{npc.destroy(); game.global_vars[707] = 3}





