Advertisement
Guest User

Untitled

a guest
May 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. aliases:
  2. randomtp = 1, 2, 3, 4, 12, 13, 49, 7, 8, 5, 18, 172, 24, 9, 17, 31:1, 44:1
  3.  
  4. function teleportToRandomLocation(p: player, sendmsg: boolean):
  5. set {_locX} to a random integer between -2500 and 2500
  6. set {_locZ} to a random integer between -2500 and 2500
  7. set {_loc} to location at {_locX}, 0, {_locZ} of the world "world"
  8. if biome at {_loc} is ocean or river or deep ocean:
  9. set {_x} to biome at {_loc}
  10. if {_x} is ocean or deep ocean:
  11. set {_x} to "oceanie"
  12. if {_x} is river:
  13. set {_x} to "rzece"
  14. send " &8» &cTrafiona lokalizacja znajduje sie na &7%{_x}%&c!" to {_p}
  15. stop
  16. else:
  17. loop blocks above the block at location of {_loc}:
  18. if block at location of loop-block is randomtp:
  19. if block above the block at location of loop-block is air or water:
  20. if block 1 above the block at location of loop-block is air:
  21. if block 2 above the block at location of loop-block is air:
  22. set {_pos} to block above the block at location of loop-block
  23. set {_ploc} to location of {_p}
  24. teleport {_p} to {_pos}
  25. if location of {_p} is {_ploc}:
  26. send " &8» &cWystapil blad podczas teleportacji. Sprobuj ponownie." to {_p}
  27. stop
  28. if {_sendmsg} is true:
  29. send " &8» &aPrzeteleportowano w losowe miejsce na mapie!" to {_p}
  30. send " &8» &7Koordynaty: &fx: %{_locX}%, z: % {_locZ}%" to {_p}
  31. set {randomtp::%{_p}%} to true
  32. wait 3 seconds
  33. set {randomtp::%{_p}%} to false
  34.  
  35. on damage:
  36. if {randomtp::%victim%} is true:
  37. cancel event
  38.  
  39. on rightclick on wood button:
  40. if block behind event-block is sponge:
  41. if "%region at player%" contain "G_RTP":
  42. loop all players in radius 50 around event-block:
  43. if "%region at loop-player%" contain "G_RTP":
  44. add loop-player to {_G_RTP::*}
  45. teleportToRandomLocation({_G_RTP::*}, false)
  46. send " &8» &aTeleportacja za pomoca grupowego teleportu..." to {_G_RTP::*}
  47. else:
  48. teleportToRandomLocation(event-player, true)
  49.  
  50. command /randomtp [<text>]:
  51. executable by: players
  52. aliases: rtp
  53. trigger:
  54. if player has permission "rtp.use":
  55. teleportToRandomLocation(player, true)
  56. else:
  57. send " &8» &cNie posiadasz uprawnien do uzywania tej komendy!" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement