OnurBeyTR
%79.99 Java
- Katılım
- 21 Ağustos 2017
- Mesajlar
- 184
- Elmaslar
- 92
- Puan
- 13.675
- Yaş
- 23
Discord:
onurbyrkl
Kod:
import:
org.bukkit.Bukkit
org.bukkit.World
java.lang.System
com.wasteofplastic.askyblock.ASkyBlockAPI as ASkyBlockAPI
com.wasteofplastic.askyblock.events.IslandDeleteEvent
com.wasteofplastic.askyblock.events.IslandResetEvent
org.bukkit.Location
on load:
load yaml "plugins/Skript/Ciftci/ASkyBlock/Ayarlar.yml" as "Ciftci-ASkyBlock-Ayar"
if yaml "Ciftci-ASkyBlock-Ayar" is empty:
set yaml value "Ciftci.Fiyat" from "Ciftci-ASkyBlock-Ayar" to 250000
set yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Kaktüs.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Buğday.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Buğday.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Şeker_Kamışı.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Şeker_Kamışı.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Karpuz.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Karpuz.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Balkabağı.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Balkabağı.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Kakao.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Kakao.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
set yaml value "Ciftci.Depo.Nether_Wart.Durum" from "Ciftci-ASkyBlock-Ayar" to true
set yaml value "Ciftci.Depo.Nether_Wart.Max_Stok" from "Ciftci-ASkyBlock-Ayar" to 3500
save yaml "Ciftci-ASkyBlock-Ayar" without extra lines between nodes
set {_pl} to "ASkyBlock"
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 unload:
unload yaml "Ciftci-ASkyBlock-Ayar"
function configReload():
unload yaml "Ciftci-ASkyBlock-Ayar"
load yaml "plugins/Skript/Ciftci/ASkyBlock/Ayarlar.yml" as "Ciftci-ASkyBlock-Ayar"
on IslandDeleteEvent and IslandResetEvent:
ciftciSil("%event.getLocation()%")
function ciftciSil(loc:text):
if {ciftci::askyblock::*} contains "%{_loc}%":
delete {ciftci::askyblock::%{_loc}%}
delete {ciftci::askyblock::%{_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::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 10 of {_p} with cactus with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 11 of {_p} with wheat_item with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 12 of {_p} with sugar_cane_item with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 13 of {_p} with melon_slice with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 14 of {_p} with pumpkin with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 15 of {_p} with cocoa_beans with lore "||&7Stok: &6%{ciftci::askyblock::%{_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-ASkyBlock-Ayar"
create gui slot 16 of {_p} with nether_wart_item with lore "||&7Stok: &6%{ciftci::askyblock::%{_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::askyblock::%{_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::askyblock::%{_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::askyblock::%{_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-ASkyBlock-Ayar"
if {_p}'s balance >= {_f}:
remove {_f} from {_p}'s balance
set {ciftci::askyblock::%{_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::askyblock::%{_loc}%::cactus} to 0
set {ciftci::askyblock::%{_loc}%::wheat} to 0
set {ciftci::askyblock::%{_loc}%::sugar_cane} to 0
set {ciftci::askyblock::%{_loc}%::melon} to 0
set {ciftci::askyblock::%{_loc}%::pumpkin} to 0
set {ciftci::askyblock::%{_loc}%::cocoa_beans} to 0
set {ciftci::askyblock::%{_loc}%::nether_wart} to 0
on grow:
set {_x} to "%ASkyBlockAPI.getInstance().getIslandAt(event-location).getCenter()%"
if {ciftci::askyblock::*} contains "%{_x}%":
if event-item is cactus:
if yaml value "Ciftci.Depo.Kaktüs.Durum" from "Ciftci-ASkyBlock-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-ASkyBlock-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-ASkyBlock-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-ASkyBlock-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-ASkyBlock-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-ASkyBlock-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-ASkyBlock-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::askyblock::%{_loc}%::%{_i}%}+{_a}) <= yaml value "Ciftci.Depo.%{_yn}%.Max_Stok" from "Ciftci-ASkyBlock-Ayar":
add {_a} to {ciftci::askyblock::%{_loc}%::%{_i}%}
Değerli ziyaretçimiz, içeriği görebilmek için
şimdi giriş yapın veya kayıt olun.
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-* 3.6.1-*
Skellett
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ı!
Skripti izinsiz paylaşmak yasaktır, Emeğe saygı!
- Yaml dosyalaması konumu değiştirildi.
- Reload süresi kısaltıldı.
- Reload süresi kısaltıldı.
Normalde Plugin olarak yapılacaktı fakat herkesin düzenleyebilmesi için bu şekilde yapıldı!
Ekli dosyalar
Son düzenleme: