Skript Paylaşımı Market - Yeni nesil Sanal Market! + Gui

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

giresun283428

Örümcek Hoşt!
Katılım
13 Nisan 2017
Mesajlar
334
Elmaslar
286
Puan
14.375
Konum
Türkiye
Minecraft
giresun28

Discord:

Mert#4420

Merhaba arkadaşlar,

Yine mükemmel bir Skript ile karşınızdayım :)

Bu Skriptimiz ne işe yarar diye soracak olursanız eğer hemen anlatayım:

Öncelikle şunu söylüyeyim Skript tamamen Gui desteklidir. Market'e eklemek istediğiniz eşyayı elinize alırsınız ve fiyatını da girdikten sonra eşyayı Market'e eklersiniz. En az 0 en fazla 9 uzunluğunda olmak üzere bir fiyat girebilirsiniz. Market'e eklenen eşyayı diğer oyuncular görebilir ve onu satın alabilirler. Eşyayı satın alan oyuncudan eşya fiyatı hesabından alınır ve eşyanın sahibi kim ise ona da eşya fiyatı kadar para hesabına eklenir. Kendi eşyanızı satın alamazsınız. Ve her eşya eklemenizde yada eşya almanızda Toplam Ekleme-Harcama Sayısı'na 1 eklenir. Bu arada Gui'de birden çok sayfa var.
Market'e aşırı yükleme yapmamaları için şöyle bir sistem getirdim;

Oyuncular her 5 dakikada bir Market'e eşya ekleyebilirler. Ama op olan oyuncular bekleme süresine gerek kalmadan istedikleri kadar eşya ekleyebilirler.

/marketadmin<temizle> komutunu girerekte Market'teki tüm eşyaları silebilirsiniz. (Adminlere özel)

val1dr.png

1.PNG


2.png


3.png


9.png


4.PNG


5.png


6.PNG


7.PNG


8.PNG


kMaNZ9.png


Kod:
# By Coder is giresun283428 (Sikiript my life .d)

options:
    p: &8[&eMarket&8] &8»
 
variables:

    {market::yaptigieklemesayisi::%player%} = 0
    {market::yaptigiharcamasayisi::%player%} = 0
 
function market(p: player, sayfa: String):
    if {_sayfa} is "menu":
        wait 0.1 ticks
        play raw sound "note.pling" at {_p} with pitch 1 volume 10
        open virtual chest with size 1 named "&eMarket / Menü" to {_p}
        make gui slot 0 of {_p} with {_p}'s skull named "&aBilgilerin" to run function market({_p}, "bilgiler")
        make gui slot 1 of {_p} with 160:11 named "&e" to nothing
        make gui slot 2 of {_p} with 380 named "&aEşyalar" to run using left:
            make player execute command "/marketesyalar"
    if {_sayfa} is "bilgiler":
        play raw sound "note.pling" at {_p} with pitch 1 volume 10
        open virtual chest inventory with size 6 named "&eMarket / Bilgilerin" to {_p}
        make a gui slot 0 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 1 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 2 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 3 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 4 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 5 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 6 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 7 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 8 of {_p} with 160:14 named "&e" to nothing
        make a gui slot 9 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 10 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 11 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 12 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 13 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 14 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 15 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 16 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 17 of {_p} with 160:11 named "&e" to nothing
        make a gui slot 18 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 26 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 27 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 29 of {_p} with 160 named "&e" to nothing
        make a gui slot 31 of {_p} with {_p}'s skull named "&a%{_p}%" with lore "&9&m------------------------||||&eToplam Yaptığın Ekleme Sayısı: &a%{market::yaptigieklemesayisi::%{_p}%}%||&eToplam Yaptığın Harcama Sayısı: &a%{market::yaptigiharcamasayisi::%{_p}%}%" to nothing
        make a gui slot 32 of {_p} with 160 named "&e" to nothing
        make a gui slot 33 of {_p} with 160 named "&e" to nothing
        make a gui slot 35 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 36 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 44 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 46 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 47 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 48 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 49 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 50 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 51 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 52 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 53 of {_p} with 160:5 named "&e" to nothing
        make a gui slot 30 of {_p} with 160 named "&e" to nothing
        make a gui slot 19 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 20 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 21 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 22 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 23 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 24 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 25 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 28 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 34 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 37 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 38 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 39 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 40 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 41 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 42 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 43 of {_p} with 160:4 named "&e" to nothing
        make a gui slot 45 of {_p} with 262 named "&c&l<- Önceki Sayfa" to run function market({_p}, "menu")

