//this is run when the escape key is pressed

void main(void)
{
int &old_result;
Playsound(18, 22050, 0,0,0);
freeze(1);
help:

        choice_start();
        "读取存档"
        "重新开始"
        "退回Windows"
        "帮助"
        "继续游戏"
        "观看/改变按键"
        choice_end();


if (&result == 1)
  {
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "不干什么了"
        choice_end();
if (&result == 11) goto help;

if (game_exist(&result) == 0)
  {

  unfreeze(1);
  wait(2000);  
  Say("Wow, this loaded game looks so familiar.", 1);
  kill_this_task();
    return;
   }

init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");

init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");

init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");

init("load_sequence_now graphics\dink\hit\normal\ds-h2- 102 75 60 72 -19 -9 19 9");
init("load_sequence_now graphics\dink\hit\normal\ds-h4- 104 75 61 73 -19 -10 19 10");
init("load_sequence_now graphics\dink\hit\normal\ds-h6- 106 75 58 71 -18 -10 18 10");
init("load_sequence_now graphics\dink\hit\normal\ds-h8- 108 75 61 71 -19 -10 19 10");


  unfreeze(1);
  load_game(&result);
 &update_status = 1;
 draw_status();

  kill_this_task();
  }




if (&result == 3)
  {
        choice_start();
        "暂时不想玩了"
        "我错了,让我继续玩吧"
        choice_end();
   if (&result == 2)
   {
    wait(300);
    say("嘿嘿,差一点就...",1);
   }
   if (&result == 1)
   {
   kill_game();
   }
  unfreeze(1);
  kill_this_task();
  }

  if (&result == 4)
  {
helpstart:
        choice_start();
        set_y 240
        title_start();




需要什么帮助呢?
        title_end();
        "键盘指令"
        "如何保存"
        "没了"
        choice_end();
Debug("Ok, result is &result");

      if (&result == 1)
     {
        choice_start();
        set_y 240
        title_start();
Ctrl = 攻击/选择
Space = 对话/调查
Shift = 魔法
Enter = 物品/魔法菜单

方向键移动
        title_end();
        "Ok"
        choice_end();
       goto helpstart;
     }

      if (&result == 2)
     {
        choice_start();
        set_y 240
        title_start();
In this quest, saving your game can
only be done at the special 'Save
Machine'. (it hums strangely)

        title_end();
        "Ok"
        choice_end();
       goto helpstart;
     }


      if (&result == 3)
      {
       goto help;
      }


  }


if (&result == 2)
  {
        choice_start();
        "是的，我确定要重新来过"
        "不要！我还要继续玩！"
        choice_end();
   if (&result == 2)
   {
   goto help;
   }
   if (&result == 1)
   {
   unfreeze(1);
   restart_game();
   kill_this_task();
   }
  unfreeze(1);
  kill_this_task();
  }

   if (&result == 6)
   {
   buttonstart:
        choice_start();
        "Button 1 - &buttoninfo"
        "Button 2 - &buttoninfo"
        "Button 3 - &buttoninfo"
        "Button 4 - &buttoninfo"
        "Button 5 - &buttoninfo"
        "Button 6 - &buttoninfo"
        "Button 7 - &buttoninfo"
        "Button 8 - &buttoninfo"
        "Button 9 - &buttoninfo"
        "Button 10 - &buttoninfo"
        "Nevermind"
        choice_end();

if (&result != 11)
  {
  &old_result = &result;
        choice_start();
        set_y 140
        title_start();
按键?
        title_end();
        "攻击"
        "对话/观察"
        "魔法"
        "物品栏"
        "主菜单"
        "地图（如果有的话）"
        "不干什么"
        choice_end();
  if (&result < 7)
   set_button(&old_result, &result);

   goto buttonstart;
  }
    
       goto help;

   }

   if (&result == 7)
   {
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "Nevermind"
        choice_end();

   save_game(&result);

   }

  unfreeze(1);
  kill_this_task();
}
