setVar("gamesworldloc", read.location("games:8:4:8")); setVar("shipstartloc", read.location("games:1917.5:106:3880.5:180:0")); /*setVar("placeloc1", read.location("games:")); setVar("placeloc2", read.location("games:")); setVar("placeloc3", read.location("games:")); setVar("placeloc4", read.location("games:"));*/ wheatlist = list.new(); list.add($wheatlist, read.location("games:1905:108:3898")); list.add($wheatlist, read.location("games:1905:108:3899")); list.add($wheatlist, read.location("games:1905:108:3900")); list.add($wheatlist, read.location("games:1905:108:3901")); list.add($wheatlist, read.location("games:1904:108:3901")); list.add($wheatlist, read.location("games:1904:108:3902")); list.add($wheatlist, read.location("games:1903:108:3902")); list.add($wheatlist, read.location("games:1902:108:3902")); list.add($wheatlist, read.location("games:1902:108:3901")); list.add($wheatlist, read.location("games:1902:108:3900")); list.add($wheatlist, read.location("games:1902:108:3899")); list.add($wheatlist, read.location("games:1902:108:3898")); list.add($wheatlist, read.location("games:1903:108:3898")); list.add($wheatlist, read.location("games:1903:108:3897")); list.add($wheatlist, read.location("games:1904:108:3897")); goldblocks = list.new(); list.add($goldblocks, read.location("games:1928:102:3845")); list.add($goldblocks, read.location("games:1922:102:3839")); list.add($goldblocks, read.location("games:1934:103:3840")); list.add($goldblocks, read.location("games:1945:103:3841")); setVar("animalloc", read.location("games:1911:108:3896")); setVar("guardianloc", read.location("games:1929:104:3861")); setVar("treeloc", read.location("games:1911:110:3885")); setVar("flowerloc", read.location("games:1929:107:3906")); setVar("truechestloc", read.location("games:1920:118:3840")); setVar("firechestloc", read.location("games:1949:107:3842")); setVar("firelogloc", read.location("games:1907:107:3885")); setVar("no-join", true); command("clear ", $player-name); entity.teleport($player, $shipstartloc); sb.reset($player); entity.setHealth($player, 20); player.setHunger($player, 20); player.setSaturation($player, 5); setVar("stage", ggv($player-name, "schiffstage")); if(equal($stage, null)) { sgv($player-name, "schiffstage", 0); setVar("stage", 0); } if(greater($stage, 0)) { block.set(read.location(ggv($player-name, "schiffofenloc")), read.item("FURNACE")); } if(greaterequal($stage, 10)) { block.set(read.location(ggv($player-name, "schiffcakeloc")), read.item("CAKE_BLOCK")); } if(less($stage, 9)) { entity.addEffect($player, "confusion", 99999, 0); } if(equal($stage, 0)) goto("stage0"); if(equal($stage, 1)) goto("stage1"); if(equal($stage, 2)) goto("stage2"); if(equal($stage, 3)) goto("stage3"); if(equal($stage, 4)) goto("stage4"); if(equal($stage, 5)) goto("stage5"); if(equal($stage, 6)) goto("stage6"); if(equal($stage, 7)) goto("stage7"); if(equal($stage, 8)) goto("stage8"); if(equal($stage, 9)) goto("stage9"); if(equal($stage, 10)) goto("stage10"); if(equal($stage, 11)) goto("stage11"); if(equal($stage, 12)) goto("stage12"); @stage0 event.load("block-break"); player.giveItem($player, read.item("WOOD_PICKAXE")); abgebaut_loc = list.new(); abgebaut_type = list.new(); setVar("tempstone", 0); player.speak($player, "§2Kumpel", "Guten Morgen Kamerad! Wie du merkst, waren wir heute Nacht 'etwas' angetrunken."); player.speak($player, "§2Kumpel", "Leider haben wir dabei unser gutes Schiff auf Sand gesetzt. Was wir bei uns trugen, fiel ins tiefe Wasser."); 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."); 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."); @waitstage0 wait(); if(equal($event, "block-break")) { if(or(equal($block-type, "COBBLESTONE"), equal($block-type, "COBBLESTONE"))) { setVar("cancel", false); list.add($abgebaut_loc, $block-loc); list.add($abgebaut_type, $block-type); inc("tempstone"); if(greaterequal($tempstone, 8)) { event.unload("block-break"); event.load("craft"); } } else() { setVar("cancel", true); } } if(equal($event, "craft")) { if(equal($item-type, "FURNACE")) { event.unload("craft"); event.load("block-place"); } } if(equal($event, "block-place")) { if(and(equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "GRASS"), equal($block-type, "FURNACE"))) { player.speak($player, "§2Kumpel", "Lass die Mahlzeiten brutzeln, Kamerad."); setVar("cancel", false); sgv($player-name, "schiffofenloc", text.location($block-loc)); setVar("i", -1); while(less(inc("i"), list.getSize($abgebaut_loc))) { block.set(list.getIndex($abgebaut_loc, $i), read.item(list.getIndex($abgebaut_type, $i))); } event.unload("block-place"); removeVar("tempstone"); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage1"); } else() { setVar("cancel", true); } } goto("waitstage0"); @stage1 player.speak($player, "§2Kumpel", "Berge die vier Goldblöcke aus dem havariertem Schiff und bringe sie mir."); player.giveItem($player, read.item("IRON_PICKAXE")); event.load("block-break"); event.load("villager-give"); setVar("tempgiven", 0); setVar("i", -1); while(less(inc("i"), list.getSize($goldblocks))) { block.set(list.getIndex($goldblocks, $i), read.item("GOLD_BLOCK")); } @waitstage1 wait(); if(equal($event, "block-break")) { if(and(equal($block-type, "GOLD_BLOCK"), list.contains($goldblocks, $block-loc))) { setVar("cancel", false); list.remove($goldblocks, $block-loc); if(equal(list.getSize($goldblocks), 0)) { player.speak($player, "§2Kumpel", "Sehr gut, bring das Gold nun mir."); event.unload("block-break"); goto("waitstage1"); } } else() { setVar("cancel", true); } } if(equal($event, "villager-give")) { if(equal($item-type, "GOLD_BLOCK")) { setVar("cancel", false); setVar("tempgiven", add($tempgiven, $item-amount)); if(greaterequal($tempgiven, 4)) { player.speak($player, "§2Kumpel", "Wir haben den Schatz geborgen. Wenn wir überleben, sind wir reich!"); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage2"); } else() { player.speak($player, "§2Kumpel", "Ich bekomme noch ", sub(4, $tempgiven), " Goldblöcke von dir."); } } else() { setVar("cancel", true); player.speak($player, "§2Kumpel", "Was soll ich damit?"); } } goto("waitstage1"); @stage2 player.speak($player, "§2Kumpel", "In der Zwischenzeit habe ich eine Farm errichtet. Ernte genug Weizen, damit du uns vier Brote craften kannst."); event.load("block-break"); event.load("craft"); setVar("playerbread1", player.getItemAmount($player, true, read.item("BREAD"))); setVar("i", -1); while(less(inc("i"), list.getSize($wheatlist))) { block.set(list.getIndex($wheatlist, $i), read.item("CROPS:7")); } @waitstage2 wait(); if(equal($event, "block-break")) { if(and(equal($block-type, "CROPS"), equal($block-data, 7))) { setVar("cancel", false); goto("waitstage2"); } else() { setVar("cancel", true); } } if(equal($event, "craft")) { if(equal($item-type, "BREAD")) { sgoto(1, "checkbread"); } } goto("waitstage2"); @checkbread setVar("playerbread2", player.getItemAmount($player, true, read.item("BREAD"))); setVar("crafted", sub($playerbread2, $playerbread1)); if(greaterequal($crafted, 4)) { player.speak($player, "§2Kumpel", "Läuft doch gut!"); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage3"); } else() { player.speak($player, "§2Kumpel", "Es fehlen noch ", sub(4, $crafted), " Brote."); } goto("waitstage2"); @stage3 player.speak($player, "§2Kumpel", "Nimm diese Angel und fang uns zum Abendessen einen Fisch."); player.giveItem($player, read.item("FISHING_ROD")); event.load("fishing"); @waitstage3 wait(); if(equal($event, "fishing")) { player.speak($player, "§2Kumpel", "Lass es dir schmecken."); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage4"); } goto("waitstage3"); @stage4 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."); setVar("guardian", read.spawnMob($guardianloc, "{id:'GUARDIAN'}")); event.load("entity-kill"); event.load("player-respawn"); player.giveItem($player, read.item("STONE_SWORD")); @waitstage4 wait(); if(and(equal($event, "entity-kill"), equal($entity-type, "GUARDIAN"))) { player.speak($player, "§2Kumpel", "Lang lebe die Sicherheit."); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage5"); } if(equal($event, "player-respawn")) { setVar("respawn-loc", $shipstartloc); } goto("waitstage4"); @stage5 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."); player.giveItem($player, read.item("STONE_AXE")); event.load("block-break"); setVar("tempbroken", 0); block.set(loc.mod($treeloc, 0, -3, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, -2, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, -1, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, 0, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, 1, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, 2, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, 3, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, 0, 4, 0), read.item("LOG:3")); block.set(loc.mod($treeloc, -2, 2, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 2, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 2, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 2, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 2, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 2, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 2, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 2, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 2, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 2, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 2, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 2, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 2, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 2, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 2, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 2, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 2, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 2, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 2, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 2, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 3, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 3, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 3, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 3, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -2, 3, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 3, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 3, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 3, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 3, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 3, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 3, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 3, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 3, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 3, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 3, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 3, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 3, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 3, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 3, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 3, -2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 3, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 3, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 3, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 2, 3, 2), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 4, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 4, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 4, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 4, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 4, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 4, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 4, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 4, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, -1, 5, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 5, -1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 5, 0), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 0, 5, 1), read.item("LEAVES:3")); block.set(loc.mod($treeloc, 1, 5, 0), read.item("LEAVES:3")); @waitstage5 wait(); if(equal($event, "block-break")) { if(less(loc.distance($block-loc, $treeloc), 6)) { if(equal($block-type, "LOG")) { setVar("cancel", false); inc("tempbroken"); if(greaterequal($tempbroken, 8)) { event.load("villager-give"); event.unload("block-break"); setVar("tempgiven", 0); removeVar("tempbroken"); } } if(equal($block-type, "LEAVES")) { setVar("cancel", false); } } } if(equal($event, "villager-give")) { if(and(equal($item-type, "LOG"), equal($item-data, 3))) { setVar("tempgiven", add($tempgiven, $item-amount)); if(greaterequal($tempgiven, 8)) { player.speak($player, "§2Kumpel", "Bald kann die Reise beginnen."); removeVar("tempgiven"); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage6"); } else() { player.speak($player, "§2Kumpel", "Ich brauche noch ", sub(8, $tempgiven), " Stück Holz."); } } else() { setVar("cancel", true); player.speak($player, "§2Kumpel", "Was soll ich damit?"); } } goto("waitstage5"); @stage6 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."); event.load("block-place"); player.giveItem($player, read.item("RED_ROSE:4")); block.set($flowerloc, read.item("AIR")); @waitstage6 wait(); if(and(equal($event, "block-place"), equal($block-loc, $flowerloc), equal($block-type, "RED_ROSE"), equal($block-data, 4))) { player.speak($player, "§2Kumpel", "Er möge in Frieden ruhen."); setVar("cancel", false); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage7"); } else() { setVar("cancel", true); } goto("waitstage6"); @stage7 player.speak($player, "§2Kumpel", "Nimm dieses Glas und crafte daraus Glasflaschen. Befülle sie mit Wasser und bringe sie mir."); event.load("craft"); event.load("villager-give"); player.giveItem($player, read.item("GLASS:0:3")); @waitstage7 wait(); if(equal($event, "craft")) { if(equal($item-type, "GLASS_BOTTLE")) { setVar("filled", 0); event.unload("craft"); event.load("air-click"); } } if(equal($event, "air-click")) { if(and(equal(item.getType(entity.getEquip($player, "hand")), "GLASS_BOTTLE"), equal($action, "RIGHT_CLICK_AIR"))) { inc("filled"); if(greaterequal($filled, 3)) { event.unload("air-click"); event.load("villager-give"); setVar("given", 0); } } } if(equal($event, "villager-give")) { if(equal($item-type, "POTION")) { setVar("given", add($given, $item-amount)); if(greaterequal($given, 3)) { player.speak($player, "§2Kumpel", "Vielen Dank, mir geht es schon viel besser."); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage8"); } else() { player.speak($player, "§2Kumpel", "Ich brauche noch ", sub(3, $given), " Wasserflaschen."); } } else() { setVar("cancel", true); player.speak($player, "§2Kumpel", "Was soll ich damit?"); } } goto("waitstage7"); @stage8 player.speak($player, "§2Kumpel", "Nimm dir diesen Eimer und melke eine Kuh. Trink die Milch, dann gehts dir besser."); event.load("entity-click"); setVar("cow", read.spawnMob($animalloc, "{id:'COW'}")); player.giveItem($player, read.item("BUCKET")); @waitstage8 wait(); if(and(equal($event, "entity-click"), equal($entity-type, "COW"))) { event.unload("entity-click"); event.load("consume"); player.removeItem($player, read.item("BUCKET")); player.giveItem($player, read.item("MILK_BUCKET")); } if(and(equal($event, "consume"), equal($item-type, "MILK_BUCKET"))) { player.speak($player, "§2Kumpel", "Sag ich doch. Milch hilft immer.") entity.remove($cow);; inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage9"); } goto("waitstage8"); @stage9 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."); player.speak($player, "§2Kumpel", "Für einen Kuchen brauchst du: 3 Eimer Milch, 2 Zucker, 1 Ei (Huhn rechtsklicken) und 3 Weizen."); event.load("block-break"); event.load("entity-click"); event.load("craft"); setVar("milk", 0); setVar("canebroken", 0); setVar("eggsgiven", 0); setVar("harvested", 0); setVar("milkgiven", 0); setVar("playersugar1", player.getItemAmount($player, true, read.item("SUGAR"))); setVar("chicken", read.spawnMob($animalloc, "{id:'CHICKEN'}")); setVar("cow", read.spawnMob($animalloc, "{id:'COW'}")); player.giveItem($player, read.item("BUCKET:0:3")); setVar("wheat", false); setVar("sugar", false); setVar("milk", false); setVar("egg", false); setVar("i", -1); while(less(inc("i"), list.getSize($wheatlist))) { block.set(list.getIndex($wheatlist, $i), read.item("CROPS:7")); } block.set(read.location("games:1894:106:3879"), read.item("SUGAR_CANE_BLOCK")); block.set(read.location("games:1894:107:3879"), read.item("SUGAR_CANE_BLOCK")); block.set(read.location("games:1892:106:3880"), read.item("SUGAR_CANE_BLOCK")); block.set(read.location("games:1892:107:3880"), read.item("SUGAR_CANE_BLOCK")); block.set(read.location("games:1891:106:3882"), read.item("SUGAR_CANE_BLOCK")); block.set(read.location("games:1891:107:3882"), read.item("SUGAR_CANE_BLOCK")); @waitstage9 wait(); if(equal($event, "block-break")) { if(equal($block-type, "SUGAR_CANE_BLOCK")) { if(equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "SUGAR_CANE_BLOCK")) { setVar("cancel", false); inc("canebroken"); if(equal(block.getType(loc.mod($block-loc, 0, 1, 0)), "SUGAR_CANE_BLOCK")) { inc("canebroken"); } } else() { setVar("cancel", true); } goto("waitstage9"); } if(and(equal($block-type, "CROPS"), equal($block-data, 7))) { setVar("cancel", false); inc("harvested"); if(greaterequal($harvested, 3)) { setVar("wheat", true); goto("checkcake"); } } goto("waitstage9"); } if(equal($event, "entity-click")) { if(equal($entity-type, "COW")) { inc("milkgiven"); if(greaterequal($milkgiven, 3)) { setVar("milk", true); goto("checkcake"); } goto("waitstage9"); } if(and(equal($entity-type, "CHICKEN"), invert($egg))) { player.giveItem($player, read.item("EGG")); inc("eggsgiven"); setVar("egg", true); goto("checkcake"); } } if(equal($event, "craft")) { if(and(equal($item-type, "SUGAR"), greater($canebroken, 1))) { sgoto(1, "checksugar"); } if(equal($item-type, "CAKE")) { event.unload("craft"); event.load("block-place"); } goto("waitstage9"); } if(and(equal($event, "block-place"), equal(block.getType(loc.mod($block-loc, 0, -1, 0)), "FURNACE"))) { if(equal($block-type, "CAKE_BLOCK")) { setVar("cancel", false); sgv($player-name, "schiffcakeloc", text.location($block-loc)); player.speak($player, "§2Kumpel", "Auf das wir noch ein langes Leben haben."); entity.remove($cow); entity.remove($chicken); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage10"); } else() { setVar("cancel", true); } } goto("waitstage9"); @checksugar setVar("playersugar2", player.getItemAmount($player, true, read.item("SUGAR"))); setVar("crafted", sub($playersugar2, $playersugar1)); if(greaterequal($crafted, 2)) { setVar("sugar", true); goto("checkcake"); } else() { player.speak($player, "§2Kumpel", "Es fehlen noch ", sub(2, $crafted), " Stück Zucker."); } goto("waitstage9"); @checkcake if(and($wheat, $sugar, $milk, $egg)) { event.unload("entity-click"); event.unload("block-break"); setVar("allcakeitems", true); } goto("waitstage9"); @stage10 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."); event.load("block-click"); player.giveItem($player, read.item("TRIPWIRE_HOOK", "Schlüssel")); setVar("temp1", false); setVar("temp2", false); @waitstage10 wait(); if(equal($event, "block-click")) { if(equal($block-type, "CHEST")) { setVar("cancel", true); if(equal(item.getType(entity.getEquip($player, "hand")), "TRIPWIRE_HOOK")) { if(equal(item.getName(entity.getEquip($player, "hand")), "Schlüssel")) { if(equal($block-loc, $truechestloc)) { event.load("villager-give"); event.unload("block-click"); player.giveItem($player, read.item("COMPASS")); player.speak($player, "§2Kumpel", "Bitte bring mir auch den Schlüssel wieder zurück."); goto("waitstage10"); } if(notequal($block-loc, !=, $truechestloc)) { player.speak($player, "§2Kumpel", "Das ist nicht die richtige Kiste."); goto("waitstage10"); } } } } goto("waitstage10"); } if(equal($event, "villager-give")) { if(or(equal($item-type, "TRIPWIRE_HOOK"), equal($item-type, "COMPASS"))) { if(equal($item-type, "TRIPWIRE_HOOK")) { setVar("temp1", true); } if(equal($item-type, "COMPASS")) { setVar("temp2", true); } } else() { setVar("cancel", true); player.speak($player, "§2Kumpel", "Was soll ich damit?"); goto("waitstage10"); } if(and($temp1, $temp2)) { removeVar("temp1"); removeVar("temp2"); player.speak($player, "§2Kumpel", "Lang lebe die Navigation, die Freiheit und die Menschlichkeit!"); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage11"); } goto("waitstage10"); @stage11 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."); event.load("block-place"); player.giveItem($player, read.item("LOG:3", "Feuerholz", "Auf der Feuerstelle platzieren")); block.set($firelogloc, read.item("AIR")); block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR")); @waitstage11 wait(); if(equal($event, "block-place")) { if(and(equal($block-loc, $firelogloc), equal($block-type, "LOG"))) { setVar("cancel", false); event.unload("block-place"); event.load("block-click"); } goto("waitstage11"); } if(equal($event, "block-click")) { if(equal($block-type, "CHEST")) { setVar("cancel", true); if(equal($block-loc, $firechestloc)) { event.load("craft"); event.unload("block-click"); player.giveItem($player, read.item("FLINT")); player.giveItem($player, read.item("IRON_INGOT")); } if(notequal($block-loc, $firechestloc)) { player.speak($player, "§2Kumpel", "Das ist nicht die richtige Kiste."); } } if(equal($block-type, "LOG")) { if(equal($block-loc, $firelogloc)) { if(equal($action, "RIGHT_CLICK_BLOCK")) { player.speak($player, "§2Kumpel", "Feuer! Es lodere wie die Wut von unzufriedenem Volke."); inc("stage"); sgv($player-name, "schiffstage", $stage); sgoto(40, "stage12"); } } } goto("waitstage11"); } if(equal($event, "craft")) { if(equal($item-type, "FLINT_AND_STEEL")) { event.unload("craft"); event.load("block-click"); } } goto("waitstage11"); @stage12 player.speak($player, "§2Kumpel", "Gut, dass du hier bist. Auf der anderen Seite der Insel habe ich eine Hexe gesehen."); placelocs = list.new(); list.add($placelocs, $placeloc1); list.add($placelocs, $placeloc2); list.add($placelocs, $placeloc3); list.add($placelocs, $placeloc4); event.load("entity-kill"); event.load("player-respawn"); setVar("witch", read.spawnMob($spawnhexeloc, "{id:'WITCH'}")); block.set($placeloc1, read.item("AIR")); block.set($placeloc2, read.item("AIR")); block.set($placeloc3, read.item("AIR")); block.set($placeloc4, read.item("AIR")); block.set($witherloc, read.item("SKULL:1")); block.set($creeperloc, read.item("SKULL:4")); block.set($zombieloc, read.item("SKULL:2")); block.set($skelettloc, read.item("SKULL")); @waitstage12a wait(); if(equal($event, "entity-kill")) { if(equal($entity-type, "WITCH")) { 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."); event.load("block-click"); event.load("entity-hurt"); player.giveItem($player, read.item("STICK", "Zauberstab der Elemente", "Achtung, fragil!")); player.giveItem($player, read.item("STONE_SWORD")); setVar("i", -1); while(less(inc("i"), 10)) { setVar("witherskeleton", read.spawnMob($spawnwitherloc, "{id:'WITHER_SKELETON'}")); setVar("skeleton", read.spawnMob($spawnskelettloc, "{id:'SKELETON'}")); setVar("creeper", read.spawnMob($spawncreeperloc, "{id:'CREEPER'}")); setVar("zombie", read.spawnMob($spawnzombieloc, "{id:'ZOMBIE'}")); } setVar("skulls", 0); setVar("enter", false); } if(equal($event, "player-respawn")) { setVar("respawn-loc", $shipstartloc); } goto("waitstage12a"); @waitstage12b wait(); if(equal($event, "player-respawn")) { setVar("respawn-loc", $shipstartloc); } if(equal($event, "block-click")) { if(and(equal($block-type, "WOOD_BUTTON"), invert($enter))) { 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?"); setVar("enter", true); goto("waitstage12b"); } } if(equal($event, "entity-hurt")) { if(equal(item.getType(entity.getEquip($player, "hand")), "STICK")) { entity.damage($entity, 3); } else() { player.speak($player, "§2Kumpel", "Diese Monster sind mit irdischen Waffen unbesiegbar."); setVar("cancel", true); } } if(equal($event, "entity-kill")) { if(equal($entity-type, "WITHER")) { player.giveItem($player, read.item("SKULL")); inc("skulls"); goto("checkskulls"); } if(equal($entity-type, "ZOMBIE")) { player.giveItem($player, read.item("SKULL:1")); inc("skulls"); goto("checkskulls"); } if(equal($entity-type, "SKELETON")) { player.giveItem($player, read.item("SKULL:2")); inc("skulls"); goto("checkskulls"); } if(equal($entity-type, "CREEPER")) { player.giveItem($player, read.item("SKULL:4")); inc("skulls"); goto("checkskulls"); } } goto("waitstage12b"); @checkskulls if(greaterequal($skulls, 4)) { player.speak($player, "§2Kumpel", "Es schaut so aus, als würden diese Köpfe auf die hervorgehobenen Plätze gehören."); event.load("block-place"); event.unload("block-click"); event.unload("entity-hurt"); event.unload("player-respawn"); setVar("i", 0); setVar("counter", 0); goto("waitstage12c"); } else() { goto("waitstage12b"); } @waitstage12c wait(); if(equal($event, "block-place")) { setVar("cancel", true) if(and(list.contains($placelocs, $block-loc), equal($item-type, "SKULL"))) { setVar("cancel", false); inc("i"); msg($player, "Gesetzte Köpfe: ", $i, "/4"); if(greaterequal($i, 4)) { setVar("evil", read.spawnMob($evilloc, "{id:'VILLAGER'}")); entity.setName($evil, "§cBeelzebub"); entity.setEquip($evil, "head", read.item("IRON_HELMET")); 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?"); waitFor(180); player.speak($player, "§cBeelzebub", "Muahahaha..., nimm dies."); setVar("witch1", read.spawnMob($evilloc, read.item("{id:'WITCH'}"))); setVar("witch2", read.spawnMob($evilloc, read.item("{id:'WITCH'}"))); setVar("witch3", read.spawnMob($evilloc, read.item("{id:'WITCH'}"))); setVar("fish1", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}"))); setVar("fish2", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}"))); setVar("fish3", read.spawnMob($evilloc, read.item("{id:'SILVERFISH'}"))); effect.playParticle($evilloc, "EXPLOSION", 5); entity.remove($evil); player.speak($player, "§cBeelzebub", "Bis zum nächsten Mal..."); } } } if(equal($event, "entity-kill")) { inc("counter"); if(greaterequal($counter, 6)) { goto("giveup"); } } goto("waitstage12c"); @giveup if(equal($stage, 0)) { try() { setVar("i", -1); while(less(inc("i"), list.getSize($abgebaut_loc))) { block.set(list.getIndex($abgebaut_loc, $i), read.item(list.getIndex($abgebaut_type, $i))); } } catch() { nothing(); } } if(greaterequal($stage, 1)) { block.set(read.location(ggv($player-name, "schiffofenloc")), read.item("AIR")); } if(equal($stage, 4)) { entity.remove($guardian); } if(equal($stage, 8)) { entity.remove($cow); } if(equal($stage, 9)) { entity.remove($cow); entity.remove($chicken); } if(greaterequal($stage, 10)) { block.set(read.location(ggv($player-name, "schiffcakeloc")), read.item("AIR")); } if(equal($stage, 11)) { block.set($firelogloc, read.item("AIR")); block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR")); } if(equal($stage, 12)) { block.set($firelogloc, read.item("AIR")); block.set(loc.mod($firelogloc, 0, 1, 0), read.item("AIR")); entity.remove($zombie); entity.remove($spider); entity.remove($creeper); entity.remove($witherskeleton); } entity.teleport($player, $gamesworldloc); command("clear ", $player-name); sb.reset($player); entity.setHealth($player, 20); player.setHunger($player, 20); player.setSaturation($player, 5); command("effect ", $player-name, " clear"); term();