void main( void )
{
preload_seq(371);
preload_seq(373);
int &myrand;
sp_brain(&current_sprite, 0);
sp_base_walk(&current_sprite, 370);
sp_speed(&current_sprite, 2);
sp_timing(&current_sprite, 0);
//set starting pic

sp_pseq(&current_sprite, 371);
sp_pframe(&current_sprite, 1);
}

void talk( void )
{
 freeze(1);
 choice_start()
 "打招呼"
(&thief == 0) "询问他的工作"
(&thief == 1) "帮助他"
 "离开"
 choice_end()

 if (&result == 1)
 {
  wait(400);
  say_stop("你在干嘛呢？", 1);
  wait(400);
  say_stop("`2你是来工作的吗？", &current_sprite);
  wait(400);
  say_stop("什么工作？", 1);
  wait(400);
  say_stop("`2哦，当我没说", &current_sprite);
  say("`2可恶，那家伙哪去了啊？！", &current_sprite);
  unfreeze(1);
 }
 if (&result == 2)
 {
  wait(400);
  say_stop("朋友，哪路的？", 1);
  wait(400);
  say_stop("`2你说我吗？", &current_sprite);
  wait(400);
  say_stop("是的，我，我是个探险者，", 1);
  wait(400);
  say_stop("`2哦，嘿嘿，我嘛，我是 ... 我是个专家。", &current_sprite);
  wait(400);
  say_stop("什么专家？", 1);
  wait(400);
  say_stop("`2就这么说吧，我是寻找东西的专家...", &current_sprite);
  wait(400);
  say_stop("啊，那，你现在在寻求什么物品呢？", 1);
  wait(400);
  say_stop("`2你应该不会感兴趣的。", &current_sprite);
  wait(400);
  say_stop("`2快走吧。", &current_sprite);
  //Set it up
  &thief = 1;
 }
 if (&result == 3)
 //Helping the guy out!!
 {
  wait(400);
  say_stop("`2怎么又是你？", &current_sprite);
  wait(400);
  say_stop("你想做的事 .. 我可以帮助你。", 1);
  wait(400);
  say_stop("`2你？！", &current_sprite);
  wait(400);
  say_stop("`2确定吗？", &current_sprite);
  wait(400);
  say_stop("是的，我有做各种各样的事情。", 1);
  wait(400);
  say_stop("`2Hmmmmm", &current_sprite);
  wait(400);
  say_stop("`2好吧，看来另外那家伙也不来了。", &current_sprite);
  wait(400);
  say_stop("`2就让你顶替吧。", &current_sprite);
  wait(400);
  say_stop("`2准备好后到西边汇合。", &current_sprite);
  move_stop(&current_sprite, 4, 317, 1);
  move_stop(&current_sprite, 2, 430, 1);
  unfreeze(1);                                         
  &thief = 2;
  sp_active(&current_sprite, 0);
 }
unfreeze(1);                                         
}
