Back to index

freedink-data  1.08.20080920
S1-CAVES.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003 playmidi("insper.mid");
00004  int &mbot;
00005  &mbot = random(7,1);
00006  if (&mbot == 1)
00007  
00008  {
00009   say_stop("Smells damp in here.", 1);
00010  }
00011  if (&mbot == 2)
00012  
00013  {
00014   say_stop("I don't like this one bit...", 1);
00015  }
00016 //call it once right now
00017 noise();
00018 
00019 set_callback_random("noise", 5000, 10000);
00020 
00021 }
00022 
00023 void noise( void )
00024 {
00025 if (&wizard_see > 2)
00026   {
00027   //killed monster already, why would it roar?
00028   return;
00029   }
00030 
00031 playsound(32, 11000, 4000, 0, 0);
00032 wait(4000);
00033 int &bot = random(4,1);
00034 if (&bot == 1)
00035 say_stop("Can we leave now? <shiver>", 1);
00036 if (&bot == 2)
00037 say_stop("I'm scared.", 1);
00038 if (&bot == 3)
00039 say_stop("Why, that's a funny noise.", 1);
00040 
00041 if (&bot == 4)
00042 say_stop("This cave sucks, let's leave...", 1);
00043 
00044 }