Back to index

freedink-data  1.08.20080920
S3-PEEPS.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003 int &hi;
00004 
00005  //people watching parade
00006  sp_hitpoints(&current_sprite, 20);
00007 sp_brain(&current_sprite, 16);
00008 }
00009 
00010 
00011 void talk(void )
00012 
00013 {
00014 &hi = random(4, 1);
00015 
00016 if (&hi == 1)
00017 say("`3Isn't this wonderful?", &current_sprite);
00018 
00019 if (&hi == 2)
00020 say("`3Not a very long parade was it...", &current_sprite);
00021 if (&hi == 3)
00022 say("`3This was even better than last year!", &current_sprite);
00023 
00024 if (&hi == 4)
00025  say("`3What a great parade!", &current_sprite);
00026 
00027 
00028 }
00029 
00030 
00031 void hit(void )
00032 
00033 {
00034 
00035 &hi = random(4, 1);
00036 
00037 if (&hi == 1)
00038 say("`3Help!  This man is going crazy!", &current_sprite);
00039 
00040 if (&hi == 2)
00041 say("`3Guards!!! Over here!!!", &current_sprite);
00042 if (&hi == 3)
00043 say("`3Help!! This Dink guy is no hero, he was behind the attack!", &current_sprite);
00044 
00045 if (&hi == 4)
00046 say("`3Please sir... please...no!!!  Come on, help me fight this guy!", &current_sprite);
00047 sp_frame_delay(&current_sprite, 50);
00048 sp_brain(&current_sprite, 9);
00049 sp_touch_damage(&current_sprite, 5);
00050 sp_speed(&current_sprite, 2);
00051 sp_target(&current_sprite, 1);
00052 }
00053 
00054 void die( void )
00055 {
00056 if (get_sprite_with_this_brain(16, &current_sprite) == 0)
00057  {
00058 
00059 if (get_sprite_with_this_brain(9, &current_sprite) == 0)
00060   {
00061   //no more brain 9 monsters here, lets unlock the screen
00062 wait(1000);
00063  say("Now, THAT'S entertainment!", 1);
00064   }
00065  }
00066 
00067 &save_x = sp_x(&current_sprite, -1);
00068 &save_y = sp_y(&current_sprite, -1);
00069 external("emake","medium");
00070 
00071 
00072 }
00073