Advertisement
FrostedWeFall

rtp

Oct 15th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2. #Minimum amount of blocks farm from X cord to tp to
  3. min.x: -2000
  4. #maximum amount of blocks farm from X cord to tp to
  5. max.x: 2000
  6. #Minimum amount of blocks farm from Z cord to tp to
  7. min.z: -2000
  8. #maximum amount of blocks farm from Z cord to tp to
  9. max.z: 2000
  10. #Amount of time before the player will be allowed to use the command again
  11. cooldown: 5 minutes
  12. #Avoid spawning in lava, water and air
  13. avoid: air or water block or lava block
  14. #To add worlds it would look like
  15. # worlds: "world" or "world_nether" or "world_the_end"
  16. worlds: "world3"
  17. #Permission
  18. permission: randomtp.use
  19. #No permission message
  20. PermMsg: &4You do not have permission to use this command!
  21. #Can not execute command in this world message
  22. NoWorldMsg: &4You can’t use this command in this world!
  23. #Cooldown message
  24. SpamMsg: &cPlease do not spam this command! You must wait 5 minutes!
  25.  
  26.  
  27. Command /randomtp:
  28. description: Teleports player to random location not in water
  29. permission: {@permission}
  30. permission message: {@PermMsg}
  31. aliases: /rtp, /wild, /random
  32. trigger:
  33. if world is not {@worlds}:
  34. message "{@NoWorldMsg}"
  35. else:
  36. if difference between {cooldowns::randomtp::%player%} and now < {@cooldown}:
  37. send "{@SpamMsg}"
  38. else:
  39. set {_loc::old} to player's location
  40. while player's location is {_loc::old}:
  41. set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
  42. loop blocks above {_loc::new}:
  43. if loop-block and block above loop-block are air:
  44. if block under loop-block is not {@avoid}:
  45. set {_loc::new} to location of loop-block
  46. teleport player to {_loc::new}
  47. if light level at player <= 2:
  48. set block at player to ground torch
  49. set {cooldowns::randomtp::%player%} to now
  50. stop loop
  51. wait 10 ticks
  52. command /testlogins:
  53. trigger:
  54. send "&b%{logins}% &8- &7Unique Logins"
  55. send "&c%{online}% &8- &7Total Logins"
  56. stop
  57. #Filler#
  58. on quit:
  59. broadcast "&7[&c-&7] &7%player%"
  60. on join:
  61. add 1 to {online}
  62. broadcast "&7[&a+&7] &7%player% "
  63. on first join:
  64. wait 50 ticks
  65. add 1 to {logins}
  66. execute console command "/spawn %player%"
  67. execute console command "/kit starter %player%"
  68. broadcast "&b%player% &7joined for the first time! &7(&b%{logins}%&7 Unique Logins)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement