Hi! I've had some trouble with this skript for quite a while now, and I need help.
It says my skript is failing, and it just keep doing that.
I thought I needed some skript add-ons, but turns out that's not the case.
Here is my skript code:
options:
p: &8[ &6&lBUY&f&lCRAFT &8 ]
c: &8[ &e&LCOIN &f&lSYSTEM &8]
r: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmFjNmY3NzVlOGFjZmRmNmUxZGVhYzgwYThkYTFmMzdiM2I0YmE1Y2FhNGEzNTI0OWY5ZWIxNDVjY2Y0M2RhNSJ9fX0=
a: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTdlZjI4ZGU4ZTJhY2NkY2IyM2IwOTQyZjU2MjRmNDE0OWE1YWE0OTBlYzE5ZjdkYzQ5OTFhODUwYjY1ZjQwIn19fQ==
beauti: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzUyZDY2YWEwZjQ0MTcxNWY3MDFiMTBlMzg4YTc3YTI0NDg3NjQzN2U0MTcwZGEwZjkxYzcyMjJhYzM5ZTI5NSJ9fX0=
poisen: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2I2ODYzMDcyMGJhNDFiODI5OGUzMjJmOGEwOTNmY2I5ZDM5MjRmNDJlZTZlZTVmYTZmMzRiNTZlNDNhOTZhYyJ9fX0=
poisen+: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWNjZWMzZmMwNmExYjZiZjk2MmQyMzA3MDRiNjYyM2JiZmI0MzA0M2YwNjY3OTY2YzIwYzg5YzMwYzRhMzMwIn19fQ==
command /buy:
aliases: buycraft,
trigger:
Buycraft(p: player)
function Buycraft(p: player):
set {_uuid} to uuid of {_p}
set {_} to chest inventory with 5 rows named "&6&lBUY&f&lCRAFT"
set slot (integers from 0 to 3) of {_} to orange stained glass pane named "&7"
set slot (integers from 4 to 4) of {_} to shiny anvil named "&c&lT.O.S" with lore "&7Det du har k�bt kan ikke REFUNDERES!"
set slot (integers from 5 to 8) of {_} to orange stained glass pane named "&7"
set slot (integers from 36 to 36) of {_} to shiny tripwire hook named "&f&lDine &E&lCoins" with lore "&e%{coins::%{_u}%}%"
set slot (integers from 37 to 39) of {_} to white stained glass pane named "&7"
set slot (integers from 40 to 40) of {_} to shiny sunflower named "&e&LCoins" with lore "&fHvis du vil k�be &eCOINS &fskal du skrive &7(&7/&eK�bcoins antal&7)"
set slot (integers from 41 to 43) of {_} to white stained glass pane named "&7"
set slot (integers from 44 to 44) of {_} to shiny emerald named "&e&lDem som kan tage EMS" with lore "&cZzLeeeeoZz &7- &cSHAZITOOO"
set slot 21 of {_} to head("{@r}") named "&6&lRANKS" with lore "&7&oKlik for at se vores udvalg af ranks!"
set slot 23 of {_} to head("{@a}") named "&6&LANDET" with lore "&7&oKlik for at se vores udvalg af andet!"
open {_} for {_p}
function BuycraftRanks(p: player):
set {_uuid} to uuid of {_p}
set {_} to chest inventory with 5 rows named "&6&lBUY&f&lCRAFT &7&o- Ranks"
set slot (integers from 0 to 8) of {_} to orange stained glass pane named "&7"
set slot (integers from 37 to 45) of {_} to white stained glass pane named "&7"
set slot 20 of {_} to head("{@beauti}") named "&d&lBEAUTI" with lore "&fPris: &6&l2k"
set slot 22 of {_} to head("{@poisen}") named "&6&lPOISEN" with lore "&fPris: &6&l2.75K"
set slot 24 of {_} to head("{@poisen+}") named "&b&lPOISEN+" with lore "&fPris: &6&l3.5k"
set slot 36 of {_} to arrow named "&F<ILBAGE"
open {_} for {_p}
function BuycraftAndet(p: player):
set {_uuid} to uuid of {_p}
set {_} to chest inventory with 5 rows named "&6&lBUY&f&lCRAFT &7&o- Andet"
set slot (integers from 0 to 8) of {_} to orange stained glass pane named "&7"
set slot (integers from 37 to 45) of {_} to white stained glass pane named "&7"
set slot 20 of {_} to iron door named "&e&lVIP-CELLE" with lore "&fPris: &e&l4k"
set slot 22 of {_} to shiny tripwire hook named "&6&lKeys" with lore "&fPris: &e&l400"
set slot 24 of {_} to gold helmet with no NBT named "&c&lVAGT" with lore "&fPris: &e&l4.75k"
set slot 36 of {_} to arrow named "&F<ILBAGE"
open {_} for {_p}
on inventory click:
if name of event-inventory is "&6&lBUY&f&lCRAFT":
cancel event
index of event-slot is 21:
BuycraftRanks(player)
play sound "CLICK" with volume 1 for the player
index of event-slot is 23:
BuycraftAndet(player)
play sound "CLICK" with volume 1 for the player
if name of event-inventory is "&6&lBUY&f&LCRAFT &7&o- Ranks":
cancel event
index of event-slot is 36:
Buycraft(player)
play sound "CLICK" with volume 1 for the player
index of event-slot is 20:
close player's inventory
if player's group is "beauti" or "poisen" or "poisen+":
send "{@p} &fDu kan ikke købe dette rank"
stop
close player's inventory
if {coins::%uuid of player%} >= 2000:
remove 2000 from {coins::%uuid of player%}
send "{@p} &fDu fik &d&lBEAUTI"
console command "manuadd %player% beauti"
broadcast "{@p} &6%player% &fkøbte &d&lBEAUTI"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
index of event-slot is 22:
close player's inventory
if player's group is "poisen" or "poisen+":
send "{@p} &fDu kan ikke købe dette rank"
stop
close player's inventory
if {coins::%uuid of player%} >= 2750:
remove 2750 from {coins::%uuid of player%}
send "{@p} &fDu fik &6&lPOISEN"
console command "manuadd %player% poisen"
broadcast "{@p} &6%player% &fkøbte &6&lPOISEN"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
index of event-slot is 24:
close player's inventory
if player's group is "":
send "{@p} &fDu kan ikke købe dette rank"
stop
close player's inventory
if {coins::%uuid of player%} >= 3500:
remove 3500 from {coins::%uuid of player%}
send "{@p} &fDu fik &b&lPOISEN+"
console command "manuadd %player% poisen+"
broadcast "{@p} &6%player% &fkøbte &b&lPOISEN+"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
if name of event-inventory is "&6&lBUY&f&LCRAFT &7&O- Andet":
cancel event
index of event-slot is 36:
Buycraft(player)
play sound "CLICK" with volume 1 for the player
index of event-slot is 20:
close player's inventory
if {coins::%uuid of player%} >= 4000:
remove 4000 from {coins::%uuid of player%}
send "{@p} &fDu vil snart få din celle"
broadcast "{@p} &6%player% &fkøbte en &e&lVIP-CELLE"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
index of event-slot is 22:
close player's inventory
if {coins::%uuid of player%} >= 400:
remove 400 from {coins::%uuid of player%}
send "{@p} &fDu fik 1 &6&lKEY"
console command "key %player% 1"
broadcast "{@p} &6%player% &7Købte 1 &6Key"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
index of event-slot is 24:
close player's inventory
if {coins::%uuid of player%} >= 4750:
remove 4750 from {coins::%uuid of player%}
send "{@p} &c&lDu Købte Vagt"
set player's group to "vagt"
broadcast "{@p} &6%player% &7Købte &c&lVAGT"
play sound "LEVEL_UP" with volume 1 for the player
else:
send "{@p} &fDu har ikke nok &ecoins"
play sound "VILLAGER_NO" with volume 1 for the player
on join:
if {coins::%uuid of player%} is not set:
set {coins::%uuid of player%} to 0
import:
java.util.UUID
function head(value: string) :: item type:
return player head with nbt "{display:{Name:""&cIntet navn..""},SkullOwner:{Id:""%UUID.randomUUID()%"",Properties:{textures:[{Value:""%{_value}%""}]}}}"
command /coins [<text>] [<player>] [<int>]:
trigger:
if player doesn't have permission "*":
send "&4Du har ikke adgang til denne kommando"
stop
if arg-1 is not set:
send "{@c} &EKorrekt brug: &f/coins (giv/fjern/sæt) (spiller) (antal)"
stop
if arg-2 is not set:
send "{@c} &EKorrekt brug: &f/coins (giv/fjern/sæt) (spiller) (antal)"
stop
if arg-3 is not set:
send "{@c} &EKorrekt brug: &f/coins (giv/fjern/sæt) (spiller) (antal)"
stop
if arg-1 is set:
if arg-2 is set:
if arg-3 is set:
if arg-1 is "giv" or "give" or "add":
add arg-3 to {coins::%uuid of arg-2%}
send "{@c} &fDu fik &e%arg-3%&f&l coins" to arg-2
send "{@c} &fDu gav &e%arg-2% %arg-3%&f coins" to command sender
send "{@c} &fTak for dit køb %arg-2% på &e%arg-3% &eCoins!" to all players
if arg-1 is set:
if arg-2 is set:
if arg-3 is set:
if arg-1 is "sæt" or "set":
set {coins::%uuid of arg-2%} to arg-3
send "{@c} &fDin coin balance er nu sat til &e%arg-3%" to arg-2
send "{@c} &FDu satte &e%arg-2%'s&f coin balance til &e%arg-3%" to command sender
stop
if arg-1 is set:
if arg-2 is set:
if arg-3 is set:
if arg-1 is "fjern" or "remove" or "take":
remove arg-3 from {coins::%uuid of arg-2%}
send "{@c} &fDu fik fjernet &E%arg-2%&f coins" to arg-2
send "{@c} &fDu fjernede &e%arg-3%&f coins fra &e%arg-2%" to command sender
stop
command /købcoins [<integer>]:
trigger:
if arg-1 is not set:
send "{@c} &fSkriv hvor mange du vil k�be!"
stop
if arg-1 is set:
if arg-1 >= 1:
send "{@c} &fEn staff vil snart kontakte dig!"
send "{@p} &f&e&N%player%&f vil gerne købe &e&n%arg-1%&f coins!" to all players where [input has permission "*"] #INDSÆT PERMISSION
stop
if arg-1 < 1:
send "{@p} &eDu kan mindst k�be 1 coins!"
stop
command /coin:
trigger:
send "{@c} &fDu har &e%{coins::%uuid of player%}% coins"
function købcoins(p: player):
wait 1 tick
send "<sgt:/købcoins > &8[ &e&LCOIN &f&lSYSTEM &8] &bKlik På Denne Besked For At Købe Coins<reset>" {_p}
wait 1 tick
send "<sgt:/købcoins > &8[ &e&LCOIN &f&lSYSTEM &8] &bTryk &b&nher&b og skriv hvor mange &Ecoins &bdu vil købe<reset>" to {_p}
on leftclick on anvil:
send "&8[ &cT.O.S&8 ] &7Det du har k�bt kan ikke REFUNDERES!"
send "&8[ &cT.O.S&8 ] &7Det du har k�bt har vi ret til at fjerne"
send "&8[ &cT.O.S&8 [ &7Hvis du misbruger det!"