Created
May 18, 2020 08:19
-
-
Save AggerTV/2eb0ec5fe097202a16156160af7d2981 to your computer and use it in GitHub Desktop.
tutorial 3, mission 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tutorial 3: | |
# mission 2: When the player places glass it sets a variable ({last.glass}) to the location of the glass block, and when the player runs a command (/glass) it teleports them to that location and sends them a message. | |
on place of glass: | |
cancel event | |
if {last.glass::%uuid of player%} is not set: | |
set {last.glass::%uuid of player%} to location of event-block | |
send "&cSet the location at &d%{last.glass::%uuid of player%}%&c! Use &a/glass&c to teleport to the location!" | |
else: | |
send "&cA tp location is already set at %{last.glass::%uuid of player%}%&c. Use &a/glass&c to teleport to the location!" | |
command /glass: | |
trigger: | |
if {last.glass::%uuid of player%} is set: | |
teleport player to {last.glass::%uuid of player%} | |
send "&cTeleportet you, now deleting the tp location. To set a new location, simply use the glass tool again" | |
delete {last.glass::%uuid of player%} | |
else: | |
send "&cNo tp location could be found. To set a new location, simply use the glass tool." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment