Sol Reklam
Sağ Reklam

Çözüldü Sat Skripti Hata !

Durum
Mesaj gönderimine kapalı.

HcaTR

Odunlara Vur Vur Vur!
Katılım
16 Ekim 2016
Mesajlar
36
Elmaslar
3
Puanlar
13.210
Yaş
26
Merhabalar. Aşağıdaki skriptte 8,16,32 veya 64 adetli satış yapmaya çalıştığımda Adet satış ücreti yerine hepsinin satış ücretini vermekte ve sadece envanterden sattığım adet kadar eksilmektedir. Yardımcı olursanız sevinirim


Kod:
options:
    p: &5&lSkyBlock &e»
    demirfiyat: 250
    altınfiyat: 150
    elmasfiyat: 300
    zümrütfiyat: 200
    kaktüsfiyat: 50
    demirblokfiyat: 450
    altınblokfiyat: 350
    elmasblokfiyat: 400
    zümrütblokfiyat: 300
    kızıltaşblokfiyat: 150
command /sat:
    trigger:
        open virtual chest with size 3 named "&c&nSat Menü" to player
        wait a tick
        make gui slot (numbers between 0 and 27) of player with gray stained glass pane
        make gui slot 0 of player with iron ingot named "&fDemir" to run function esyaSatmenu(player, iron ingot, {@demirfiyat}, "&fDemir")
        make gui slot 1 of player with gold ingot named "&6Altın" to run function esyaSatmenu(player, gold ingot, {@altınfiyat}, "&6Altın")
        make gui slot 2 of player with diamond named "&bElmas" to run function esyaSatmenu(player, diamond, {@elmasfiyat}, "&bElmas")
        make gui slot 3 of player with emerald named "&aZümrüt" to run function esyaSatmenu(player, emerald, {@zümrütfiyat}, "&aZümrüt")
        make gui slot 4 of player with cactus named "&2Kaktüs" to run function esyaSatmenu(player, cactus, {@kaktüsfiyat}, "&2Kaktüs")
        make gui slot 18 of player with iron block named "&fDemir Blok" to run function esyaSatmenu(player, iron block, {@demirblokfiyat}, "&fDemir Blok")
        make gui slot 19 of player with gold block named "&6Altın Blok" to run function esyaSatmenu(player, gold block, {@altınblokfiyat}, "&6Altın Blok")
        make gui slot 20 of player with diamond block named "&bElmas Blok" to run function esyaSatmenu(player, diamond block, {@elmasblokfiyat}, "&bElmas Blok")
        make gui slot 21 of player with emerald block named "&aZümrüt Blok" to run function esyaSatmenu(player, emerald block, {@zümrütblokfiyat}, "&aZümrüt Blok")
        make gui slot 22 of player with redstone block named "&4Kızıltaş Blok" to run function esyaSatmenu(player, redstone, {@kızıltaşblokfiyat}, "&4Kızıltaş Blok")
        make gui slot 26 of player with redstone named "&cKapat" to close