command /market [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "&8&m------&8] &9Market &8[&8&m------" to player
            send "{@p} &a/market menu" to player
            send "{@p} &a/market ekle" to player
            send "" to player
        if arg 1 is "menu":
            market(player, "menu")
        if arg 1 is "ekle":
            if player's tool is not air:
                if arg 2 is set:
                    set {_arg2} to arg 2 parsed as integer
                    set {_arg2uzunluk} to length of arg 2
                    if {_arg2} is bigger than 0:
                        if {_arg2uzunluk} is smaller than 10:
                            if player is op:
                                set {_esya} to player's tool
                                add {_esya} with lore "&8------------------------||&aTıkla ve Satın Al||||&9Fiyat: &e$%arg 2%||&9Satan Kişi: &e%player%||&8------------------------" to {market::*}
                                remove {_esya} from player's inventory
                                add 1 to {market::yaptigieklemesayisi::%player%}
                                send "&aEşya Markete eklendi!" to player
                                stop
                            else:
                                set {_zaman} to difference between {market::beklemesuresi::%player%} and now
                                if {market::beklemesuresi::%player%} is not set:
                                    set {market::beklemesuresi::%player%} to now
                                    set {_esya} to player's tool
                                    add {_esya} with lore "&8------------------------||&aTıkla ve Satın Al||||&9Fiyat: &e$%arg 2%||&9Satan Kişi: &e%player%||&8------------------------" to {market::*}
                                    remove {_esya} from player's inventory
                                    add 1 to {market::yaptigieklemesayisi::%player%}
                                    send "&aEşya Markete eklendi!" to player
                                    stop
                                else:
                                    if {market::beklemesuresi::%player%} was less than 5 minutes ago:
                                        send "{@p} &cMarket'e 5 dakikada bir eşya ekleyebilirsin!" to player
                                        send "{@p} &eKalan süre: &a%difference between {_zaman} and 5 minutes%" to player
                                    else:
                                        set {market::beklemesuresi::%player%} to now
                                        set {_esya} to player's tool
                                        add {_esya} with lore "&8------------------------||&aTıkla ve Satın Al||||&9Fiyat: &e$%arg 2%||&9Satan Kişi: &e%player%||&8------------------------" to {market::*}
                                        remove {_esya} from player's inventory
                                        add 1 to {market::yaptigieklemesayisi::%player%}
                                        send "&aEşya Markete eklendi!" to player
                                        stop
                        else:
                            send "{@p} &cGirdiğin fiyatın uzunluğu 9'dan küçük olmalı!" to player
                    else:
                        send "{@p} &cGirdiğin fiyat 0'dan büyük olmalı!" to player
                else:
                    send "{@p} &cBir fiyat girmelisin!" to player
            else:
                send "{@p} &cEline bir eşya almalısın!" to player
             
command /marketadmin [<text>]:
    aliases: ma
    permission: market.sk
    trigger:
        if arg 1 is not set:
            send "&8&m------] &9Market Admin &8&m[------" to player
            send "{@p} &a/marketadmin temizle" to player
        if arg 1 is "temizle":
            clear {market::*}
            send "{@p} &aMarket temizlendi!" to player
         
command /marketesyalar [<integer=1>]:
    trigger:
        wait 0.1 ticks
        play raw sound "note.pling" at player with pitch 1 volume 10
        set {_sayfa::maksimum} to arg 1 * ((6 - 1) * 9)
        set {_sayfa::minimum} to (arg 1 - 1) * ((6 - 1) * 9)
        set {_sayfa::esyalar} to 0
        set {_sayfa::miktar} to 0
        set {_sayfa::sayi} to arg 1
        set {_sayfalar} to size of {market::*} / ((6 - 1) * 9)
        set {_sayfalar} to "%{_sayfalar}%"
        set {_sayfalar::*} to {_sayfalar} split at "."
        set {_sayfa::toplam} to {_sayfalar::1}
        if {_sayfalar::2} is set:
            set {_sayfa::toplam} to {_sayfa::toplam} parsed as an integer
            add 1 to {_sayfa::toplam}
        if inventory name of player's current inventory does not contain "&0Tüm Eşyaların Listesi":
            open virtual chest with size 6 named "&0Tüm Eşyaların Listesi %{_sayfa::sayi}%/%{_sayfa::toplam}%" to player
        else:
            loop (6 * 9) times:
                set slot (loop-number - 1) of player's current inventory to air
            set inventory name of player's current inventory to "&0Tüm Eşyaların Listesi %{_sayfa::sayi}%/%{_sayfa::toplam}%"
        if {_sayfa::sayi} is greater than 1:
            set slot (6 * 9 - 9) of player's current inventory to 262 named "&eÖnceki Sayfa"
            set slot (6 * 9 - 8) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 7) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 6) of player's current inventory to 385 named "&eSayfayı Yenile" with lore "||&7Sayfayı Yenilemek||&7için tıkla!"
            set slot (6 * 9 - 5) of player's current inventory to 160:11 named "&e"
            set slot (6 * 9 - 4) of player's current inventory to 340 named "&eTüm Eşyaların Sayısı" with lore "||&7Eşyalar &8» &c%size of {market::*}%||"
            set slot (6 * 9 - 3) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 2) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 1) of player's current inventory to red stained glass pane named "&7"
        else:
            set slot (6 * 9 - 9) of player's current inventory to red stained glass pane named "&7"
            set slot (6 * 9 - 8) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 7) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 6) of player's current inventory to 385 named "&eSayfayı Yenile" with lore "||&7Sayfayı Yenilemek||&7için tıkla!"
            set slot (6 * 9 - 5) of player's current inventory to 160:11 named "&e"
            set slot (6 * 9 - 4) of player's current inventory to 340 named "&eTüm Eşyaların Sayısı" with lore "||&7Eşyalar &8» &c%size of {market::*}%||"
            set slot (6 * 9 - 3) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 2) of player's current inventory to black stained glass pane named "&7"
            set slot (6 * 9 - 1) of player's current inventory to red stained glass pane named "&7"
        loop {market::*}:
            set {_esya} to loop-value
            if {_sayfa::esyalar} is less than {_sayfa::maksimum}:
                if {_sayfa::miktar} is greater than or equal to {_sayfa::minimum}:
                    make gui slot {_sayfa::esyalar} of player with loop-value to run using left:
                        set {_esyasahibi} to line 5 of lore of {_esya}
                        replace all "&9Satan Kişi: &e" with "" in {_esyasahibi}
                        set {_esyafiyati} to line 4 of lore of {_esya}
                        replace all "&9Fiyat: &e$" with "" in {_esyafiyati}
                        set {_esyafiyati} to {_esyafiyati} parsed as integer
                        if {_esyasahibi} = player:
                            send "{@p} &cBu eşyanın sahibi zaten sensin!" to player
                        else:
                            if balance of player is bigger than or equal to {_esyafiyati}:
                                remove {_esya} from {market::*}
                                set {_esya}'s lore to ""
                                delete line 8 of the lore of {_esya}
                                set {_esya}'s lore to ""
                                delete line 0 of the lore of {_esya}
                                give {_esya} to player
                                send "{@p} &eEşyayı satın aldın!" to player
                                execute console command "eco give %{_esyasahibi}% %{_esyafiyati}%"
                                execute console command "eco take %player% %{_esyafiyati}%"
                                add 1 to {market::yaptigiharcamasayisi::%player%}
                                make player execute command "/marketesyalar"
                            else:
                                send "{@p} &cHesabında yeterli bakiye yok!" to player
                                send "{@p} &9Gereken ücret: &e$%{_esyafiyati}%" to player
                    add 1 to {_sayfa::esyalar}
            add 1 to {_sayfa::miktar}
        if {_sayfa::sayi} is less than {_sayfa::toplam}:
            set slot (6 * 9 - 1) of player's current inventory to 262 named "&eSonraki Sayfa"
        if {_sayfa::miktar} is 0:
            open virtual chest with size 1 named "&0Mevcut Eşyalar: &a%{_sayfa::miktar}%" to player
            set slot 0 of player's current inventory to black stained glass pane named "&7"
            set slot 1 of player's current inventory to black stained glass pane named "&7"
            set slot 2 of player's current inventory to black stained glass pane named "&7"
            set slot 3 of player's current inventory to black stained glass pane named "&7"
            set slot 4 of player's current inventory to 340 named "&eHenüz eşya koyulmamış!"
            set slot 5 of player's current inventory to black stained glass pane named "&7"
            set slot 6 of player's current inventory to black stained glass pane named "&7"
            set slot 7 of player's current inventory to black stained glass pane named "&7"
            set slot 8 of player's current inventory to black stained glass pane named "&7"
         
on inventory click:
    if inventory name of player's current inventory contains "&0Mevcut Eşyalar: ":
        cancel event
    if inventory name of player's current inventory contains "&0Tüm Eşyaların Listesi":
        cancel event
        set {_sayfa} to "%inventory name of player's current inventory%"
        replace all "&0Tüm Eşyaların Listesi " in {_sayfa} with ""
        set {_sayfalar::*} to {_sayfa} split at "/"
        if clicked slot is ((6 - 1) * 9):
            if clicked item's name is "&eÖnceki Sayfa":
                if {_sayfalar::1} parsed as an integer is greater than 1:
                    execute player command "/marketesyalar %{_sayfalar::1} parsed as an integer - 1%"
                else:
                    send "Zaten ilk sayfadasın."
        else if clicked slot is (6 * 9 - 1):
            if clicked item's name is "&eSonraki Sayfa":
                execute player command "/marketesyalar %{_sayfalar::1} parsed as an integer + 1%"
        if clicked slot is (6 * 9 - 6):
            if clicked item's name is "&eSayfayı Yenile":
                execute player command "/marketesyalar"
             
on join:
    if {market::bilgilerduzenlenmismi::%player%} is not set:
        set {market::yaptigieklemesayisi::%player%} to 0
        set {market::yaptigiharcamasayisi::%player%} to 0
        set {market::bilgilerduzenlenmismi::%player%} to true
     
