View difference between Paste ID: Rb2EgLfA and BdxkvJMm
SHOW: | | - or go back to the newest paste.
1
on spawn of skeleton, pig, zombie, cow, chicken, horse, iron golem, sheep, skeleton, spider or creeper:
2-
 loop all entities in radius 8 around the spawned entity:
2+
 set {_g} to 0
3-
  send message "%{_g}%" to player 
3+
 loop all entities in radius 20 around the spawned entity:
4-
  add 1 to {_g}
4+
  if chunk of spawned entity is chunk of loop-entity:
5-
  if {_g} is larger than 5:
5+
   add 1 to {_g}
6-
   if chunk of spawned entity is chunk of loop-entity:
6+
  send message "%{_g}%" to console
7-
    cancel the event
7+
 if {_g} is larger than 5:
8
   cancel the event