Çözüldü Essentials Paralı Kit Yapımı

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

Dark_4

Zombi Geldi, Beni Yedi
Katılım
24 Ağustos 2019
Mesajlar
241
Elmaslar
110
Puan
4.095
Yaş
27
Minecraft
Dark_4

Discord:

Evoshi Hatake#6144

Arkadaşlar Yeni Essentials'da Kits.yml Diye Bir Yer Var Kitleri Nasıl Paralı Yapcağımı Bilmiyorum Lütfen Yardım Edermisiniz?
 
Kod:
command /kit ismi:
    trigger:
        execute console command "eco take %player% 50000"
        else:
            "send "&eBu kiti alabilmek için 50.000 paraya ihtiyacın var."
 
Skripti lütfen sallamadan yazın :D

kits.yml dosyasını atarmısın
Kod:
# EssentialsX kit configuration.
# If you don't have any kits defined in this file, the plugin will try to copy them from the config.yml
#
# Note: All items MUST be followed by a quantity!
# All kit names should be lower case, and will be treated as lower in permissions/costs.
# Syntax: - name[:durability] amount [enchantment:level]... [itemmeta:value]...
# For Item Meta information visit http://wiki.ess3.net/wiki/Item_Meta
# 'delay' refers to the cooldown between how often you can use each kit, measured in seconds.
# Set delay to -1 for a one time kit.
# For more information, visit http://wiki.ess3.net/wiki/Kits
kits:
  Ninjakit:
    delay: 30
    items:
    - diamondsword 1 damage_all:2
    - goldenapple 5
    - fishingrod 1 durability:1
    - leatherhelmet 1 protection_environmental:1 color:1644825
    - leatherchestplate 1 protection_environmental:2 color:1644825
    - leatherleggings 1 protection_environmental:1 color:1644825
    - leatherboots 1 protection_environmental:1 color:1644825
    - apple 1 name:&eHIZ
    - fishingrod 1 durability:1
  normal:
    delay: 30
    items:
    - ironsword 1 damage_all:2
    - goldenapple 2
    - fishingrod 1
    - flintandsteel:46 1
    - ironhelmet 1 protection_environmental:1
    - ironchestplate 1 protection_environmental:1
    - ironleggings 1 protection_environmental:1
    - ironboots 1 protection_environmental:1
  dikenadam:
    delay: 30
    items:
    - stonesword 1 damage_all:2
    - fishingrod 1
    - goldenapple 3
    - splashregenerationpotion:1 1 splash:true effect:regeneration power:0 duration:33
    - splashregenerationpotion:1 1 splash:true effect:regeneration power:0 duration:33
    - ironhelmet 1 protection_environmental:2 thorns:2
    - diamondchestplate 1 protection_environmental:2 thorns:2
    - ironleggings 1 protection_environmental:2 thorns:2
    - ironboots 1 protection_environmental:2 thorns:2
 
Yardımcı Olcak Kimse Yokmu?
 
JavaScript:
on command "/kit x":
    if player's balance is bigger than 100:
        remove 100 from player's balance
        execute player command "kit x"
 
on command "/kit x": if player's balance is bigger than 100: remove 100 from player's balance execute player command "kit x"
Olmuyor Hata Veriyor
Kod:
'player's balance' is not an entity type (paralıkit.sk, line 2: if
player's balance is bigger than 100:')
Acil Yardım Edin Nolur
 
Kod:
on load:
    load yaml "plugins/Essentials/kits.yml" as "Kits"
   
command /kit-admin [<text=help>] [<text>] [<integer>]:
    permission: kit.admin
    trigger:
        if arg-1 is "help":
            send "/kit-admin para <kit adı> <para>"
        if arg-1 is "para":
            if (yaml value "kits.%arg-2%" from "Kits") is set:
                if arg-3 is set:
                    set yaml value "kits.%arg-2%.price" from "Kits" to arg-3
                    save yaml "Kits"
                    send "%arg-2% kiti için %arg-3% miktarda para ayarlandı."
