#Skript teleports players even after they leave the region
1 messages · Page 1 of 1 (latest)
add the player to a list when they run the command to be a part of the koth event; then when your timer ends, loop the list and teleport loop-value (the player) to the location you need
kind of stupid but how :K
do you know what a Skript list is?
I do know what it is, idk how to make it
add player to {SomeList::*} will add the player to the list {SomeList::*}. if the list wasn't already created previously, it will be created for you
where in the skript do I put that?
is there a command for them to join the Koth event? or how do they join it?
Its through a world guard portal
gotcha. is the portal used with Skript or a plugin?
plugin, when player enters the portal it just minecraft:tps them
gotcha. well, you can change things slightly and turn your WorldGuard teleport into a Skript command that teleports them, and that's where you can add the player to a list.
something like this
Issue is, with worldguard i have the koth plugin automatically unflag the minecraft:tp so that players cant enter the koth arena if theres no koth running
on koth start, it flags it and allows them to enter
command kothtp:
trigger:
add player to {koth::*}
teleport player to location(0, 64, 0, world "world")```
you can run this command when they go through the portal (as the player, not console)
right, yeah done that
so other players can't run it, you can have a delay in the code that then detects the region they are in (in this case, the koth area itself), and if it's that region, then do the code to add them
Okay yeah done that, how can i add the list into the /kothtpall trigger?
and how can i remove the player from the list if they leave the region
on region leave for the last one, then just remove player from {koth::*}
if you aren't going to need the list after you teleport all the players, you can just delete {koth::*} and it will delete the list
how can i specify the region?
"%region at loop-value%" contains "kotharena"
using loop-value because you're using a list where the value is a player
for the on region leave event, the region is name of event-region or just event-region, I forget which. if all else fails, if "%event-region%" contains "text"
ngl all this just confuses me, is it possible to remake this skript? https://pastebin.com/XVcY6cbX
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.