Skript Paylaşımı Home.sk | Made by cactusdev | Skript-yaml desteği eklendi, Güvensiz alanlara ForceTP eklendi | 1.20.4

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

cactusdev

where is my dessert?
Katılım
19 Ocak 2023
Mesajlar
50
Elmaslar
42
Puan
4.155
Yaş
18
Konum
çöl
Discord İzni
Minecraft
itscactusdev

Discord:

cactusdev

Merhaba canlarımın içi,
uzun süredir buralardan uzağım piyasadan ne haberim var nede alakam var
eğer hatırlarsanız 1-2 sene önce zRooter, eyyüp. isimleriyle Piyasada dolaşmıştım ve sonra
cactusdev olarak ismimi değiştirip piyasayı uzun bir süre salmıştım (yaklaşık 1 senedir ortada yokum)

Şimdi ise geri dönüş zamanı bu Skripti skripti unuttummu unutmadımmı diye yaptım
Sonuç olarak çoğu şeyi unutmuşum ama geri döneceğim.


Başlayalım home skriptimize

Özellikler:
/home oluştur - Ev oluşturur
/home sil (adı) - Ev siler
/home - Ev menüsünü açar

Fotoğraflar

1709498900653.png

1709498911174.png


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

Gerekli eklentiler:
Skript
skript-gui
skript-yaml


Kod:
#
#
#
#     MADE BY
#    CACTUSDEV
#
#    Dosya Adı: Home.sk
#

    
on load:
    setupConfig()
    send "%yaml value "prefix" from "config"% &aHome Skript aktifleşti" to console

command /ev [<text>] [<text>]:
    aliases: home
    trigger:
        if arg-1 is not set:
            homeGUI(player)
        else if arg 1 is "forcetp":
            if yaml value "homes.%name of player%.%arg 2%" from "homesDB" exists:
                set {_loc} to location at (yaml value "homes.%name of player%.%arg 2%.x" from "homesDB", yaml value "homes.%name of player%.%arg 2%.y" from "homesDB", yaml value "homes.%name of player%.%arg 2%.z" from "homesDB") in world yaml value "homes.%name of player%.%arg 2%.world" from "homesDB" parsed as world
                safeTeleport(player, {_loc}, arg 2, true)
                stop
            else:
                send "%yaml value "prefix" from "config"% &cEvin silinmiş olabilir"
                stop
        else if arg 1 is "sil" or "remove" or "delete":
            if size of yaml node keys "homes.%name of player%" from "homesDB" is lower or equal to 0:
                send "%yaml value "prefix" from "config"% &cSilmek için bir evin yok."
            if arg 2 is set:
                if yaml value "homes.%name of player%.%arg 2%" from "homesDB" exists:
                    delete yaml value "homes.%name of player%.%arg 2%" from "homesDB"
                    save yaml "homesDB"
                    send "%yaml value "prefix" from "config"% &e%arg 2% &aEviniz silindi"
                else:
                    send "%yaml value "prefix" from "config"% &e%arg-2% &cisminde eviniz bulunamadı"
        else if arg 1 is "oluştur" or "create":
            if size of yaml node keys "homes.%name of player%" from "homesDB" is greater or equal to 7:
                send "%yaml value "prefix" from "config"% &cSadece &e7 &cev hakkın var."
                stop
            if arg 2 is set:
                if yaml value "homes.%name of player%.%arg 2%" from "homesDB" exists:
                    send "%yaml value "prefix" from "config"% &e%arg-2%. &cadında bir evin var zaten."
                    stop
                set yaml value "homes.%name of player%.%arg 2%.x" from "homesDB" to player's x-coordinate
                set yaml value "homes.%name of player%.%arg 2%.y" from "homesDB" to player's y-coordinate
                set yaml value "homes.%name of player%.%arg 2%.z" from "homesDB" to player's z-coordinate
                set yaml value "homes.%name of player%.%arg 2%.pitch" from "homesDB" to player's pitch
                set yaml value "homes.%name of player%.%arg 2%.yaw" from "homesDB" to player's yaw
                set yaml value "homes.%name of player%.%arg 2%.world" from "homesDB" to name of player's world
                save yaml "homesDB"
                send "%yaml value "prefix" from "config"% &e%arg-2%. &aEviniz oluşturuldu."
            else:
                send "%yaml value "prefix" from "config"% &cLütfen bir Ev ismi giriniz."
            


function setupConfig():
    load yaml "plugins/cactusdev/HomeSK/config.yml" as "config"
    load yaml "plugins/cactusdev/HomeSK/homes.yml" as "homesDB"
    if yaml path "prefix" in "config" doesn't exist:
        set yaml value "prefix" from "config" to "&aHome &7»"
    save yaml "config"

