Przy dłuższych opóźnieniach robienie pętli while z warunkiem czy gracz jest online nie ma sensu, bo gdy gracz wyjdzie i wejdzie stara pętla się nie zatrzyma a zacznie odliczać też nowa
on bed enter:
set {_online} to number of all players
loop all players:
if loop-playe is sleeping:
add 1 to {_sleeping}
set {_proc} to ({_sleeping}/{_online})*100
send "&7Gracz &6%player% &7polozyl sie spac &8(&6%{_proc}%%%&7/&650%%&8)"
if {_proc} >= 50:
set time in world to 06:00
on spawn:
loop all living entities in chunk at event-entity:
if loop-entity is not player:
add 1 to {_mobs}
if {_mobs} >= 30:
cancel event
Jedynie blokuje spawnowanie
on spawn:
if event-entity is not zombie:
stop
loop all living entities in chunk at event-entity:
if loop-entity is not player:
if name of loop-entity is "Zombie":
add 1 to {_mobs}
if {_mobs} >= 15:
cancel event