INADINA CIFTCI - Ücretsiz Çiftci Eklentisi (ASkyBlock)

OnurBeyTR

Sudan Çıkmış
Mesajlar
2
En iyi cevaplar
0
Beğeniler
1
Puanları
70
1-giriş.png
görseller.png

ciftci1.png

ciftci2.png

ciftci3.png


Kod:
on load:
    checkYaml()
on unload:
    unload yaml "Ciftci/Ayar"
function checkYaml():
    if yaml "Ciftci/Ayar" is not loaded:
        load yaml "plugins/Skript/Ciftci/Ayarlar.yml" as "Ciftci/Ayar"
        set yaml value "Ciftci.Fiyat" from "Ciftci/Ayar" to 250000
        set yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Kaktüs.Max_Stok" from "Ciftci/Ayar" to 3500
        set yaml value "Ciftci.Depo.Buğday.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Buğday.Max_Stok" from "Ciftci/Ayar" to 3500 
        set yaml value "Ciftci.Depo.Şeker_Kamışı.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Şeker_Kamışı.Max_Stok" from "Ciftci/Ayar" to 3500 
        set yaml value "Ciftci.Depo.Karpuz.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Karpuz.Max_Stok" from "Ciftci/Ayar" to 3500
        set yaml value "Ciftci.Depo.Balkabağı.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Balkabağı.Max_Stok" from "Ciftci/Ayar" to 3500
        set yaml value "Ciftci.Depo.Kakao.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Kakao.Max_Stok" from "Ciftci/Ayar" to 3500
        set yaml value "Ciftci.Depo.Nether_Wart.Durum" from "Ciftci/Ayar" to true
        set yaml value "Ciftci.Depo.Nether_Wart.Max_Stok" from "Ciftci/Ayar" to 3500
        save yaml "Ciftci/Ayar" without extra lines between nodes

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

import:
    org.bukkit.Bukkit
    org.bukkit.World
    com.wasteofplastic.askyblock.ASkyBlockAPI as ASkyBlockAPI
    com.wasteofplastic.askyblock.events.IslandDeleteEvent
    com.wasteofplastic.askyblock.events.IslandResetEvent

on IslandDeleteEvent:
    ciftciSil("%event.getLocation()%")

on IslandResetEvent:
    ciftciSil("%event.getLocation()%")

function ciftciSil(loc:text):
    if {ciftci::*} contains "%{_loc}%":
        delete {ciftci::%{_loc}%}
        delete {ciftci::%{_loc}%::*}

command /ciftci [<text>]:
    aliases: /çiftci
    trigger:
        if arg-1 is not set:
            set {_x} to ASkyBlockAPI.getInstance().getIslandAt(location of player).getCenter()
            ciftciMenu(player,"%{_x}%")
        else if arg-1 is "reload" or "yenile":
            if player is op:
                configReload()
                send " Config yenilendi!"
            else:
                send " Yetersiz Yetki!"
function ciftciMenu(p:player, loc:text):
    set {_memberlist} to "%ASkyBlockAPI.getInstance().getIslandAt(location of {_p}).getMembers()%"
    replace all "[","]"," " with "" in {_memberlist}
    set {_members::*} to {_memberlist} split at ","
    loop {_members::*}:
        set {_x} to "%loop-value%"
        if {_x} is uuid of {_p}:
            set {_v} to true
    if {_v} is true:
        if {ciftci::%{_loc}%} 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},{_loc})
        else:
            open virtual chest inventory with size 6 named "&0Çiftci &8> Depo" to {_p}
            ciftciDepoEsyalar({_p},{_loc})
            while 1 is 1:
                wait a tick
                if name of {_p}'s current inventory is "&0Çiftci &8> Depo":
                    ciftciDepoEsyalar({_p},{_loc})
                    wait 1 seconds
                else:
                    stop
    else:
        send " Burası senin adan değil yada bu adada bir üye değilsin!" to {_p}
  
function ciftciDepoEsyalar(p:player, loc:text):
    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/Ayar"
    create gui slot 10 of {_p} with cactus with lore "||&7Stok: &6%{ciftci::%{_loc}%::cactus}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"cactus","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Buğday.Max_Stok" from "Ciftci/Ayar"
    create gui slot 11 of {_p} with wheat_item with lore "||&7Stok: &6%{ciftci::%{_loc}%::wheat}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"wheat","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Şeker_Kamışı.Max_Stok" from "Ciftci/Ayar"
    create gui slot 12 of {_p} with sugar_cane_item with lore "||&7Stok: &6%{ciftci::%{_loc}%::sugar_cane}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"sugar_cane","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Karpuz.Max_Stok" from "Ciftci/Ayar"
    create gui slot 13 of {_p} with melon_slice with lore "||&7Stok: &6%{ciftci::%{_loc}%::melon}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"melon","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Balkabağı.Max_Stok" from "Ciftci/Ayar"
    create gui slot 14 of {_p} with pumpkin with lore "||&7Stok: &6%{ciftci::%{_loc}%::pumpkin}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"pumpkin","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Kakao.Max_Stok" from "Ciftci/Ayar"
    create gui slot 15 of {_p} with cocoa_beans with lore "||&7Stok: &6%{ciftci::%{_loc}%::cocoa_beans}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"cocoa_beans","%clicked type%")
    set {_c} to yaml value "Ciftci.Depo.Nether_Wart.Max_Stok" from "Ciftci/Ayar"
    create gui slot 16 of {_p} with nether_wart_item with lore "||&7Stok: &6%{ciftci::%{_loc}%::nether_wart}%/%{_c}%%{_loredesc}%" to run:
        depoIslem({_p},"%{_loc}%",clicked item,"nether_wart","%clicked type%")

