itsKimo Posted October 2, 2021 Share Posted October 2, 2021 command spawn [<player>]: trigger: arg-1 is not set: {combatlog.%player%} is set: send "&cYou cannot go to spawn now!" to player else: teleport player to spawn send "&aYou have been sent to spawn." to player else: player does not have permission "spawn.other": send "&cYou cannot teleport others to spawn!" to player else: teleport arg-1 to spawn send "&aYou have been sent to spawn." to arg-1 send "&aYou have sent %arg-1% &ato spawn." to player command setspawn: permission: spawn.set permission message: &cInsufficient permissions! trigger: set spawn to player's location send "&aSpawn has been set!" to player this is super easy to use. works in ANY world, if a spawn is not set it just teleports them to the worlds' default spawn. dont hate please and ask me if you need any help there is a combat log thing if you want it. u can always just not use it, it doesn't matter much, if u dont wanna use it u dont have to delete anything as the variable wont ever be set Enjoy Link to comment Share on other sites More sharing options...
Legendary_Edwin Posted October 7, 2021 Share Posted October 7, 2021 can u add a countdown too? and if u move it get's cancelled? just question Link to comment Share on other sites More sharing options...
itsKimo Posted October 10, 2021 Author Share Posted October 10, 2021 On 10/7/2021 at 11:56 AM, Legendary_Edwin said: can u add a countdown too? and if u move it get's cancelled? just question sure! command spawn [<player>]: trigger: arg-1 is not set: {combatlog.%player%} is set: send "&cYou cannot go to spawn now!" to player else: set {spawns.%player%} to true wait 5 seconds if {move.%player%} is set: delete {move.%player%} stop else: delete {spawns.%player%} teleport player to spawn send "&aYou have been sent to spawn." to player else: player does not have permission "spawn.other": send "&cYou cannot teleport others to spawn!" to player else: teleport arg-1 to spawn send "&aYou have been sent to spawn." to arg-1 send "&aYou have sent %arg-1% &ato spawn." to player command setspawn: permission: spawn.set permission message: &cInsufficient permissions! trigger: set spawn to player's location send "&aSpawn has been set!" to player on any movement: if {spawns.%player%} is set: send "&cYou moved! Teleportation cancelled!" set {move.%player%} to true delete {spawns.%player%} Link to comment Share on other sites More sharing options...
_Tarna_ Posted October 10, 2021 Share Posted October 10, 2021 7 minutes ago, itsKimo said: sure! command spawn [<player>]: trigger: arg-1 is not set: {combatlog.%player%} is set: send "&cYou cannot go to spawn now!" to player else: set {spawns.%player%} to true wait 5 seconds if {move.%player%} is set: delete {move.%player%} stop else: delete {spawns.%player%} teleport player to spawn send "&aYou have been sent to spawn." to player else: player does not have permission "spawn.other": send "&cYou cannot teleport others to spawn!" to player else: teleport arg-1 to spawn send "&aYou have been sent to spawn." to arg-1 send "&aYou have sent %arg-1% &ato spawn." to player command setspawn: permission: spawn.set permission message: &cInsufficient permissions! trigger: set spawn to player's location send "&aSpawn has been set!" to player on any movement: if {spawns.%player%} is set: send "&cYou moved! Teleportation cancelled!" set {move.%player%} to true delete {spawns.%player%} Instead of using on any move to track movement, which requires skquery, just use a loop in the command and check if the player's location changed. set {_l} to player's location loop 5 times: wait 1 second if player's location is not {_l}: # player has moved. stop teleport here # teleport player here Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
itsKimo Posted October 10, 2021 Author Share Posted October 10, 2021 12 minutes ago, _Tarna_ said: Instead of using on any move to track movement, which requires skquery, just use a loop in the command and check if the player's location changed. set {_l} to player's location loop 5 times: wait 1 second if player's location is not {_l}: # player has moved. stop teleport here # teleport player here ty lol i never knew an equivelent to it Link to comment Share on other sites More sharing options...
Legendary_Edwin Posted October 18, 2021 Share Posted October 18, 2021 thanks! Link to comment Share on other sites More sharing options...
Legendary_Edwin Posted October 18, 2021 Share Posted October 18, 2021 It doesn't seem to work, do you know why? Link to comment Share on other sites More sharing options...
itsKimo Posted October 24, 2021 Author Share Posted October 24, 2021 On 10/18/2021 at 12:43 PM, Legendary_Edwin said: It doesn't seem to work, do you know why? not sure, should work Link to comment Share on other sites More sharing options...
Lamborghini26 Posted May 24, 2022 Share Posted May 24, 2022 do you need essentials spawn plugin for this skript to work? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now