Untitled

mail@pastecode.io avatar
unknown
python
a year ago
524 B
1
Indexable
Never
# Cwiczenie 1
# Zombie Run
def zombieRun():
    # ustawienia poczatkowe
    gameplay.set_difficulty(NORMAL)
    gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER))
    mobs.give(mobs.target(NEAREST_PLAYER), DIAMOND_SWORD, 1)
    # spawn zombie 
    for licznik in range(100):
        mobs.spawn(ZOMBIE, randpos(pos(-10, 0, -10), pos(10, 0, 10)))
        loops.pause(100)
    # zmiana cyklu dnia 
    for licznik in range(1000):
        gameplay.time_add(100)
    # przypisac do czatu
player.on_chat('z', zombieRun)