core.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. event.load("human_hurt");
  2. event.load("entity_click");
  3. event.load("inv_click");
  4. msg("dev", "§bQuests: §rSchiffbruch loaded.");
  5. @wait
  6. wait();
  7. ignoreGoto(event);
  8. goto("wait");
  9. @human_hurt
  10. if(!isPlayer(entity)) {
  11. goto("wait");
  12. }
  13. player = entity;
  14. entity = human;
  15. goto("human_core");
  16. @entity_click
  17. if(hand == "OFF_HAND") {
  18. goto("wait");
  19. }
  20. if(entity.getType(entity) != "human") {
  21. goto("wait");
  22. }
  23. goto("human_core");
  24. @human_core
  25. if(player.hasQuest2(player)) {
  26. goto("wait");
  27. }
  28. entity_name = entity.getName(entity);
  29. if(entity_name == "Kumpel") {
  30. inv = inv.new("333333333333333333");
  31. progress = player.getShipProgress(player);
  32. inv.setItem(inv, 0, read.item("minecraft:enchanted_book", 1, "§fSchiffbruch"));
  33. if(progress > 0) {
  34. inv.setItem(inv, 1, read.item("minecraft:enchanted_book", 1, "§fNüchtern werden"));
  35. }
  36. if(progress > 1) {
  37. inv.setItem(inv, 2, read.item("minecraft:enchanted_book", 1, "§fSchatz der Santa Maria"));
  38. }
  39. if(progress > 2) {
  40. inv.setItem(inv, 3, read.item("minecraft:enchanted_book", 1, "§fNie wieder Hunger leiden"));
  41. }
  42. if(progress > 3) {
  43. inv.setItem(inv, 4, read.item("minecraft:enchanted_book", 1, "§fFeines Abendessen"));
  44. }
  45. if(progress > 4) {
  46. inv.setItem(inv, 5, read.item("minecraft:enchanted_book", 1, "§fMonster besiegen"));
  47. }
  48. if(progress > 5) {
  49. inv.setItem(inv, 6, read.item("minecraft:enchanted_book", 1, "§fBaumaterial besorgen"));
  50. }
  51. if(progress > 6) {
  52. inv.setItem(inv, 7, read.item("minecraft:enchanted_book", 1, "§fToten Ehre erweisen"));
  53. }
  54. if(progress > 7) {
  55. inv.setItem(inv, 8, read.item("minecraft:enchanted_book", 1, "§fIch bin durstig"));
  56. }
  57. if(progress > 8) {
  58. inv.setItem(inv, 9, read.item("minecraft:enchanted_book", 1, "§fBacke Backe Kuchen"));
  59. }
  60. if(progress > 9) {
  61. inv.setItem(inv, 10, read.item("minecraft:enchanted_book", 1, "§fVorbereitungen"));
  62. }
  63. if(progress > 10) {
  64. inv.setItem(inv, 11, read.item("minecraft:enchanted_book", 1, "§fFeuerteufel"));
  65. }
  66. if(progress > 11) {
  67. inv.setItem(inv, 12, read.item("minecraft:enchanted_book", 1, "§fBoss"));
  68. }
  69. inv.open(inv, player, "Quests: Kumpel");
  70. goto("wait");
  71. }
  72. goto("wait");
  73. @inv_click
  74. if(inv_name == "Quests: Kumpel") {
  75. progress = player.getShipProgress(player);
  76. if(inv_slot > progress) {
  77. goto("wait");
  78. }
  79. if(inv_slot == 0) {
  80. quest.start(player, "story/schiffbruch/schiff_1_schiffbruch");
  81. goto("wait");
  82. }
  83. if(inv_slot == 1) {
  84. quest.start(player, "story/schiffbruch/schiff_2_nuechtern");
  85. goto("wait");
  86. }
  87. if(inv_slot == 2) {
  88. quest.start(player, "story/schiffbruch/schiff_3_schatz");
  89. goto("wait");
  90. }
  91. if(inv_slot == 3) {
  92. quest.start(player, "story/schiffbruch/schiff_4_hunger");
  93. goto("wait");
  94. }
  95. if(inv_slot == 4) {
  96. quest.start(player, "story/schiffbruch/schiff_5_abendessen");
  97. goto("wait");
  98. }
  99. if(inv_slot == 5) {
  100. quest.start(player, "story/schiffbruch/schiff_6_monster");
  101. goto("wait");
  102. }
  103. if(inv_slot == 6) {
  104. quest.start(player, "story/schiffbruch/schiff_7_baumaterial");
  105. goto("wait");
  106. }
  107. if(inv_slot == 7) {
  108. quest.start(player, "story/schiffbruch/schiff_8_ehre");
  109. goto("wait");
  110. }
  111. if(inv_slot == 8) {
  112. quest.start(player, "story/schiffbruch/schiff_9_durst");
  113. goto("wait");
  114. }
  115. if(inv_slot == 9) {
  116. quest.start(player, "story/schiffbruch/schiff_10_kuchen");
  117. goto("wait");
  118. }
  119. if(inv_slot == 10) {
  120. quest.start(player, "story/schiffbruch/schiff_11_vorbereitungen");
  121. goto("wait");
  122. }
  123. if(inv_slot == 11) {
  124. quest.start(player, "story/schiffbruch/schiff_12_feuerteufel");
  125. goto("wait");
  126. }
  127. if(inv_slot == 12) {
  128. quest.start(player, "story/schiffbruch/schiff_13_boss");
  129. goto("wait");
  130. }
  131. }
  132. goto("wait");