Back to index

freedink-data  1.08.20080920
S6-VEND.c
Go to the documentation of this file.
00001 //hellfire man
00002 
00003 void main( void )
00004 {
00005  preload_seq(381);
00006  preload_seq(383);
00007  preload_seq(385);
00008  preload_seq(387);
00009  preload_seq(389);
00010  sp_base_walk(&current_sprite, 380);
00011  sp_hitpoints(&current_sprite, 50);
00012  sp_brain(&current_sprite, 16);
00013  sp_speed(&current_sprite, 1);
00014  sp_timing(&current_sprite, 33);
00015 
00016 }
00017 
00018 void hit( void )
00019 {
00020  say("`5I suppose I'll be dead soon.  I'm not particularly worried.",&current_sprite);
00021 
00022 }
00023 
00024 void talk( void )
00025 {
00026 
00027 int &mcrap = count_magic("item-sfb");
00028 
00029  freeze(1);
00030  freeze(&current_sprite);
00031 
00032 
00033 if (&mcrap > 0)
00034   {
00035 
00036   say_stop("`0Please sir, I have nothing else to sell.", &current_sprite);
00037   wait(400);
00038   say_stop("Sell me something else you bastard!", 1);
00039   wait(400);
00040   say_stop("`0Nope.", &current_sprite);
00041   wait(400);
00042   say_stop("What on earth are you doing in this cave anyway?",1);
00043   wait(400);
00044   say_stop("`0I was waiting for you.", &current_sprite);
00045   wait(400);
00046   say_stop("Do you have a family?", 1);
00047   wait(400);
00048   say_stop("`0No.", &current_sprite);
00049   wait(400);
00050   say_stop("Do you have a home?", 1);
00051   wait(400);
00052   say_stop("`0I do not.", &current_sprite);
00053   wait(400);
00054   say_stop("Your life just doesn't make sense to me.", 1);
00055   wait(400);
00056   say_stop("`0Life isn't supposed to make sense.", &current_sprite);
00057   wait(400);
00058   say_stop("And I suppose you know everything.", 1);
00059   wait(400);
00060   say_stop("`0Nope.  If I did, I doubt I would want to live it.", &current_sprite);
00061   wait(400);
00062   say_stop("I'll just be leaving now.", 1);
00063   unfreeze(1);
00064   unfreeze(&current_sprite);
00065 
00066   return;
00067   }
00068 
00069  choice_start();
00070         set_y 240
00071         set_title_color 0
00072         title_start();
00073 "Hello, friend.  I will teach Hellfire magic for $1500 gold."
00074         title_end();
00075 "Learn Hellfire"
00076 "Leave"
00077  choice_end();
00078 
00079   if (&result == 1)
00080     {
00081      if (&gold < 1500)
00082        {
00083         say("I don't have enough money!", 1);
00084        }
00085        else
00086        {
00087 
00088 int &junk = free_magic();
00089 
00090 
00091 if (&junk < 1)
00092  {
00093          choice_start()
00094         set_y 240
00095         title_start();
00096 You are carrying too much.
00097         title_end();
00098          "Ok"
00099          choice_end()
00100 unfreeze(1);
00101 unfreeze(&current_sprite);
00102 
00103  return;
00104  }
00105 
00106 
00107 if (&junk < 1)
00108  {
00109          choice_start()
00110         set_y 240
00111         title_start();
00112 You are carrying too much.
00113         title_end();
00114          "Ok"
00115          choice_end()
00116 unfreeze(1);
00117 unfreeze(&current_sprite);
00118 
00119  return;
00120  }
00121 
00122 
00123         say("`0* YOU LEARN HELLFIRE *", 1);
00124          playsound(43, 22050,0,0,0);
00125          &gold -= 1500;
00126  add_magic("item-sfb",437, 2);
00127        
00128        }
00129     }
00130 
00131 unfreeze(1);
00132 unfreeze(&current_sprite);
00133 
00134 
00135 }