Advertisement
MateuszGrabarczyk

Untitled

Dec 9th, 2022
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.11 KB | None | 0 0
  1.  
  2.  
  3.  
  4. def zamekKonstruktor(mur,wysokosc):
  5.     dlMuru = mur
  6.     dlMuruKopia = dlMuru / 2
  7.     wysokoscMuru = wysokosc
  8.     builder.teleport_to(pos(-5, 0, 5))
  9.     builder.set_origin()
  10.     builder.mark()
  11.     i = 0
  12.     # pętla tworząca 3 warstwowe mury dookoła gracza
  13.     while i < 3:
  14.         j = 0
  15.         while j < 4:
  16.             builder.move(FORWARD, dlMuru)
  17.             builder.raise_wall(MOSSY_STONE_BRICKS, wysokoscMuru)
  18.             builder.turn(RIGHT_TURN)
  19.             j += 1
  20.         dlMuru += -2
  21.         builder.move(RIGHT, 1)
  22.         builder.move(FORWARD, 1)
  23.         builder.mark()
  24.         i += 1
  25.     builder.move(UP, wysokoscMuru - 1)
  26.     builder.face(WEST)
  27.     builder.move(BACK, 15)
  28.     builder.mark()
  29.     i = 0
  30.     #pętla tworząca schody
  31.     while i < wysokoscMuru - 1:
  32.         builder.shift(1, -1, 0)
  33.         builder.line(STONE_BRICK_STAIRS)
  34.         i += 1
  35.     builder.teleport_to_origin()
  36.     builder.move(UP, wysokoscMuru)
  37.     builder.face(NORTH)
  38.     builder.mark()
  39.     i = 0
  40.     #pętla tworząca wierzchołki
  41.     while i < 4:
  42.         j = 0
  43.         while j < dlMuruKopia:
  44.             builder.place(SEA_LANTERN)
  45.             builder.move(FORWARD, 2)
  46.             j += 1
  47.         builder.turn(RIGHT_TURN)
  48.         i += 1
  49.  
  50. player.on_chat("zamek", zamekKonstruktor)
  51.  
  52. def ekwipunek():  
  53.     # lista przedmiotów, które ma dostać gracz
  54.     przedmioty = [NETHERITE_SWORD, 1, NETHERITE_AXE, 1, BOW, 1, ARROW, 64, FIREBALL, 10
  55.                  , LAVA_BUCKET, 5, NETHERITE_HELMET, 1, NETHERITE_CHESTPLATE, 1, NETHERITE_LEGGINGS, 1, NETHERITE_BOOTS, 1
  56.                  , SPRUCE_DOOR, 20, TORCH, 20, LADDER, 64, ENCHANTED_APPLE, 2, COOKED_PORKCHOP, 4]
  57.     # Pętla przypisująca przedmioty graczowi
  58.     for i in range(0, len(przedmioty), 2):
  59.         mobs.give(mobs.target(NEAREST_PLAYER), przedmioty[i], przedmioty[i+1])
  60.  
  61.  
  62. player.on_chat("ekwipunek", ekwipunek)
  63.  
  64. def konSpawn():
  65.     mobs.spawn(HORSE, pos(1, 0, 0))
  66.     mobs.give(mobs.target(NEAREST_PLAYER), SADDLE, 1)
  67.     mobs.give(mobs.target(NEAREST_PLAYER), IRON_HORSE_ARMOR, 1)
  68.  
  69. player.on_chat("kon", konSpawn)
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement