Rpg mob spawning

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Luukvosje

Member
Apr 13, 2020
3
0
0
24
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]"
 
Status
Not open for further replies.