#ticket

1 messages · Page 1 of 1 (latest)

coral granite
#

So i want to make a skript that when you click the ticket item on lime wool, it tp you to lime glass but it wont work, can someone help me? Here is my skript

command /giveticket:
permission: pro.ticket
permission message: "&cYou must be a parkour pro to use this command!"
cooldown: 1 minute
cooldown message: "&cYou must wait %remaining time% before using this command again."
trigger:
give player 1 kelp named "&6Ticket"
send "&aYou have been given a Ticket!" to player
on right click:
if player's tool is kelp named "&6Ticket":
if clicked block is lime wool:
set {_loc} to location of clicked block
set {_nearestDistance} to 101
set {_nearestGlass} to null
loop blocks within 100 meters of {_loc}:
if loop-block is lime stained glass:
set {_distance} to distance between {_loc} and loop-block
if {_distance} < {_nearestDistance}:
set {_nearestDistance} to {_distance}
set {_nearestGlass} to loop-block
if {_nearestGlass} is not set:
send "&cNo lime stained glass found within 100 blocks." to player
else:
teleport player to {_nearestGlass}
send "&aTeleported to the nearest lime stained glass!" to player

low lagoon
#

do you get any errors

chilly violet
#

^, and have you debugged it?

#

do you know what/where the error is? telling us your code "wont work" isnt very specific

#

and, can you please

#

!format

wary prairieBOT
# chilly violet !format

:technologist: Code Blocks

To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:

```
Code here
```