tutorial.txt 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. event.load("human_hurt");
  2. event.load("entity_click");
  3. event.load("custom_command");
  4. event.load("quest_start");
  5. event.load("quest_term");
  6. stage = 0;
  7. all_stages = 21;
  8. quest_name = "Tutorial";
  9. kölsch = read.item("{id:\"minecraft:player_head\",Count:1b,tag:{SkullOwner:{Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2OGI5ODA5OGEwYzRhMjllMjA0NjcwNDYzMDkxZGI2MDcwZTc3ZDg2NzY5ZDk4NWY2YmVmNDA3NWU1In19fQ==\"}]},Id:\"c937a96b-cdbc-4fd1-8a19-e3fa9eadf313\"},display:{Name:'{\"text\":\"§r§eKölsch\"}'}}}");
  10. @wait
  11. wait();
  12. if(event == "human_hurt") {
  13. player = entity;
  14. }
  15. if(quest_player_uuid == player.getUuid(player)) {
  16. ignoreGoto(event);
  17. }
  18. goto("wait");
  19. @quest_start
  20. msg.quest(player, "Tutorial", 1, 3, "Welcome to our fat world full of chocolate!");
  21. stage.increase(player);
  22. goto("wait");
  23. @quest_term
  24. goto("wait");
  25. @custom_command
  26. if(command == "questanswer") {
  27. number = list.getIndex(args, 0);
  28. speaker = list.getIndex(args, 1);
  29. if(stage == 5) {
  30. if(number == 1000) {
  31. msg(player, "[§b2§r/§b5§r] §a", speaker, " §r| §eFirst rule about rules. Don't talk about rules. No joke. There are no rules. But you can read our funny ", text.hover(text.link("§bFake Rules", "https://minecraft.hammerle.me/?site=rules"), "Click me"), ".");
  32. stage.increase(player);
  33. } elseif(number == 1001) {
  34. msg(player, "[§b2§r/§b5§r] §a", speaker, " §r| §eAlways those useless developers! Has he also told you to learn all server rules by heart? Don't trust him! We have no rules. There are just a bunch of funny ", text.hover(text.link("§bFake Rules", "https://minecraft.hammerle.me/?site=rules"), "Click me"), ".");
  35. stage.increase(player);
  36. }
  37. goto("wait");
  38. }
  39. if(stage == 11) {
  40. if(number == 1002) {
  41. msg.quest(player, speaker, 2, 3, "There you go. Marvin should enjoy it!");
  42. safeGiveItemPlayer(player, kölsch);
  43. stage.increase(player);
  44. } elseif(number == 1003) {
  45. msg.quest(player, speaker, 2, 3, "There you go. You may have heard about Marvin?");
  46. safeGiveItemPlayer(player, kölsch);
  47. safeGiveItemPlayer(player, kölsch);
  48. safeGiveItemPlayer(player, kölsch);
  49. safeGiveItemPlayer(player, read.item("minecraft:apple"));
  50. stage.increase(player);
  51. }
  52. goto("wait");
  53. }
  54. if(stage == 15) {
  55. if(number == 1004) {
  56. msg.quest(player, speaker, 2, 6, "I see. I see.");
  57. player.removeItem(player, kölsch);
  58. stage.increase(player);
  59. } elseif(number == 1005) {
  60. msg.quest(player, speaker, 2, 6, "My friend. My best friend.");
  61. player.removeItem(player, kölsch);
  62. stage.increase(player);
  63. }
  64. goto("wait");
  65. }
  66. if(stage == 18) {
  67. if(number == 1006) {
  68. msg.quest(player, speaker, 4, 6, "Mmhh. If it has to be. 20x10 plot, there you go.");
  69. if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
  70. skill.addAmount(player, "skill.freeplotsize", 200);
  71. }
  72. stage.increase(player);
  73. } elseif(number == 1007) {
  74. if(player.getItemAmount(player, false, kölsch) >= 1) {
  75. msg.quest(player, speaker, 4, 6, "Oh yeah! You know what. You get a free plot for the size of 20x20. But don't tell Kajetan about this.");
  76. if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
  77. skill.addAmount(player, "skill.freeplotsize", 400);
  78. }
  79. player.removeItem(player, kölsch);
  80. stage.increase(player);
  81. } else {
  82. msg.quest(player, speaker, 4, 6, "§eUff. We ran out of beer. Doesn't matter. 20x10 plot, there you go.");
  83. if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
  84. skill.addAmount(player, "skill.freeplotsize", 200);
  85. }
  86. stage.increase(player);
  87. }
  88. }
  89. goto("wait");
  90. }
  91. }
  92. goto("wait");
  93. @human_hurt
  94. player = entity;
  95. entity = human;
  96. goto("human_core");
  97. @entity_click
  98. if(hand == "OFF_HAND") {
  99. goto("wait");
  100. }
  101. if(entity.getType(entity) != "human") {
  102. goto("wait");
  103. }
  104. goto("human_core");
  105. @human_core
  106. entity_name = entity.getName(entity);
  107. if(entity_name == "Tutorial") {
  108. if(stage == 1) {
  109. msg.quest(player, entity_name, 2, 3, "Just a joke. Altough this is modified Minecraft, we have no chocolate.");
  110. stage.increase(player);
  111. } elseif(stage == 2) {
  112. msg.quest(player, entity_name, 3, 3, "Talk to Kajetan. He is a funky guy. But don't believe his every word.");
  113. stage.increase(player);
  114. }
  115. goto("wait");
  116. }
  117. if(entity_name == "Kajetan") {
  118. if(stage == 3) {
  119. msg.quest(player, entity_name, 1, 5, concat("Hello ", player.getName(player), ". I am your owner and the creator of life, the universe and everything."));
  120. stage.increase(player);
  121. } elseif(stage == 4) {
  122. msg(player, "§dOptions of answer:");
  123. msg(player, text.click("[§bA§r] §eOkay my lord. What do you want me to do? Should I learn all server rules by heart?", "/questanswer 1000 Kajetan"));
  124. msg(player, text.click("[§bB§r] §eSure. Marvin already told me to be aware of you.", "/questanswer 1001 Kajetan"));
  125. stage.increase(player);
  126. } elseif(stage == 6) {
  127. msg.quest(player, player_name, 3, 5, "Fancy, but where can I build my own house?");
  128. stage.increase(player);
  129. } elseif(stage == 7) {
  130. msg.quest(player, entity_name, 4, 5, "Wherever you want to. For protection use §b/plot. §eTalk to Marvin and he will give you a free plot (max. 20x10).");
  131. stage.increase(player);
  132. } elseif(stage == 8) {
  133. msg.quest(player, entity_name, 5, 5, "Please bring him something to drink. This developer only works on 100% when drunk. Alena in the tavern will give you a beer for him.");
  134. stage.increase(player);
  135. }
  136. goto("wait");
  137. }
  138. if(entity_name == "Alena") {
  139. if(stage == 9) {
  140. msg.quest(player, entity_name, 1, 3, "Hello Stranger. What brings you here?");
  141. stage.increase(player);
  142. } elseif(stage == 10) {
  143. msg(player, "§dOptions of answer:");
  144. msg(player, text.click("[§bTruth§r] §eI was told to get Marvin a beer.", "/questanswer 1002 Alena"));
  145. msg(player, text.click("[§bLie§r] §eKajetan the owner sent me to you. I should bring him three beers and an apple.", "/questanswer 1003 Alena"));
  146. stage.increase(player);
  147. } elseif(stage == 12) {
  148. msg.quest(player, entity_name, 3, 3, "He always codes useful things such as the button over there for free food.");
  149. stage.increase(player);
  150. }
  151. goto("wait");
  152. }
  153. if(entity_name == "Marvin") {
  154. if(stage == 13) {
  155. msg.quest(player, entity_name, 1, 6, "??????");
  156. stage.increase(player);
  157. } elseif(stage == 14) {
  158. msg(player, "§dOptions of answer:");
  159. msg(player, text.click("[§bA§r] §eEhmm... I have a beer for you.", "/questanswer 1004 Marvin"));
  160. msg(player, text.click("[§bB§r] §eLOL. You are already drunk. Nevertheless I have a beer for you.", "/questanswer 1005 Marvin"));
  161. stage.increase(player);
  162. } elseif(stage == 16) {
  163. msg.quest(player, entity_name, 3, 6, "Go into the cave for minigames.");
  164. stage.increase(player);
  165. } elseif(stage == 17) {
  166. msg(player, "§dOptions of answer:");
  167. msg(player, text.click("[§bA§r] §eMaybe later. Kajetan told me you have a free plot for me.", "/questanswer 1006 Marvin"));
  168. msg(player, text.click("[§bB§r] §eYeah, great idea. But let us drink another beer together!", "/questanswer 1007 Marvin"));
  169. stage.increase(player);
  170. } elseif(stage == 19) {
  171. msg.quest(player, player_name, 5, 6, "Very nice. Thank you.");
  172. stage.increase(player);
  173. } elseif(stage == 20) {
  174. msg.quest(player, entity_name, 6, 6, "You're welcome.");
  175. msg(player, "§dTutorial completed. Reward: 10 Coins!");
  176. addMoney(player, 10);
  177. quest.finish(script, player);
  178. }
  179. }
  180. goto("wait");