on script load: if folder "plugins/Skript/scripts/itemgenerator" doesn't exists: create folder "plugins/Skript/scripts/itemgenerator" if file "plugins/Skript/scripts/itemgenerator/config.yml" doesn't exists: create file "plugins/Skript/scripts/itemgenerator/config.yml" set yaml value "items.wojownik" from file "itemgenerator/config.yml" to "brak itemow" add "brak itemow 21" to yaml list "items.wojownik" from file "itemgenerator/config.yml" add "cos1" to yaml list "items.wojownik" from file "itemgenerator/config.yml" add "cos2" to yaml list "items.wojownik" from file "itemgenerator/config.yml" add "cos3" to yaml list "items.wojownik" from file "itemgenerator/config.yml" command /itemgenerator [] [] [] [] []: aliases: ig permission: i.generator trigger: if arg 1 is "losuj" set {ig::*} to yaml value "items.wojownik" from file "itemgenerator/config.yml" set {_itemsg} to random element out of {ig::*} send "&c%{_itemsg}%" send "&a%{items::generator::*}%" send "&7Wylosowano z bazy danych nazwe: &c%{_itemsg}%" if arg 2 is "276": give 1 276 named "&6%{_itemsg}%" with lore "&c=-=-=-=-=-=-=-=-=-=--=-=-=||&cObrazenia: &7%arg 3%||&cDla: &7%arg 4%||&cOd poziomu: &7%arg 5%||&cDodatki:||&6*||&6*||&6*||&c=-=-=-=-=-=-=-=-=-=--=-=-=" to player