Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- aliases:
- randomtp = 1, 2, 3, 4, 12, 13, 49, 7, 8, 5, 18, 172, 24, 9, 17, 31:1, 44:1
- function teleportToRandomLocation(p: player, sendmsg: boolean):
- set {_locX} to a random integer between -2500 and 2500
- set {_locZ} to a random integer between -2500 and 2500
- set {_loc} to location at {_locX}, 0, {_locZ} of the world "world"
- if biome at {_loc} is ocean or river or deep ocean:
- set {_x} to biome at {_loc}
- if {_x} is ocean or deep ocean:
- set {_x} to "oceanie"
- if {_x} is river:
- set {_x} to "rzece"
- send " &8» &cTrafiona lokalizacja znajduje sie na &7%{_x}%&c!" to {_p}
- stop
- else:
- loop blocks above the block at location of {_loc}:
- if block at location of loop-block is randomtp:
- if block above the block at location of loop-block is air or water:
- if block 1 above the block at location of loop-block is air:
- if block 2 above the block at location of loop-block is air:
- set {_pos} to block above the block at location of loop-block
- set {_ploc} to location of {_p}
- teleport {_p} to {_pos}
- if location of {_p} is {_ploc}:
- send " &8» &cWystapil blad podczas teleportacji. Sprobuj ponownie." to {_p}
- stop
- if {_sendmsg} is true:
- send " &8» &aPrzeteleportowano w losowe miejsce na mapie!" to {_p}
- send " &8» &7Koordynaty: &fx: %{_locX}%, z: % {_locZ}%" to {_p}
- set {randomtp::%{_p}%} to true
- wait 3 seconds
- set {randomtp::%{_p}%} to false
- on damage:
- if {randomtp::%victim%} is true:
- cancel event
- on rightclick on wood button:
- if block behind event-block is sponge:
- if "%region at player%" contain "G_RTP":
- loop all players in radius 50 around event-block:
- if "%region at loop-player%" contain "G_RTP":
- add loop-player to {_G_RTP::*}
- teleportToRandomLocation({_G_RTP::*}, false)
- send " &8» &aTeleportacja za pomoca grupowego teleportu..." to {_G_RTP::*}
- else:
- teleportToRandomLocation(event-player, true)
- command /randomtp [<text>]:
- executable by: players
- aliases: rtp
- trigger:
- if player has permission "rtp.use":
- teleportToRandomLocation(player, true)
- else:
- send " &8» &cNie posiadasz uprawnien do uzywania tej komendy!" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement