Minecraft GUİ Market Skripti Ultra Shop

kadir2015

Kızıltaş Madencisi
En iyi cevaplar
7
Adsız.png

Minecraft GUİ Market Skripti Ultra Shop

Bu gün sizlere minecraft sanal market skripti tanıtımı yapacağım.

us1.PNG


Özellikler
Skript çok fazla kapasite istemez ve ram tasarrufu sağlar.
Basit kullanımı ile kullanıcılar tarafından beğenilmesi.
GUİ özelliğinin güzel bir şekilde olması.

Gerekli Addon'lar

TuSKe
Şart
skQuery Şart
skUtilities Şart
skript-yaml Şart

Nasıl yüklenir:
  1. Kodu kopyalayın​
  2. Serverinizin dosyalarına girin​
  3. "Plugins" bulun​
  4. "Skript" aratın​
  5. Çıkan sonucta "skript" klasorune tıklayın​
  6. Açılan klasorde "scripts" tıklayın​
  7. ve yeni bir metin belgesi oluşturun ismini yazın sonunda .sk olması lazım örneğin "benimskriptim.sk"​
  8. Kaydedin ve çıkın​
  9. Kopyaladıgınız kodları içine yapıştırın ve bu komutu kullanın​
  10. "/sk reload (oluşturdugunuz metin belgesininin ismi (.sk olmadan)".​
Komutlar:
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 yapmak için:
  1. "us dil indir tr_TR" komutunu girin.​
  2. "us dil değiştir tr_TR" komutunu girin​
  3. ve skript tamamen türkçe olacaktır!​

JavaScript:
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}

Konunun sonuna gelmişken herkese iyi forumlar diler, diğer konularda görüşmek üzere

Bir Cahil Dostum Olacağına, Bin Alim Düşmanım Olsun…
 

Jhones

Taş Madencisi
En iyi cevaplar
0
Kullanıcıları uğraştırmamak için direkt Türkçe yapıp atsaydın yinede güzel konu tebrikler
 
Üst