Advertisement
Guest User

Untitled

a guest
Jun 8th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.99 KB | None | 0 0
  1. //----------------------------------------------------------------------------------------------------
  2. // game_start
  3. //----------------------------------------------------------------------------------------------------
  4. function game_start()
  5. {
  6. }
  7.  
  8. //----------------------------------------------------------------------------------------------------
  9. // repeatedly_execute
  10. //----------------------------------------------------------------------------------------------------
  11. function repeatedly_execute()
  12. {
  13. }
  14.  
  15. //----------------------------------------------------------------------------------------------------
  16. // repeatedly_execute_always
  17. //----------------------------------------------------------------------------------------------------
  18. function repeatedly_execute_always()
  19. {
  20. }
  21.  
  22. //----------------------------------------------------------------------------------------------------
  23. // on_key_press
  24. //----------------------------------------------------------------------------------------------------
  25. function on_key_press(eKeyCode keycode)
  26. {
  27.   if (IsGamePaused()) keycode = 0;
  28.  
  29.   // "System Keys"
  30.   if (keycode == eKeyCtrlQ) QuitGame(1); // Ctrl-Q
  31.   if (keycode == eKeyF9) RestartGame(); // F9
  32.   if (keycode == eKeyF12) SaveScreenShot("scrnshot.pcx");  // F12
  33.  
  34.   // Debugger Keys
  35.   if (keycode == eKeyCtrlS) Debug(0,0); // Ctrl-S, give all inventory
  36.   if (keycode == eKeyCtrlV) Debug(1,0); // Ctrl-V, version
  37.   if (keycode == eKeyCtrlA) Debug(2,0); // Ctrl-A, show walkable areas
  38.   if (keycode == eKeyCtrlX) Debug(3,0); // Ctrl-X, teleport to room
  39. }
  40.  
  41. //----------------------------------------------------------------------------------------------------
  42. // on_mouse_click
  43. //----------------------------------------------------------------------------------------------------
  44. function on_mouse_click(MouseButton button)
  45. {
  46.     // all mouse clicks are handled in TwoClickHandler.asc!
  47. }
  48.  
  49. //----------------------------------------------------------------------------------------------------
  50. // on_event
  51. //----------------------------------------------------------------------------------------------------
  52. function on_event (EventType event, int data)
  53. {
  54. }
  55.  
  56. //----------------------------------------------------------------------------------------------------
  57. // unhandled_event
  58. //----------------------------------------------------------------------------------------------------
  59. function unhandled_event (int what, int type)
  60. {
  61.     if (what == 1) // Unhandled events for HOTSPOTS
  62.     {
  63.         if (type == 1) // look
  64.         {
  65.             player.Say("I see nothing special about it.");
  66.         }
  67.         if (type == 2) // interact
  68.         {
  69.             player.Say("I can't do anything with it.");
  70.         }
  71.         if (type == 3) // use inv on
  72.         {
  73.             player.Say("That won't do anything.");
  74.         }
  75.     }
  76.     if (what == 2) // Unhandled events for OBJECTS
  77.     {
  78.         if (type == 0) // look
  79.         {
  80.             player.Say("Looks alright.");
  81.         }
  82.         if (type == 1) // interact
  83.         {
  84.             player.Say("I don't want to have it.");
  85.         }
  86.         if (type == 3) // use inv on
  87.         {
  88.             player.Say("That's a funny idea.");
  89.         }
  90.     }
  91.     if (what == 3) // Unhandled events for CHARACTERS
  92.     {
  93.         if (type == 0) // look
  94.         {
  95.             player.Say("Hm.");
  96.         }
  97.         if (type == 1) // interact
  98.         {
  99.             player.Say("Got nothing to say.");
  100.         }
  101.         if (type == 3) // use inv on
  102.         {
  103.             player.Say("I don't think I should give that away.");
  104.         }
  105.     }
  106.     if (what == 5) // Unhandled events for INVENTORY ITEMS
  107.     {
  108.         if (type == 0) // look
  109.         {
  110.             player.Say("It's just some junk in my inventory.");
  111.         }
  112.         if (type == 1) // interact
  113.         {
  114.             player.Say("Er, no?");
  115.         }
  116.         if (type == 3) // use inv on
  117.         {
  118.             player.Say("That's ridiculous.");
  119.         }
  120.     }
  121. }
  122.  
  123. //----------------------------------------------------------------------------------------------------
  124. // dialog_request
  125. //----------------------------------------------------------------------------------------------------
  126. function dialog_request(int param)
  127. {
  128. }
  129.  
  130. function btnQuit_OnClick(GUIControl *control, MouseButton button)
  131. {
  132.     QuitGame(1);
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement