Skript Version: 2.5.1
Minecraft: Paper 1.15.2
I want this...
But it gives me errors and I can only get this to work but I'm not wanting to write code for every mob...
The problem is with "bat spawn egg". It won't let me use a variable or even "victim" in place of "bat".
I'm sure I'm just having trouble with the syntax, its been a few years and skript has changed so much since then... I've been googling for a couple days but haven't found anything useful.
Thanks!
Minecraft: Paper 1.15.2
I want this...
Code:
on damage:
set {_victim} to "%victim%"
if attacker is holding Heart of the Sea named "Capture Container":
cancel event
if attacker has enough space for 1 %{_victim}% spawn egg named "Captured %{_victim}%":
send "You have Captured the %{_victim}%!" to attacker
teleport victim 100 meters below attacker
give attacker %{_victim}% spawn egg named "Captured %{_victim}%"
add 1 to {player.captured.%{_victim}%}
send "You have captured %{player.captured.%{_victim}%}%!" to attacker
else:
send "You are out of space in your inventory!" to attacker
But it gives me errors and I can only get this to work but I'm not wanting to write code for every mob...
Code:
on damage:
if attacker is holding Heart of the Sea named "Capture Container":
cancel event
if victim is bat:
if attacker has enough space for 1 bat spawn egg named "Captured Bat":
send "You have Captured the Bat!" to attacker
teleport victim 100 meters below attacker
give attacker bat spawn egg named "Captured Bat"
add 1 to {player.captured.bat}
send "You have captured %{player.captured.bat}% bats!" to attacker
else:
send "You are out of space in your inventory!" to attacker
The problem is with "bat spawn egg". It won't let me use a variable or even "victim" in place of "bat".
I'm sure I'm just having trouble with the syntax, its been a few years and skript has changed so much since then... I've been googling for a couple days but haven't found anything useful.
Thanks!