Back to index

freedink-data  1.08.20080920
S5-ST1P.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003  int &play;
00004 }
00005 
00006 
00007 void hit( void )
00008 {
00009  &play = random(3, 1);
00010  if (&play == 1)
00011  {
00012   say_stop("`2Must you hit me?", &current_sprite);
00013  }
00014  if (&play == 2)
00015  {
00016   say_stop("`2You're a murderer aren't you?", &current_sprite);
00017  }
00018  if (&play == 3)
00019  {
00020   say_stop("`2So, hitting the owner of a weapons store huh?", &current_sprite);
00021   say_stop("`2Some people.", &current_sprite);
00022  }
00023 }
00024 
00025 
00026 void buyaxe( void)
00027 {
00028 int &junk = free_items();
00029 
00030 
00031 if (&junk < 1)
00032  {
00033          choice_start()
00034         set_y 240
00035         title_start();
00036 You are carrying too much.
00037         title_end();
00038          "Ok"
00039          choice_end()
00040  return;
00041  }
00042 
00043 
00044 if (&gold < 3000)
00045  {
00046          choice_start()
00047         set_y 240
00048         title_start();
00049 You don't have enough gold to buy this.
00050         title_end();
00051          "Ok"
00052          choice_end()
00053  return;
00054  }
00055 
00056 &gold -= 3000;
00057 add_item("item-axe",438, 6);
00058 
00059 }
00060 
00061 
00062 
00063 
00064 void talk( void )
00065 {
00066          choice_start()
00067         set_y 240
00068         set_title_color 2
00069         title_start();
00070 "What will it be, hero?"
00071         title_end();
00072          "Throwing Axe - $3000"
00073          "Leave"
00074          choice_end()
00075 
00076           if (&result == 1)
00077           {
00078            buyaxe();
00079            unfreeze(1);
00080            return;
00081 
00082           }
00083 
00084    unfreeze(1);
00085    return;
00086 
00087 }