Bulundu Borsa Skripti

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

IEvilMoon_

Bir Kömür Göründü Kaptanım!
Katılım
15 Ekim 2023
Mesajlar
120
Elmaslar
10
Puan
1.335
Yaş
26
Konum
Muğla
Merhaba MC-TR Kullanıcıları Sizlerden Bir Skript istiyorum Yapabilirmisiniz?

Skript şu Şekilde Olacak : Dolar Euro ve Bitcoin Olarak 3 Para Birimi Olacak ve Bunlar 10 Dakikada bir Bitcoin 10.000 Dinar ile 100.000 Dinar Arası Değişecek
Dolar ile Euro İse 10 ile 100 Dinar Arasında 10 Dakikada Bir Değişecek ve Her 10 dk Da Bir Sohbette Dolar Euro ve Bitcoinin Fiyatını Gösterecek

Almak İçin Örnek : "/borsa al {para birimi} {miktar}" Şeklinde Eğer Parası Yoksa "&c{Para birimi}'ni Almak İçin Paranız Yetersiz!" Yazacak
Bozdurmak İçin İse : /borsa sat {para birimi} {miktar}" Şeklinde Eğer Para Birimi O Kadar Yoksa "&cMaalesef Bozdurmak İçin {miktar} {para birimi} niz yok!"
Kendi Aldıkları Para Birimlerini Görmek İçin ise : "/borsa" Yazacaklar

Yapabilirseniz Sevinirim İyi Günler :heart:
 
Son düzenleme:
Kod:
options:
    prefix: &dBORSA &8»

on load:
    add "Bitcoin","Ethereum","Dogecoin" to {_kriptolar::*}
    loop {_kriptolar::*}:
        if {borsa::fiyatlar::%loop-value%::anafiyat} is not set:
            set {_fiyat} to random integer between 1000 and 100000
            set {borsa::fiyatlar::%loop-value%} to loop-value
            set {borsa::fiyatlar::%loop-value%::anafiyat} to {_fiyat}
            set {borsa::fiyatlar::%loop-value%::fiyat} to {_fiyat}
            set {borsa::fiyatlar::%loop-value%::yenilenme} to now
            add 5 minute to {borsa::fiyatlar::%loop-value%::yenilenme}
    loop all players:
        loop {_kriptolar::*}:
            if {borsa::oyuncular::%loop-value-1%::%loop-value-2%} is not set:
                set {borsa::oyuncular::%loop-value-1%::%loop-value-2%} to 0

every 1 minute:
    loop {borsa::fiyatlar::*}:
        if difference between {borsa::fiyatlar::%loop-value%::yenilenme} and now > 5 minutes:
            set {_fiyat} to random integer between 1 and 1000
            set {borsa::fiyatlar::%loop-value%::yenilenme} to now
            add 5 minute to {borsa::fiyatlar::%loop-value%::yenilenme}
            if chance of 50%:
                if {borsa::fiyatlar::%loop-value%::fiyat} - {_fiyat} <= 0:
                    set {borsa::fiyatlar::%loop-value%::fiyat} to random integer between 1 and 1000
                else:
                    remove {_fiyat} from {borsa::fiyatlar::%loop-value%::fiyat}
            else:
                add {_fiyat} to {borsa::fiyatlar::%loop-value%::fiyat}

command /borsa:
    trigger:
        borsaMenu(player)

function borsaMenu(p:player):
    open virtual chest inventory with size 1 named "&0Borsa" to {_p}
    set {_x} to 0
    loop {borsa::fiyatlar::*}:
        if {borsa::oyuncular::%{_p}%::%loop-value%} is not set:
            set {borsa::oyuncular::%{_p}%::%loop-value%} to 0
        set {_m} to noktaFormatlayici({borsa::fiyatlar::%loop-value%::fiyat})
        set {_a} to artisHesaplama("%loop-value%")
        set {_i} to sunflower named "&d%loop-value%"
        set line 1 of the lore of {_i} to "&7Fiyat;"
        set line 2 of the lore of {_i} to "    &e%{_m}% TL &7(%{_a}%&7)"
        set line 4 of the lore of {_i} to "&7Borsa Yenilenme;"
        set line 5 of the lore of {_i} to "    &e%{borsa::fiyatlar::%loop-value%::yenilenme}%"
        set line 7 of the lore of {_i} to "&7Sahip Olunan;"
        set line 8 of the lore of {_i} to "    &e%noktaFormatlayici({borsa::oyuncular::%{_p}%::%loop-value%})% %loop-value%"
        set line 10 of the lore of {_i} to "&7Kısayollar;"
        set line 11 of the lore of {_i} to "    &eSatın almak için &dsol tıkla."
        set line 12 of the lore of {_i} to "    &eSatmak için &dsağ tıkla."
        create gui slot {_x} of {_p} with {_i} to nothing
        add loop-value to {_kriptolar::*}
        set {_kriptolar::%loop-value%::slot} to {_x}
        add 1 to {_x}
    while 1 is 1:
        wait 10 seconds
        if name of {_p}'s current inventory is "&0Borsa":
            loop {_kriptolar::*}:
                set {_m} to noktaFormatlayici({borsa::fiyatlar::%loop-value%::fiyat})
                set {_a} to artisHesaplama("%loop-value%")
                set line 2 of the lore of slot {_kriptolar::%loop-value%::slot} of {_p}'s current inventory to "    &e%{_m}% TL &7(%{_a}%&7)"
                set line 5 of the lore of slot {_kriptolar::%loop-value%::slot} of {_p}'s current inventory to "    &e%{borsa::fiyatlar::%loop-value%::yenilenme}%"
        else:
            stop

on inventory click:
    if name of player's current inventory is "&0Borsa":
        cancel event
        if name of event-inventory is "&0Borsa":
            if clicked item is not air:
                if {borsa::fiyatlar::%uncolored name of clicked item%::fiyat} is set:
                    if clicked type is left mouse button:
                        islemMenu(player,"Alış","%uncolored name of clicked item%")
                    else if clicked type is right mouse button:
                        islemMenu(player,"Satış","%uncolored name of clicked item%")
                    else:
                        cancel event
                else:
                    close player's inventory
                    send "{@prefix} &7Bu birim bozulmuş lütfen yetkiliye bildirin!" to player
            else:
                cancel event
          
function islemMenu(p:player,islem:text,k:text):
    open virtual hopper inventory with size 1 named "&0Borsa &8> %{_k} % &8> %{_islem}%" to {_p}
    create gui slot 0 and 4 of {_p} with gray stained glass pane to nothing
    create gui slot 2 of {_p} with paper named "&d1" to run:
        set {_m} to "%numbers of uncolored name of clicked item%" parsed as integer
        if {_islem} is "Alış":
            if {_p}'s balance >= ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}):
                remove ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}) from {_p}'s balance
                add {_m} to {borsa::oyuncular::%{_p}%::%{_k}%}
                set {_f} to noktaFormatlayici({borsa::fiyatlar::%{_k}%::fiyat})
                set {_top} to "%{_m}*{borsa::fiyatlar::%{_k}%::fiyat}%" parsed as integer
                set {_top} to noktaFormatlayici({_top})
                send "{@prefix} &e%{_k}% &7satın alındı, &e(%{_f}% * %{_m}% = %{_top}%)" to {_p}
            else:
                send "{@prefix} &7Bakiyeniz yetersiz!" to {_p}
        else if {_islem} is "Satış":
            if {borsa::oyuncular::%{_p}%::%{_k}%} >= {_m}:
                add ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}) to {_p}'s balance
                remove {_m} from {borsa::oyuncular::%{_p}%::%{_k}%}
                set {_f} to noktaFormatlayici({borsa::fiyatlar::%{_k}%::fiyat})
                set {_top} to "%{_m}*{borsa::fiyatlar::%{_k}%::fiyat}%" parsed as integer
                set {_top} to noktaFormatlayici({_top})
                send "{@prefix} &e%{_k}% &7satıldı, &e(%{_f}% * %{_m}% = %{_top}%)" to {_p}
            else:
                send "{@prefix} &7Yeterli miktarda &e%{_k}% &7sahip değilsin!" to {_p}
    create gui slot 1 of {_p} with stone button named "&c-1" to run:
        miktarAyarla({_p},-1)
    create gui slot 3 of {_p} with stone button named "&a+1" to run:
        miktarAyarla({_p},1)
  
function miktarAyarla(p:player,m:integer):
    set {_sm} to "%numbers of uncolored name of slot 2 of {_p}'s current inventory%" parsed as integer
    if ({_sm}+{_m}) is between 1 and 30:
        set name of slot 2 of {_p}'s current inventory to "&d%{_sm}+{_m}%"

function noktaFormatlayici(cevirilecek:integer) :: text:
    set {_r} to "%{_cevirilecek}%"
    set {_t} to ""
    loop round up length of {_r} / 3 times:
        set {_l} to the last 3 characters of {_r}
        set {_r} to the first length of {_r} - 3 characters of {_r}
        if loop-number = 1:
            set {_t} to "%{_l}%%{_t}%"
        else:
            set {_t} to "%{_l}%.%{_t}%"
    return {_t}


function artisHesaplama(birim:text) :: text:
    set {_x} to {borsa::fiyatlar::%{_birim}%::fiyat} - {borsa::fiyatlar::%{_birim}%::anafiyat}
    set {_x} to {_x}/{borsa::fiyatlar::%{_birim}%::anafiyat}
    set {_x} to {_x}*100
    if {_x} < 0:
        set {_x} to "&c%{_x}%"
    else:
        set {_x} to "&a%{_x}%"
    return {_x}
denermisiniz ?
 
Kod:
options:
    prefix: &dBORSA &8»

on load:
    add "Bitcoin","Ethereum","Dogecoin" to {_kriptolar::*}
    loop {_kriptolar::*}:
        if {borsa::fiyatlar::%loop-value%::anafiyat} is not set:
            set {_fiyat} to random integer between 1000 and 100000
            set {borsa::fiyatlar::%loop-value%} to loop-value
            set {borsa::fiyatlar::%loop-value%::anafiyat} to {_fiyat}
            set {borsa::fiyatlar::%loop-value%::fiyat} to {_fiyat}
            set {borsa::fiyatlar::%loop-value%::yenilenme} to now
            add 5 minute to {borsa::fiyatlar::%loop-value%::yenilenme}
    loop all players:
        loop {_kriptolar::*}:
            if {borsa::oyuncular::%loop-value-1%::%loop-value-2%} is not set:
                set {borsa::oyuncular::%loop-value-1%::%loop-value-2%} to 0

every 1 minute:
    loop {borsa::fiyatlar::*}:
        if difference between {borsa::fiyatlar::%loop-value%::yenilenme} and now > 5 minutes:
            set {_fiyat} to random integer between 1 and 1000
            set {borsa::fiyatlar::%loop-value%::yenilenme} to now
            add 5 minute to {borsa::fiyatlar::%loop-value%::yenilenme}
            if chance of 50%:
                if {borsa::fiyatlar::%loop-value%::fiyat} - {_fiyat} <= 0:
                    set {borsa::fiyatlar::%loop-value%::fiyat} to random integer between 1 and 1000
                else:
                    remove {_fiyat} from {borsa::fiyatlar::%loop-value%::fiyat}
            else:
                add {_fiyat} to {borsa::fiyatlar::%loop-value%::fiyat}

command /borsa:
    trigger:
        borsaMenu(player)

function borsaMenu(p:player):
    open virtual chest inventory with size 1 named "&0Borsa" to {_p}
    set {_x} to 0
    loop {borsa::fiyatlar::*}:
        if {borsa::oyuncular::%{_p}%::%loop-value%} is not set:
            set {borsa::oyuncular::%{_p}%::%loop-value%} to 0
        set {_m} to noktaFormatlayici({borsa::fiyatlar::%loop-value%::fiyat})
        set {_a} to artisHesaplama("%loop-value%")
        set {_i} to sunflower named "&d%loop-value%"
        set line 1 of the lore of {_i} to "&7Fiyat;"
        set line 2 of the lore of {_i} to "    &e%{_m}% TL &7(%{_a}%&7)"
        set line 4 of the lore of {_i} to "&7Borsa Yenilenme;"
        set line 5 of the lore of {_i} to "    &e%{borsa::fiyatlar::%loop-value%::yenilenme}%"
        set line 7 of the lore of {_i} to "&7Sahip Olunan;"
        set line 8 of the lore of {_i} to "    &e%noktaFormatlayici({borsa::oyuncular::%{_p}%::%loop-value%})% %loop-value%"
        set line 10 of the lore of {_i} to "&7Kısayollar;"
        set line 11 of the lore of {_i} to "    &eSatın almak için &dsol tıkla."
        set line 12 of the lore of {_i} to "    &eSatmak için &dsağ tıkla."
        create gui slot {_x} of {_p} with {_i} to nothing
        add loop-value to {_kriptolar::*}
        set {_kriptolar::%loop-value%::slot} to {_x}
        add 1 to {_x}
    while 1 is 1:
        wait 10 seconds
        if name of {_p}'s current inventory is "&0Borsa":
            loop {_kriptolar::*}:
                set {_m} to noktaFormatlayici({borsa::fiyatlar::%loop-value%::fiyat})
                set {_a} to artisHesaplama("%loop-value%")
                set line 2 of the lore of slot {_kriptolar::%loop-value%::slot} of {_p}'s current inventory to "    &e%{_m}% TL &7(%{_a}%&7)"
                set line 5 of the lore of slot {_kriptolar::%loop-value%::slot} of {_p}'s current inventory to "    &e%{borsa::fiyatlar::%loop-value%::yenilenme}%"
        else:
            stop

on inventory click:
    if name of player's current inventory is "&0Borsa":
        cancel event
        if name of event-inventory is "&0Borsa":
            if clicked item is not air:
                if {borsa::fiyatlar::%uncolored name of clicked item%::fiyat} is set:
                    if clicked type is left mouse button:
                        islemMenu(player,"Alış","%uncolored name of clicked item%")
                    else if clicked type is right mouse button:
                        islemMenu(player,"Satış","%uncolored name of clicked item%")
                    else:
                        cancel event
                else:
                    close player's inventory
                    send "{@prefix} &7Bu birim bozulmuş lütfen yetkiliye bildirin!" to player
            else:
                cancel event
         
function islemMenu(p:player,islem:text,k:text):
    open virtual hopper inventory with size 1 named "&0Borsa &8> %{_k} % &8> %{_islem}%" to {_p}
    create gui slot 0 and 4 of {_p} with gray stained glass pane to nothing
    create gui slot 2 of {_p} with paper named "&d1" to run:
        set {_m} to "%numbers of uncolored name of clicked item%" parsed as integer
        if {_islem} is "Alış":
            if {_p}'s balance >= ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}):
                remove ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}) from {_p}'s balance
                add {_m} to {borsa::oyuncular::%{_p}%::%{_k}%}
                set {_f} to noktaFormatlayici({borsa::fiyatlar::%{_k}%::fiyat})
                set {_top} to "%{_m}*{borsa::fiyatlar::%{_k}%::fiyat}%" parsed as integer
                set {_top} to noktaFormatlayici({_top})
                send "{@prefix} &e%{_k}% &7satın alındı, &e(%{_f}% * %{_m}% = %{_top}%)" to {_p}
            else:
                send "{@prefix} &7Bakiyeniz yetersiz!" to {_p}
        else if {_islem} is "Satış":
            if {borsa::oyuncular::%{_p}%::%{_k}%} >= {_m}:
                add ({_m}*{borsa::fiyatlar::%{_k}%::fiyat}) to {_p}'s balance
                remove {_m} from {borsa::oyuncular::%{_p}%::%{_k}%}
                set {_f} to noktaFormatlayici({borsa::fiyatlar::%{_k}%::fiyat})
                set {_top} to "%{_m}*{borsa::fiyatlar::%{_k}%::fiyat}%" parsed as integer
                set {_top} to noktaFormatlayici({_top})
                send "{@prefix} &e%{_k}% &7satıldı, &e(%{_f}% * %{_m}% = %{_top}%)" to {_p}
            else:
                send "{@prefix} &7Yeterli miktarda &e%{_k}% &7sahip değilsin!" to {_p}
    create gui slot 1 of {_p} with stone button named "&c-1" to run:
        miktarAyarla({_p},-1)
    create gui slot 3 of {_p} with stone button named "&a+1" to run:
        miktarAyarla({_p},1)
 
function miktarAyarla(p:player,m:integer):
    set {_sm} to "%numbers of uncolored name of slot 2 of {_p}'s current inventory%" parsed as integer
    if ({_sm}+{_m}) is between 1 and 30:
        set name of slot 2 of {_p}'s current inventory to "&d%{_sm}+{_m}%"

function noktaFormatlayici(cevirilecek:integer) :: text:
    set {_r} to "%{_cevirilecek}%"
    set {_t} to ""
    loop round up length of {_r} / 3 times:
        set {_l} to the last 3 characters of {_r}
        set {_r} to the first length of {_r} - 3 characters of {_r}
        if loop-number = 1:
            set {_t} to "%{_l}%%{_t}%"
        else:
            set {_t} to "%{_l}%.%{_t}%"
    return {_t}


function artisHesaplama(birim:text) :: text:
    set {_x} to {borsa::fiyatlar::%{_birim}%::fiyat} - {borsa::fiyatlar::%{_birim}%::anafiyat}
    set {_x} to {_x}/{borsa::fiyatlar::%{_birim}%::anafiyat}
    set {_x} to {_x}*100
    if {_x} < 0:
        set {_x} to "&c%{_x}%"
    else:
        set {_x} to "&a%{_x}%"
    return {_x}
denermisiniz ?
25 tane hata veriyor
 
0 Dan Kodlayabilecek Varda Kodlasın
 
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