Skript Paylaşımı OPGuard Güncellendi! | GUİ & YAML Destekli Güvenlik Kodu Skripti

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

Furkan Doğan

¯⁠\⁠_⁠ʘ⁠‿⁠ʘ⁠_⁠/⁠¯
Emektar
MinePass
Katılım
14 Nisan 2023
Mesajlar
922
Elmaslar
239
Puan
5.605
Minecraft
FurkanDogan

Discord:

furkandogan.

Herkese Merhaba!

Eski hesabımdan paylaşmış olduğum OPGuard sistemini hem can sıkıntısından hem de o sistemi kullanan insanlar varsa onlar için yeniledim.


● Güncelleme Notları;

Kod kısaltıldı ve optimize edildi.
Config'e giriş tipi seçeneği eklendi: GUI/ANVIL/CHAT - Görsellerden inceleyebilirsiniz.
Koddaki uzunluk sınırlaması kaldırıldı, istediğiniz uzunlukta kodlar ayarlayabilirsiniz.


● Gereken Eklentiler;

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.



● Çalışma Şekli;

Eğer sunucuda yetkiliyseniz sunucuya katıldığınız anda sizden bir güvenlik kodu istenecektir. Bu kodu girmeden sunucuda hiçbir şey yapamazsınız. Amaç, ek bir güvenlik sistemi olup Grief v.b sorunları önlemektir.


● Yapılandırma (config.yml) Dosyası;

YAML:
Kod: 1234
Giriş Tipi: GUI
Mesajlar:
  Prefix: '&3OP&bGuard &8»'
  Zaman Aşımı: '&cGüvenlik Kodunu Girmeniz Için Ayrılan Sürenin Sonuna Geldiniz!'
  Atılma Mesajı: '&cGirilen Kod Yanlış!'
  Eylem Mesajı: '&7Güvenlik kodunu girmeden hiçbir şey yapamazsınız.'


● Kod;
Kod:
on load:
    load yaml "plugins/OPGuard/config.yml" as "OPGuard"  
    if yaml "OPGuard" is empty:
        set yaml value "Kod" from "OPGuard" to 1234
        set yaml value "Giriş Tipi" from "OPGuard" to "GUI"
        set yaml value "Mesajlar.Prefix" from "OPGuard" to "&3OP&bGuard &8➜"
        set yaml value "Mesajlar.Kodu Girin" from "OPGuard" to "&c&7Lütfen güvenlik kodunu girin: &e/opguard <kod>"
        set yaml value "Mesajlar.Zaman Aşımı" from "OPGuard" to "&cGüvenlik Kodunu Girmeniz Için Ayrılan Sürenin Sonuna Geldiniz!"
        set yaml value "Mesajlar.Atılma Mesajı" from "OPGuard" to "&cGirilen Kod Yanlış!"
        set yaml value "Mesajlar.Eylem Mesajı" from "OPGuard" to "&7Güvenlik kodunu girmeden hiçbir şey yapamazsınız."
        save yaml "OPGuard"
on join:
    player is op
    set {opguard::%player%::verified} to false
    OPGuardPrepare(player)
    wait 30 second
    {opguard::%player%::verified} is false
    kick player due to "%yaml value ""Mesajlar.Zaman Aşımı"" from ""OPGuard""%"
    delete {opguard::%player%::*}  
on quit:
    player is op
    delete {opguard::%player%::*} 
function OPGuardPrepare(p: player):
    clear all effects from {_p}
    wait a tick
    apply potion of resistance of tier 255 to {_p} for 10000 second
    apply potion of blindness of tier 255 to {_p} for 10000 second
    apply potion of slowness of tier 20 to {_p} for 10000 second  
    OPGuardVerify({_p})
function OPGuardVerify(p: player):
    {opguard::%{_p}%::verified} is set
    if "%yaml value ""Giriş Tipi"" from ""OPGuard""%" is "GUI":
        set {_code} to length of "%yaml value ""Kod"" from ""OPGuard""%"
        set {_menucode} to amount of {opguard::%{_p}%::code::*}
        set {_menutitle::*} to "%{opguard::%{_p}%::code::*}%"
        replace all "and" with "" in {_menutitle::*}
        replace all "," with "" in {_menutitle::*}
        replace all " " with "" in {_menutitle::*}
        if {opguard::%{_p}%::code::*} isn't set:
            open virtual dispenser named "&6Güvenlik Kodunu Girin" to {_p}
        else:
            open virtual dispenser named "&6%{_menutitle::*}%" to {_p}
        if {_code} != {_menucode}:
            make gui slot 0 of {_p} with yellow glass pane named "&e1" to run:
                add 1 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})           
            make gui slot 1 of {_p} with 2 yellow glass pane named "&e2" to run:   
                add 2 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})          
            make gui slot 2 of {_p} with 3 yellow glass pane named "&e3" to run:
                add 3 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})  
            make gui slot 3 of {_p} with 4 yellow glass pane named "&e4" to run:
                add 4 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})  
            make gui slot 4 of {_p} with 5 yellow glass pane named "&e5" to run:
                add 5 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})  
            make gui slot 5 of {_p} with 6 yellow glass pane named "&e6" to run:
                add 6 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p}) 
            make gui slot 6 of {_p} with 7 yellow glass pane named "&e7" to run:
                add 7 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p}) 
            make gui slot 7 of {_p} with 8 yellow glass pane named "&e8" to run:
                add 8 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p}) 
            make gui slot 8 of {_p} with 9 yellow glass pane named "&e9" to run:
                add 9 to {opguard::%{_p}%::code::*}
                OPGuardVerify({_p})
        if {_code} = {_menucode}:
            make gui slot (numbers between 0 and 8) of {_p} with black glass pane
            make gui slot 4 of {_p} with light green glass pane named "&aDoğrula" to run:
                close {_p}'s inventory
                OPGuardCheck({_p}, {_menutitle::*})
    if "%yaml value ""Giriş Tipi"" from ""OPGuard""%" is "ANVIL":
        open anvil gui named "&6Güvenlik Kodunu Girin" to {_p} with default text "Kodu Girin"
    if "%yaml value ""Giriş Tipi"" from ""OPGuard""%" is "CHAT":
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Kodu Girin"" from ""OPGuard""%" to {_p}
on close anvil gui named "&6Güvenlik Kodunu Girin":
    OPGuardCheck(player, event-text)
command /opguard [<text>]:
    permission: op
    trigger:
        {opguard::%{_p}%::verified} is set
        if arg 1 isn't set:
            send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Kodu Girin"" from ""OPGuard""%" to player
            stop
        OPGuardCheck(player, arg 1)
function OPGuardCheck(p: player, code: text):
    if {_code} isn't "%yaml value ""Kod"" from ""OPGuard""%":
        kick {_p} due to "%yaml value ""Mesajlar.Atılma Mesajı"" from ""OPGuard""%"
        delete {opguard::%{_p}%::*}
        stop
    clear all effects from {_p}
    delete {opguard::%{_p}%::*}
    send {_p} title "" with subtitle "&aDoğrulama Başarılı" for 3 seconds
on chat:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
    wait 1 second
    OPGuardVerify(player) 
on command:
    {opguard::%player%::verified} is false
    if command isn't "opguard":
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
        wait 1 second
        OPGuardVerify(player) 
on place:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
    wait 1 second
    OPGuardVerify(player) 
          
on break:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
    wait 1 second
    OPGuardVerify(player) 
on pickup:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
    wait 1 second
    OPGuardVerify(player)  
on drop:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player  
    wait 1 second
    OPGuardVerify(player) 
          
on click:
    {opguard::%player%::verified} is false
    cancel event
    send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player  
    wait 1 second
    OPGuardVerify(player)


● Görseller;
1694094702154.png

1694094769605.png

1695890026314.png

1695890095472.png

1695890115045.png

1694094829477.png

1694094848953.png

1694094975371.png


● Kurulum & Açıklamalar;

plugins/Skript/script
dosya yoluna gidin ve OPGuard.sk adında bir dosya oluşturun. Oluşturduğunuz dosyanın içerisine verilen OPGuard.sk kodunu yapıştırın ve dosyayı kaydedin. Sunucunuz kapalı ise sunucunuzu başlatın, açık ise sunucunuzu yeniden başlatın. Bütün bu işlemler sonucunda OPGuard hizmete hazır hale gelecektir.


* Kod rakamlardan oluşmalı ve içerisinde 0 rakamı olmamalıdır, ancak giriş tipi CHAT olursa kod harf ve sayı içerebilir.
 
Son düzenleme:
fikri çok güzel çok beğendim tasarım olarak bakınca, kod biraz spagettiye dönmüş kısaltmayı ve basitleştirmeyi deneyebilirsiniz
 
fikri çok güzel çok beğendim tasarım olarak bakınca, kod biraz spagettiye dönmüş kısaltmayı ve basitleştirmeyi deneyebilirsiniz
Şu an son hâli ile yetineceğim, ancak diğer hâlinden Allah korusun. :D
 
Grief sorunlarını çözmek önlemek için güzel bir skript olmuş teşekkürler iyi çalışmalar.
 
Herkese Merhaba!

Eski hesabımdan paylaşmış olduğum OPGuard sistemini hem can sıkıntısından hem de o sistemi kullanan insanlar varsa onlar için yeniledim.


● Gereken Eklentiler;

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.



● Çalışma Şekli;

Eğer sunucuda yetkiliyseniz sunucuya katıldığınız anda sizden bir güvenlik kodu istenecektir. Bu kodu girmeden sunucuda hiçbir şey yapamazsınız. Amaç, ek bir güvenlik sistemi olup Grief v.b sorunları önlemektir.


● Yapılandırma (config.yml) Dosyası;

YAML:
Kod: 1234
Mesajlar:
  Prefix: '&3OP&bGuard &8»'
  Zaman Aşımı: '&cGüvenlik Kodunu Girmeniz Için Ayrılan Sürenin Sonuna Geldiniz!'
  Atılma Mesajı: '&cGirilen Kod Yanlış!'
  Eylem Mesajı: '&7Güvenlik kodunu girmeden hiçbir şey yapamazsınız.'


● Kod;
Kod:
on load:
    load yaml "plugins/OPGuard/config.yml" as "OPGuard"

on join:
    if player is op:
        OPGuardPrepare(player)
        wait 30 second
        if {opguard::%player%::verified} is false:
            kick player due to "%yaml value ""Mesajlar.Zaman Aşımı"" from ""OPGuard""%"
            delete {opguard::%player%::*}

on quit:
    if player is op:
        delete {opguard::%player%::*}

function OPGuardPrepare(p: player):
    set {opguard::%{_p}%::verified} to false
    clear all effects from {_p}
    wait a tick
    apply potion of resistance of tier 255 to {_p} for 10000 second
    apply potion of blindness of tier 255 to {_p} for 10000 second
    apply potion of slowness of tier 20 to {_p} for 10000 second
    OPGuardVerify({_p})

function OPGuardVerify(p: player):
    if {opguard::%{_p}%::verified} is false:
        if {opguard::%{_p}%::code::*} isn't set:
            open virtual dispenser named "&6Güvenlik Kodunu Girin" to {_p}
        if {opguard::%{_p}%::code::1} is set:
            open virtual dispenser named "&6%{opguard::%{_p}%::code::1}%" to {_p}
        if {opguard::%{_p}%::code::2} is set:
            open virtual dispenser named "&6%{opguard::%{_p}%::code::1}%%{opguard::%{_p}%::code::2}%" to {_p}
        if {opguard::%{_p}%::code::3} is set:
            open virtual dispenser named "&6%{opguard::%{_p}%::code::1}%%{opguard::%{_p}%::code::2}%%{opguard::%{_p}%::code::3}%" to {_p}
        if {opguard::%{_p}%::code::4} is set:
            open virtual dispenser named "&6%{opguard::%{_p}%::code::1}%%{opguard::%{_p}%::code::2}%%{opguard::%{_p}%::code::3}%%{opguard::%{_p}%::code::4}%" to {_p}
            make gui slot 4 of {_p} with light green glass pane named "&aDoğrula" to run:
                close {_p}'s inventory
                OPGuardCheck({_p})
            make gui slot 0 and 1 and 2 and 3 and 5 and 6 and 7 and 8 of {_p} with black glass pane
        else:
            make gui slot 0 of {_p} with yellow glass pane named "&e1" to run:
                add 1 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)  
            make gui slot 1 of {_p} with 2 yellow glass pane named "&e2" to run:
                add 2 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player) 
            make gui slot 2 of {_p} with 3 yellow glass pane named "&e3" to run:
                add 3 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 3 of {_p} with 4 yellow glass pane named "&e4" to run:
                add 4 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 4 of {_p} with 5 yellow glass pane named "&e5" to run:
                add 5 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 5 of {_p} with 6 yellow glass pane named "&e6" to run:
                add 6 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 6 of {_p} with 7 yellow glass pane named "&e7" to run:
                add 7 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 7 of {_p} with 8 yellow glass pane named "&e8" to run:
                add 8 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)
            make gui slot 8 of {_p} with 9 yellow glass pane named "&e9" to run:
                add 9 to {opguard::%{_p}%::code::*}
                OPGuardVerify(player)

function OPGuardCheck(p: player):
    if "%{opguard::%{_p}%::code::1}%%{opguard::%{_p}%::code::2}%%{opguard::%{_p}%::code::3}%%{opguard::%{_p}%::code::4}%" isn't "%yaml value ""Kod"" from ""OPGuard""%":
        kick {_p} due to "%yaml value ""Mesajlar.Atılma Mesajı"" from ""OPGuard""%"
        delete {opguard::%{_p}%::*}
        stop
    clear all effects from {_p}
    delete {opguard::%{_p}%::*}
    send {_p} title "" with subtitle "&aDoğrulama Başarılı" for 3 seconds

on chat:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player

on command:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player

on place:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
 
on break:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player

on pickup:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player

on drop:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player
 
on click:
    if {opguard::%player%::verified} is false:
        cancel event
        send "%yaml value ""Mesajlar.Prefix"" from ""OPGuard""% %yaml value ""Mesajlar.Eylem Mesajı"" from ""OPGuard""%" to player


● Görseller;


● Kurulum & Açıklamalar;

Öncelikle kodu Skript dosyanıza atıp /sk reload <dosya adı> yazın, ardından plugins dosyanızda oluşan OPGuard/config.yml dosyasına verilen config.yml ayarlarını yapıştırın ve yeniden /sk reload <dosya adı> yazın. Bütün bunları yaptıktan sonra OPGuard hizmete hazır olacaktır.

Kod 4 haneli olmalı ve 0 rakamı bulunmamalıdır, GUI tasarımı için 0 rakamı sistemde kullanılmamıştır.

Onun dışında kodu dilediğiniz gibi değiştirebilirsiniz. İyi forumlar.
Gayet başarılı bir paylaşım, başarılarınızın devamını dilerim.
 
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