Hello,
I was rewriting a skript for a server I help with and I cannot seem to get this to work reliably and without causing the server to have to restart itself. The skript is supposed to open a menu and calculate price of a random teleport based on a weighted center. Once the user makes a choice they will be randomly teleported to a spot within the selected region. If the spot is either a Towny town or water it will try again (ideally) and it should only try twice and if not refund the player and tell them to try again. I added a limit to prevent a previous issue with ending up with an infinite loop of instant server crash.
I have attached the file to this post and I also made a PasteBin for it here
I was rewriting a skript for a server I help with and I cannot seem to get this to work reliably and without causing the server to have to restart itself. The skript is supposed to open a menu and calculate price of a random teleport based on a weighted center. Once the user makes a choice they will be randomly teleported to a spot within the selected region. If the spot is either a Towny town or water it will try again (ideally) and it should only try twice and if not refund the player and tell them to try again. I added a limit to prevent a previous issue with ending up with an infinite loop of instant server crash.
I have attached the file to this post and I also made a PasteBin for it here