Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.34 KB | None | 0 0
  1. # ######################## #
  2. # _ _ __ _ ' #
  3. # | | |/ / ( ) ___ ' #
  4. # _ | | '' / |/ / __| ' #
  5. # | |_| | .' \ \__ \ ' ' #
  6. # \__ /|_|\_\ |___/ ' ' #
  7. # '' #
  8. # ####################### #
  9.  
  10. #This skript are created by JKGamerxD, don't repost the skript and no edit credits, thanks n.n
  11. #SkRayFall is a optional, but recomended dependencie (needed for title)
  12. #If you are noob in skript, don't edit the code!
  13.  
  14.  
  15. options:
  16.  
  17. #This is the sign lines, if you have created a randomtp sign
  18.  
  19. SignLine1: &aClick on this sign #Line 1 of the sign, you can use colors, but, you don't use the ""
  20. SignLine2: &ato &cteleport &ato #Line 2 of sign, you can use colors, but, you don't use the ""
  21. SignLine3: &6Random place&3! #Line 3 of sign, you can use colors, but, you don't use the ""
  22. SignLine4: &9 :D #Line 4 of sign, you can use color, but, you don't use the ""
  23.  
  24. #The limits of blocks you have random teleported
  25.  
  26. min.x: -2500
  27. max.x: 2500
  28. min.z: -2500
  29. max.z: 2500
  30.  
  31. #Cooldowns and times, you can use ticks, seconds, minutes and hours
  32.  
  33. cooldown: 20 seconds #This is cooldown for sign use and /rtp go command. You can use ticks, seconds, minutes and hours
  34. cooldownus: 20 seconds #This is cooldown for the /rtp unstuck command. You can use ticks, seconds, minutes and hours
  35. tfadein: 4 seconds #This is the title fade in time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
  36. tstay: 5 seconds #This is the title stay time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
  37. tfadeout: 4 seconds #This is the title fade out time. You can use ticks, seconds, minutes and hours. REQUIRE SKRAYFALL
  38.  
  39.  
  40. #Worlds and Avoid blocks
  41.  
  42. avoid: air or water block or lava block
  43. worlds: "World" or "OtherWorld" #If you add other world like this: worlds: "world" or "world2"
  44.  
  45. #Messages
  46.  
  47. #You can use this variables in messages:
  48. #%{_loc::new}% show the location of player after this are teleported
  49. #%{_biome}% show the biome of player after this are teleported
  50. #%{_world}% show the world of player
  51. #I change the format %{_variable}% in future update to [variable] :D
  52. #You can use colors in all messages, but, the "" cause bugs in message don't use this
  53.  
  54.  
  55. cooldownmsg: &cWait &8the cooldown &cto teleport a random location again! #This is the cooldown message
  56. cooldownusmsg: &cWait the cooldown to use again this command! #This is cooldown unstuck message
  57. teleportmsg: &aYou are random teleported to #This message are showed if you are random teleported
  58. teleportmsg2: &6%{_loc::new}%&7, &ain biome &6%{_biome}% #The second line of teleportmsg message
  59. teleporttitle: &aYou are teleported to #This is teleport titile, showed on you are random teleported, REQUIRE SKRAYFALL
  60. teleportsubtitle: &6%{_biome}% #This is the subtitle of teleport title, REQUIRE SKRAYFALL
  61. permissionmsg: &cYou don't have permission to this! #This message are displayed if you don't have permission.
  62. 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
  63. worldpermittedare: &aThe worlds permitted are #The message envies before worldlist.
  64. worldlist: &6World&8,&6 OtherWorld #This message envied to the player wen execute command /rtp worldlist
  65.  
  66.  
  67. #Don't edit this part.
  68.  
  69. prefix: &8[&6Random&aTP&8] #The prefix of the skript
  70. version: 1.0 #The version of skript
  71.  
  72. #If you are noob in skript, don't edit this!
  73.  
  74. on sign change:
  75. if player has permission "randomtp.sign.create":
  76. if line 2 of block is "[RTP]":
  77. set line 1 of block to "{@SignLine1}"
  78. set line 2 of block to "{@SignLine2}"
  79. set line 3 of block to "{@SignLine3}"
  80. set line 4 of block to "{@SignLine4}"
  81. else:
  82. send "{@permissionmsg}"
  83. on rightclick on sign:
  84. if line 1 of block is "{@SignLine1}":
  85. if player has permission "randomtp.sign.use":
  86. if world is not {@worlds}:
  87. loop all players:
  88. set {_world} to the world of loop-player
  89. send "{@noworldmsg}"
  90. else:
  91. if difference between {cooldowns::rtp::%player%} and now < {@cooldown}:
  92. send "{@cooldownmsg}"
  93. else:
  94. set {_loc::old} to player's location
  95. while player's location is {_loc::old}:
  96. set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
  97. loop blocks above {_loc::new}:
  98. if loop-block and block above loop-block are air:
  99. if block under loop-block is not {@avoid}:
  100. set {_loc::new} to location of loop-block
  101. set {_biome} to biome at {_loc::new}
  102. teleport the player to {_loc::new}
  103. if light level at player <= 2:
  104. set block at player to ground torch
  105. set {cooldowns::rtp::%player%} to now
  106. send "{@teleportmsg}"
  107. send player title "{@teleporttitle}" with subtitle "{@teleportsubtitle}" for {@tstay} with {@tfadein} fade in and {@tfadeout} fade out
  108. send "{@teleportmsg2}"
  109. stop loop
  110. wait 10 ticks
  111. else:
  112. send "{@permissionmsg}"
  113.  
  114. command /randomtp [<text>]:
  115. aliases: /rtp
  116. permission: randomtp.cmd.use
  117. description: Main command
  118. trigger:
  119. if argument 1 is not set:
  120. if executor is console:
  121. send "{@prefix} &7Use &5'&6/&artp help&5' &7for help. "
  122. if executor is player:
  123. if player has permission "randomtp.cmd.rtp":
  124. send "{@prefix} &7Use &5'&6/&artp help&5' &7for help. "
  125. else:
  126. send "{@permissionmsg}"
  127. if argument 1 is "go":
  128. if executor is console:
  129. send "&cOnly players execute this command&8!"
  130. if executor is player:
  131. if player has permission "randomtp.cmd.go":
  132. if world is not {@worlds}:
  133. loop all players:
  134. set {_world} to the world of loop-player
  135. send "{@noworldmsg}"
  136. else:
  137. if difference between {cooldowns::rtp::%player%} and now < {@cooldown}:
  138. send "{@cooldownmsg}"
  139. else:
  140. set {_loc::old} to player's location
  141. while player's location is {_loc::old}:
  142. set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
  143. loop blocks above {_loc::new}:
  144. if loop-block and block above loop-block are air:
  145. if block under loop-block is not {@avoid}:
  146. set {_loc::new} to location of loop-block
  147. set {_biome} to biome at {_loc::new}
  148. teleport the player to {_loc::new}
  149. if light level at player <= 2:
  150. set block at player to ground torch
  151. set {cooldowns::rtp::%player%} to now
  152. send "{@teleportmsg}"
  153. send player title "{@teleporttitle}" with subtitle "{@teleportsubtitle}" for {@tstay} with {@tfadein} fade in and {@tfadeout} fade out
  154. send "{@teleportmsg2}"
  155. stop loop
  156. wait 10 ticks
  157. else:
  158. send "{@permissionmsg}"
  159.  
  160. if argument 1 is "help":
  161. if executor is console:
  162. send "&7---------------&6Random&aTP &cHelp&7---------------"
  163. send "&6/&artp go &8This command is for teleport a random location"
  164. send "&6/&artp help &8Show help"
  165. send "&6/&artp unstuck &8Unstuck a bugged player :D"
  166. send "&6/&artp sign &8This command show instruction for create sign"
  167. send "&6/&artp credits &8Show the credits"
  168. send "&6/&artp worldlist &8This is worldlist are permitted"
  169. send "&7------------------------------------------"
  170. if executor is player:
  171. if player has permission "randomtp.cmd.go" or "randomtp.cmd.unstuck" or "randomtp.sign.create" or "randomtp.cmd.worldlist":
  172. send "&7---------------&6Random&aTP &cHelp&7---------------"
  173. if player has permission "randomtp.cmd.go":
  174. send "&6/&artp go &8This command is for teleport a random location"
  175. send "&6/&artp help &8Show help"
  176. if player has permission "randomtp.cmd.unstuck":
  177. send "&6/&artp unstuck &8Unstuck a bugged player :D"
  178. if player has permission "randomtp.sign.create":
  179. send "&6/&artp sign &8This command show instruction for create sign"
  180. send "&6/&artp credits &8Show the credits"
  181. if player has permission "randomtp.cmd.worldlist":
  182. send "&6/&artp worldlist &8This is worldlist are permitted"
  183. send "&7------------------------------------------"
  184. else:
  185. send "{@permissionmsg}"
  186. if argument 1 is "sign":
  187. if executor is console:
  188. send "&7------------------------------------------"
  189. send "{@prefix} &81. &7Place a sign."
  190. send "{@prefix} &82. &7Write in second line of sign &5'&6[RTP]&5'"
  191. send "{@prefix} &83. &7In skript you can edit lines of sign."
  192. send "{@prefix} &84. &7Click in sign to use :D."
  193. send "&7------------------------------------------"
  194. if executor is player:
  195. if player has permission "randomtp.sign.create":
  196. send "&7------------------------------------------"
  197. send "{@prefix} &81. &7Place a sign."
  198. send "{@prefix} &82. &7Write in second line of sign &5'&6[RTP]&5'"
  199. send "{@prefix} &83. &7In skript you can edit lines of sign."
  200. send "{@prefix} &84. &7Click in sign to use :D."
  201. send "&7------------------------------------------"
  202. if argument 1 is "unstuck":
  203. if executor is console:
  204. send "&cOnly players execute this command&8!"
  205. if executor is player:
  206. if player has permission "randomtp.cmd.unstuck":
  207. if difference between {cooldowns::rtp::%player%} and now < {@cooldownus}:
  208. send "{@cooldownusmsg}"
  209. else:
  210. set {_loc} to location of block at player
  211. set y-coordinate of {_loc} to 256
  212. set {_n} to 0
  213. loop 255 times:
  214. set {_n} to {_n}+1
  215. block {_n} below block at {_loc} is not air
  216. set {_n} to {_n}-1
  217. teleport player to block {_n} below block at {_loc}
  218. set {cooldowns::rtp::%player%} to now
  219. send "&aYou are unstucked :D"
  220. stop
  221. else:
  222. send "{@permissionmsg}"
  223. if argument 1 is "credits":
  224. send "&7------------------------------------------"
  225. send "{@prefix} &eCreated by&6: &aJKGamerxD"
  226. send "{@prefix} &eVersion&6: {@version}"
  227. send "{@prefix} &eThanks for download!"
  228. send "&7------------------------------------------"
  229. if argument 1 is "worldlist":
  230. if executor is console:
  231. send "{@prefix} {@worldpermittedare}:"
  232. send "{@worldlist}"
  233. if executor is player:
  234. if player has permission "randomtp.cmd.worldlist":
  235. send "{@prefix} {@worldpermittedare}:"
  236. send "{@worldlist}"
  237. else:
  238. send "{@permissionmsg}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement