DerpBoy
Kömür Madencisi
- Mesajlar
- 130
- En iyi cevaplar
- 0
- Beğeniler
- 34
- Puanları
- 215
- Ruh hali
Lag yapmayan, tamamen menü üzerinden, hafif ve çok özellikli bir market mi arıyorsunuz?
- İnanılmaz derecede hafif.
- Kullanımı çok kolay.
- Kategori sistemi.
- Üç bine yakın eşya ekleme imkanı.
- Kontrol sizde! YAML üzerinden her şeyi düzenleyin.
- Aktif, bilgili ve samimi geliştirici.
- Açık, hata ve saçma sapan kod içermez.
- Yeni: Çoklu dil desteği!
Skript2.2dev37- - Kodlarken bu sürümü ve Paperspigot1.8.8 kullandım.
TuSKe - GUI için gerekli.
skQuery - Eski sürüm Skript kullanıyorsanız eşya açıklamaları için gerekli.
skUtilities - YAML dosyalarını indirmek için gerekli.
skript-yaml - YAML dosyalarını kullanmak için gerekli.
Ana Komut: ultrashop, shop, us
Menü komutu: /us
Yardım komutu: /us yardım
Yenileme komutu: /us yenile (us.reload)
Dil komutu: /us dil <değiştir/indir/mevcut> <dil> (us.setlang)
Türkçe dil desteği var, skripti yüklediğiniz zaman;
1) "us dil indir tr_TR" komutunu girin.
2) "us dil değiştir tr_TR" komutunu girin.
ve skript tamamen türkçe olacaktır!
Dosyalar:
Eşyalar - Türkçe YAML - İngilizce YAML
Kod:
Kod:
variables:
{us::language} = "en_US"
on load:
execute console command "/ultrashop reload"
function placeholder(text: text, amount: text, name: text, price: text) :: texts:
replace "$a" with {_amount} in {_text}
replace "$m" with {_name} in {_text}
replace "$p" with {_price} in {_text}
return {_text}
function checkFiles(file: text, url: text):
if file {_file} doesn't exist:
create file {_file}
set file contents of {_file} to contents from url {_url}
command /ultrashop [<text>] [<text=current>] [<text>]:
aliases: us, shop
trigger:
if arg-1 is not set:
usCategories(player, "US-I", "shop.categories", yaml value "shop.size" from "US-I", yaml value "shop.name" from "US-I")
else if arg-1 is "help" or "yardım":
send "%join colored yaml list ""help.message"" from ""US-M"" with nl% " to executor
else if arg-1 is "reload" or "yenile":
if executor has permission "us.reload":
checkFiles("plugins/UltraShop/items.yml", "https://raw.githubusercontent.com/pixache/ultrashop/master/items.yml")
checkFiles("plugins/UltraShop/localization/%{us::language}%.yml", "https://raw.githubusercontent.com/pixache/ultrashop/master/localization/%{us::language}%.yml")
load yaml "plugins/UltraShop/items.yml" as "US-I"
load yaml "plugins/UltraShop/localization/%{us::language}%.yml" as "US-M"
save yaml "US-I"
save yaml "US-M"
send (yaml value "us.skript.reloaded" from "US-M") to executor
else:
send (yaml value "no-perm" from "US-M") to executor
else if arg-1 is "lang" or "dil":
if executor has permission "us.setlang":
if arg-2 is "current" or "mevcut":
set {_x} to yaml value "us.lang.current" from "US-M"
replace all "{lang}" with {us::language} in {_x}
send {_x}
else if arg-2 is "set" or "değiştir":
if arg-3 is set:
if file "plugins/UltraShop/localization/%arg-3%.yml" exists:
set {us::language} to arg-3
execute player command "us reload"
send (yaml value "us.lang.changed" from "US-M")
else:
send (yaml value "us.lang.doesnt-exist" from "US-M")
else:
send (yaml value "us.lang.defining.to-set" from "US-M")
else if arg-2 is "down" or "indir":
if arg-3 isn't set:
send (yaml value "us.lang.defining.to-down" from "US-M")
else:
if file "plugins/UltraShop/localization/%arg-3%.yml" exists:
send (yaml value "us.lang.downloading.exists" from "US-M")
else:
if contents from url "https://raw.githubusercontent.com/pixache/ultrashop/master/localization/%arg-3%.yml" doesn't exist:
send (yaml value "us.lang.doesnt-exist" from "US-M")
else:
set file contents of "plugins/UltraShop/localization/%arg-3%.yml" to contents from url "https://raw.githubusercontent.com/pixache/ultrashop/master/localization/%arg-3%.yml"
send (yaml value "us.lang.downloading.downloaded" from "US-M")
else:
send (yaml value "no-perm" from "US-M")
function usCategories(p: player, yaml: text, node: text, size: text, name: text):
open virtual chest with size {_size} named {_name} to {_p}
loop yaml node keys {_node} from {_yaml}:
set {_GUI::value} to loop-value
set {_GUI::kategori::name} to yaml value "%{_node}%.%{_GUI::value}%.name" from {_yaml}
set {_GUI::kategori::size} to yaml value "%{_node}%.%{_GUI::value}%.size" from {_yaml}
set {_GUI::kategori::item} to yaml value "%{_node}%.%{_GUI::value}%.item" from {_yaml} parsed as item
set {_GUI::kategori::slot} to yaml value "%{_node}%.%{_GUI::value}%.slot" from {_yaml}
make gui slot {_GUI::kategori::slot} of {_p} with {_GUI::kategori::item} named {_GUI::kategori::name} to run function usShop({_p}, "US-I", "%{_node}%.%{_GUI::value}%.items", {_GUI::kategori::size}, "%{_GUI::kategori::name}%")
function usShop(p: player, yaml: text, node: text, size: object, name: object):
open virtual chest with size {_size} named {_name} to {_p}
loop yaml node keys {_node} from {_yaml}:
set {_GUI::shop::name} to yaml value "%{_node}%.%loop-value%.name" from {_yaml}
set {_GUI::shop::item} to yaml value "%{_node}%.%loop-value%.item" from {_yaml} parsed as item
set {_GUI::shop::amount} to yaml value "%{_node}%.%loop-value%.amount" from {_yaml}
set {_GUI::shop::price} to yaml value "%{_node}%.%loop-value%.price" from {_yaml}
set {_GUI::shop::slot} to yaml value "%{_node}%.%loop-value%.slot" from {_yaml}
make gui slot {_GUI::shop::slot} of {_p} with {_GUI::shop::amount} of {_GUI::shop::item} named {_GUI::shop::name} with lore (placeholder("%colored yaml list ""advanced.lore"" from {_yaml}%", "%{_GUI::shop::amount}%", "%{_GUI::shop::item}%", "%{_GUI::shop::price}%")) to run:
if {_p}'s balance >= {_GUI::shop::price}:
give {_GUI::shop::amount} of {_GUI::shop::item} named {_GUI::shop::name} to {_p}
remove {_GUI::shop::price} from {_p}'s balance
send (placeholder(yaml value "purchased" from "US-M", "%{_GUI::shop::amount}%", "%{_GUI::shop::name}%", "%{_GUI::shop::price}%")) to {_p}
else:
send (yaml value "no-money" from "US-M") to {_p}