#SEQUENCE "stop";
# wait(.15);
# char_activate("player", 0);
# seq_jump(if(gvar("gfx_world_particles"), "particles", "check"));

#SEQUENCE "particles";
# var func = nop;
  func = if(geq(lvar("count"), 270), seq_jump, nop);
  func("check");
# particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  particle_make( "mist_02", rand(0,150), rand(0,300), rand(9,24), rand(0.1,0.5), rand(-.1,.3), 0, 0 );
  lvar("count", add(lvar("count"), 10));
# wait( .0001 );

#SEQUENCE "check";
# var func = nop;
  func = if(eq(avar("forest_02_loaded"), 1), seq_jump, nop);
  func("kill");
# seq_jump("spawn_01");

#SEQUENCE "spawn_01";
# avar("waiting", 0);
# char_make("allies/mercenary_fighter", rand(500, 550), rand(500, 550), "mercenary_fighter", 1 );
  char_make("allies/mercenary_fighter2", rand(500, 550), rand(500, 550), "mercenary_fighter2", 1 );
  char_make("allies/mercenary_shooter", rand(500, 550), rand(500, 550), "mercenary_shooter", 1 );
  char_make("allies/mercenary_elite", rand(500, 550), rand(500, 550), "mercenary_elite", 1 );
  //char_make("hairhair_lvl_00", rand(500, 550), rand(500, 550), "hairhair_lvl_00", 1 );

  char_make("kidney_lvl_01", rand(500, 550), rand(500, 550), "kidney_lvl_01", 1 );

  indicator_char_make( "general", 2, 0, "mercenary_cin_01", 1, colorRGB(0,0,1), .75, 1, 25, "indicator/general_01.tga");
  indicator_char_make( "mercenary_fighter", 2, 0, "mercenary_fighter", 1, colorRGB(0,0,1), .75, 1, 15);
  indicator_char_make( "mercenary_fighter2", 2, 0, "mercenary_fighter2", 1, colorRGB(0,0,1), .75, 1, 15);
  indicator_char_make( "mercenary_shooter", 2, 0, "mercenary_shooter", 1, colorRGB(0,0,1), .75, 1, 15);
  indicator_char_make( "mercenary_elite", 2, 0, "mercenary_elite", 1, colorRGB(0,0,1), .75, 1, 15);

  char_make("allies/mercenary_cin_01", 69, 234);

# avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
  avar("spawn_cave_init", 10);
  avar("spawn_cave_wait", 600);
  avar("spawn_cave_release", 1);
  avar("spawn_cave_r_wait", 10);
  avar("spawn_cave_max", 50);
  avar("monster_type", "kidney_lvl_01");
  avar("monster_typeb", "kidney_lvl_01");
# char_make("buildings/spawn_cave", 69, 226);
# explosion_make( 69, 226, 5, 0.5, 700);
  sound_play("ambient/explode_01.wav", 69, 226, 1);

# wait( .2 );

# avar("spawn_cave_init", 3);
  avar("spawn_cave_wait", 60);
  avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
# char_make("buildings/spawn_cave", 113, 211);

# wait( .2 );

# avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
  avar("spawn_cave_release", 1);
  avar("spawn_cave_r_wait", 9);
  avar("monster_typeb", "kidney_lvl_01");
# char_make("buildings/spawn_cave", 36, 159);

# wait( .2 );

# avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
  avar("spawn_cave_release", 1);
  avar("spawn_cave_r_wait", 8);
  avar("monster_typeb", "kidney_lvl_02");
# char_make("buildings/spawn_cave", 104, 130);

# wait( .2 );

# avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
  avar("spawn_cave_release", 1);
  avar("spawn_cave_r_wait", 7);
  avar("monster_typeb", "kidney_lvl_02");
# char_make("buildings/spawn_cave", 60, 69);

# wait( .2 );

# avar("spawn_cave_id", add(avar("spawn_cave_id"), 1));
  avar("spawn_cave_init", 1);
  avar("spawn_cave_wait", 30);
  avar("spawn_cave_max", 50);
  avar("monster_type", "hairhair_lvl_02");
  avar("spawn_cave_release", 1);
  avar("spawn_cave_r_wait", 6);
  avar("monster_typeb", "kidney_lvl_03");
# char_make("buildings/citadel", 109, 34);

  char_clone("kidney_lvl_01", 69, 235 );
  char_clone("kidney_lvl_01", 63, 234 );
  char_clone("kidney_lvl_01", 80, 230 );
  char_clone("kidney_lvl_01", 62, 221 );
  char_clone("kidney_lvl_01", 79, 222 );
# seq_jump("kill");

#SEQUENCE "kill";
# wait( 1 );
# char_activate("player", 1);
  avar("forest_02_loaded", 1);
  screenFX_fade( "fade_black", .5, 0 );
  avar("loading", 0);
# kill_this();
# seq_jump("wait");

#SEQUENCE "wait";
# wait( 10000 );
