Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function commandgen(cmd: text):
- create script "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write "command /%{_cmd}%:" at line 1 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " trigger:" at line 2 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " set {_waitedcommand} to difference between {spawn.teleport.%player%.lastused} and now" at line 3 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " if {_waitedcommand} is less than 5 seconds:" at line 4 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send formatted ""&c&lᴇᴍᴘʏʀᴇᴀɴ &8» &fYou cannot use this command for a difference between &75 seconds &fand &7%{_waitedcommand}%""" at line 5 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " stop" at line 6 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " else:" at line 7 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " if {global.%{_cmd}%.spawn} is set:" at line 8 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " teleport player to {global.%{_cmd}%.spawn}" at line 9 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " set {spawn.teleport.%player%.lastused} to now" at line 10 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send """ at line 11 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send formatted ""&c&lᴇᴍᴘʏʀᴇᴀɴ &8» &fYou teleported to %{_cmd}%"" to player" at line 12 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send """ at line 13 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " else:" at line 14 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " if player has permission ""mineplex.admin"":" at line 15 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send formatted ""&c&lᴇʀʀᴏʀ &8» &fThere is no spawn. Create one using &c/manager setspawn <name>""" at line 16 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- write " send formatted ""&c&lᴇʀʀᴏʀ &8» &cThere was an error accessing your order.""" at line 17 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
- execute console command "sk reload /Spawns/"
- command /test1:
- trigger:
- if {_waitedcommand} is less than 5 seconds:
- send formatted "�c�l???????? �8� �fYou cannot use this command for a difference between �75 seconds �fand �7<none>"
- stop
- else:
- if {global.test1.spawn} is set:
- teleport player to {global.test1.spawn}
- send "
- send formatted "�c�l???????? �8� �fYou teleported to test1" to player
- send "
- else:
- if player has permission "mineplex.admin":
- send formatted "�c�l????? �8� �fThere is no spawn. Create one using �c/manager setspawn <name>"
- send formatted "�c�l????? �8� �cThere was an error accessing your order."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement