Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 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 "Rare Berries"
  7. version 1
  8. }
  9.  
  10. state Begin
  11. {
  12. desc "Talk to old farmer Greg."
  13. action AddNpcText( 38 , "Its hard find young motivated people for picking berries." );
  14. action AddNpcText( 38 , "Are you maybe interested in a job?" );
  15.  
  16. action AddNpcInput( 38 , 1 , "No thanks");
  17. action AddNpcInput( 38 , 2 , "Yes i take the job!");
  18. action AddNpcInput( 38 , 3 , "Where do i find berries?");
  19.  
  20. rule InputNpc( 1 ) goto Reset
  21. rule InputNpc( 2 ) goto Begin2
  22. rule InputNpc( 3 ) goto Begin3
  23. }
  24.  
  25. state Begin2
  26. {
  27. desc "Collect 10 rare berries"
  28. action ShowHint("Quest reward : 1500 EXP and 500 gold (REP)")
  29. action AddNpcText( 38 , "I pay 500 gold for 20 rare berries.");
  30. action AddNpcText( 38 , "Working in the fields will ofcourse give you a lot experience as well!");
  31.  
  32. action AddNpcInput( 38 , 1 , "I give up");
  33. action AddNpcInput( 38 , 2 , "Im working on it!");
  34.  
  35. rule InputNpc( 1 ) goto Reset
  36. rule GotItems( 486 , 20 ) goto Talk2
  37. }
  38.  
  39. state Begin3
  40. {
  41. desc "Talk to old farmer Greg."
  42. action AddNpcText( 38 , "The berries are growing in the patches of farmlands around me. There are 5 in total.");
  43. action AddNpcText( 38 , "I think that the plants spawn berries randomly but they don't always spawn them.");
  44. action AddNpcText( 38 , "Sometimes they spawn useless leaves, sadly i cannot pay you for that.");
  45. action AddNpcText( 38 , "You should remove the useless leaves, it prevents berries from growing.");
  46.  
  47. rule TalkedToNpc( 38 ) goto Begin2 // requires to talk
  48. }
  49.  
  50. state Talk2
  51. {
  52. desc "Talk to the farmer Greg."
  53. action ShowHint("You succesfully collected 10 rare berries")
  54. action AddNpcChat( 38 , "Great job!" );
  55. action AddNpcText( 38 , "10 excellent berries! Thanks for your business." );
  56.  
  57. rule TalkedToNpc( 38 ) goto GetReward // requires to talk
  58. rule LostItems( 486 , 20 ) goto Begin2
  59.  
  60. }
  61.  
  62. state GetReward
  63. {
  64. action ShowHint("You gained 1500 EXP and 500 gold (REP)");
  65. action PlaySound(17);
  66.  
  67. action RemoveItem( 486 , 20 )
  68. action GiveItem( 1 , 500)
  69. action GiveExp(1500)
  70. action End()
  71. }
  72.  
  73. state Reset
  74. {
  75. action ShowHint("Rare Berries quest aborted..")
  76. action Reset() // reset and abort quest
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement