Back to index

freedink-data  1.08.20080920
S3-GOBG.c
Go to the documentation of this file.
00001 
00002 void main( void )
00003 {
00004 int &mcounter;
00005 sp_brain(&current_sprite, 0);
00006 sp_speed(&current_sprite, 1);
00007 sp_distance(&current_sprite, 50);
00008 sp_range(&current_sprite, 35);
00009 sp_timing(&current_sprite, 0);
00010 sp_frame_delay(&current_sprite, 55);
00011 sp_exp(&current_sprite, 150);
00012 sp_base_walk(&current_sprite, 800);
00013 sp_base_attack(&current_sprite, 790);
00014 sp_defense(&current_sprite, 6);
00015 sp_strength(&current_sprite, 25);
00016 sp_hitpoints(&current_sprite, 80);
00017 preload_seq(792);
00018 preload_seq(794);
00019 preload_seq(796);
00020 preload_seq(798);
00021 preload_seq(805);
00022 
00023 preload_seq(801);
00024 preload_seq(803);
00025 preload_seq(807);
00026 preload_seq(809);
00027 }
00028 
00029 
00030 void hit( void )
00031 {
00032 sp_brain(&current_sprite, 9);
00033 sp_target(&current_sprite, &enemy_sprite);
00034 //lock on to the guy who just hit us
00035 //playsound
00036 playsound(28, 22050,0,&current_sprite, 0);
00037 sp_touch_damage(&current_sprite, 10);
00038 
00039 }
00040 
00041 void die( void )
00042 {
00043   int &hold = sp_editor_num(&current_sprite);
00044   if (&hold != 0)
00045   editor_type(&hold, 6); 
00046 }
00047 void attack( void )
00048 {
00049 playsound(27, 22050,0,&current_sprite, 0);
00050 &mcounter = random(4000,0);
00051 sp_attack_wait(&current_sprite, &mcounter);
00052 }
00053 
00054 void talk ( void )
00055 {
00056 
00057 int &temp;
00058 &temp = sp_brain(&current_sprite, -1);
00059 if (&temp == 9)
00060   {
00061   say("`6i bey kalling yoo deed!", &current_sprite);
00062   return; 
00063   }
00064 
00065 freeze(1);
00066 freeze(&current_sprite);
00067  choice_start()
00068 (&gobpass == 0) "Ask the Goblin guard to let you in"
00069  "Incite an 'incident'"
00070  "Leave"
00071  choice_end()
00072 
00073  if (&result == 1)
00074  {
00075   wait(400);
00076   say_stop("Greetings my good fellow!  May I enter your fine establishment?", 1);
00077   wait(400);
00078   say_stop("`6hmm.", &current_sprite);
00079   wait(400);
00080   int &dumb = compare_weapon("item-b1");
00081 debug("Dumb is &dumb");
00082   if (&dumb == 1)
00083     {
00084       if (&mayor != 3)
00085        {
00086         //if they have not talked to the mayor, let's not let them in.
00087   say_stop("`6hmm.. are yoo joon?? coom beck lader! too erly", &current_sprite);
00088   wait(400);
00089   unfreeze(1);
00090  unfreeze(&current_sprite);
00091   return;    
00092 
00093        }
00094      //they are holding the bow
00095    say_stop("`6ashee yoo hav bough. GATS OPAN!", &current_sprite);
00096 playsound(43, 22050,0,0,0);
00097 
00098         &gobpass = 1;
00099         //remove gate
00100         &dumb = sp(3);
00101         sp_hard(&dumb, 1);
00102         draw_hard_sprite(&dumb);
00103         sp_active(&dumb, 0);
00104 unfreeze(1);
00105 unfreeze(&current_sprite);
00106   return;    
00107     }
00108   say_stop("`6erga hoomans NOT heenter!  leev!", &current_sprite);
00109   wait(400);
00110   say_stop("Oh come on, let me in!", 1);
00111   wait(400);
00112   say_stop("`6no bow?!!! un not joon! leev!!", &current_sprite);
00113  }
00114 
00115  if (&result == 2)
00116  {
00117   wait(400);
00118   say_stop("Say.  So how 'bout that war of '23?  You guys got beat back pretty hard.", 1);
00119   wait(400);
00120   say_stop("`6yoo ar engerang meee!", &current_sprite);
00121   wait(400);
00122   say_stop("I mean, King Daniel basically crushed you all like tiny bugs.", 1);
00123   wait(400);
00124   say_stop("`6reechard!?? yoo wheel bey daying now!", &current_sprite);
00125   sp_brain(&current_sprite, 9);
00126   sp_target(&current_sprite, 1);
00127  }
00128 
00129 unfreeze(1);
00130 unfreeze(&current_sprite);
00131 
00132 }