function homeGUI(p: player):
    create a gui with virtual chest inventory with 3 rows named "&e&nEvleriniz" and shape "=========", "=0123456=" and "=========":
        make gui slot "=" with red stained glass pane named "&c"
        set {_i} to 0
        loop yaml node keys "homes.%name of {_p}%" from "homesDB":
            set {_name} to "%loop-key%"
            set {_loc} to location at (yaml value "%loop-node%.x" from "%loop-id%", yaml value "%loop-node%.y" from "%loop-id%", yaml value "%loop-node%.z" from "%loop-id%") in world yaml value "%loop-node%.world" from "%loop-id%" parsed as world
            make gui slot "%{_i}%" with grass block named "&f%{_name}%" with lore "&a", "&7Ev bilgileri:", "&c  &eDünya: &c%{_loc}'s world%", "","&7Kordinat Bilgisi:", "&c  &eX: &f%{_loc}'s x-coordinate%", "&c  &eY: &f%{_loc}'s y-coordinate%", "&c  &eZ: &f%{_loc}'s z-coordinate%":
                safeTeleport({_p}, {_loc}, {_name}, false)
            add 1 to {_i}
    open the last gui for {_p}

function safeTeleport(p: player, loc: location, homeName: text, force: boolean):
    send "%yaml value "prefix" from "config"% &eEvine ışınlanıyorsun..." to {_p}
    set {_loc} to highest block at location ({_loc}'s x-coordinate, 0, {_loc}'s z-coordinate) in world ({_loc}'s world)
    loop blocks above block at {_loc}:
        if block under loop-block or loop-block or block above loop-block is lava: 
            if {_force} is false:
                send formatted "%yaml value "prefix" from "config"% <tooltip:&eSebebi: &fAltında &cLav &fvar.>&cEvine ışınlanamadın çünkü güvenli değil" to {_p}
                send formatted "&cEğer ışınlanmaya eminsen <tooltip:&fIşınlanmak için Tıkla><command:/home forcetp %{_homeName}%>&f&n&lBURAYA TIKLA<reset>" to {_p}
            else:
                teleport {_p} to {_loc}
                send "%yaml value "prefix" from "config"% &aEvine ışınlandın, &cBurası güvenli olmayabilir." to {_p}
            stop
        else if block under loop-block or loop-block or block above loop-block is water: 
            if {_force} is false:
                send formatted "%yaml value "prefix" from "config"% <tooltip:&eSebebi: &fAltında &bSu &fvar.>&cEvine ışınlanamadın çünkü güvenli değil." to {_p}
                send formatted "&cEğer ışınlanmaya eminsen <tooltip:&fIşınlanmak için Tıkla><command:/home forcetp %{_homeName}%>&f&n&lBURAYA TIKLA<reset>" to {_p}
            else:
                teleport {_p} to {_loc}
                send "%yaml value "prefix" from "config"% &aEvine ışınlandın, &cBurası güvenli olmayabilir." to {_p}
            stop
        else:
            add 2 to y-location of {_loc}
            teleport {_p} to {_loc}
            send "%yaml value "prefix" from "config"% &aEvine ışınlandın." to {_p}
            stop
 
Son düzenleme:
Güzel skript fakat şöyle bir şey ekleseniz fena olmaz mıydı?

qweqwewqeqeqew.png


JavaScript:
# //code
    
    loop blocks above block at {_loc}:
        if block under loop-block or loop-block or block above loop-block is lava:
            send "&cEviniz güvende değil." to {_p}
            
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
            
            stop
        else if block under loop-block or loop-block or block above loop-block is water:
            send "&cEviniz güvende değil." to {_p}
            
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
            
            stop
            
#    // code

function json(p: player, targetLoc: location):: text:
    {_targetLoc} is set:
        set {_teleporter} to "teleport %{_p}% %x-coordinate of {_targetLoc}% %y-coordinate of {_targetLoc}% %z-coordinate of {_targetLoc}%"
        set {_out} to "tellraw %{_p}% {""text"":""&6&l| &eEviniz güvende değil, yine de ışınlanmak istiyor musunuz? &6&l[EVET]"",""bold"":true,""color"":""gold"",""clickEvent"":{""action"":""run_command"",""value"":""/%{_teleporter}%""},""hoverEvent"":{""action"":""show_text"",""contents"":[{""text"":""&eEve gitmek için tıkla!"",""color"":""yellow""}]}}"
    return {_out}
 
Skript başarılı ellerinize sağlık. Bir kaç eksik haricinde kullanılabilir bir skripte benziyor. Örneğin skriptin kendi database inde saklaması veri kaybına yol açabilir. Skript-yaml eklentisini kullanarak kalıcı veri tutumu yapsanız daha sağlıklı olabilir.
 
Skript başarılı ellerinize sağlık. Bir kaç eksik haricinde kullanılabilir bir skripte benziyor. Örneğin skriptin kendi database inde saklaması veri kaybına yol açabilir. Skript-yaml eklentisini kullanarak kalıcı veri tutumu yapsanız daha sağlıklı olabilir.
Geri dönüş için teşekkürler bunu ekleyeceğim bugün.

Güzel skript fakat şöyle bir şey ekleseniz fena olmaz mıydı?

Ekli dosyayı görüntüle 236681

JavaScript:
# //code
   
    loop blocks above block at {_loc}:
        if block under loop-block or loop-block or block above loop-block is lava:
            send "&cEviniz güvende değil." to {_p}
           
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
           
            stop
        else if block under loop-block or loop-block or block above loop-block is water:
            send "&cEviniz güvende değil." to {_p}
           
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
           
            stop
           
#    // code

function json(p: player, targetLoc: location):: text:
    {_targetLoc} is set:
        set {_teleporter} to "teleport %{_p}% %x-coordinate of {_targetLoc}% %y-coordinate of {_targetLoc}% %z-coordinate of {_targetLoc}%"
        set {_out} to "tellraw %{_p}% {""text"":""&6&l| &eEviniz güvende değil, yine de ışınlanmak istiyor musunuz? &6&l[EVET]"",""bold"":true,""color"":""gold"",""clickEvent"":{""action"":""run_command"",""value"":""/%{_teleporter}%""},""hoverEvent"":{""action"":""show_text"",""contents"":[{""text"":""&eEve gitmek için tıkla!"",""color"":""yellow""}]}}"
    return {_out}
Bunu zaten yapmayı düşündüğümü skript topluluğunda belirtmiştim kodu yazmaya üşendiydim bugün yazcaktım şimdi yazmama gerek kalmadı direk bunu entegre edeceğim sağolasın :) xD
 
Geri dönmene sevindik Eyüp, yine başarılı bir skript.
 
Genel olarak iyi bir fikir, tebrik ederim.
/home kaydet komutu yerine /ev kaydet komutuyla değiştirebilirsiniz. Biraz tuhaf görünüyor değil mi, bir İngilizce bir Türkçe?
 
Genel olarak iyi bir fikir, tebrik ederim.
/home kaydet komutu yerine /ev kaydet komutuyla değiştirebilirsiniz. Biraz tuhaf görünüyor değil mi, bir İngilizce bir Türkçe?
Düzenlendi.

Skript başarılı ellerinize sağlık. Bir kaç eksik haricinde kullanılabilir bir skripte benziyor. Örneğin skriptin kendi database inde saklaması veri kaybına yol açabilir. Skript-yaml eklentisini kullanarak kalıcı veri tutumu yapsanız daha sağlıklı olabilir.
Yapıldı.

Güzel skript fakat şöyle bir şey ekleseniz fena olmaz mıydı?

Ekli dosyayı görüntüle 236681

JavaScript:
# //code
   
    loop blocks above block at {_loc}:
        if block under loop-block or loop-block or block above loop-block is lava:
            send "&cEviniz güvende değil." to {_p}
           
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
           
            stop
        else if block under loop-block or loop-block or block above loop-block is water:
            send "&cEviniz güvende değil." to {_p}
           
            set {_json} to json(player, {_loc})
            execute console command "%{_json}%"
           
            stop
           
#    // code

function json(p: player, targetLoc: location):: text:
    {_targetLoc} is set:
        set {_teleporter} to "teleport %{_p}% %x-coordinate of {_targetLoc}% %y-coordinate of {_targetLoc}% %z-coordinate of {_targetLoc}%"
        set {_out} to "tellraw %{_p}% {""text"":""&6&l| &eEviniz güvende değil, yine de ışınlanmak istiyor musunuz? &6&l[EVET]"",""bold"":true,""color"":""gold"",""clickEvent"":{""action"":""run_command"",""value"":""/%{_teleporter}%""},""hoverEvent"":{""action"":""show_text"",""contents"":[{""text"":""&eEve gitmek için tıkla!"",""color"":""yellow""}]}}"
    return {_out}
Yapıldı :)
 
Düzenlendi.


Yapıldı.


Yapıldı :)
Böylesi daha iyi olmuş fakat yaml ve gui için sizce addon gerekli mi? Skript'in kendi değişkenleri daha hızlı diye biliyorum ve gui için vanilla tercih edebilirdiniz ama yine de güzel.
 
Böylesi daha iyi olmuş fakat yaml ve gui için sizce addon gerekli mi? Skript'in kendi değişkenleri daha hızlı diye biliyorum ve gui için vanilla tercih edebilirdiniz ama yine de güzel.
vanilla gui kullanıcaktım fakat Skript topluluğunda sorduğumda Skript gui kullanmamı söylediler skript yaml kullanma sebebim ise kullanıcı isteğinden üsteki mesajlarda bulunuyor.
 
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