Back to index

freedink-data  1.08.20080920
S4-ST3P.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003  int &talker;
00004  &talker = 0;
00005  int &smell;
00006  &smell = random(3, 1);
00007  if (&smell == 1)
00008  {
00009   say_stop("`6Good day to ye sir.", &current_sprite);
00010  }
00011  if (&smell == 2)
00012  {
00013   say_stop("`6Arrr, I miss the sea ...", &current_sprite);
00014  }
00015 }
00016 
00017 
00018 void buys1( void)
00019 {
00020 int &junk = free_items();
00021 
00022 
00023 if (&junk < 1)
00024  {
00025          choice_start()
00026         set_y 240
00027         title_start();
00028 You are carrying too much.
00029         title_end();
00030          "Ok"
00031          choice_end()
00032  return;
00033  }
00034 
00035 
00036 if (&gold < 400)
00037  {
00038          choice_start()
00039         set_y 240
00040         set_title_color 6
00041         title_start();
00042 You don't have enough gold to buy this sword, landlubber!
00043         title_end();
00044          "Ok"
00045          choice_end()
00046  return;
00047  }
00048 
00049 &gold -= 400;
00050 add_item("item-sw1",438, 7);
00051 
00052 }
00053 
00054 
00055 void buy( void )
00056 {
00057 buy:
00058          choice_start()
00059         set_y 240
00060         set_title_color 6
00061         title_start();
00062 "Arrr, feast your eyes on these fine tools..."
00063         title_end();
00064          "Longsword - $400"
00065          "Bomb - $20"
00066          "Clawsword - $2000"
00067          "Leave"
00068          choice_end()
00069 
00070           if (&result == 1)
00071           {
00072            buys1();
00073            unfreeze(1);
00074            goto mainloop;
00075            return;
00076 
00077           }
00078           if (&result == 2)
00079           {
00080            buybomb();
00081            unfreeze(1);
00082            goto mainloop;
00083            return;
00084 
00085           }
00086 
00087           if (&result == 3)
00088           {
00089            buysw2();
00090            unfreeze(1);
00091            goto mainloop;
00092            return;
00093 
00094           }
00095 
00096 
00097    unfreeze(1);
00098    goto mainloop;
00099    return;
00100 
00101 }
00102 
00103 void buybomb( void)
00104 {
00105 int &junk = free_items();
00106 
00107 
00108 if (&junk < 1)
00109  {
00110          choice_start()
00111         set_y 240
00112         title_start();
00113 You are carrying too much.
00114         title_end();
00115          "Ok"
00116          choice_end()
00117  return;
00118  }
00119 
00120 
00121 if (&gold < 20)
00122  {
00123          choice_start()
00124         set_y 240
00125         set_title_color 6
00126         title_start();
00127 You don't have enough gold to buy this bomb, mate!
00128         title_end();
00129          "Ok"
00130          choice_end()
00131  return;
00132  }
00133 
00134 &gold -= 20;
00135 add_item("item-bom",438, 3);
00136 
00137 }
00138 
00139 void buysw2( void)
00140 {
00141 int &junk = free_items();
00142 
00143 
00144 if (&junk < 1)
00145  {
00146          choice_start()
00147         set_y 240
00148         title_start();
00149 You are carrying too much.
00150         title_end();
00151          "Ok"
00152          choice_end()
00153  return;
00154  }
00155 
00156 
00157 if (&gold < 2000)
00158  {
00159          choice_start()
00160         set_y 240
00161         set_title_color 6
00162         title_start();
00163 Arr! You don't have enough gold to buy the Clawsword!
00164         title_end();
00165          "Ok"
00166          choice_end()
00167  return;
00168  }
00169 &gold -= 2000;
00170 add_item("item-sw2",438, 20);
00171 }
00172 
00173 
00174 void talk( void )
00175 {
00176  freeze(1);
00177  freeze(&current_sprite);
00178  choice_start()
00179 (&talker == 0)"Ask about the store"
00180 (&talker == 1)"Ask about Pete"
00181  "See what's for sale"
00182  "Leave"
00183  choice_end()
00184   if (&result == 1)
00185   {
00186    say_stop("Nice store here, what is it?", 1);
00187    wait(250);
00188    say_stop("`6What be this place ye ask?  Can't ya tell?!", &current_sprite);
00189    wait(250);
00190    say_stop("`6This be Blistering Pete's weapons shop,", &current_sprite);
00191    wait(250);
00192    say_stop("`6Sharpest blades this side of the sea.", &current_sprite);
00193    &talker = 1;
00194   }
00195   if (&result == 2)
00196   {
00197    say_stop("Are you a pirate?", 1);
00198    wait(250);
00199    say_stop("`6Arr, I used to be ...", &current_sprite);
00200    wait(250);
00201    say_stop("`6one of the best I might add.", &current_sprite);
00202    wait(250);
00203    say_stop("Well, what are you doing here?", 1);
00204    wait(250);
00205    say_stop("Aren't you supposed to be out on the high seas collecting booty?", 1);
00206    wait(250);
00207    say_stop("`6I used to live that lifestyle, blood on me blade,", &current_sprite);
00208    wait(250);
00209    say_stop("`6rum in me gut, and plunder in the hold.", &current_sprite);
00210    wait(250);
00211    say_stop("`6But, a small run in with the Royal navy,", &current_sprite);
00212    wait(250);
00213    say_stop("`6has forced me to lay low for a while.", &current_sprite);
00214    wait(250);
00215    say_stop("`6But rest assured my treasure awaits me", &current_sprite);
00216    wait(250);
00217    say_stop("`6right where I buried it!", &current_sprite);
00218    wait(500);
00219    say_stop("`6Why are ye asking?", &current_sprite);
00220    wait(250);
00221    say_stop("Just, just wondering sir.", 1);
00222   }
00223   if (&result == 3)
00224   {                                         f
00225  
00226   goto buy;
00227    //Stuff here
00228   }
00229  unfreeze(1);
00230  unfreeze(&current_sprite);
00231 }
00232 
00233 void hit( void )
00234 {
00235  if (&story > 10)
00236  {
00237   say_stop("`6I'll kill ye, hero.", &current_sprite); 
00238  }
00239  say_stop("`6Don't challenge me boy, I'll give you a wooden leg!!", &current_sprite);
00240 }