i am trying to make a mmoRpg server plugin but i'm stuck at spawning mobs
can someone help me.
i want to spawn zombie's on a random location if you are in a specific region
this is what i have now
please help
command /Rpg.mob <text> [<integer>]:
permission: Admin
trigger:
arg 1 is "zombie":
if arg-2 is not set:
set {_random.ZombieSpawn} to a random integer between 1 and 10
if {_random.ZombieSpawn} is false:
set {location.%{_random.ZombieSpawn}%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%{_random.ZombieSpawn}% &7set&8&m]" to player
set {_random.ZombieSpawn::%{_random.ZombieSpawn}%} to true
else:
set {_random.ZombieSpawn} to a random integer between 1 and 10
set {location.%{_random.ZombieSpawn}%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%{_random.ZombieSpawn}% &7has been reset to here&8&m]" to player
arg 2 is between 1 and 100:
set {location.%arg-2%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%arg-2% &7set&8&m]" to player
every 2 seconds:
set {_random1} to a random integer between 1 and 10
if block above {location.%{_random1}%.ZombieSpawn} is air:
if last spawned entity is a chicken:
kill last spawned entity
kill last spawned entity
spawn 1 zombie at {location.%{_random1}%.ZombieSpawn}
set last spawned entity to adult
set tool of last spawned entity to wooden sword
set the last spawned entity's max health to 5
set the last spawned entity's health to 5
set name of last spawned entity to "&7[&cZombie&7]"
can someone help me.
i want to spawn zombie's on a random location if you are in a specific region
this is what i have now
please help
command /Rpg.mob <text> [<integer>]:
permission: Admin
trigger:
arg 1 is "zombie":
if arg-2 is not set:
set {_random.ZombieSpawn} to a random integer between 1 and 10
if {_random.ZombieSpawn} is false:
set {location.%{_random.ZombieSpawn}%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%{_random.ZombieSpawn}% &7set&8&m]" to player
set {_random.ZombieSpawn::%{_random.ZombieSpawn}%} to true
else:
set {_random.ZombieSpawn} to a random integer between 1 and 10
set {location.%{_random.ZombieSpawn}%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%{_random.ZombieSpawn}% &7has been reset to here&8&m]" to player
arg 2 is between 1 and 100:
set {location.%arg-2%.ZombieSpawn} to location of player
send "&8&m[&7Zombie spawn &6&l%arg-2% &7set&8&m]" to player
every 2 seconds:
set {_random1} to a random integer between 1 and 10
if block above {location.%{_random1}%.ZombieSpawn} is air:
if last spawned entity is a chicken:
kill last spawned entity
kill last spawned entity
spawn 1 zombie at {location.%{_random1}%.ZombieSpawn}
set last spawned entity to adult
set tool of last spawned entity to wooden sword
set the last spawned entity's max health to 5
set the last spawned entity's health to 5
set name of last spawned entity to "&7[&cZombie&7]"