function depoIslem(p:player, loc:text, ci:item, v:text, ct:text):
    set {_amount} to {ciftci::%{_loc}%::%{_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::%{_loc}%::%{_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::%{_loc}%::%{_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, loc:text):
    set {_f} to yaml value "Ciftci.Fiyat" from "Ciftci/Ayar"
    if {_p}'s balance >= {_f}:
        remove {_f} from {_p}'s balance
        set {ciftci::%{_loc}%} to {_loc}
        ciftciDepoAyarla({_loc})
        send " Ciftci satın alındı!" to {_p}
    else:
        send " Bakiyen yetersiz!" to {_p}
  
function ciftciDepoAyarla(loc:text):
    set {ciftci::%{_loc}%::cactus} to 0
    set {ciftci::%{_loc}%::wheat} to 0
    set {ciftci::%{_loc}%::sugar_cane} to 0
    set {ciftci::%{_loc}%::melon} to 0
    set {ciftci::%{_loc}%::pumpkin} to 0
    set {ciftci::%{_loc}%::cocoa_beans} to 0
    set {ciftci::%{_loc}%::nether_wart} to 0

on grow:
    set {_x} to "%ASkyBlockAPI.getInstance().getIslandAt(event-location).getCenter()%"
    if {ciftci::*} contains "%{_x}%":
        if event-item is cactus:
            if yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                depoyaEkle("%{_x}%","cactus","Kaktüs",1)
        else if event-item is ripe_wheat:
            if yaml value "Ciftci.Depo.Buğday.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                set block at event-block to crops
                depoyaEkle("%{_x}%","wheat","Buğday",1)
        else if event-item is melon:
            if yaml value "Ciftci.Depo.Karpuz.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                depoyaEkle("%{_x}%","melon","Karpuz",(random integer between 1 and 7))
        else if event-item is pumpkin:
            if yaml value "Ciftci.Depo.Balkabağı.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                depoyaEkle("%{_x}%","pumpkin","Balkabağı",1)
        else if event-item is sugar_cane:
            if yaml value "Ciftci.Depo.Şeker_Kamışı.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                depoyaEkle("%{_x}%","sugar_cane","Şeker_Kamışı",1)
        else if event-item is ripe_nether_wart:
            if yaml value "Ciftci.Depo.Nether_Wart.Durum" from "Ciftci/Ayar" is true:
                event.setCancelled(true)
                set block at event-block to nether_wart_plant_block
                depoyaEkle("%{_x}%","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/Ayar" is true:
                event.setCancelled(true)
                set block at event-block to cocoa
                depoyaEkle("%{_x}%","cocoa_beans","Kakao",(random integer between 1 and 4))
  
function depoyaEkle(loc:text,i:text,yn:text,a:integer):
    if ({ciftci::%{_loc}%::%{_i}%}+{_a}) <= yaml value "Ciftci.Depo.%{_yn}%.Max_Stok" from "Ciftci/Ayar":
        add {_a} to {ciftci::%{_loc}%::%{_i}%}

ASkyBlock
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-Lime 3.6.1-Lime
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
Eklenecek
Eklenecek
 


Ekli dosyalar

  • ciftci3.png
    ciftci3.png
    18.4 KB · Görüntüleme: 139

ATOMCRAFTTR

Sudan Çıkmış
Mesajlar
3
En iyi cevaplar
0
Beğeniler
2
Puanları
20
skript olması dışında her şey güzel
başarılarınızın devamını dilerim.
 

AhmetAli02

Ağaç Yumruklayıcı
Mesajlar
16
En iyi cevaplar
0
Beğeniler
2
Puanları
20
Ruh hali
bence java bilgin varsa eklenti olarak yaz ama güzel eline sağlık
 

DangerYusuf

Zombi Katili
Mesajlar
219
En iyi cevaplar
1
Beğeniler
20
Puanları
500
Ruh hali
SuperiorSkyblock2 eklentisi için yapabilir misiniz?
 

NawieR

Ağaç Yumruklayıcı
Mesajlar
39
En iyi cevaplar
0
Beğeniler
4
Puanları
80
FabledSkyblock'da çalışan bir versiyonu yapabilirmisiniz? ve skript çok güzel olmuş elinize sağlık.
 
Son düzenleme:

Üst