X=0 Y=0 Z=150 zaehler=1 Teil2= False Teil3= True Hind1= True Hind2=False Hind3=False Hind4=False Hind5=False Hind6=False zaehler2=1 def spielbediungen(): gameplay.time_set(0) gameplay.set_difficulty(NORMAL) gameplay.set_game_mode(SURVIVAL, mobs.target(ALL_PLAYERS)) mobs.clear_effect(mobs.target(ALL_PLAYERS)) gameplay.set_game_rule(KEEP_INVENTORY, False) player.execute("immutableworld") def raum1(): player.execute("setworldspawn 0 150 0") player.execute("spawnpoint @s 0 150 0") blocks.fill(BLACKSTONE, world(X-1,Z-1,Y-5), world(X+8,Z+11,Y+6)) blocks.fill(AIR, world(X, Z, Y-4), world(X+7, Z+10, Y+5)) blocks.fill(GLOWSTONE, world(X, Z-1, Y-1), world(X+7, Z-1, Y+1)) blocks.fill(AIR, world(X+8, Z, Y-1), world(X+8, Z+2, Y+1)) blocks.fill(MONSTER_SPAWNER, world(X+8, Z, Y-1), world(X+9, Z+2, Y+1)) blocks.fill(GLOWSTONE, world(X, Z-1, Y-1), world(X+7, Z-1, Y+1)) raetselblock() def raetselblock():# Blöcke fürs Rechnen(die Hinweis für den Zahlencode) blocks.fill(RESPAWN_ANCHOR, world(X, Z, Y-4), world(X+7, Z, Y-4),) blocks.fill(RESPAWN_ANCHOR, world(X, Z, Y+5), world(X+7, Z, Y+5),) blocks.fill(AIR, world(X+5, Z, Y-4), world(X+6, Z, Y-4),) blocks.place(AIR, world(X, Z, Y+5)) blocks.place(AIR, world(X+4, Z, Y+5)) def dialog1(): # Text an Spieler einige Zeilen angenehmer zum Lesen player.say("Sei Gegrüsst Fremde*r") player.say("Der Weg zu den Schatzkammern der Magier ist dir verwehrt!") player.say("Zeige dich als Alchemist und gib nur die 3 Zahlen der Anordnung von Gold.") player.say("Für wackere Abenteurer*in gibt es 3 Tipps. Um sie zu erhalten schreibe «Tipp».") def TippR1():# Für Tipps Durchgänge mit If+ Zähler global zaehler zaehler=zaehler+1 if (zaehler==2): player.say("Tipp 1: In der Anordnung der Blöcke sind die Zahlen der Protonen, Elektronen, Neutronen versteckt") if (zaehler==3): player.say("Tipp 2: Die Protonen sind gleichviele wie die Elektronen.") if (zaehler==4): player.say("Tipp 3: Die Blöcke sind in zweimal in Modulo angeordnet von Süd nach Nord.") if (zaehler==5): player.say("Schau mit deinem 3 Auge nach Süden") # Hilf an der Wandtafel hinten if (zaehler>5): player.say("Du hast leider schon alle Tipps aufgebraucht.") def rantwort(): blocks.fill(AIR, world (X+8, Z, Y-1), world(X+9, Z+2, Y+1)) player.say("Tritt ein, doch sei gewarnt, denn nun eine Umkehr ist unmöglich. Eile nicht sonst bleibt dir der Weg verwehrt") def on_travelled_walk(): x = player.position().get_value(Axis.X) z = player.position().get_value(Axis.Y) y = player.position().get_value(Axis.Z) if (x==X+8) and (y==Y) and (z==z>Z+-2) and (z==z<2+Z):# Raum1 zu Raum 2 Türe zu blocks.fill(ANVIL, world (X+8, Z, Y-1), world(X+8, Z+2, Y+1)) player.execute("spawnpoint @s 10, 151 0") mobs.apply_effect(LEVITATION, mobs.target(NEAREST_PLAYER), 10, 1) global Teil2 Teil2 = True if (x==X+10) and (z>Z-1):# Raum 2 schweben mobs.apply_effect(LEVITATION, mobs.target(NEAREST_PLAYER), 10, 1) if (x==X+13) and (Z+14==z): player.execute("spawnpoint @s 18 163 0") if ((X+21==x) or (x==X+22)) and ((Y+5==y) or (Y+6==y)) and (z==Z+14):# Ab hier, die bewegenden Blöcke, immer gleiches Muster global Hind1 Hind1=False # alte Funktion wird abgestellt global Hind2 Hind2= True # die neue Funktion wird aktiviert player.execute("spawnpoint @s 21 164 6") # neuer Spawnpoint falls man stirbt if (z==Z+10) and (X+23==x) or (X+24==x) and (y==Y+20) or (y==Y+21): global Hind2 Hind2= False global Hind3 Hind3= True player.execute("spawnpoint @s 23 160 21") if (zaehler2==1): # damit man nur eine Enderperle bekommt global zaehler2 zaehler2= zaehler2 +2 mobs.give(mobs.target(NEAREST_PLAYER), ENDER_PEARL, 1) player.say("sehr gut gemacht weiter so") if ((X+15==x) or (X+14==x)) and (z==Z+16) and (y==Y+27) or (y==Y+28): global Hind3 Hind3= False global Hind4 Hind4= True player.execute("spawnpoint @s 14 167 27") if (X+13 gurke + intervall * intervalldauer: # immer weiter, wenn mindestens 10 Ticks vergangen sind... blocks.fill(M,world(x + richx, z+richz, y+richy), world(x2 + richx, z2+richz, y2+richy)) # Block an neuer Position bauen blocks.fill(AIR, world(x, z, y), world(x2, z2, y2)) # Block löschen x = x + richx # Position anpassen x2= x2+richx y= y+richy y2=y2+richy z= z+richz z2=z2+richz intervall= intervall + 1 def blöckebewegen2 (M,x,z,y,x2,z2,y2,richx,richy,richz,länge,intervalldauer):# sie ist nicht so schön fliessend jedoch meist besser geeignet running = True intervall=1 gurke = gameplay.time_query(GAME_TIME) blocks.fill(M,world(x, z, y),world(x2, z2, y2)) # Block an erster Position bauen while gameplay.time_query(GAME_TIME) < gurke + länge: #zähler der ticks if gameplay.time_query(GAME_TIME) > gurke + intervall * intervalldauer: # immer weiter, wenn mindestens 10 Ticks vergangen sind... blocks.fill(AIR, world(x, z, y), world(x2, z2, y2)) # Block löschen blocks.fill(M,world(x + richx, z+richz, y+richy), world(x2 + richx, z2+richz, y2+richy)) # Block an neuer Position bauen x = x + richx # Position anpassen x2= x2+richx y= y+richy y2=y2+richy z= z+richz z2=z2+richz intervall= intervall + 1 def blöckebewegen3 (M,x,z,y,x2,z2,y2,richx,richy,richz,länge,intervalldauer):# das der hintere Block nicht verschwindet (wachsende Form) running = True intervall=1 gurke = gameplay.time_query(GAME_TIME) blocks.fill(M,world(x, z, y),world(x2, z2, y2)) # Block an erster Position bauen while gameplay.time_query(GAME_TIME) < gurke + länge: #zähler der ticks if gameplay.time_query(GAME_TIME) > gurke + intervall * intervalldauer: # immer weiter, wenn mindestens 10 Ticks vergangen sind... blocks.fill(M,world(x + richx, z+richz, y+richy), world(x2 + richx, z2+richz, y2+richy)) # Block an neuer Position bauen x = x + richx # Position anpassen x2= x2+richx y= y+richy y2=y2+richy z= z+richz z2=z2+richz intervall= intervall + 1 def raum3(): blocks.fill(OBSIDIAN, world(X+13, Z+5, Y-2), world(X+25,Z+21,Y+50)) blocks.fill(AIR, world(X+14, Z+6, Y-1), world(X+24, Z+20, Y+49)) blocks.fill(LAVA, world(X+14, Z+6,Y-1), world (X+24, Z+8, Y+49)) blocks.fill(AIR, world(X+13,Z+14,Y-1), world(X+13,Z+15,Y)) blocks.fill(STONE, world(X+14,Z+13,Y-1), world(X+24,Z+13,Y)) blocks.fill(STONE, world(X+21,Z+13,Y+5), world(X+22,Z+13,Y+6)) blocks.place(OBSIDIAN, world(X+12, Z+13, Y+3)) while Hind1: # die verschiedenen Blöcke, die sich bewegen blöckebewegen(STONE_BRICKS,X+14,Z+13,Y+2,X+13,Z+13,Y+3,2,0,0,70,10) while Hind2: blöckebewegen2(STONE_BRICKS, X+23, Z+10, Y+1, X+24, Z+10, Y+2, 0, 1, 0, 200,10) while Hind3: blöckebewegen (STONE_SLAB,X+22, Z+10, Y+21, X+21, Z+10, Y+20, -1, 1, 1, 160, 20) while Hind4: blocks.fill(AIR, world(X+14,Z+13,Y+33), world(X+15,Z+13,Y+33)) blöckebewegen (BRICKS,X+12, Z+13, Y+33, X+13, Z+13, Y+33, 2, 0, 0, 40, 20) blocks.fill(STONE_BRICKS, world(X+14,Z+10,Y+38), world(X+15,Z+10,Y+39)) while Hind5: blocks.fill(STONE_BRICKS, world(X+14,Z+10,Y+42), world(X+15,Z+10,Y+43)) if (Hind6==True): blocks.fill(AIR, world(X+14, Z+10, Y-1), world(X+24, Z+19, Y+40)) blöckebewegen3 (STONE_BRICKS,X+14, Z+10, Y+41, X+13, Z+10, Y+44, 2, 0, 0, 60, 10) blöckebewegen3 (ANVIL,X+14, Z+13, Y+41, X+14, Z+13, Y+41, 2, 0, 0, 60, 10) blöckebewegen3 (ANVIL,X+14, Z+13, Y+44, X+14, Z+13, Y+44, 2, 0, 0, 60, 10) blocks.fill(MONSTER_SPAWNER, world(X+25, Z+11, Y+42), world(X+25, Z+12, Y+43)) player.say("Du hast dich wacker geschlagen.") player.say("JEDOCH BIST DU KEIN MAGIER*in") player.say("Angesichts deines Talentes gesttaten wir dir weiterzuleben.") player.say("Um weiter zum Schatz vorzudringen sag:aperta.") player.say("Wenn du klugerweise dich zurückziehen möchtest sag: beam mich hoch scotty.") def antworttod(): # wenn er/sie den Schatz verfolen will player.teleport(world(X+11, Z-48, Y)) player.execute("spawnpoint @s 11 102 0") player.say("Wir sind so freundlich und geben dir den Schatz!") player.say("Ich hoffe du kanst ihn essen") player.say(" Wir garen dich schon etwas, dann ist deine Zeit in der Höhle kürzer ") player.say("Leb wohl, du Totgeweihter") mobs.apply_effect(HUNGER, mobs.target(NEAREST_PLAYER), 1000000, 20) mobs.apply_effect(FIRE_DAMAGE, mobs.target(NEAREST_PLAYER), 1000000, 1) Materialien=[DIAMOND, GOLD_NUGGET, LAPIS_LAZULI, DIAMOND_BLOCK, GOLD_BLOCK] n=1 for zahl in Materialien: mobs.give(mobs.target(NEAREST_PLAYER), Materialien[n], 128) n=n+1 def antwortend(): # wenn er/sie aufhören möchte player.say("Gratulation, du hast überlebt") player.teleport(positions.ground_position(pos(0,0,0))) spielbediungen() raum1() player.teleport(world(X, Z, Y)) player.on_travelled(WALK, on_travelled_walk) dialog1() player.on_chat("Tipp", TippR1) player.on_chat("79 79 118", rantwort) player.on_chat("aperta", antworttod) player.on_chat("beam mich hoch scotty", antwortend) raum2() raum3()