Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ######################## #
- # _ _ __ _ ' #
- # | | |/ / ( ) ___ ' #
- # _ | | '' / |/ / __| ' #
- # | |_| | .' \ \__ \ ' ' #
- # \__ /|_|\_\ |___/ ' ' #
- # '' #
- # ####################### #
- #This skript are created by JKGamerxD, don't repost the skript and no edit credits, thanks n.n
- #SkRayFall is a optional, but recomended dependencie (needed for title)
- #If you are noob in skript, don't edit the code!
- options:
- #This is the sign lines, if you have created a randomtp sign
- SignLine1: &aClick on this sign #Line 1 of the sign, you can use colors, but, you don't use the ""
- SignLine2: &ato &cteleport &ato #Line 2 of sign, you can use colors, but, you don't use the ""
- SignLine3: &6Random place&3! #Line 3 of sign, you can use colors, but, you don't use the ""
- SignLine4: &9 :D #Line 4 of sign, you can use color, but, you don't use the ""
- #The limits of blocks you have random teleported
- min.x: -2500
- max.x: 2500
- min.z: -2500
- max.z: 2500
- #Cooldowns and times, you can use ticks, seconds, minutes and hours
- cooldown: 20 seconds #This is cooldown for sign use and /rtp go command. You can use ticks, seconds, minutes and hours
- cooldownus: 20 seconds #This is cooldown for the /rtp unstuck command. You can use ticks, seconds, minutes and hours
- tfadein: 4 seconds #This is the title fade in time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
- tstay: 5 seconds #This is the title stay time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
- tfadeout: 4 seconds #This is the title fade out time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
- #Worlds and Avoid blocks
- avoid: air or water block or lava block
- worlds: "World" or "OtherWorld" #If you add other world like this: worlds: "world" or "world2"
- #Messages
- #You can use this variables in messages:
- #%{_loc::new}% show the location of player after this are teleported
- #%{_biome}% show the biome of player after this are teleported
- #%{_world}% show the world of player
- #I change the format %{_variable}% in future update to [variable] :D
- #You can use colors in all messages, but, the "" cause bugs in message don't use this
- cooldownmsg: &cWait &8the cooldown &cto teleport a random location again! #This is the cooldown message
- cooldownusmsg: &cWait the cooldown to use again this command! #This is cooldown unstuck message
- teleportmsg: &aYou are random teleported to #This message are showed if you are random teleported
- teleportmsg2: &6%{_loc::new}%&7, &ain biome &6%{_biome}% #The second line of teleportmsg message
- teleporttitle: &aYou are teleported to #This is teleport titile, showed on you are random teleported, REQUIRE SKRAYFALL
- teleportsubtitle: &6%{_biome}% #This is the subtitle of teleport title, REQUIRE SKRAYFALL
- permissionmsg: &cYou don't have permission to this! #This message are displayed if you don't have permission.
- noworldmsg: &cThe world &5'&8%{_world}%&5'&c are not permitted for random teleport! #This message is of you are in world, and in this world are not permitted the random teleport
- worldpermittedare: &aThe worlds permitted are #The message envies before worldlist.
- worldlist: &6World&8,&6 OtherWorld #This message envied to the player wen execute command /rtp worldlist
- #Don't edit this part.
- prefix: &8[&6Random&aTP&8] #The prefix of the skript
- version: 1.0 #The version of skript
- #If you are noob in skript, don't edit this!
- on sign change:
- if player has permission "randomtp.sign.create":
- if line 2 of block is "[RTP]":
- set line 1 of block to "{@SignLine1}"
- set line 2 of block to "{@SignLine2}"
- set line 3 of block to "{@SignLine3}"
- set line 4 of block to "{@SignLine4}"
- else:
- send "{@permissionmsg}"
- on rightclick on sign:
- if line 1 of block is "{@SignLine1}":
- if player has permission "randomtp.sign.use":
- if world is not {@worlds}:
- loop all players:
- set {_world} to the world of loop-player
- send "{@noworldmsg}"
- else:
- if difference between {cooldowns::rtp::%player%} and now < {@cooldown}:
- send "{@cooldownmsg}"
- else:
- set {_loc::old} to player's location
- while player's location is {_loc::old}:
- set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
- loop blocks above {_loc::new}:
- if loop-block and block above loop-block are air:
- if block under loop-block is not {@avoid}:
- set {_loc::new} to location of loop-block
- set {_biome} to biome at {_loc::new}
- teleport the player to {_loc::new}
- if light level at player <= 2:
- set block at player to ground torch
- set {cooldowns::rtp::%player%} to now
- send "{@teleportmsg}"
- send player title "{@teleporttitle}" with subtitle "{@teleportsubtitle}" for {@tstay} with {@tfadein} fade in and {@tfadeout} fade out
- send "{@teleportmsg2}"
- stop loop
- wait 10 ticks
- else:
- send "{@permissionmsg}"
- command /randomtp [<text>]:
- aliases: /rtp
- permission: randomtp.cmd.use
- description: Main command
- trigger:
- if argument 1 is not set:
- if executor is console:
- send "{@prefix} &7Use &5'&6/&artp help&5' &7for help. "
- if executor is player:
- if player has permission "randomtp.cmd.rtp":
- send "{@prefix} &7Use &5'&6/&artp help&5' &7for help. "
- else:
- send "{@permissionmsg}"
- if argument 1 is "go":
- if executor is console:
- send "&cOnly players execute this command&8!"
- if executor is player:
- if player has permission "randomtp.cmd.go":
- if world is not {@worlds}:
- loop all players:
- set {_world} to the world of loop-player
- send "{@noworldmsg}"
- else:
- if difference between {cooldowns::rtp::%player%} and now < {@cooldown}:
- send "{@cooldownmsg}"
- else:
- set {_loc::old} to player's location
- while player's location is {_loc::old}:
- set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
- loop blocks above {_loc::new}:
- if loop-block and block above loop-block are air:
- if block under loop-block is not {@avoid}:
- set {_loc::new} to location of loop-block
- set {_biome} to biome at {_loc::new}
- teleport the player to {_loc::new}
- if light level at player <= 2:
- set block at player to ground torch
- set {cooldowns::rtp::%player%} to now
- send "{@teleportmsg}"
- send player title "{@teleporttitle}" with subtitle "{@teleportsubtitle}" for {@tstay} with {@tfadein} fade in and {@tfadeout} fade out
- send "{@teleportmsg2}"
- stop loop
- wait 10 ticks
- else:
- send "{@permissionmsg}"
- if argument 1 is "help":
- if executor is console:
- send "&7---------------&6Random&aTP &cHelp&7---------------"
- send "&6/&artp go &8This command is for teleport a random location"
- send "&6/&artp help &8Show help"
- send "&6/&artp unstuck &8Unstuck a bugged player :D"
- send "&6/&artp sign &8This command show instruction for create sign"
- send "&6/&artp credits &8Show the credits"
- send "&6/&artp worldlist &8This is worldlist are permitted"
- send "&7------------------------------------------"
- if executor is player:
- if player has permission "randomtp.cmd.go" or "randomtp.cmd.unstuck" or "randomtp.sign.create" or "randomtp.cmd.worldlist":
- send "&7---------------&6Random&aTP &cHelp&7---------------"
- if player has permission "randomtp.cmd.go":
- send "&6/&artp go &8This command is for teleport a random location"
- send "&6/&artp help &8Show help"
- if player has permission "randomtp.cmd.unstuck":
- send "&6/&artp unstuck &8Unstuck a bugged player :D"
- if player has permission "randomtp.sign.create":
- send "&6/&artp sign &8This command show instruction for create sign"
- send "&6/&artp credits &8Show the credits"
- if player has permission "randomtp.cmd.worldlist":
- send "&6/&artp worldlist &8This is worldlist are permitted"
- send "&7------------------------------------------"
- else:
- send "{@permissionmsg}"
- if argument 1 is "sign":
- if executor is console:
- send "&7------------------------------------------"
- send "{@prefix} &81. &7Place a sign."
- send "{@prefix} &82. &7Write in second line of sign &5'&6[RTP]&5'"
- send "{@prefix} &83. &7In skript you can edit lines of sign."
- send "{@prefix} &84. &7Click in sign to use :D."
- send "&7------------------------------------------"
- if executor is player:
- if player has permission "randomtp.sign.create":
- send "&7------------------------------------------"
- send "{@prefix} &81. &7Place a sign."
- send "{@prefix} &82. &7Write in second line of sign &5'&6[RTP]&5'"
- send "{@prefix} &83. &7In skript you can edit lines of sign."
- send "{@prefix} &84. &7Click in sign to use :D."
- send "&7------------------------------------------"
- if argument 1 is "unstuck":
- if executor is console:
- send "&cOnly players execute this command&8!"
- if executor is player:
- if player has permission "randomtp.cmd.unstuck":
- if difference between {cooldowns::rtp::%player%} and now < {@cooldownus}:
- send "{@cooldownusmsg}"
- else:
- set {_loc} to location of block at player
- set y-coordinate of {_loc} to 256
- set {_n} to 0
- loop 255 times:
- set {_n} to {_n}+1
- block {_n} below block at {_loc} is not air
- set {_n} to {_n}-1
- teleport player to block {_n} below block at {_loc}
- set {cooldowns::rtp::%player%} to now
- send "&aYou are unstucked :D"
- stop
- else:
- send "{@permissionmsg}"
- if argument 1 is "credits":
- send "&7------------------------------------------"
- send "{@prefix} &eCreated by&6: &aJKGamerxD"
- send "{@prefix} &eVersion&6: {@version}"
- send "{@prefix} &eThanks for download!"
- send "&7------------------------------------------"
- if argument 1 is "worldlist":
- if executor is console:
- send "{@prefix} {@worldpermittedare}:"
- send "{@worldlist}"
- if executor is player:
- if player has permission "randomtp.cmd.worldlist":
- send "{@prefix} {@worldpermittedare}:"
- send "{@worldlist}"
- else:
- send "{@permissionmsg}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement