Çözüldü Skript Yardım

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

Syzntex

Birisi mi Spawnlandı?
Katılım
31 Mart 2024
Mesajlar
4
Elmaslar
0
Puan
120
Konum
Turkey
Minecraft
Syzntex
Selam, internetten birkaç örnekten bakarak yazmayı denediğim bir skript var, amacım oyuncunun blok kırarak, madenci seviyesine bağlı şans oranı ile eşya alması. Skript konularında daha yeniyim ve "if {miningreward::%uuid of player%::1} is set" kısmını tam anlayamadım. Yardımcı olabilirseniz çok sevinirim.





Kod:
on break:
    if player's held item is pickaxe:
# burasını sonraya bıraktım
   

on join:
    mining_reward_level(player)
   
function mining_reward_level(p: player):
    if {_p} has permission "miningreward.firstlevel":
        set {miningreward::%uuid of player%} to 1
    if {_p} has permission "miningreward.secondlevel":
        set {miningreward::%uuid of player%} to 2
    if {_p} has permission "miningreward.thirdlevel":
        set {miningreward::%uuid of player%} to 3
    if {_p} has permission "miningreward.fourthlevel":
        set {miningreward::%uuid of player%} to 4
   
command miningreward-upgrade:
    aliases: mrupgrade
    trigger:
        if {miningreward::%uuid of player%::1} is set:
            if player's balance is greater than or equal to 50000:
                execute console command "eco take * 50000"
                execute console command "lp user * permission set miningreward.secondlevel true"
                mining_reward_level(player)
                send "<##ffa679>Şuanki madenci levelin {miningreward::%uuid of player%} " to player
            else:
                play sound "entity.villager.no" at volume 1 at pitch 2.5 to player
        else if {miningreward::%uuid of player%::2} is set:
            if player's balance is greater than or equal to 100000:
                execute console command "eco take * 100000"
                execute console command "lp user * permission set miningreward.thirdlevel true"
                mining_reward_level(player)
                send "<##ffa679>Şuanki madenci levelin {miningreward::%uuid of player%} " to player
            else:
                play sound "entity.villager.no" at volume 1 at pitch 2.5 to player
        else if {miningreward::%uuid of player%::3} is set:
            if player's balance is greater than or equal to 250000:
                execute console command "eco take * 250000"
                execute console command "lp user * permission set miningreward.fourthlevel true"
                mining_reward_level(player)
                send "<##ffa679>Şuanki madenci levelin {miningreward::%uuid of player%} " to player
            else:
                play sound "entity.villager.no" at volume 1 at pitch 2.5 to player
        else:
            play sound "entity.villager.no" at volume 1 at pitch 2.5 to player
            send "<##ffa679>Şuanki madenci levelin {miningreward::%uuid of player%} " to player
 
Son düzenleme:
Anladığım kadarıyla yazdığınız Skript oyuncuların kazı işleri yaparak seviye atlaması & seviyeye göre eşya düşürme.
Sizin için sonsuza kadar uzay bir seviye sistemi ve Skript'iniz için kullanabileceğiniz ifadeler yaptım:

12345.png


İfadeler:
Kod:
#if playerBreak(player) = 1: #oyuncunun kırdığı blok sayısı 1 ise

#if playerXp(player) = 1: #oyuncunun tecrübe puanı 1 ise

#if calculateXp(playerLvl(player)) = 1: #oyuncunun gerekli tecrübe puanı 1 ise


#if playerLvl(player) = 1: #oyuncunun seviyesi 1 ise
[BU BÖLÜMDE OYUNCUNUN SEVİYESİNE GÖRE BLOK KIRINCA BELİRLİ BİR ŞANSA GÖRE EŞYA VERMESİNİ SAĞLAYABİLİRSİNİZ]


#if moneyMoreThanInt(player, 100) = "true": #oyuncu 100 (money) parayı karşılıyor/karşılamıyor

Örnek ifade kullanımı:
Kod:
command miningreward-upgrade:
    aliases: mrupgrade
    trigger:
 
        set {_p} to player    #UUID PLAYER INFO YAZISI VERMEMESI ICIN
     
        if playerLvl({_p}) is set:
     
            if moneyMoreThanInt({_p}, 50000) = "true": #eğer parayı karşılıyorsa true olarak işaretliyoruz
                execute console command "eco take * 50000"
                execute console command "lp user * permission set miningreward.secondlevel true"
                mining_reward_level({_p})
                send "<##ffa679>Şuanki madenci levelin %playerLvl({_p})%" to {_p}
            else:
                play sound "entity.villager.no" at volume 1 at pitch 2.5 to {_p}



Kod:
#delete {mining::*} herşeyi sıfırlar

break:
    checkLvl(event-player) #seviyeyi kontrol eder.

command /mining-stats [<offline player>]:
    trigger:
        offline player arg 1 is set:
            set {_p} to arg 1
        else:
            set {_p} to player
        {_p} is online:
            set {_lvl} to playerLvl({_p})
            send "%nl%%nl%&8--------------------------%nl%"
            send "Oyuncu: &e%{_p}%"
            send "Kırılan blok: &e%playerBreak({_p})%"
            send "XP: &d%playerXp({_p})%&7/&5%calculateXp(playerLvl({_p}))%"
            send "İlerleme: %progressBar({mining::exp::%{_p}%}, calculateXp({mining::level::%{_p}%}), "|", 50, "&a&lBitti") ? "&cYok"%"
            send "Seviye: &8[&e%{_lvl} ? "0"%&8] &7-> &8[&e%{_lvl} + 1 ? "&cYok"%&8]"
            send "%nl%&8--------------------------"
        else:
            send "&cBöyle bir oyuncu bulunamadı/aktif değil!"

function playerBreak(p: player) :: NUMBER:
    return {mining::block::break::%{_p}%} ? 0

function playerXp(p: player) :: NUMBER:
    return {mining::exp::%{_p}%} ? 0

function playerLvl(p: player) :: NUMBER:
    return {mining::level::%{_p}%} ? 0

function checkLvl(p: player):

    add 1 to {mining::block::break::%{_p}%}
    set {_xp} to {mining::level::%{_p}%}
    set {_actionBar} to "&8[&e%{_xp}%&8] %progressBar({mining::exp::%{_p}%}, calculateXp({mining::level::%{_p}%}), "|", 50, "&a&lBitti")% &8[&e%{_xp} + 1%&8]"
    send action bar {_actionBar} to {_p}
    set {mining::exp::%{_p}%} to {mining::block::break::%{_p}%} * 2

    ({mining::exp::%{_p}%}) >= calculateXp({mining::level::%{_p}%}):
        add 1 to {mining::level::%{_p}%}
        subtract calculateXp({mining::level::%{_p}%}) from {mining::exp::%{_p}%}
        send "&a[Level] &eTebrikler! Seviye &6%{mining::level::%{_p}%}%&e'e yükseldiniz!" to {_p}
        play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 at {_p}'s location
 
function calculateXp(lvl: number) :: NUMBER:
    return 100 * ({_lvl} ^ 1.5)

function moneyMoreThanInt(p: player, int: number) :: STRING:
    {_p}'s balance is greater than or equal to {_int}:
        set {_out} to true
    return "%{_out} ? "false"%"

function anemysProgressBar(current: Integer, total: Integer, symbol: String, size: Integer, fullBar: String) :: STRING:
    loop {_size} times:
        set {_progress} to "%{_progress} ? ""%%{_symbol}%"
    set {_full} to "&6%subtext of {_progress} from indices 1 to (({_current} / {_total}) * {_size} * (length of {_symbol})) ? ""%"
    set {_void} to "&7%subtext of {_progress} from indices (({_current} / {_total}) * {_size} * (length of {_symbol}))+1 to (length of {_progress}) ? " "%"
    {_current} >= {_total}:
        set {_full} to {_fullBar}
    return "%{_full} ? " " %%{_void}%"
 
Yardımın için teşekkür ederim, çok güzel bir skript olmuş
 
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