Element Skripti

Katılım
1 Ocak 2022
Konular
24
Mesajlar
62
Tepki puanı
67
Puanları
860
element.png


● Skript baştan aşağı yenilendi, artık daha kısa, performanslı, ve mantık hataları giderilen bir kod haline getirildi.
● Skript, size sadece bir kerelik element seçme hakkı sunar, bunlar; ateş, su, toprak ve hava. Seçtiğiniz elementlerin
özelliklerine göre her 1 saatte oyunda iseniz efekt, eşya ve para kazanırsınız.

● Sistemin çalışması için gereken eklentiler ise şunlardır: Skript-2.2dev36, TuSKe, SkQuery ve Skrayfall.

komutlar.png


● /element
● /element sıfırla <oyuncu> | oyuncunun elementi ve element seçme hakkı sıfırlanır.
● /elementbugfix <oyuncu> | eğer ki, göstergeler, değişkenler ve oyuncunun element seçme hakkı sorun
çıkartıyorsa bu komutu kullanarak önüne geçebilirsiniz.

görseller.png


Element (1).png


Açılan Menü

element1.png


Bilgilendirme Kısmı
element2.png


Ateş Elementi & Özellikleri
element3.png


Su Elementi & Özellikleri
element4.png


Toprak Elementi & Özellikleri
element5.png


Hava Elementi & Özellikleri
element6.png



JavaScript:
options:
    prefix: &3&lELEMENT &8»

variables:
    {ates} = 0
    {su} = 0
    {toprak} = 0
    {hava} = 0
  
on first join:
    set {element::%player%} to "Yok"
    set {elementivar::%player%} to false     

command /element [<text>] [<player>]:
    trigger:
        if arg 1 isn't set:
            elementMenu(player)
        if arg 1 is "sıfırla" or "sifirla" or "reset":
            if player is op:
                if arg 2 is set:           
                    elementReset(args 2)
                    send "{@prefix} &e%arg 2% &7Adlı Oyuncunun &aElementi &7Sıfırlandı." to player             
                else:
                    send "{@prefix} &7Bir Oyuncu Girmelisin." to player
            else:
                send "{@prefix} &7Yetkin Yok."                 
        if arg 1 is "bugfix":
            if player is op:
                if arg 2 is set:
                    elementBugFix(player)
                    send "{@prefix} &e%arg 2% &7Adlı Oyuncunun &aElement &7Sorunu Çözüldü." to player
                else:
                    send "{@prefix} &7Bir Oyuncu Girmelisin." to player
            else:
                send "{@prefix} &7Yetkin Yok."

function elementMenu(p: player):
    open virtual chest with size 6 named "&6Element Menüsü" to {_p}     
    make gui slot 4 of {_p} with book and quill named "&6Bilgilendirme" with lore "||&eElement Nedir? ||  ||&7Sadece Bir Kere Seçebileceğiniz Bu Element, ||&7Seçiminize Göre Size Para/Eşya/Özellik Kazandırır.|| ||&7Hangi Elementin Ne Kazandırdığına Bakmak Için ||&7Mouse Imlecini Seçeceğin Elementin Üzerine Getirebilirsin.||"
    make gui slot 19 of {_p} with red wool block named "&6Ateş Elementi" with lore "||&eÖzellikler; ||  ||&7Sınırsız &aAteş Direnci &7Efekti ||&760 Dakikada Bir &a50.000 &7Oyun Parası||&760 Dakikada Bir &a64 Nether Tuğlası||&760 Dakikada Bir &a2 Lav Kovası||  ||&4&lNOT: &c60 Dakikada Bir Verilen Ödülleri Almak||&cIçin Oyunda Aktif Olman Gerekmektedir.||" to run:         
        elementSelect({_p}, "Ateş")
        close {_p}'s inventory           
    make gui slot 21 of {_p} with blue wool block named "&6Su Elementi" with lore "||&eÖzellikler; ||  ||&7Sınırsız &aSu Altında Nefes Alma &7Efekti ||&7&760 Dakikada Bir &a50.000 &7Oyun Parası||&7&760 Dakikada Bir &a64 Prizmarin||&7&760 Dakikada Bir &a2 Su Kovası||  ||&4&lNOT: &c60 Dakikada Bir Verilen Ödülleri Almak||&cIçin Oyunda Aktif Olman Gerekmektedir.||" to run:
        elementSelect({_p}, "Su")
        close {_p}'s inventory           
    make gui slot 23 of {_p} with brown wool block named  "&6Toprak Elementi" with lore "||&eÖzellikler; ||  ||&7Sınırsız &aZıplama Desteği &2(&aIII&2) &7Efekti ||&7&760 Dakikada Bir &a50.000 &7Oyun Parası||&7&760 Dakikada Bir &a64 Toprak||&7&760 Dakikada Bir &a64 Çimenli Toprak||  ||&4&lNOT: &c60 Dakikada Bir Verilen Ödülleri Almak||&cIçin Oyunda Aktif Olman Gerekmektedir.||" to run:
        elementSelect({_p}, "Toprak")
        close {_p}'s inventory           
    make gui slot 25 of {_p} with light blue wool block named  "&6Hava Elementi" with lore "||&eÖzellikler; ||  ||&7Sınırsız &aGüç Ve Direnç &2(&aIII&2) &7Efekti ||&7&760 Dakikada Bir &a50.000 &7Oyun Parası||&7&760 Dakikada Bir &a32 Altın Blok||&7&760 Dakikada Bir &a16 Elmas Blok||  ||&4&lNOT: &c60 Dakikada Bir Verilen Ödülleri Almak||&cIçin Oyunda Aktif Olman Gerekmektedir.||" to run:
        elementSelect({_p}, "Hava")
        close {_p}'s inventory           
    make gui slot 39 of {_p} with book named "&6Elementin" with lore "||&7Senin Elementin: &a%{element::%{_p}%}%||"
    make gui slot 41 of {_p} with book named "&6Istatistikler" with lore "||&aAteş &7Elementini Seçen Kişi Sayısı: &e%{ates}% &7Kişi||&aSu &7Elementini Seçen Kişi Sayısı: &e%{su}% &7Kişi||&aToprak &7Elementini Seçen Kişi Sayısı: &e%{toprak}% &7Kişi||&aHava &7Elementini Seçen Kişi Sayısı: &e%{hava}% &7Kişi"
    make gui slot 53 of {_p} with arrow named "&4Menüyü Kapat" to run:
        close {_p}'s inventory

function elementSelect(p: player, element: text):
    if {_element} is "Ateş":
        if {elementivar::%{_p}%} is false:   
            set {elementivar::%{_p}%} to true       
            set {element::%{_p}%} to "Ateş"
            add 1 to {ates}         
            execute console command "manuaddp %{_p}% element.ates"
            send "{@prefix} &aAteş &7Elementi Seçildi." to {_p}       
        else:
            send "{@prefix} &7Zaten Bir Element Seçmişsin. Senin Elementin: &a%{element::%{_p}%}%" to {_p}
    if {_element} is "Su":
        if {elementivar::%{_p}%} is false:   
            set {elementivar::%{_p}%} to true       
            set {element::%{_p}%} to "Su"
            add 1 to {su}         
            execute console command "manuaddp %{_p}% element.su"
            send "{@prefix} &aSu &7Elementi Seçildi." to {_p}       
        else:
            send "{@prefix} &7Zaten Bir Element Seçmişsin. Senin Elementin: &a%{element::%{_p}%}%" to {_p}
    if {_element} is "Toprak":
        if {elementivar::%{_p}%} is false:   
            set {elementivar::%{_p}%} to true       
            set {element::%{_p}%} to "Toprak"
            add 1 to {toprak}         
            execute console command "manuaddp %{_p}% element.toprak"
            send "{@prefix} &aToprak &7Elementi Seçildi." to {_p}       
        else:
            send "{@prefix} &7Zaten Bir Element Seçmişsin. Senin Elementin: &a%{element::%{_p}%}%" to {_p}
    if {_element} is "Hava":
        if {elementivar::%{_p}%} is false:   
            set {elementivar::%{_p}%} to true       
            set {element::%{_p}%} to "Hava"
            add 1 to {hava}         
            execute console command "manuaddp %{_p}% element.hava"
            send "{@prefix} &aHava &7Elementi Seçildi." to {_p}       
        else:
            send "{@prefix} &7Zaten Bir Element Seçmişsin. Senin Elementin: &a%{element::%{_p}%}%" to {_p}                                 

function elementReset(p: player):
    if {elementivar::%{_p}%} is true:
        set {elementivar::%{_p}%} to false   
        set {element::%{_p}%} to "Yok"
        send "{@prefix} &7Elementin Sıfırlandı." to {_p}
        if {_p} has permission "element.ates":
            execute console command "manudelp %{_p}% element.ates"                     
            remove 1 from {ates}
        if {_p} has permission "element.su":
            execute console command "manudelp %{_p}% element.su"                     
            remove 1 from {su}
        if {_p} has permission "element.toprak":
            execute console command "manudelp %{_p}% element.hava"                     
            remove 1 from {toprak}
        if {_p} has permission "element.hava":
            execute console command "manudelp %{_p}% element.hava"                     
            remove 1 from {hava}

function elementPrize(t: text): 
    loop all players:
        if loop-players has permission "element.ates":
            apply potion of fire resistance of tier 255 to loop-players for 10000 second         
            add 50000 to loop-players's balance
            give 64 nether brick block to loop-players
            give 2 lava bucket to loop-players
            send "{@prefix} &aAteş &7Elementinin Sana Kazandırdığı Ödüller Verildi, 60 Dakika Sonra Yeniden Alacaksın." to loop-players   
        else if loop-players has permission "element.su":
            apply potion of water breathing of tier 255 to loop-players for 10000 second       
            add 50000 to loop-players's balance
            give 64 prismarine to loop-players
            give 2 water bucket to loop-players
            send "{@prefix} &aSu &7Elementinin Sana Kazandırdığı Ödüller Verildi, 60 Dakika Sonra Yeniden Alacaksın." to loop-players
        else if loop-players has permission "element.toprak":
            apply potion of jump boost of tier 3 to loop-players for 10000 second       
            add 50000 to loop-players's balance
            give 64 grass block to loop-players
            give 64 dirt to loop-players
            send "{@prefix} &aToprak &7Elementinin Sana Kazandırdığı Ödüller Verildi, 60 Dakika Sonra Yeniden Alacaksın." to loop-players
        else if loop-players has permission "element.hava":
            apply potion of strength of tier 3 to loop-players for 10000 second
            apply potion of resistance of tier 3 to loop-players for 10000 second         
            add 50000 to loop-players's balance
            give 32 gold block to loop-players
            give 16 diamond block to loop-players
            send "{@prefix} &aHava &7Elementinin Sana Kazandırdığı Ödüller Verildi, 60 Dakika Sonra Yeniden Alacaksın." to loop-players

function elementBugFix(p: player):
    set {element::%{_p}%} to "Yok"
    set {elementivar::%{_p}%} to false
    execute console command "manudelp %{_p}% element.ates element.su element.toprak element.hava"
    send "{@prefix} &7Element Sorunun Yetkili Tarafından Çözüldü." to {_p}

on join:
    if player has permission "element.ates":
        apply potion of fire resistance of tier 255 to player for 10000 second
    else if player has permission "element.su":
        apply potion of water breathing of tier 255 to player for 10000 second
    else if player has permission "element.toprak":
        apply potion of jump boost of tier 3 to player for 10000 second
    else if player has permission "element.hava":
        apply potion of strength of tier 3 to player for 10000 second
        apply potion of resistance of tier 3 to player for 10000 second
      
on respawn:
    if player has permission "element.ates":
        apply potion of fire resistance of tier 255 to player for 10000 second
    else if player has permission "element.su":
        apply potion of water breathing of tier 255 to player for 10000 second
    else if player has permission "element.toprak":
        apply potion of jump boost of tier 3 to player for 10000 second
    else if player has permission "element.hava":
        apply potion of strength of tier 3 to player for 10000 second
        apply potion of resistance of tier 3 to player for 10000 second
      
every 1 hour:
    elementPrize("ELEMENT")
 
Katılım
18 Mar 2020
Konular
11
Mesajlar
71
Tepki puanı
31
Puanları
2,610
Ücretsiz olması çok hoş