function esyaSat(p: player, i: item, n: number, m: number, txt: text):
    if amount of {_i} in {_p}'s inventory is greater than or equal to {_n}:
        add (amount of {_i} in {_p}'s inventory * {_m}) to {_p}'s balance
        send {_p} title "&a&lBaşarılı" with subtitle "&7Envanterindeki &r%{_n}% %{_txt}% &7satıldı!" for 2 second
        set action bar of {_p} to "&4&l» &2Başarılı &4&l«"
        remove {_n} of {_i} from {_p}'s inventory
    else:
        close {_p}'s inventory
        send {_p} title "&4&lBaşarısız" with subtitle "&7Envanterinde yeterli eşya yok!" for 2 second
        set action bar of {_p} to "&4&l» &cBaşarısız &4&l«"
function esyaSathepsi(p: player, i: item, m: number, txt: text):
    if amount of {_i} in {_p}'s inventory is greater than 0:
        add (amount of {_i} in {_p}'s inventory * {_m}) to {_p}'s balance
        send {_p} title "&a&lBaşarılı" with subtitle "&7Envanterindeki &r%amount of {_i} in {_p}'s inventory% %{_txt}% &7satıldı!" for 2 second
        set action bar of {_p} to "&4&l» &2Başarılı &4&l«"
        remove all {_i} from {_p}'s inventory
        close {_p}'s inventory
    else:
        close {_p}'s inventory
        send {_p} title "&4&lBaşarısız" with subtitle "&7Envanterinde yeterli eşya yok!" for 2 second
        set action bar of {_p} to "&4&l» &cBaşarısız &4&l«"
function esyaSatmenu(p: player, i: item, m: number, txt: text):
    open virtual chest with size 3 named "&c&nSat Menü" to {_p}
    wait a tick
    make gui slot (numbers between 0 and 27) of {_p} with gray stained glass pane
    make gui slot 4 of {_p} with skull of ("MHF_Question" parsed as an offline player) named "%{_txt}%" with lore "&7Envanterinde &c%amount of {_i} in {_p}'s inventory% &7tane bulunmakta.||&7%{_txt}% &7tanesi &a%{_m}%Tl" to nothing
    make gui slot 9 of {_p} with {_i} named "&e&n8 tane sat" with lore "||&7Tıklayarak &c8 &7tane sat||||&7Alacağın para: &a%(8 * {_m})%" to run function esyaSat({_p}, {_i}, 8, {_m}, {_txt})
    make gui slot 11 of {_p} with {_i} named "&e&n16 tane sat" with lore "||&7Tıklayarak &c16 &7tane sat||||&7Alacağın para: &a%(16 * {_m})%" to run function esyaSat({_p}, {_i}, 16, {_m}, {_txt})
    make gui slot 13 of {_p} with {_i} named "&e&n32 tane sat" with lore "||&7Tıklayarak &c32 &7tane sat||||&7Alacağın para: &a%(32 * {_m})%" to run function esyaSat({_p}, {_i}, 32, {_m}, {_txt})
    make gui slot 15 of {_p} with {_i} named "&e&n64 tane sat" with lore "||&7Tıklayarak &c64 &7tane sat||||&7Alacağın para: &a%(64 * {_m})%" to run function esyaSat({_p}, {_i}, 64, {_m}, {_txt})
    make gui slot 17 of {_p} with {_i} named "&6&nHepsini sat" with lore "||&7Tıklayarak &chepsini &7sat||||&7Alacağın para: &a%(amount of {_i} in {_p}'s inventory * {_m})%" to run function esyaSathepsi({_p}, {_i}, {_m}, {_txt})
    make gui slot 26 of {_p} with redstone named "&cGeri dön" to run {_p} command "sat"
Gönderi otomatik olarak birleştirildi:

Güncel.
 
Son düzenleme:

EnderR3kt

Somon Balığı Selam Vermeye Geldi

Discord:

enderxd#1084

Katılım
12 Kasım 2019
Mesajlar
12
Elmaslar
3
Puanlar
910
Yaş
23
Yer
Türkiye
Minecraft
EnderR3kt
Eğer çözüm bulamazsan menüsüz istediğin gibi olan tanesine fiyat biçen anlaşılır bir skript verebilirim

Sonra o komutları deluxemenu gibi bir pluginde oluşturduğun menü üzerinde kullanman gerekicek
Ben skriptten menü yapmayı sevmediğim için menü konusunda çok yardımcı olamıyacağım
 

HcaTR

Odunlara Vur Vur Vur!
Katılım
16 Ekim 2016
Mesajlar
36
Elmaslar
3
Puanlar
13.210
Yaş
26
Eğer çözüm bulamazsan menüsüz istediğin gibi olan tanesine fiyat biçen anlaşılır bir skript verebilirim

Sonra o komutları deluxemenu gibi bir pluginde oluşturduğun menü üzerinde kullanman gerekicek
Ben skriptten menü yapmayı sevmediğim için menü konusunda çok yardımcı olamıyacağım
Denemek isterim verirsen
 

EnderR3kt

Somon Balığı Selam Vermeye Geldi

Discord:

enderxd#1084

Katılım
12 Kasım 2019
Mesajlar
12
Elmaslar
3
Puanlar
910
Yaş
23
Yer
Türkiye
Minecraft
EnderR3kt
Kod:
variables:
    pumpkinfiyati = 1
    kamisfiyati = 1
    kakaofiyati = 1
    netherfiyati = 1
    karpuzfiyati = 1
    kaktusfiyati = 1

command /satpumpkin:
    trigger:
        if player has pumpkin:
            set {_x} to number of pumpkin in player's inventory
            set {_z} to {_x}*{pumpkinfiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet pumpkini %{_z}%$ fiyatına sattiniz."
            remove all pumpkin from player  
            stop
        else:
            send " &eCantanda balkabagi bulunamadi."  
            stop
           
command /satkamis:
    trigger:
        if player has sugar canes:
            set {_x} to number of sugar canes in player's inventory
            set {_z} to {_x}*{kamisfiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet kamisi %{_z}%$ fiyatına sattiniz."
            remove all sugar canes from player
            stop
        else:
            send " &eCantanda kamis bulunamadi."  
            stop
           
command /satkakao:
    trigger:
        if player has cocoa beans:
            set {_x} to number of cocoa beans in player's inventory
            set {_z} to {_x}*{kakaofiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet kakaoyu %{_z}%$ fiyatına sattiniz."
            remove all cocoa beans from player
            stop
        else:
            send " &eCantanda kakao bulunamadi."
            stop
           
command /satnether:
    trigger:
        if player has nether wart:
            set {_x} to number of nether wart in player's inventory
            set {_z} to {_x}*{netherfiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet nether warti %{_z}%$ fiyatına sattiniz."
            remove all nether wart from player
            stop
        else:
            send " &eCantanda nether wart bulunamadi."      
            stop
           
command /satkarpuz:
    trigger:
        if player has melon slice:
            set {_x} to number of melon slice in player's inventory
            set {_z} to {_x}*{karpuzfiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet karpuzu %{_z}%$ fiyatına sattiniz."
            remove all melon slice from player
            stop
        else:
            send " &eCantanda karpuz bulunamadi."      
            stop
           
command /satkaktus:
    trigger:
        if player has cactus:
            set {_x} to number of cactus in player's inventory
            set {_z} to {_x}*{kaktusfiyati}
            add {_z} to player's balance
            message "&a%{_x}% adet kaktusu %{_z}%$ fiyatına sattiniz."
            remove all cactus from player
            stop
        else:
            send " &eCantanda kaktus bulunamadi."      
            stop

Blokları değiştirceksin mecbur dokunmadım onlara
Fiyatları tanesine göre ayarlasan yeter
Oyuncudaki item miktarına göre fiyatla çarpıyor zaten.
Direk envanterde ki satılmak istenilen itemin hepsini satar
 
Durum
Mesaj gönderimine kapalı.
Neden altınlarını Discord sunucumuzda kazmıyorsun? TIKLA VE KATIL!
Yukarı