function temizle():
    loop yaml nodes with keys "kits" from "Kits":
        loop {kitSistemi::kitalanlar::%loop-value%::*}:
            if {kitSistemi::cooldown::%loop-value-1%::%loop-value-2%} is less than now:
                delete {kitSistemi::cooldown::%loop-value-1%::%loop-value-2%}
                delete {kitSistemi::kitalanlar::%loop-value-1%::%loop-value-2%}
function kitAl(p: player,kit: text):
    set {_price} to yaml value "kits.%{_kit}%.price" from "Kits"
    remove {_price} from {_p}'s account
    set {_items::*} to yaml list "kits.%{_kit}%.items" from "Kits"
    set {_delay} to yaml value "kits.%{_kit}%.delay" from "Kits"
    loop {_items::*}:
        set {_item::*} to loop-value split at "name:"
        set {_itemtype} to first element of {_item::*}
        set {_lore::*} to loop-value split at "lore:"
        set {_lores::*} to last element of {_lore::*}
        set {_itemname} to last element of {_item::*}
        replace "lore:%{_lores::*}%" with "" in {_itemname}
        give {_itemtype} parsed as item type named "%colored {_itemname}%" with lore "%colored {_lores::*}%" to {_p}
    set {kitSistemi::cooldown::%{_kit}%::%{_p}%} to ("%{_delay}% seconds") parsed as timespan later
    set {kitSistemi::kitalanlar::%{_kit}%::%{_p}%} to {_p}
every 30 minutes:
    temizle()
command /kit <text>:
    trigger:
        if (yaml value "kits.%arg-1%" from "Kits") is set:
            set {_price} to yaml value "kits.%arg-1%.price" from "Kits"
            if player's money >= {_price}:
                if {kitSistemi::cooldown::%arg-1%::%player%} is not set:
                    kitAl(player,arg-1)
                    send "%arg-1% kitini aldın."
                else if {kitSistemi::cooldown::%arg-1%::%player%} is less than now:
                    kitAl(player,arg-1)
                    send "%arg-1% kitini aldın."
                else:
                    send "kalan süre %difference between now and {kitSistemi::cooldown::%arg-1%::%player%}%"
            else:
                send "yetersiz para"
Essentialsın üzerine yapmak mümkün değil,sistemi skript ile baştan yapmalısınız.
Diğer türlü oluyorsa gerek yok bu skripte.
Essentialsın kits.yml dosyasını yükler,/kit-admin para <kit adı> <para> komutu ile parayı ayarlarsın.
/kit <kit adı> komutu ile de kiti alırsın,delayı yml dosyasındaki saniye olur.
Ancak items: kısmını şu şekilde yapman gerekiyor;
Kod:
kits:
    tools:
        delay: 10 #10 saniye
        items:
        - diamond sword of efficiency 1 name:&r&6Selam lore:&ftest||&9test||&etest
        price: 500 #Fiyat = 500
Eşya kodu ile yazdıklarını ingilizce yazman gerekiyor.Enchant,display name ve lore eklemek için;
Kod:
<item> of [enchant] name:<display name> lore:<lore line 1>||<lore line 2>||<lore line 3> ...
Birden fazla enchant için araya and ekle

PaperSpigot 1.8.8 ve Skript 2.2 dev36 kullanılarak kodlanmıştır.
Gereken skript addonları:
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.


Ve ek olarak Vault ve bir ekonomi eklentisi (Essentials gibi ki zaten Essentials olmazsa kitleri yükleyemez.)
 
Son düzenleme:
Olmuyor Hata Veriyor
Kod:
'player's balance' is not an entity type (paralıkit.sk, line 2: if
player's balance is bigger than 100:')
Acil Yardım Edin Nolur
Sunucunuzda ekonomi eklentisi ve vault mevcut mu?
 
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