on first join:
    if {market::bilgilerduzenlenmismi::%player%} is not set:
        set {market::yaptigieklemesayisi::%player%} to 0
        set {market::yaptigiharcamasayisi::%player%} to 0
        set {market::bilgilerduzenlenmismi::%player%} to true

Takipte kalın Skript paylaşmaya devam edeceğim :))

= Güncelleme =

Bazı hatalar ve buglar giderildi!
Renk kodları güncellendi!
 
Son düzenleme:

Merhaba, bu kaynak kodlarını yeni açacağım Faction sunucum için kullanacağım. Bu kodlar 32 GB'lık sunucuda lag yapar mı?
 
gerçekten skriptlerinizi çok beğeniyorum bunu görüncede dilim tutuldu çok güzel peki 8gb lag yaparmı?
 
Sanal market eklentisi var iken gereksiz olmuş. Ama başarısız olmamış.
 
Fikir mantıklı fakat kodlaması gerçekten kötü. Her slot için tek tek item eklemişsiniz ki buna hiç gerek yok.

Performansına bakmadım fakat kodlarını incelemek istersen diye kendi scriptimi bırakıyorum buraya şuan senin kod yarı yarıya kısalabilir.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
 
Güzel bir skript olmuş. Eline sağlık. Daha iyilerini yapabileceğine inanıyorum.
 
Fikir mantıklı fakat kodlaması gerçekten kötü. Her slot için tek tek item eklemişsiniz ki buna hiç gerek yok.

Performansına bakmadım fakat kodlarını incelemek istersen diye kendi scriptimi bırakıyorum buraya şuan senin kod yarı yarıya kısalabilir.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
Dostum farkındaysan bu AH plugini tarzı ben öyle sadece adminler eşya ekliyebilsin diye bir Skript yapsaydım şuan piyasanın içinden geçmiştim. Kodlaması kolay olmadı çünkü her oyuncu için bir Skript kodladım biraz mantıklı düşün.
 
Başarılı bir market olmuş tebrikler. :)
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst