void main ( void )
{
 int &maybe;
 &maybe = random(3,1);
 if (&maybe == 1)
  {
   say_stop("`6你好啊，旅行者。", &current_sprite);
  }
}

//playmidi("xfiles.mid");

void talk ( void )
{
 freeze(1);
 freeze(&current_sprite);
 choice_start()
 "询问旅行趣事"
 "关于新闻"
(&story == 2)"关于AlkTree nuts"
 "离开"
 choice_end()
 wait(300);
  if (&result == 1)
   {
    story();
   }
  if (&result == 2)
   {
    news();
   }
  if (&result == 3)
   {
    say_stop("`6AlkTree nuts？？那些可好吃了。我想想啊...", &current_sprite);
    say_stop("`6附近的小村的东南方好像有颗Alk树。", &current_sprite);
    say_stop("`6值得一去。", &current_sprite);
   }
 unfreeze(1);
 unfreeze(&current_sprite);
}

void hit ( void )
{
 int &dir;
 say("`6哇，你个疯子！", &current_sprite);
 sp_speed(&current_sprite, 4);
 sp_timing(&current_sprite, 0);
 //Disappear off screen
 &dir = random(4, 1);
 if (&dir == 1)
 {
         move(&current_sprite, 1, -100, 1);
 }
 if (&dir == 2)
 {
         move(&current_sprite, 3, 700, 1);
 }
 if (&dir == 3)
 {
         move(&current_sprite, 7, -100, 1);
 }
 if (&dir == 4)
 {
         move(&current_sprite, 9, 700, 1);
 }
 sp_brain(&current_sprite, 0);
 sp_kill(&current_sprite, 2000);
 script_attach(0);

}

void die ( void )
{
 say("可惜你是去不了你的目的地了。", 1);
}

void story( void )
{
 int &maybe = random(3,1);
 if (&maybe == 1)
  {
   say_stop("`6到西面要当心。地精城堡的防御可不是闹着玩的。", &current_sprite);
   wait(250);
   say_stop("`6我见过很多旅行者在那丢了脑袋。", &current_sprite);
  }
 if (&maybe == 2)
  {
   say_stop("`6我听说在 SunCool 湖的北面住了一个老人。", &current_sprite);
   say_stop("`6虽然我从来没见过他，可我在经过那里的时候听到些动静。", &current_sprite);   
  }
 if (&maybe == 3)
  {
   say_stop("`6现在走海路还真贵。我建议如果你没钱的话", &current_sprite);
   say_stop("`6还是去赚一点，或者找个愿意帮你出钱的朋友", &current_sprite);
   say_stop("`6资助你，那样可以省不少时间。", &current_sprite);
  }
}

void news( void )
{
int &maybe = random(3,1);
  if (&maybe == 1)
   {
    makefun();
    return;
   }
 &maybe = random(3,1); 
 if (&maybe == 1)
  {
   say_stop("`6最近有人说一个隐藏在西方古老的XE物在觉醒。", &current_sprite);
   say_stop("`6我不清楚具体情况，但我觉得这不过是些迷信而已。", &current_sprite);
   wait(500);
   say_stop("嗯，我肯定这是迷...迷信...", 1);
  }
 if (&maybe == 2)
  {
   say_stop("`6PortTown 城里的人有时会非常的吵闹。", &current_sprite);
   say_stop("`6有人说这是因为那里海盗的猖獗。不管怎么样，", &current_sprite);
   say_stop("`6到那去都要小心。", &current_sprite);
  }
 if (&maybe == 3)
  {
   say_stop("`6如果你遇到地精，一定要小心。", &current_sprite);
   say_stop("`6他们很喜欢用暴力，所以不要激怒他们。", &current_sprite);
   say_stop("`6但是他们也挺笨，很容易就能骗到他们。", &current_sprite);
  }
}

void makefun( void )
{
 //I think story = 5 ???
 if (&story == 6)
  {
   int &maybe = random(3,1);
   if(&maybe == 1)
   {
    say_stop("`6听说附近的小村失火了，", &current_sprite);
    say_stop("`6希望没人受重伤。", &current_sprite);
    wait(500);
    say_stop("是，确实没人...受伤...", 1);
   }
  }
 if (&old_womans_duck == 3)
  {
   say_stop("`6听说附近的小村出了个疯子", &current_sprite);
   wait(250);
   say_stop("`6他专门跟踪并且杀害别人的宠物！", &current_sprite);
   wait(250);
   say_stop("`6很可恶吧？", &current_sprite);
   wait(250);
   say_stop("是啊，非常，可恶 ..", 1);
  }
 if (&old_womans_duck == 3)
  {
   say_stop("`6听说附近的小村出了个疯子", &current_sprite);
   wait(250);
   say_stop("`6他专门跟踪并且杀害别人的宠物！", &current_sprite);
   wait(250);
   say_stop("`6很可恶吧？", &current_sprite);
   wait(250);
   say_stop("是啊，非常，可恶 ..", 1);
  }
 else
 {
  say_stop("`6那么年轻人，你叫傻？", &current_sprite);
  say_stop("我不叫傻，我叫小森林，丁克小森林。", 1);
  wait(250);
  say_stop("`6你好啊小森林先生。", &current_sprite);
 }
}
