Skript Paylaşımı INADINA CIFTCI - Ücretsiz Çiftci Skripti (GriefPrevention)

  • Konuyu Başlatan Konuyu Başlatan OnurBeyTR
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 3.785
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

OnurBeyTR

%79.99 Java
Katılım
21 Ağustos 2017
Mesajlar
184
Elmaslar
92
Puan
13.675
Yaş
23

Discord:

onurbyrkl

1-giriş.png

görseller.png


ciftci1.png

ciftci2.png

ciftci3.png

Kod:
import:
    org.bukkit.Bukkit
    org.bukkit.World
    java.lang.System
    me.ryanhamshire.GriefPrevention.Claim
    me.ryanhamshire.GriefPrevention.GriefPrevention
    org.bukkit.Location
    me.ryanhamshire.GriefPrevention.events.ClaimDeletedEvent


on load:
    load yaml "plugins/Skript/Ciftci/GriefPrevention/Ayarlar.yml" as "Ciftci-GriefPrevention-Ayar"
    if yaml "Ciftci-GriefPrevention-Ayar" is empty:
        set yaml value "Ciftci.Fiyat" from "Ciftci-GriefPrevention-Ayar" to 250000
        set yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Kaktüs.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500
        set yaml value "Ciftci.Depo.Buğday.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Buğday.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500 
        set yaml value "Ciftci.Depo.Şeker_Kamışı.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Şeker_Kamışı.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500 
        set yaml value "Ciftci.Depo.Karpuz.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Karpuz.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500
        set yaml value "Ciftci.Depo.Balkabağı.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Balkabağı.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500
        set yaml value "Ciftci.Depo.Kakao.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Kakao.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500
        set yaml value "Ciftci.Depo.Nether_Wart.Durum" from "Ciftci-GriefPrevention-Ayar" to true
        set yaml value "Ciftci.Depo.Nether_Wart.Max_Stok" from "Ciftci-GriefPrevention-Ayar" to 3500
        save yaml "Ciftci-GriefPrevention-Ayar" without extra lines between nodes
    set {_pl} to "GriefPrevention"
    if Bukkit.getPluginManager().isPluginEnabled({_pl}) is false:
        System.out.println("-------------[CIFTCI]-------------")
        System.out.println(" ")
        System.out.println(" %{_pl}% Eklentisi Bulunamadi!")
        System.out.println(" ")
        System.out.println("-------------[CIFTCI]-------------")
        execute console command "/stop"


on ClaimDeletedEvent:
    ciftciSil(event.getClaim().getID())
      


function ciftciSil(id:integer):
    if {ciftci::griefprevention::*} contains {_id}:
        delete {ciftci::griefprevention::%{_id}%}
        delete {ciftci::griefprevention::%{_id}%::*}

command /ciftci [<text>]:
    aliases: /çiftci
    trigger:
        if arg-1 is not set:
            set {_claim} to GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), false, null)
            set {_id} to {_claim}.getID()
            if {_id} is set:
                if {_claim}.isAdminClaim() is false:
                    set {_y} to false
                    if {_claim}.getOwnerName() is player.getName():
                        set {_y} to true
                    if {_claim}.allowBuild(player) is not set:
                        set {_y} to true
                    if {_y} is true:
                        ciftciMenu(player,{_id})
                    else:
                        send " Bu claimde yetkin yok!"
                else:
                    send " Burası bir admin claimi!"
            else:
                send " Buraya claim atılmamış!"
        else if arg-1 is "reload" or "yenile":
            if player is op:
                configReload()
                send " Config yenilendi!"
            else:
                send " Yetersiz Yetki!"

          
function ciftciMenu(p:player, id:integer):
    if {ciftci::griefprevention::%{_id}%} is not set:
        open virtual chest inventory with size 1 named "&0Çiftci &8> Satın Al" to {_p}
        wait a ticks
        loop 9 times:
            if slot (loop-value)-1 of {_p}'s current inventory is air:
                create gui slot (loop-value)-1 of {_p} with gray_stained_glass_pane to nothing
        create gui slot 4 of {_p} with golden_hoe named "&dÇiftci" with lore "||&7Çiftci satın almak için tıkla!" to close then run function ciftciSatinAl({_p},{_id})
    else:
        open virtual chest inventory with size 6 named "&0Çiftci &8> Depo" to {_p}
        ciftciDepoEsyalar({_p},{_id})
        while 1 is 1:
            wait a tick
            if name of {_p}'s current inventory is "&0Çiftci &8> Depo":
                ciftciDepoEsyalar({_p},{_id})
                wait 1 seconds
            else:
                stop
  
function ciftciDepoEsyalar(p:player, id:integer):
    set {_loredesc} to "||||&dSol+Tık &764 Adet Al||&dSol+Tık+Shift &7Envanteri Doldur"
    set {_c} to yaml value "Ciftci.Depo.Kaktüs.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 10 of {_p} with cactus with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::cactus}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"cactus","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Buğday.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 11 of {_p} with wheat_item with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::wheat}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"wheat","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Şeker_Kamışı.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 12 of {_p} with sugar_cane_item with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::sugar_cane}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"sugar_cane","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Karpuz.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 13 of {_p} with melon_slice with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::melon}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"melon","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Balkabağı.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 14 of {_p} with pumpkin with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::pumpkin}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"pumpkin","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Kakao.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 15 of {_p} with cocoa_beans with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::cocoa_beans}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"cocoa_beans","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Nether_Wart.Max_Stok" from "Ciftci-GriefPrevention-Ayar"
    create gui slot 16 of {_p} with nether_wart_item with lore "||&7Stok: &6%{ciftci::griefprevention::%{_id}%::nether_wart}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},{_id},clicked item,"nether_wart","%clicked type%")

function depoIslem(p:player, id:integer, ci:item, v:text, ct:text):
    set {_amount} to {ciftci::griefprevention::%{_id}%::%{_v}%}
    if {_ct} is "left mouse button":
        if {_amount} <= 0:
            send " Depoda bu eşyadan yeterli miktarda yok!" to {_p}
            stop
        if {_amount} >= 64:
            set {_amount} to 64
        if {_p} has enough space for {_amount} of type of {_ci}:
            remove {_amount} from {ciftci::griefprevention::%{_id}%::%{_v}%}
            give {_amount} of type of {_ci} to {_p}
        else:
            send " Çantanda yeterli yer yok!" to {_p}
    else if {_ct} is "left mouse button with shift":
        if {_amount} <= 0:
            send " Depoda bu eşyadan yeterli miktarda yok!" to {_p}
            stop
        loop {_amount} times:
            if {_p} has enough space for 1 of type of {_ci}:
                remove 1 from {ciftci::griefprevention::%{_id}%::%{_v}%}
                give 1 of type of {_ci} to {_p}
            else:
                stop
          
on inventory click:
    if name of player's current inventory is "&0Çiftci &8> Depo":
        cancel event

function ciftciSatinAl(p:player, id:integer):
    set {_f} to yaml value "Ciftci.Fiyat" from "Ciftci-GriefPrevention-Ayar"
    if {_p}'s balance >= {_f}:
        remove {_f} from {_p}'s balance
        set {ciftci::griefprevention::%{_id}%} to {_id}
        ciftciDepoAyarla({_id})
        send " Ciftci satın alındı!" to {_p}
    else:
        send " Bakiyen yetersiz!" to {_p}
  
function ciftciDepoAyarla(id:integer):
    set {ciftci::griefprevention::%{_id}%::cactus} to 0
    set {ciftci::griefprevention::%{_id}%::wheat} to 0
    set {ciftci::griefprevention::%{_id}%::sugar_cane} to 0
    set {ciftci::griefprevention::%{_id}%::melon} to 0
    set {ciftci::griefprevention::%{_id}%::pumpkin} to 0
    set {ciftci::griefprevention::%{_id}%::cocoa_beans} to 0
    set {ciftci::griefprevention::%{_id}%::nether_wart} to 0 
  

on unload:
    unload yaml "Ciftci-GriefPrevention-Ayar"
function configReload():
    unload yaml "Ciftci-GriefPrevention-Ayar"
    load yaml "plugins/Skript/Ciftci/GriefPrevention/Ayarlar.yml" as "Ciftci-GriefPrevention-Ayar"



on grow:
    set {_x} to GriefPrevention.instance.dataStore.getClaimAt(event-location, false, null)
    set {_id} to {_x}.getID()
    if {ciftci::griefprevention::%{_id}%} is set:
        if event-item is cactus:
            if yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                depoyaEkle({_id},"cactus","Kaktüs",1)
        else if event-item is ripe_wheat:
            if yaml value "Ciftci.Depo.Buğday.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                set block at event-block to crops
                depoyaEkle({_id},"wheat","Buğday",1)
        else if event-item is melon:
            if yaml value "Ciftci.Depo.Karpuz.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                depoyaEkle({_id},"melon","Karpuz",(random integer between 1 and 7))
        else if event-item is pumpkin:
            if yaml value "Ciftci.Depo.Balkabağı.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                depoyaEkle({_id},"pumpkin","Balkabağı",1)
        else if event-item is sugar_cane:
            if yaml value "Ciftci.Depo.Şeker_Kamışı.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                depoyaEkle({_id},"sugar_cane","Şeker_Kamışı",1)
        else if event-item is ripe_nether_wart:
            if yaml value "Ciftci.Depo.Nether_Wart.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                set block at event-block to nether_wart_plant_block
                depoyaEkle({_id},"nether_wart","Nether_Wart",(random integer between 1 and 4))
        else if event-item is big_cocoa_plant:
            if yaml value "Ciftci.Depo.Kakao.Durum" from "Ciftci-GriefPrevention-Ayar" is true:
                event.setCancelled(true)
                set block at event-block to cocoa
                depoyaEkle({_id},"cocoa_beans","Kakao",(random integer between 1 and 4))
      
function depoyaEkle(id:integer,i:text,yn:text,a:integer):
    if ({ciftci::griefprevention::%{_id}%::%{_i}%}+{_a}) <= yaml value "Ciftci.Depo.%{_yn}%.Max_Stok" from "Ciftci-GriefPrevention-Ayar":
        add {_a} to {ciftci::griefprevention::%{_id}%::%{_i}%}



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

GriefPrevention
Herhangi bir Ekonomi Eklentisi
Skript 2.2 dev36
skript-mirror 2.0.0-SNAPSHOT
skript-yaml 1.3.2
TuSKe 1.8.3-PikachuPatch-v3
SkQuery-* 3.6.1-*
Skellett

Hiçbir şey kusursuz değildir, bir hata ve kusur gördüğünüzde aşağılamak yerine lütfen bana bildirin!
Skripti izinsiz paylaşmak yasaktır, Emeğe saygı!


Eklenecek

Normalde Plugin olarak yapılacaktı fakat herkesin düzenleyebilmesi için bu şekilde yapıldı!
 
İşsiiiiz XD XD Hocam bu sunucuyu çökertmez mi ? Eğer çökertmezse direk kullanacağım..
 
Ben istedim, sen yaptın. Helal olsun reis. :-)
 
Cidden böyle bir skripti ücretsiz paylaşmanız çok güzel.
Elinize sağlık, başarılar dilerim <3​
 
İnadına Tüccar paylaşırsanız çok iyi olur.(Bence bu sefer plugin olarak paylaşın. Çiftçide düzenleme için skript kullanmanızı anladım ama Tüccarda plugin olması daha iyi olur.) İyi forumlar. Geyik bir eklenti olmayacağını biliyorum. ?
 
İnadına Tüccar paylaşırsanız çok iyi olur.(Bence bu sefer plugin olarak paylaşın. Çiftçide düzenleme için skript kullanmanızı anladım ama Tüccarda plugin olması daha iyi olur.) İyi forumlar. Geyik bir eklenti olmayacağını biliyorum. ?
Java konusunda daha o kadar gelişmiş değilim, yani ortaya Geyik bir eklenti çıkacaktır kendimi geliştirdikten sonra bu işe girmek daha mantıklı gibi.
 
Arkadaşlar Hastebin de script yazısı gelmiyor lütfen birisi bana dosya.co ya yükleyip linkini atabilirmi lütfenn :)
 
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