Hi so i've been wanting to make a skript that does this:
when a player hits another player with a snowball, both of them get teleported to a arena
the players both get tped back to a set of coordinates after 60 seconds
I also only want it to work in a region where pvp is enabled (specified bellow)
here's what i've came up with:
on projectile hit:
victim is a player
projectile is a snowball
shooter of the snowball is a player
set {_shooterWorld} to world of shooter of the snowball
set {_shooterLocation} to location of shooter of the snowball
set {_victimLocation} to location of shooter of the snowball
if {_shooterWorld} is "world":
if {_shooterLocation's x} is between -418 and -418:
if {_shooterLocation's y} is between 186 and 196:
if {_shooterLocation's z} is between 643 and 643:
if {_victimLocation's x} is between -418 and -418:
if {_victimLocation's y} is between 186 and 196:
if {_victimLocation's z} is between 643 and 643:
teleport shooter of the snowball to location -34, 182, 220
teleport victim to location -34, 182, 220
wait 5 seconds
teleport shooter of the snowball to location -146, 126, 639
teleport victim to location -146, 126, 639
Skript doesnt show any errors and the World, and coordinates seem to be fine after a bit of debugging, i also tried this:
on projectile hit:
victim is a player
projectile is a snowball
shooter of the snowball is a player
set {_shooterWorld} to world of shooter of the snowball
set {_shooterLocation} to location of shooter of the snowball
if {_shooterWorld} is "world":
if {_shooterLocation's x} is between -445 and -20:
if {_shooterLocation's y} is between 217 and 119:
if {_shooterLocation's z} is between 644 and 389:
teleport shooter of the snowball to location -34, 182, 220
teleport victim to location -34, 182, 220
wait 5 seconds
teleport shooter of the snowball to location -146, 126, 639
teleport victim to location -146, 126, 639
If anyone knows why and has the time to answer i'd be so relieved thanks!
when a player hits another player with a snowball, both of them get teleported to a arena
the players both get tped back to a set of coordinates after 60 seconds
I also only want it to work in a region where pvp is enabled (specified bellow)
here's what i've came up with:
on projectile hit:
victim is a player
projectile is a snowball
shooter of the snowball is a player
set {_shooterWorld} to world of shooter of the snowball
set {_shooterLocation} to location of shooter of the snowball
set {_victimLocation} to location of shooter of the snowball
if {_shooterWorld} is "world":
if {_shooterLocation's x} is between -418 and -418:
if {_shooterLocation's y} is between 186 and 196:
if {_shooterLocation's z} is between 643 and 643:
if {_victimLocation's x} is between -418 and -418:
if {_victimLocation's y} is between 186 and 196:
if {_victimLocation's z} is between 643 and 643:
teleport shooter of the snowball to location -34, 182, 220
teleport victim to location -34, 182, 220
wait 5 seconds
teleport shooter of the snowball to location -146, 126, 639
teleport victim to location -146, 126, 639
Skript doesnt show any errors and the World, and coordinates seem to be fine after a bit of debugging, i also tried this:
on projectile hit:
victim is a player
projectile is a snowball
shooter of the snowball is a player
set {_shooterWorld} to world of shooter of the snowball
set {_shooterLocation} to location of shooter of the snowball
if {_shooterWorld} is "world":
if {_shooterLocation's x} is between -445 and -20:
if {_shooterLocation's y} is between 217 and 119:
if {_shooterLocation's z} is between 644 and 389:
teleport shooter of the snowball to location -34, 182, 220
teleport victim to location -34, 182, 220
wait 5 seconds
teleport shooter of the snowball to location -146, 126, 639
teleport victim to location -146, 126, 639
If anyone knows why and has the time to answer i'd be so relieved thanks!