Back to index

freedink-data  1.08.20080920
S2-CA-G.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003 int &jerry;
00004 int &mcounter;
00005 &jerry = 1;
00006 sp_base_attack(&current_sprite, 720);
00007  sp_distance(&current_sprite, 60);
00008  sp_strength(&current_sprite, 50);
00009 sp_hitpoints(&current_sprite, 100);
00010 }
00011 
00012 void attack( void )
00013 {
00014 playsound(36, 22050,0,&current_sprite, 0);
00015 &mcounter = random(4000,0);
00016 sp_attack_wait(&current_sprite, &mcounter);
00017 
00018 }
00019 
00020 
00021 void hit( void )
00022 {
00023 if (&story > 15)
00024   {
00025  say("`2Nice, you win the game, then start killing guards?  Get 'em!", &current_sprite);
00026 sp_timing(&current_sprite, 0);
00027 sp_speed(&current_sprite, 3);
00028 return;
00029   }
00030 
00031  say("`2The guy just hit me!  I am now going to kill him.", &current_sprite);
00032 sp_timing(&current_sprite, 0);
00033 sp_speed(&current_sprite, 3);
00034 }
00035 
00036 void talk( void )
00037 {
00038  freeze(1);
00039  freeze(&current_sprite);
00040          choice_start()
00041          "Ask about the history of the castle"
00042          "Ask about the history of the King"
00043          "Request an audience with King Daniel"
00044          "Leave"
00045          choice_end()
00046 
00047 if (&result == 1)
00048   {
00049    Say_stop("Tell me about this grand castle, friendly Knight.", 1); 
00050 wait(500);  
00051    Say_stop("`2Castle Goodheart has stood here for centuries.", &current_sprite);
00052 wait(500);  
00053    Say_stop("`2It is a magnificent testament to what a monarchy can do.", &current_sprite);
00054 wait(500);  
00055    Say_stop("That castle actually doesn't look that big.", 1); 
00056 wait(500);  
00057    Say_stop("`2It's bigger from the inside.", &current_sprite);
00058 wait(500);  
00059    Say_stop("Ah.", 1); 
00060   }
00061 
00062 if (&result == 2)
00063   {
00064    Say_stop("Tell me about our good King.", 1); 
00065 wait(500);  
00066    Say_stop("`2King Daniel has ruled with an iron hand for nearly a decade now.", &current_sprite);
00067 wait(500);  
00068    Say_stop("`2It was his strategic brilliance that stopped the Great Goblin invasion of '23.", &current_sprite);
00069 wait(500);  
00070    Say_stop("Did he kill them all?", 1); 
00071 wait(500);  
00072    Say_stop("`2No.  After the war was won he created a special place for them to live in peace.", &current_sprite);
00073 wait(500);  
00074    Say_stop("Wow, quite a guy.", 1); 
00075 
00076   }
00077 
00078 
00079 if (&result == 3)
00080   {
00081    Say_stop("I must see the King at once.", 1); 
00082 wait(500);  
00083 
00084 if (&story < 9)
00085 {
00086    Say_stop("`2And you are?", &current_sprite);
00087 wait(500);  
00088    Say_stop("Dink Smallwood.", 1); 
00089 wait(500);  
00090 
00091 }
00092   if (&story < 8)
00093    {
00094    Say_stop("`2I've never heard of you.  Please, go back to your village and play hero there.", &current_sprite);
00095    }
00096 
00097   if (&story == 8)
00098    {
00099    Say_stop("`2Ah, the one that saved that little girl.  Nice work.", &current_sprite);
00100 wait(500);  
00101    Say_stop("So you will grant me access?", 1); 
00102 wait(500);  
00103    Say_stop("`2I'm sorry, the King is otherwise engaged today.", &current_sprite);
00104    }
00105 
00106   if (&story == 9)
00107    {
00108    Say_stop("`2Ah, the one that saved that little girl.  Nice work.", &current_sprite);
00109 wait(500);  
00110    Say_stop("I have news about a Cast plot!", 1); 
00111 wait(500);  
00112    Say_stop("`2I'm sorry, the King is otherwise engaged today.", &current_sprite);
00113    }
00114 
00115 
00116   if (&story == 10)
00117    {
00118    Say_stop("`2Hello, Smallwood.  Congratulations on foiling that attack in KernSin.", &current_sprite);
00119    wait(500);  
00120    Say_stop("It was no more than any other man would have done.", 1); 
00121    wait(500);  
00122    Say_stop("`2But alas, the King is visiting abroad.", &current_sprite); 
00123    wait(500);  
00124    Say_stop("Damn.", 1); 
00125    }
00126 
00127   if (&story == 11)
00128    {
00129    Say_stop("`2Hey, it's Sir Smallwood!", &current_sprite);
00130    wait(500);  
00131    Say_stop("So is the King home?", 1); 
00132    wait(500);  
00133    Say_stop("`2No - He's seeing Milder off before his journey to the Darklands.", &current_sprite); 
00134    wait(500);  
00135    Say_stop("Milder?", 1); 
00136    wait(500);  
00137    Say_stop("`2Yes, Flatstomp is the bravest man in the kingdom.", &current_sprite); 
00138    wait(500);  
00139    Say_stop("Grrrrrrr.", 1); 
00140    }
00141 
00142 
00143 
00144   if (&story > 11)
00145    {
00146    Say_stop("`2Hello, Smallwood.  Of course you may see the King!", &current_sprite);
00147    wait(500);  
00148    Say_stop("`2GUARD, OPEN THE GATE!", &current_sprite);
00149    enter();
00150    }
00151 
00152 
00153   }
00154 
00155    unfreeze(1);
00156    unfreeze(&current_sprite);
00157  
00158 
00159  }                                   
00160 }
00161 
00162 void die( void )
00163 {
00164   int &hold = sp_editor_num(&current_sprite);
00165   if (&hold != 0)
00166   editor_type(&hold, 6); 
00167 
00168 wait(500);
00169 say("Killing guards is fun!",1);
00170 }
00171 
00172 void enter( void )
00173 {
00174  int &gate = sp(4);
00175  sp_seq(&gate, 68);
00176 script_attach(1000);
00177 wait(1000);
00178 fade_down();
00179 &player_map = 102;
00180 sp_x(1, 314);
00181 sp_y(1, 349);
00182 load_screen(102);
00183 draw_screen();
00184 fade_up();
00185 unfreeze(1);
00186 kill_this_task();
00187 }
00188