schiffbruch.txt 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. setVar("gamesworldloc", read.location("games:8:4:8"));
  2. setVar("shipstartloc", read.location("games:1917.5:106:3880.5:180:0"));
  3. /*setVar("placeloc1", read.location("games:"));
  4. setVar("placeloc2", read.location("games:"));
  5. setVar("placeloc3", read.location("games:"));
  6. setVar("placeloc4", read.location("games:"));*/
  7. wheatlist = list.new();
  8. list.add($wheatlist, read.location("games:1905:108:3898"));
  9. list.add($wheatlist, read.location("games:1905:108:3899"));
  10. list.add($wheatlist, read.location("games:1905:108:3900"));
  11. list.add($wheatlist, read.location("games:1905:108:3901"));
  12. list.add($wheatlist, read.location("games:1904:108:3901"));
  13. list.add($wheatlist, read.location("games:1904:108:3902"));
  14. list.add($wheatlist, read.location("games:1903:108:3902"));
  15. list.add($wheatlist, read.location("games:1902:108:3902"));
  16. list.add($wheatlist, read.location("games:1902:108:3901"));
  17. list.add($wheatlist, read.location("games:1902:108:3900"));
  18. list.add($wheatlist, read.location("games:1902:108:3899"));
  19. list.add($wheatlist, read.location("games:1902:108:3898"));
  20. list.add($wheatlist, read.location("games:1903:108:3898"));
  21. list.add($wheatlist, read.location("games:1903:108:3897"));
  22. list.add($wheatlist, read.location("games:1904:108:3897"));
  23. goldblocks = list.new();
  24. list.add($goldblocks, read.location("games:1928:102:3845"));
  25. list.add($goldblocks, read.location("games:1922:102:3839"));
  26. list.add($goldblocks, read.location("games:1934:103:3840"));
  27. list.add($goldblocks, read.location("games:1945:103:3841"));
  28. setVar("animalloc", read.location("games:1911:108:3896"));
  29. setVar("guardianloc", read.location("games:1929:104:3861"));
  30. setVar("treeloc", read.location("games:1911:110:3885"));
  31. setVar("flowerloc", read.location("games:1929:107:3906"));
  32. setVar("truechestloc", read.location("games:1920:118:3840"));
  33. setVar("firechestloc", read.location("games:1949:107:3842"));
  34. setVar("firelogloc", read.location("games:1907:107:3885"));
  35. setVar("no-join", true);
  36. command("clear ", $player-name);
  37. entity.teleport($player, $shipstartloc);
  38. sb.reset($player);
  39. entity.setHealth($player, 20);
  40. player.setHunger($player, 20);
  41. player.setSaturation($player, 5);
  42. setVar("stage", ggv($player-name, "schiffstage"));
  43. if(equal($stage, null)) {
  44. sgv($player-name, "schiffstage", 0);
  45. setVar("stage", 0);
  46. }
  47. if(greater($stage, 0)) {
  48. block.set(read.location(ggv($player-name, "schiffofenloc")), read.item("FURNACE"));
  49. }
  50. if(greaterequal($stage, 10)) {
  51. block.set(read.location(ggv($player-name, "schiffcakeloc")), read.item("CAKE_BLOCK"));
  52. }
  53. if(less($stage, 9)) {
  54. entity.addEffect($player, "confusion", 99999, 0);
  55. }
  56. if(equal($stage, 0)) goto("stage0");
  57. if(equal($stage, 1)) goto("stage1");
  58. if(equal($stage, 2)) goto("stage2");
  59. if(equal($stage, 3)) goto("stage3");
  60. if(equal($stage, 4)) goto("stage4");
  61. if(equal($stage, 5)) goto("stage5");
  62. if(equal($stage, 6)) goto("stage6");
  63. if(equal($stage, 7)) goto("stage7");
  64. if(equal($stage, 8)) goto("stage8");
  65. if(equal($stage, 9)) goto("stage9");
  66. if(equal($stage, 10)) goto("stage10");
  67. if(equal($stage, 11)) goto("stage11");
  68. if(equal($stage, 12)) goto("stage12");
  69. @stage0
  70. event.load("block-break");
  71. player.giveItem($player, read.item("WOOD_PICKAXE"));
  72. abgebaut_loc = list.new();
  73. abgebaut_type = list.new();
  74. setVar("tempstone", 0);
  75. player.speak($player, "§2Kumpel", "Guten Morgen Kamerad! Wie du merkst, waren wir heute Nacht 'etwas' angetrunken.");
  76. player.speak($player, "§2Kumpel", "Leider haben wir dabei unser gutes Schiff auf Sand gesetzt. Was wir bei uns trugen, fiel ins tiefe Wasser.");
  77. player.speak($player, "§2Kumpel", "Alles was wir zum Überleben brauchen, müssen wir uns von dieser Insel holen. Mit 'wir' meine ich dich, denn ich habe mir mein Bein gebrochen.");
  78. player.speak($player, "§2Kumpel", "Zuerst benötigen wir einen Ofen, um Mahlzeiten zubereiten zu können. Sammle 8 Bruchstein, crafte einen Ofen und platziere ihn beliebig auf der Grasfläche.");
  79. @waitstage0
  80. wait();
  81. if(equal($event, "block-break")) {
  82. if(or(equal($block-type, "COBBLESTONE"), equal($block-type, "COBBLESTONE"))) {
  83. setVar("cancel", false);
  84. list.add($abgebaut_loc, $block-loc);
  85. list.add($abgebaut_type, $block-type);
  86. inc("tempstone");
  87. if(greaterequal($tempstone, 8)) {
  88. event.unload("block-break");
  89. event.load("craft");
  90. }
  91. } else() {
  92. setVar("cancel", true);
  93. }
  94. }
  95. if(equal($event, "craft")) {
  96. if(equal($item-type, "FURNACE")) {
  97. event.unload("craft");
  98. event.load("block-place");
  99. }
  100. }
  101. if(equal($event, "block-place")) {
  102. if(and(equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "GRASS"), equal($block-type, "FURNACE"))) {
  103. player.speak($player, "§2Kumpel", "Lass die Mahlzeiten brutzeln, Kamerad.");
  104. setVar("cancel", false);
  105. sgv($player-name, "schiffofenloc", text.location($block-loc));
  106. setVar("i", -1);
  107. while(less(inc("i"), list.getSize($abgebaut_loc))) {
  108. block.set(list.getIndex($abgebaut_loc, $i), read.item(list.getIndex($abgebaut_type, $i)));
  109. }
  110. event.unload("block-place");
  111. removeVar("tempstone");
  112. inc("stage");
  113. sgv($player-name, "schiffstage", $stage);
  114. sgoto(40, "stage1");
  115. } else() {
  116. setVar("cancel", true);
  117. }
  118. }
  119. goto("waitstage0");
  120. @stage1
  121. player.speak($player, "§2Kumpel", "Berge die vier Goldblöcke aus dem havariertem Schiff und bringe sie mir.");
  122. player.giveItem($player, read.item("IRON_PICKAXE"));
  123. event.load("block-break");
  124. event.load("villager-give");
  125. setVar("tempgiven", 0);
  126. setVar("i", -1);
  127. while(less(inc("i"), list.getSize($goldblocks))) {
  128. block.set(list.getIndex($goldblocks, $i), read.item("GOLD_BLOCK"));
  129. }
  130. @waitstage1
  131. wait();
  132. if(equal($event, "block-break")) {
  133. if(and(equal($block-type, "GOLD_BLOCK"), list.contains($goldblocks, $block-loc))) {
  134. setVar("cancel", false);
  135. list.remove($goldblocks, $block-loc);
  136. if(equal(list.getSize($goldblocks), 0)) {
  137. player.speak($player, "§2Kumpel", "Sehr gut, bring das Gold nun mir.");
  138. event.unload("block-break");
  139. goto("waitstage1");
  140. }
  141. } else() {
  142. setVar("cancel", true);
  143. }
  144. }
  145. if(equal($event, "villager-give")) {
  146. if(equal($item-type, "GOLD_BLOCK")) {
  147. setVar("cancel", false);
  148. setVar("tempgiven", add($tempgiven, $item-amount));
  149. if(greaterequal($tempgiven, 4)) {
  150. player.speak($player, "§2Kumpel", "Wir haben den Schatz geborgen. Wenn wir überleben, sind wir reich!");
  151. inc("stage");
  152. sgv($player-name, "schiffstage", $stage);
  153. sgoto(40, "stage2");
  154. } else() {
  155. player.speak($player, "§2Kumpel", "Ich bekomme noch ", sub(4, $tempgiven), " Goldblöcke von dir.");
  156. }
  157. } else() {
  158. setVar("cancel", true);
  159. player.speak($player, "§2Kumpel", "Was soll ich damit?");
  160. }
  161. }
  162. goto("waitstage1");
  163. @stage2
  164. player.speak($player, "§2Kumpel", "In der Zwischenzeit habe ich eine Farm errichtet. Ernte genug Weizen, damit du uns vier Brote craften kannst.");
  165. event.load("block-break");
  166. event.load("craft");
  167. setVar("playerbread1", player.getItemAmount($player, true, read.item("BREAD")));
  168. setVar("i", -1);
  169. while(less(inc("i"), list.getSize($wheatlist))) {
  170. block.set(list.getIndex($wheatlist, $i), read.item("CROPS:7"));
  171. }
  172. @waitstage2
  173. wait();
  174. if(equal($event, "block-break")) {
  175. if(and(equal($block-type, "CROPS"), equal($block-data, 7))) {
  176. setVar("cancel", false);
  177. goto("waitstage2");
  178. } else() {
  179. setVar("cancel", true);
  180. }
  181. }
  182. if(equal($event, "craft")) {
  183. if(equal($item-type, "BREAD")) {
  184. sgoto(1, "checkbread");
  185. }
  186. }
  187. goto("waitstage2");
  188. @checkbread
  189. setVar("playerbread2", player.getItemAmount($player, true, read.item("BREAD")));
  190. setVar("crafted", sub($playerbread2, $playerbread1));
  191. if(greaterequal($crafted, 4)) {
  192. player.speak($player, "§2Kumpel", "Läuft doch gut!");
  193. inc("stage");
  194. sgv($player-name, "schiffstage", $stage);
  195. sgoto(40, "stage3");
  196. } else() {
  197. player.speak($player, "§2Kumpel", "Es fehlen noch ", sub(4, $crafted), " Brote.");
  198. }
  199. goto("waitstage2");
  200. @stage3
  201. player.speak($player, "§2Kumpel", "Nimm diese Angel und fang uns zum Abendessen einen Fisch.");
  202. player.giveItem($player, read.item("FISHING_ROD"));
  203. event.load("fishing");
  204. @waitstage3
  205. wait();
  206. if(equal($event, "fishing")) {
  207. player.speak($player, "§2Kumpel", "Lass es dir schmecken.");
  208. inc("stage");
  209. sgv($player-name, "schiffstage", $stage);
  210. sgoto(40, "stage4");
  211. }
  212. goto("waitstage3");
  213. @stage4
  214. player.speak($player, "§2Kumpel", "Letzte Nacht habe ich etwas gehört. Bitte sieh beim Schiffswrack nach, ob sich dort ein Seeungeheuer herumtreibt. Wenn du es siehst, töte es, bevor uns etwas passiert.");
  215. setVar("guardian", read.spawnMob($guardianloc, "{id:'GUARDIAN'}"));
  216. event.load("entity-kill");
  217. event.load("player-respawn");
  218. player.giveItem($player, read.item("STONE_SWORD"));
  219. @waitstage4
  220. wait();
  221. if(and(equal($event, "entity-kill"), equal($entity-type, "GUARDIAN"))) {
  222. player.speak($player, "§2Kumpel", "Lang lebe die Sicherheit.");
  223. inc("stage");
  224. sgv($player-name, "schiffstage", $stage);
  225. sgoto(40, "stage5");
  226. }
  227. if(equal($event, "player-respawn")) {
  228. setVar("respawn-loc", $shipstartloc);
  229. }
  230. goto("waitstage4");
  231. @stage5
  232. player.speak($player, "§2Kumpel", "Fälle den Baum nahe der Feuerstelle und gib mir das Holz, dann kann ich uns ein schönes Floß bauen.");
  233. player.giveItem($player, read.item("STONE_AXE"));
  234. event.load("block-break");
  235. setVar("tempbroken", 0);
  236. block.set(loc.mod($treeloc, 0, -3, 0), read.item("LOG:3"));
  237. block.set(loc.mod($treeloc, 0, -2, 0), read.item("LOG:3"));
  238. block.set(loc.mod($treeloc, 0, -1, 0), read.item("LOG:3"));
  239. block.set(loc.mod($treeloc, 0, 0, 0), read.item("LOG:3"));
  240. block.set(loc.mod($treeloc, 0, 1, 0), read.item("LOG:3"));
  241. block.set(loc.mod($treeloc, 0, 2, 0), read.item("LOG:3"));
  242. block.set(loc.mod($treeloc, 0, 3, 0), read.item("LOG:3"));
  243. block.set(loc.mod($treeloc, 0, 4, 0), read.item("LOG:3"));
  244. block.set(loc.mod($treeloc, -2, 2, -1), read.item("LEAVES:3"));
  245. block.set(loc.mod($treeloc, -2, 2, 0), read.item("LEAVES:3"));
  246. block.set(loc.mod($treeloc, -2, 2, 1), read.item("LEAVES:3"));
  247. block.set(loc.mod($treeloc, -1, 2, -2), read.item("LEAVES:3"));
  248. block.set(loc.mod($treeloc, -1, 2, -1), read.item("LEAVES:3"));
  249. block.set(loc.mod($treeloc, -1, 2, 0), read.item("LEAVES:3"));
  250. block.set(loc.mod($treeloc, -1, 2, 1), read.item("LEAVES:3"));
  251. block.set(loc.mod($treeloc, -1, 2, 2), read.item("LEAVES:3"));
  252. block.set(loc.mod($treeloc, 0, 2, -2), read.item("LEAVES:3"));
  253. block.set(loc.mod($treeloc, 0, 2, -1), read.item("LEAVES:3"));
  254. block.set(loc.mod($treeloc, 0, 2, 1), read.item("LEAVES:3"));
  255. block.set(loc.mod($treeloc, 0, 2, 2), read.item("LEAVES:3"));
  256. block.set(loc.mod($treeloc, 1, 2, -2), read.item("LEAVES:3"));
  257. block.set(loc.mod($treeloc, 1, 2, -1), read.item("LEAVES:3"));
  258. block.set(loc.mod($treeloc, 1, 2, 0), read.item("LEAVES:3"));
  259. block.set(loc.mod($treeloc, 1, 2, 1), read.item("LEAVES:3"));
  260. block.set(loc.mod($treeloc, 1, 2, 2), read.item("LEAVES:3"));
  261. block.set(loc.mod($treeloc, 2, 2, -1), read.item("LEAVES:3"));
  262. block.set(loc.mod($treeloc, 2, 2, 0), read.item("LEAVES:3"));
  263. block.set(loc.mod($treeloc, 2, 2, 1), read.item("LEAVES:3"));
  264. block.set(loc.mod($treeloc, -2, 3, -2), read.item("LEAVES:3"));
  265. block.set(loc.mod($treeloc, -2, 3, -1), read.item("LEAVES:3"));
  266. block.set(loc.mod($treeloc, -2, 3, 0), read.item("LEAVES:3"));
  267. block.set(loc.mod($treeloc, -2, 3, 1), read.item("LEAVES:3"));
  268. block.set(loc.mod($treeloc, -2, 3, 2), read.item("LEAVES:3"));
  269. block.set(loc.mod($treeloc, -1, 3, -2), read.item("LEAVES:3"));
  270. block.set(loc.mod($treeloc, -1, 3, -1), read.item("LEAVES:3"));
  271. block.set(loc.mod($treeloc, -1, 3, 0), read.item("LEAVES:3"));
  272. block.set(loc.mod($treeloc, -1, 3, 1), read.item("LEAVES:3"));
  273. block.set(loc.mod($treeloc, -1, 3, 2), read.item("LEAVES:3"));
  274. block.set(loc.mod($treeloc, 0, 3, -2), read.item("LEAVES:3"));
  275. block.set(loc.mod($treeloc, 0, 3, -1), read.item("LEAVES:3"));
  276. block.set(loc.mod($treeloc, 0, 3, 1), read.item("LEAVES:3"));
  277. block.set(loc.mod($treeloc, 0, 3, 2), read.item("LEAVES:3"));
  278. block.set(loc.mod($treeloc, 1, 3, -2), read.item("LEAVES:3"));
  279. block.set(loc.mod($treeloc, 1, 3, -1), read.item("LEAVES:3"));
  280. block.set(loc.mod($treeloc, 1, 3, 0), read.item("LEAVES:3"));
  281. block.set(loc.mod($treeloc, 1, 3, 1), read.item("LEAVES:3"));
  282. block.set(loc.mod($treeloc, 1, 3, 2), read.item("LEAVES:3"));
  283. block.set(loc.mod($treeloc, 2, 3, -2), read.item("LEAVES:3"));
  284. block.set(loc.mod($treeloc, 2, 3, -1), read.item("LEAVES:3"));
  285. block.set(loc.mod($treeloc, 2, 3, 0), read.item("LEAVES:3"));
  286. block.set(loc.mod($treeloc, 2, 3, 1), read.item("LEAVES:3"));
  287. block.set(loc.mod($treeloc, 2, 3, 2), read.item("LEAVES:3"));
  288. block.set(loc.mod($treeloc, -1, 4, -1), read.item("LEAVES:3"));
  289. block.set(loc.mod($treeloc, -1, 4, 0), read.item("LEAVES:3"));
  290. block.set(loc.mod($treeloc, -1, 4, 1), read.item("LEAVES:3"));
  291. block.set(loc.mod($treeloc, 0, 4, -1), read.item("LEAVES:3"));
  292. block.set(loc.mod($treeloc, 0, 4, 1), read.item("LEAVES:3"));
  293. block.set(loc.mod($treeloc, 1, 4, -1), read.item("LEAVES:3"));
  294. block.set(loc.mod($treeloc, 1, 4, 0), read.item("LEAVES:3"));
  295. block.set(loc.mod($treeloc, 1, 4, 1), read.item("LEAVES:3"));
  296. block.set(loc.mod($treeloc, -1, 5, 0), read.item("LEAVES:3"));
  297. block.set(loc.mod($treeloc, 0, 5, -1), read.item("LEAVES:3"));
  298. block.set(loc.mod($treeloc, 0, 5, 0), read.item("LEAVES:3"));
  299. block.set(loc.mod($treeloc, 0, 5, 1), read.item("LEAVES:3"));
  300. block.set(loc.mod($treeloc, 1, 5, 0), read.item("LEAVES:3"));
  301. @waitstage5
  302. wait();
  303. if(equal($event, "block-break")) {
  304. if(less(loc.distance($block-loc, $treeloc), 6)) {
  305. if(equal($block-type, "LOG")) {
  306. setVar("cancel", false);
  307. inc("tempbroken");
  308. if(greaterequal($tempbroken, 8)) {
  309. event.load("villager-give");
  310. event.unload("block-break");
  311. setVar("tempgiven", 0);
  312. removeVar("tempbroken");
  313. }
  314. }
  315. if(equal($block-type, "LEAVES")) {
  316. setVar("cancel", false);
  317. }
  318. }
  319. }
  320. if(equal($event, "villager-give")) {
  321. if(and(equal($item-type, "LOG"), equal($item-data, 3))) {
  322. setVar("tempgiven", add($tempgiven, $item-amount));
  323. if(greaterequal($tempgiven, 8)) {
  324. player.speak($player, "§2Kumpel", "Bald kann die Reise beginnen.");
  325. removeVar("tempgiven");
  326. inc("stage");
  327. sgv($player-name, "schiffstage", $stage);
  328. sgoto(40, "stage6");
  329. } else() {
  330. player.speak($player, "§2Kumpel", "Ich brauche noch ", sub(8, $tempgiven), " Stück Holz.");
  331. }
  332. } else() {
  333. setVar("cancel", true);
  334. player.speak($player, "§2Kumpel", "Was soll ich damit?");
  335. }
  336. }
  337. goto("waitstage5");
  338. @stage6
  339. player.speak($player, "§2Kumpel", "Mein Schiffsaffe ist vor genau einem Jahr gestorben. Ich hab ihn damals auf dieser Insel vergraben. Bitte stelle diese Blume auf sein Grab.");
  340. event.load("block-place");
  341. player.giveItem($player, read.item("RED_ROSE:4"));
  342. block.set($flowerloc, read.item("AIR"));
  343. @waitstage6
  344. wait();
  345. if(and(equal($event, "block-place"), equal($block-loc, $flowerloc), equal($block-type, "RED_ROSE"), equal($block-data, 4))) {
  346. player.speak($player, "§2Kumpel", "Er möge in Frieden ruhen.");
  347. setVar("cancel", false);
  348. inc("stage");
  349. sgv($player-name, "schiffstage", $stage);
  350. sgoto(40, "stage7");
  351. } else() {
  352. setVar("cancel", true);
  353. }
  354. goto("waitstage6");
  355. @stage7
  356. player.speak($player, "§2Kumpel", "Nimm dieses Glas und crafte daraus Glasflaschen. Befülle sie mit Wasser und bringe sie mir.");
  357. event.load("craft");
  358. event.load("villager-give");
  359. player.giveItem($player, read.item("GLASS:0:3"));
  360. @waitstage7
  361. wait();
  362. if(equal($event, "craft")) {
  363. if(equal($item-type, "GLASS_BOTTLE")) {
  364. setVar("filled", 0);
  365. event.unload("craft");
  366. event.load("air-click");
  367. }
  368. }
  369. if(equal($event, "air-click")) {
  370. if(and(equal(item.getType(entity.getEquip($player, "hand")), "GLASS_BOTTLE"), equal($action, "RIGHT_CLICK_AIR"))) {
  371. inc("filled");
  372. if(greaterequal($filled, 3)) {
  373. event.unload("air-click");
  374. event.load("villager-give");
  375. setVar("given", 0);
  376. }
  377. }
  378. }
  379. if(equal($event, "villager-give")) {
  380. if(equal($item-type, "POTION")) {
  381. setVar("given", add($given, $item-amount));
  382. if(greaterequal($given, 3)) {
  383. player.speak($player, "§2Kumpel", "Vielen Dank, mir geht es schon viel besser.");
  384. inc("stage");
  385. sgv($player-name, "schiffstage", $stage);
  386. sgoto(40, "stage8");
  387. } else() {
  388. player.speak($player, "§2Kumpel", "Ich brauche noch ", sub(3, $given), " Wasserflaschen.");
  389. }
  390. } else() {
  391. setVar("cancel", true);
  392. player.speak($player, "§2Kumpel", "Was soll ich damit?");
  393. }
  394. }
  395. goto("waitstage7");
  396. @stage8
  397. player.speak($player, "§2Kumpel", "Nimm dir diesen Eimer und melke eine Kuh. Trink die Milch, dann gehts dir besser.");
  398. event.load("entity-click");
  399. setVar("cow", read.spawnMob($animalloc, "{id:'COW'}"));
  400. player.giveItem($player, read.item("BUCKET"));
  401. @waitstage8
  402. wait();
  403. if(and(equal($event, "entity-click"), equal($entity-type, "COW"))) {
  404. event.unload("entity-click");
  405. event.load("consume");
  406. player.removeItem($player, read.item("BUCKET"));
  407. player.giveItem($player, read.item("MILK_BUCKET"));
  408. }
  409. if(and(equal($event, "consume"), equal($item-type, "MILK_BUCKET"))) {
  410. player.speak($player, "§2Kumpel", "Sag ich doch. Milch hilft immer.")
  411. entity.remove($cow);;
  412. inc("stage");
  413. sgv($player-name, "schiffstage", $stage);
  414. sgoto(40, "stage9");
  415. }
  416. goto("waitstage8");
  417. @stage9
  418. player.speak($player, "§2Kumpel", "Jetzt, wo es uns doch so gut geht, lass uns einen Kuchen backen. Hier hast du drei Eimer. Besorge dir alle Zutaten von der Insel. Wenn du alles beisammen hast, stelle einen Kuchen her und platziere ihn auf dem Ofen.");
  419. player.speak($player, "§2Kumpel", "Für einen Kuchen brauchst du: 3 Eimer Milch, 2 Zucker, 1 Ei (Huhn rechtsklicken) und 3 Weizen.");
  420. event.load("block-break");
  421. event.load("entity-click");
  422. event.load("craft");
  423. setVar("milk", 0);
  424. setVar("canebroken", 0);
  425. setVar("eggsgiven", 0);
  426. setVar("harvested", 0);
  427. setVar("milkgiven", 0);
  428. setVar("playersugar1", player.getItemAmount($player, true, read.item("SUGAR")));
  429. setVar("chicken", read.spawnMob($animalloc, "{id:'CHICKEN'}"));
  430. setVar("cow", read.spawnMob($animalloc, "{id:'COW'}"));
  431. player.giveItem($player, read.item("BUCKET:0:3"));
  432. setVar("wheat", false);
  433. setVar("sugar", false);
  434. setVar("milk", false);
  435. setVar("egg", false);
  436. setVar("i", -1);
  437. while(less(inc("i"), list.getSize($wheatlist))) {
  438. block.set(list.getIndex($wheatlist, $i), read.item("CROPS:7"));
  439. }
  440. block.set(read.location("games:1894:106:3879"), read.item("SUGAR_CANE_BLOCK"));
  441. block.set(read.location("games:1894:107:3879"), read.item("SUGAR_CANE_BLOCK"));
  442. block.set(read.location("games:1892:106:3880"), read.item("SUGAR_CANE_BLOCK"));
  443. block.set(read.location("games:1892:107:3880"), read.item("SUGAR_CANE_BLOCK"));
  444. block.set(read.location("games:1891:106:3882"), read.item("SUGAR_CANE_BLOCK"));
  445. block.set(read.location("games:1891:107:3882"), read.item("SUGAR_CANE_BLOCK"));
  446. @waitstage9
  447. wait();
  448. if(equal($event, "block-break")) {
  449. if(equal($block-type, "SUGAR_CANE_BLOCK")) {
  450. if(equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "SUGAR_CANE_BLOCK")) {
  451. setVar("cancel", false);
  452. inc("canebroken");
  453. if(equal(block.getType(loc.mod($block-loc, 0, 1, 0)), "SUGAR_CANE_BLOCK")) {
  454. inc("canebroken");
  455. }
  456. } else() {
  457. setVar("cancel", true);
  458. }
  459. goto("waitstage9");
  460. }
  461. if(and(equal($block-type, "CROPS"), equal($block-data, 7))) {
  462. setVar("cancel", false);
  463. inc("harvested");
  464. if(greaterequal($harvested, 3)) {
  465. setVar("wheat", true);
  466. goto("checkcake");
  467. }
  468. }
  469. goto("waitstage9");
  470. }
  471. if(equal($event, "entity-click")) {
  472. if(equal($entity-type, "COW")) {
  473. inc("milkgiven");
  474. if(greaterequal($milkgiven, 3)) {
  475. setVar("milk", true);
  476. goto("checkcake");
  477. }
  478. goto("waitstage9");
  479. }
  480. if(and(equal($entity-type, "CHICKEN"), invert($egg))) {
  481. player.giveItem($player, read.item("EGG"));
  482. inc("eggsgiven");
  483. setVar("egg", true);
  484. goto("checkcake");
  485. }
  486. }
  487. if(equal($event, "craft")) {
  488. if(and(equal($item-type, "SUGAR"), greater($canebroken, 1))) {
  489. sgoto(1, "checksugar");
  490. }
  491. if(equal($item-type, "CAKE")) {
  492. event.unload("craft");
  493. event.load("block-place");
  494. }
  495. goto("waitstage9");
  496. }
  497. if(and(equal($event, "block-place"), equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "FURNACE"))) {
  498. if(equal($block-type, "CAKE_BLOCK")) {
  499. setVar("cancel", false);
  500. sgv($player-name, "schiffcakeloc", text.location($block-loc));
  501. player.speak($player, "§2Kumpel", "Auf das wir noch ein langes Leben haben.");
  502. entity.remove($cow);
  503. entity.remove($chicken);
  504. inc("stage");
  505. sgv($player-name, "schiffstage", $stage);
  506. sgoto(40, "stage10");
  507. } else() {
  508. setVar("cancel", true);
  509. }
  510. }
  511. goto("waitstage9");
  512. @checksugar
  513. setVar("playersugar2", player.getItemAmount($player, true, read.item("SUGAR")));
  514. setVar("crafted", sub($playersugar2, $playersugar1));
  515. if(greaterequal($crafted, 2)) {
  516. setVar("sugar", true);
  517. goto("checkcake");
  518. } else() {
  519. player.speak($player, "§2Kumpel", "Es fehlen noch ", sub(2, $crafted), " Stück Zucker.");
  520. }
  521. goto("waitstage9");
  522. @checkcake
  523. if(and($wheat, $sugar, $milk, $egg)) {
  524. event.unload("entity-click");
  525. event.unload("block-break");
  526. setVar("allcakeitems", true);
  527. }
  528. goto("waitstage9");
  529. @stage10
  530. player.speak($player, "§2Kumpel", "Auf meiner Position auf dem Mast des Schiffs befindet sich ein Kompass. Er ist in einer verschlossenen Kiste aufbewahrt. Bitte suche ihn und bringe ihn zu mir. Das wird uns unsere Flucht von der Insel erleichtern. Hier hast du den Schlüssel für die Kiste.");
  531. event.load("block-click");
  532. player.giveItem($player, read.item("TRIPWIRE_HOOK", "Schlüssel"));
  533. setVar("temp1", false);
  534. setVar("temp2", false);
  535. @waitstage10
  536. wait();
  537. if(equal($event, "block-click")) {
  538. if(equal($block-type, "CHEST")) {
  539. setVar("cancel", true);
  540. if(equal(item.getType(entity.getEquip($player, "hand")), "TRIPWIRE_HOOK")) {
  541. if(equal(item.getName(entity.getEquip($player, "hand")), "Schlüssel")) {
  542. if(equal($block-loc, $truechestloc)) {
  543. event.load("villager-give");
  544. event.unload("block-click");
  545. player.giveItem($player, read.item("COMPASS"));
  546. player.speak($player, "§2Kumpel", "Bitte bring mir auch den Schlüssel wieder zurück.");
  547. goto("waitstage10");
  548. }
  549. if(notequal($block-loc, !=, $truechestloc)) {
  550. player.speak($player, "§2Kumpel", "Das ist nicht die richtige Kiste.");
  551. goto("waitstage10");
  552. }
  553. }
  554. }
  555. }
  556. goto("waitstage10");
  557. }
  558. if(equal($event, "villager-give")) {
  559. if(or(equal($item-type, "TRIPWIRE_HOOK"), equal($item-type, "COMPASS"))) {
  560. if(equal($item-type, "TRIPWIRE_HOOK")) {
  561. setVar("temp1", true);
  562. }
  563. if(equal($item-type, "COMPASS")) {
  564. setVar("temp2", true);
  565. }
  566. } else() {
  567. setVar("cancel", true);
  568. player.speak($player, "§2Kumpel", "Was soll ich damit?");
  569. goto("waitstage10");
  570. }
  571. if(and($temp1, $temp2)) {
  572. removeVar("temp1");
  573. removeVar("temp2");
  574. player.speak($player, "§2Kumpel", "Lang lebe die Navigation, die Freiheit und die Menschlichkeit!");
  575. inc("stage");
  576. sgv($player-name, "schiffstage", $stage);
  577. sgoto(40, "stage11");
  578. }
  579. goto("waitstage10");
  580. @stage11
  581. player.speak($player, "§2Kumpel", "Hier hast du einen Holzstamm. Lege ihn auf die Feuerstelle und gehe danach zum Schiff. In der Kiste auf dem Bug des Schiffs findest du Materialien für ein Feuerzeug. Zünde damit das Holz an, damit wir unsere Kleider über dem Feuer trocknen können.");
  582. event.load("block-place");
  583. player.giveItem($player, read.item("LOG:3", "Feuerholz", "Auf der Feuerstelle platzieren"));
  584. block.set($firelogloc, read.item("AIR"));
  585. block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR"));
  586. @waitstage11
  587. wait();
  588. if(equal($event, "block-place")) {
  589. if(and(equal($block-loc, $firelogloc), equal($block-type, "LOG"))) {
  590. setVar("cancel", false);
  591. event.unload("block-place");
  592. event.load("block-click");
  593. }
  594. goto("waitstage11");
  595. }
  596. if(equal($event, "block-click")) {
  597. if(equal($block-type, "CHEST")) {
  598. setVar("cancel", true);
  599. if(equal($block-loc, $firechestloc)) {
  600. event.load("craft");
  601. event.unload("block-click");
  602. player.giveItem($player, read.item("FLINT"));
  603. player.giveItem($player, read.item("IRON_INGOT"));
  604. }
  605. if(notequal($block-loc, $firechestloc)) {
  606. player.speak($player, "§2Kumpel", "Das ist nicht die richtige Kiste.");
  607. }
  608. }
  609. if(equal($block-type, "LOG")) {
  610. if(equal($block-loc, $firelogloc)) {
  611. if(equal($action, "RIGHT_CLICK_BLOCK")) {
  612. player.speak($player, "§2Kumpel", "Feuer! Es lodere wie die Wut von unzufriedenem Volke.");
  613. inc("stage");
  614. sgv($player-name, "schiffstage", $stage);
  615. sgoto(40, "stage12");
  616. }
  617. }
  618. }
  619. goto("waitstage11");
  620. }
  621. if(equal($event, "craft")) {
  622. if(equal($item-type, "FLINT_AND_STEEL")) {
  623. event.unload("craft");
  624. event.load("block-click");
  625. }
  626. }
  627. goto("waitstage11");
  628. @stage12
  629. player.speak($player, "§2Kumpel", "Gut, dass du hier bist. Auf der anderen Seite der Insel habe ich eine Hexe gesehen.");
  630. placelocs = list.new();
  631. list.add($placelocs, $placeloc1);
  632. list.add($placelocs, $placeloc2);
  633. list.add($placelocs, $placeloc3);
  634. list.add($placelocs, $placeloc4);
  635. event.load("entity-kill");
  636. event.load("player-respawn");
  637. setVar("witch", read.spawnMob($spawnhexeloc, "{id:'WITCH'}"));
  638. block.set($placeloc1, read.item("AIR"));
  639. block.set($placeloc2, read.item("AIR"));
  640. block.set($placeloc3, read.item("AIR"));
  641. block.set($placeloc4, read.item("AIR"));
  642. block.set($witherloc, read.item("SKULL:1"));
  643. block.set($creeperloc, read.item("SKULL:4"));
  644. block.set($zombieloc, read.item("SKULL:2"));
  645. block.set($skelettloc, read.item("SKULL"));
  646. @waitstage12a
  647. wait();
  648. if(equal($event, "entity-kill")) {
  649. if(equal($entity-type, "WITCH")) {
  650. player.speak($player, "§2Kumpel", "Hörst du das auch? Es scheint, als würden böse Kreaturen unter der Insel erwachen. Gehe besser nachschauen. Ich habe letztens ein kleines Loch in der Mitte der Insel gefunden. Vielleicht kommen die Geräsuche von dort.");
  651. event.load("block-click");
  652. event.load("entity-hurt");
  653. player.giveItem($player, read.item("STICK", "Zauberstab der Elemente", "Achtung, fragil!"));
  654. player.giveItem($player, read.item("STONE_SWORD"));
  655. setVar("i", -1);
  656. while(less(inc("i"), 10)) {
  657. setVar("witherskeleton", read.spawnMob($spawnwitherloc, "{id:'WITHER_SKELETON'}"));
  658. setVar("skeleton", read.spawnMob($spawnskelettloc, "{id:'SKELETON'}"));
  659. setVar("creeper", read.spawnMob($spawncreeperloc, "{id:'CREEPER'}"));
  660. setVar("zombie", read.spawnMob($spawnzombieloc, "{id:'ZOMBIE'}"));
  661. }
  662. setVar("skulls", 0);
  663. setVar("enter", false);
  664. }
  665. if(equal($event, "player-respawn")) {
  666. setVar("respawn-loc", $shipstartloc);
  667. }
  668. goto("waitstage12a");
  669. @waitstage12b
  670. wait();
  671. if(equal($event, "player-respawn")) {
  672. setVar("respawn-loc", $shipstartloc);
  673. }
  674. if(equal($event, "block-click")) {
  675. if(and(equal($block-type, "WOOD_BUTTON"), invert($enter))) {
  676. player.speak($player, "§2Kumpel", "Ach du meine Güte. Alles voller Monster. Und sie scheinen diesen magischen Ort zu bewachen. Was an dem wohl so besonders ist?");
  677. setVar("enter", true);
  678. goto("waitstage12b");
  679. }
  680. }
  681. if(equal($event, "entity-hurt")) {
  682. if(equal(item.getType(entity.getEquip($player, "hand")), "STICK")) {
  683. entity.damage($entity, 3);
  684. } else() {
  685. player.speak($player, "§2Kumpel", "Diese Monster sind mit irdischen Waffen unbesiegbar.");
  686. setVar("cancel", true);
  687. }
  688. }
  689. if(equal($event, "entity-kill")) {
  690. if(equal($entity-type, "WITHER")) {
  691. player.giveItem($player, read.item("SKULL"));
  692. inc("skulls");
  693. goto("checkskulls");
  694. }
  695. if(equal($entity-type, "ZOMBIE")) {
  696. player.giveItem($player, read.item("SKULL:1"));
  697. inc("skulls");
  698. goto("checkskulls");
  699. }
  700. if(equal($entity-type, "SKELETON")) {
  701. player.giveItem($player, read.item("SKULL:2"));
  702. inc("skulls");
  703. goto("checkskulls");
  704. }
  705. if(equal($entity-type, "CREEPER")) {
  706. player.giveItem($player, read.item("SKULL:4"));
  707. inc("skulls");
  708. goto("checkskulls");
  709. }
  710. }
  711. goto("waitstage12b");
  712. @checkskulls
  713. if(greaterequal($skulls, 4)) {
  714. player.speak($player, "§2Kumpel", "Es schaut so aus, als würden diese Köpfe auf die hervorgehobenen Plätze gehören.");
  715. event.load("block-place");
  716. event.unload("block-click");
  717. event.unload("entity-hurt");
  718. event.unload("player-respawn");
  719. setVar("i", 0);
  720. setVar("counter", 0);
  721. goto("waitstage12c");
  722. } else() {
  723. goto("waitstage12b");
  724. }
  725. @waitstage12c
  726. wait();
  727. if(equal($event, "block-place")) {
  728. setVar("cancel", true)
  729. if(and(list.contains($placelocs, $block-loc), equal($item-type, "SKULL"))) {
  730. setVar("cancel", false);
  731. inc("i");
  732. msg($player, "Gesetzte Köpfe: ", $i, "/4");
  733. if(greaterequal($i, 4)) {
  734. setVar("evil", read.spawnMob($evilloc, "{id:'VILLAGER'}"));
  735. entity.setName($evil, "§cBeelzebub");
  736. entity.setEquip($evil, "head", read.item("IRON_HELMET"));
  737. player.speak($player, "§cBeelzebub", "Dir werde ich das fürchten lehren! Nie mehr wirst du vor mir Ruhe haben! Vielleicht weißt du jetzt, wodurch dein Schiff gesunken ist?");
  738. waitFor(180);
  739. player.speak($player, "§cBeelzebub", "Muahahaha..., nimm dies.");
  740. setVar("witch1", read.spawnMob($evilloc, read.item("{id:'WITCH'}")));
  741. setVar("witch2", read.spawnMob($evilloc, read.item("{id:'WITCH'}")));
  742. setVar("witch3", read.spawnMob($evilloc, read.item("{id:'WITCH'}")));
  743. setVar("fish1", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}")));
  744. setVar("fish2", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}")));
  745. setVar("fish3", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}")));
  746. effect.playParticle($evilloc, "EXPLOSION", 5);
  747. entity.remove($evil);
  748. player.speak($player, "§cBeelzebub", "Bis zum nächsten Mal...");
  749. }
  750. }
  751. }
  752. if(equal($event, "entity-kill")) {
  753. inc("counter");
  754. if(greaterequal($counter, 6)) {
  755. goto("giveup");
  756. }
  757. }
  758. goto("waitstage12c");
  759. @giveup
  760. if(equal($stage, 0)) {
  761. try() {
  762. setVar("i", -1);
  763. while(less(inc("i"), list.getSize($abgebaut_loc))) {
  764. block.set(list.getIndex($abgebaut_loc, $i), read.item(list.getIndex($abgebaut_type, $i)));
  765. }
  766. } catch() {
  767. nothing();
  768. }
  769. }
  770. if(greaterequal($stage, 1)) {
  771. block.set(read.location(ggv($player-name, "schiffofenloc")), read.item("AIR"));
  772. }
  773. if(equal($stage, 4)) {
  774. entity.remove($guardian);
  775. }
  776. if(equal($stage, 8)) {
  777. entity.remove($cow);
  778. }
  779. if(equal($stage, 9)) {
  780. entity.remove($cow);
  781. entity.remove($chicken);
  782. }
  783. if(greaterequal($stage, 10)) {
  784. block.set(read.location(ggv($player-name, "schiffcakeloc")), read.item("AIR"));
  785. }
  786. if(equal($stage, 11)) {
  787. block.set($firelogloc, read.item("AIR"));
  788. block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR"));
  789. }
  790. if(equal($stage, 12)) {
  791. block.set($firelogloc, read.item("AIR"));
  792. block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR"));
  793. entity.remove($zombie);
  794. entity.remove($spider);
  795. entity.remove($creeper);
  796. entity.remove($witherskeleton);
  797. }
  798. entity.teleport($player, $gamesworldloc);
  799. command("clear ", $player-name);
  800. sb.reset($player);
  801. entity.setHealth($player, 20);
  802. player.setHunger($player, 20);
  803. player.setSaturation($player, 5);
  804. command("effect ", $player-name, " clear");
  805. term();