Skript Version: 2.2-dev22g
Skript Author: Me (Skript Version Author is bensku)
Minecraft Version: 1.11.2
---
Full Code:
Errors on Reload: none
Console Errors: none
Addons using:
Umbaska
SkRayfall
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? No
----
Hello! It's been a long time since I've been on these forums. I used to have an existing account but it must have gotten deleted. Anyway, I am trying to make a skript that lets players purchase a warp to their shops. My issue with my already mostly working skript is; when I create a new shop with my command it does not allow me to teleport to it. It does show up in the list of shops though.
I am willing to do a rewrite of the skript, as I am not fluent in skripting and I am sure that there is a better way this could have been written. Thank you for anyone who is willing to lend a hand. Also I tried to follow all guidelines on forum posting, if I missed anything, let me know.
Skript Author: Me (Skript Version Author is bensku)
Minecraft Version: 1.11.2
---
Full Code:
code_language.skript:
command /shops <string> [<string>]:
usage: &7/shops <&blist&7/&etp&7/&3create&7/&6remove&7> [&bNull&7/&eShop&7/&3ShopName&7/&6ShopName&7]
trigger:
if arg-1 is "list":
send "&9Shops:"
send "&7%{shop-name-cache::*}%"
else if arg-1 is "create":
if player's money is greater than 100:
remove 100 from the player's account
set {shop-loc-cache::%arg-2%} to the player's location
add arg-2 to {shop-name-cache::*}
add arg-2 to {shops.owned.%player%::*}
else:
send "You do not have sufficient funds to create a shop!"
else if arg-1 is "remove" or "delete":
if {shops.owned.%player%::*} contains arg-2:
add 30 to the player's balance
remove arg-2 from {shop-name-cache::*}
remove arg-2 from {shops.owned.%player%::*}
delete {shop-loc-cache::%arg-2%}
send "Shop '%arg-2%' deleted"
else:
send "You do not own that shop!"
else if arg-1 is "tp" or "teleport":
if {shop-name-cache::*} contains arg-2:
teleport player to {shop-loc-cache::%arg-2%}
send "Welcome"
#else:
#send "&4Unknown Shop"
Errors on Reload: none
Console Errors: none
Addons using:
Umbaska
SkRayfall
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? No
----
Hello! It's been a long time since I've been on these forums. I used to have an existing account but it must have gotten deleted. Anyway, I am trying to make a skript that lets players purchase a warp to their shops. My issue with my already mostly working skript is; when I create a new shop with my command it does not allow me to teleport to it. It does show up in the list of shops though.
I am willing to do a rewrite of the skript, as I am not fluent in skripting and I am sure that there is a better way this could have been written. Thank you for anyone who is willing to lend a hand. Also I tried to follow all guidelines on forum posting, if I missed anything, let me know.