Back to index

freedink-data  1.08.20080920
S1-BRG2.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003 int &dumb = create_sprite(360, 300, 0, 64, 1);
00004 sp_hard(&dumb, 0);
00005 draw_hard_sprite(&dumb);
00006 sp_disabled(&dumb, 1);
00007 
00008 sp_base_walk(&current_sprite, 370);
00009 sp_speed(&current_sprite, 3);
00010 sp_timing(&current_sprite, 0);
00011 }
00012 
00013 void hit( void )
00014 {
00015   say("`3Did something touch me?  A fly perhaps?", &current_sprite);
00016 
00017 }
00018 
00019 void talk( void )
00020 {
00021  freeze(1);
00022  choice_start();
00023         set_y 240
00024         set_title_color 3
00025         title_start();
00026 "Hello good sir, the bridge toll is 100 gold."
00027         title_end();
00028 "Pay the toll"
00029 "Argue"
00030 "Leave"
00031  choice_end();
00032 
00033   if (&result == 1)
00034   {
00035 
00036  if (&gold < 100)
00037  {
00038  wait(500);
00039  say_stop("`3You don't have enough gold, fool!", &current_sprite);   
00040  unfreeze(1);
00041  return;
00042  }
00043  wait(500);
00044  say_stop("`3Thanks.  Have a nice day.", &current_sprite);   
00045  &gold -= 100;
00046  move_stop(&current_sprite, 4, -50, 1);
00047  &story = 7;
00048  unfreeze(1);
00049  sp_hard(&dumb, 1);
00050   force_vision(0);
00051 // sp_active(&current_sprite, 0);
00052 
00053   kill_this_task();
00054  return;
00055   }
00056 
00057  if (&result == 2)
00058   {
00059  wait(500);
00060  say_stop("This is ridiculous.  How can you justify charging this much?",1);
00061  wait(500);
00062  say_stop("`3My kids need to eat.", &current_sprite);
00063  wait(500);
00064  say_stop("Does the king know about your little 'business'?", 1);
00065  wait(500);
00066  say_stop("`3Of course not.", &current_sprite);
00067  wait(500);
00068  say_stop("Ah, how nice.", 1);
00069   }
00070 
00071 
00072  unfreeze(1);
00073 }