Advertisement
Guest User

Untitled

a guest
Apr 19th, 2011
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.16 KB | None | 0 0
  1. // QUest Engine 0.01 example script by VUlt-r
  2. // script shows how to initialize and begin the quest
  3.  
  4. Main
  5. {
  6.     questname   "Karma Quest"
  7.     version     1.0
  8. }
  9. State Begin
  10. {
  11.     desc        "Talk to Wise Man"
  12.     action      AddNpcChat( 4 , "Hellow stranger" );
  13.     action      AddNpcText( 4 , "Hellow stranger, what can i do for you" );
  14.     action      AddNpcInput( 4 , 1 , "Karma menu");
  15.     action      AddNpcInput( 4 , 2 , "Class menu");
  16.  
  17.     rule        InputNpc( 1 ) goto Karma
  18.     rule        InputNpc( 2 ) goto Class
  19. }
  20.  
  21. State Karma
  22. {
  23.     desc        "Talk to Wise Man"
  24.     action      ShowHint("Karma menu opened");
  25.  
  26.     action      AddNpcText( 4 , "What shall i do to your karma?" );
  27.     action      AddNpcInput( 4 , 1 , "Take 10 Karma");
  28.     action      AddNpcInput( 4 , 2 , "Take 100 Karma");
  29.     action      AddNpcInput( 4 , 3 , "Give 10 Karma");
  30.     action      AddNpcInput( 4 , 4 , "Give 100 Karma");
  31.  
  32.     rule        InputNpc( 1 ) goto Take10
  33.     rule        InputNpc( 2 ) goto Take100
  34.     rule        InputNpc( 3 ) goto Give10
  35.     rule        InputNpc( 4 ) goto Give100
  36. }
  37.  
  38. State Class
  39. {
  40.     desc        "Talk to Wise Man"
  41.     action      ShowHint("Class menu opened");
  42.  
  43.     action      AddNpcText( 4 , "This is a temporary menu to set your class thru the quest-engine, will be better later on." );
  44.     action      AddNpcInput( 4 , 1 , "Make me Priest");
  45.     action      AddNpcInput( 4 , 2 , "Make me Magician");
  46.     action      AddNpcInput( 4 , 3 , "Make me Rogue");
  47.     action      AddNpcInput( 4 , 4 , "Make me Archer");
  48.     action      AddNpcInput( 4 , 5 , "Make me Warrior");
  49.  
  50.     rule        InputNpc( 1 ) goto Priest
  51.     rule        InputNpc( 2 ) goto Magician
  52.     rule        InputNpc( 3 ) goto Rogue
  53.     rule        InputNpc( 4 ) goto Archer
  54.     rule        InputNpc( 5 ) goto Warrior
  55. }
  56.  
  57. State Priest
  58. {
  59.     action      SetClass(2);
  60.     action      Reset();
  61. }
  62.  
  63. State Magician
  64. {
  65.     action      SetClass(3);
  66.     action      Reset();
  67. }
  68.  
  69. state Rogue
  70. {
  71.     action      SetClass(4);
  72.     action      Reset();
  73. }
  74.  
  75. state Archer
  76. {
  77.     action      SetClass(5);
  78.     action      Reset();
  79. }
  80.  
  81. state Warrior
  82. {
  83.     action      SetClass(6);
  84.     action      Reset();
  85. }
  86.  
  87. state Take10
  88. {
  89.     action      RemoveKarma(10);
  90.     action      Reset();
  91. }
  92.  
  93. state Take100
  94. {
  95.     action      RemoveKarma(100);
  96.     action      Reset();
  97. }
  98.  
  99. state Give10
  100. {
  101.     action      GiveKarma(10);
  102.     action      Reset();
  103. }
  104.  
  105. state Give100
  106. {
  107.     action      GiveKarma(100);
  108.     action      Reset();
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement