Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zamekKonstruktor(mur,wysokosc):
- dlMuru = mur
- dlMuruKopia = dlMuru / 2
- wysokoscMuru = wysokosc
- builder.teleport_to(pos(-5, 0, 5))
- builder.set_origin()
- builder.mark()
- i = 0
- # pętla tworząca 3 warstwowe mury dookoła gracza
- while i < 3:
- j = 0
- while j < 4:
- builder.move(FORWARD, dlMuru)
- builder.raise_wall(MOSSY_STONE_BRICKS, wysokoscMuru)
- builder.turn(RIGHT_TURN)
- j += 1
- dlMuru += -2
- builder.move(RIGHT, 1)
- builder.move(FORWARD, 1)
- builder.mark()
- i += 1
- builder.move(UP, wysokoscMuru - 1)
- builder.face(WEST)
- builder.move(BACK, 15)
- builder.mark()
- i = 0
- #pętla tworząca schody
- while i < wysokoscMuru - 1:
- builder.shift(1, -1, 0)
- builder.line(STONE_BRICK_STAIRS)
- i += 1
- builder.teleport_to_origin()
- builder.move(UP, wysokoscMuru)
- builder.face(NORTH)
- builder.mark()
- i = 0
- #pętla tworząca wierzchołki
- while i < 4:
- j = 0
- while j < dlMuruKopia:
- builder.place(SEA_LANTERN)
- builder.move(FORWARD, 2)
- j += 1
- builder.turn(RIGHT_TURN)
- i += 1
- player.on_chat("zamek", zamekKonstruktor)
- def ekwipunek():
- # lista przedmiotów, które ma dostać gracz
- przedmioty = [NETHERITE_SWORD, 1, NETHERITE_AXE, 1, BOW, 1, ARROW, 64, FIREBALL, 10
- , LAVA_BUCKET, 5, NETHERITE_HELMET, 1, NETHERITE_CHESTPLATE, 1, NETHERITE_LEGGINGS, 1, NETHERITE_BOOTS, 1
- , SPRUCE_DOOR, 20, TORCH, 20, LADDER, 64, ENCHANTED_APPLE, 2, COOKED_PORKCHOP, 4]
- # Pętla przypisująca przedmioty graczowi
- for i in range(0, len(przedmioty), 2):
- mobs.give(mobs.target(NEAREST_PLAYER), przedmioty[i], przedmioty[i+1])
- player.on_chat("ekwipunek", ekwipunek)
- def konSpawn():
- mobs.spawn(HORSE, pos(1, 0, 0))
- mobs.give(mobs.target(NEAREST_PLAYER), SADDLE, 1)
- mobs.give(mobs.target(NEAREST_PLAYER), IRON_HORSE_ARMOR, 1)
- player.on_chat("kon", konSpawn)
- # DESZCZ TNT LUB STRZAŁ -> FUNKCJA!
- def atak(rodzajPocisku, x, z):
- if rodzajPocisku == 1:
- rodzajPocisku = ARROW_PROJECTILE_MOB
- else:
- rodzajPocisku = PRIMED_TNT
- for i in range(20):
- mobs.spawn(rodzajPocisku, randpos(pos(x, 20, z), pos(x+20, 20, z+20)))
- player.on_chat("a", atak)
- #atak mobów
- def moby(iloscMobow):
- #ustawienie przetrwania
- gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER))
- #ustawienie nocy
- gameplay.time_set(DayTime.NIGHT)
- #tworzymy listę mobów
- lista = [CREEPER, ENDERMAN, ZOMBIE]
- for i in range(len(lista)):
- for j in range(iloscMobow):
- mobs.spawn(lista[i], randpos(pos(25, 1, 25), pos(30, 1, 30)))
- loops.pause(2000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement