Çalışmayan Skript Paylaşımı

Vasen

Marangoz
En iyi cevaplar
0
Yaklaşık 1 saatte kodladım, çalışmadı :( Belki editleyip çalıştırabilen arkadaşlar olabilir. O yüzden yinede paylaşmak istedim.

Arena skripti'dir, plugins klasörüne dosya oluşturur, oraya kullanıcıların verilerini girer. Neyse kolay gelsin. :)
Sizce uğraşmış mıyım? Bu konu hakkında ki düşüncelerinizi de merak ediyorum. :)
Kod:
options:
  prefix: "&aGamer"
on load:
  if file "plugins/ArenaPVP/config.yml" isn't exists:
    create file "plugins/ArenaPVP/config.yml"
    wf "Version: 1.0-beta" to "plugins/ArenaPVP/config.yml"
on join:
  if file "plugins/ArenaPVP/playerdata/%player%.yml" isn't exists:
    create file "plugins/arenapvp/playerdata/%player%/data.yml"
    wf "name: %player%" "plugins/arenapvp/playerdata/%player%.yml"
    wf "coin: 0" to "plugins/arenapvp/playerdata/%player%.yml"
    wf "rank: Yok" to "plugins/arenapvp/playerdata/%player%.yml"
    wf "kills: 0" to "plugins/arenapvp/playerdata/%player%.yml"
    wf "deaths: 0" to "plugins/arenapvp/playerdata/%player%.yml"
    send "%{prefix}% &esunucusuna hoş geldiniz."
# {rakip.%player%} = rakibin adı.
# {vs.%player%} = vs de olup olmadıgını kontrol et. TRUE vs'de demek. değilse delete/sil
# {dolu} = Tüm arenalar doluysa true, değilse delete/sil.

#İstek Gönderme
command /go [<offline player>]:
  trigger:
    if arg-1 is online:
      if {vs.%player%} is true:
        send "&cZaten VS desin!"
      if {vs.%player%} isn't set:
        if {dolu} isn't set:
          if {bekle.%player%} isn't set:
            if {vs.%arg-1%} isn't set:
              send "&6---------------------------------------------" to arg-1
              send "" to arg-1
              send "" to arg-1
              send "&b%player% &caadlı oyuncu seninle VS atmak istiyor!" to arg-1
              send "&cOnaylamak için &e/onayla <isim> &ckomutunu gir!" to arg-1
              send "&15 Saniye içerisinde onaylamanız gerek!" to arg-1
              send "" to arg-1
              send "" to arg-1
              send "&6---------------------------------------------" to arg-1
              set {bekle.%player%} to true
              wait 16 second
              delete {bekle.%player%}
             
             

            if {vs.%arg-1%} is true:
              send "&cVS atmak istediğiniz oyuncu zaten VS de!"
          if {bekle.%player%} is true:
            send "&cBir daha istek gönderebilmek içib 15 saniye beklemelisin!"
        if {dolu} is true:
          send "&cTüm arenalar dolu! Birkaç dakika sonra tekrar dene!"
    if arg-1 isn't online:
      send "&cVS atmak istediğin oyuncu oyunda değil!"
#Onaylama
command /onaylama:
  trigger:
    send "&eIstek iptal edildi!"
#Arenadayken çıkarsa
on quit:
  if {vs.%player%} is true:
    send "&cRakibin oyundan ayrıldı!" to {rakip.%player%}
#Arenadayken oyundan çıkarsa:
on quit:
  if {vs.%player%} is true:
    send "&cVS'deyken çıkış yaptığın için oyunu kaybettin!"
    delete {vs.%player%}
    set {_ddd} to value "deaths" get of "plugins/ArenaPVP/playerdata/%player%.yml"
    add 1 to {_ddd}
    set "deaths" to "%{_ddd}%" in yml file "plugins/arenapvp/playerdata/%player%.yml"
    set {_rrr} to value "kills" get of "plugins/arenapvp/playerdata/%{rakip.%player%}%.yml"
    add 1 to {_rrr}
    set "kills" to "%{_rrr}%" in yml file "plugins/arenapvp/playerdata/%{rakip.%player%}%.yml"
    set {_ccc} to value "coin" get of "plugins/Arenapvp/playerdata/%{rakip.%player%}%.yml"
    add 1 to {_ccc}
    set "coin" to "%{_ccc}%" in yml file "plugins/arenapvp/playerdata/%{rakip.%player%}%.yml"
 
#Onayla - Arenaya Gönder
command /onayla [<offline player>]:
  trigger:
    if arg-1 is online:
      if {bekle.%arg-1%} is set:
        if {dolu} isn't set:
          if {1} is set:
            if {2} is set:
              if {3} is set:
                if {4} is set:
                  if {5} is set:
                    if {6} is set:
                      if {7} is set:
                        if {8} is set:
                          if {9} is set:
                            if {10} is set:
                              send "&cTüm arenalar dolu! Sunucu sahibinden ek arena isteyiniz!"
          if {1} isn't set:
            if {1.sp1} is set:
              set {_arena} to "1"
              set {tamam.%player%} to "%{_arena}%"
              set {tamam.%arg-1%} to "%{_arena}%"
              delete {bekle.%player%}
              set {vs.%player%} to true
              set {vs.%arg-1%} to true
              set {rakip.%player%} to arg-1
              set {rakip.%arg-1%} to player

              set {beklearena.%player%} to "%{_arena}%"
              set {beklearena.%arg-1%} to "%{_arena}%"

              teleport player to {%{_arena}%.sp1}
              teleport {rakip.%player%} to {%{_arena}%.sp1}
             
              send player title "&cOyun Başlıyor..." with subtitle "&e5 saniye kaldı!" for 1 seconds
              send arg-1 title "&cOyun Başlıyor..." with subtitle "&e5 saniye kaldı!" for 1 seconds
              wait 1 second
              send player title "&cOyun Başlıyor..." with subtitle "&e4 saniye kaldı!" for 1 seconds
              send arg-1 title "&cOyun Başlıyor..." with subtitle "&e4 saniye kaldı!" for 1 seconds
              wait 1 second
              send player title "&cOyun Başlıyor..." with subtitle "&e3 saniye kaldı!" for 1 seconds
              send arg-1 title "&cOyun Başlıyor..." with subtitle "&e3 saniye kaldı!" for 1 seconds
              wait 1 second
              send player title "&cOyun Başlıyor..." with subtitle "&e2 saniye kaldı!" for 1 seconds
              send arg-1 title "&cOyun Başlıyor..." with subtitle "&e2 saniye kaldı!" for 1 seconds
              wait 1 second
              send player title "&cOyun Başlıyor..." with subtitle "&e1 saniye kaldı!" for 1 seconds
              send arg-1 title "&cOyun Başlıyor..." with subtitle "&e1 saniye kaldı!" for 1 seconds
              wait 2 second
              send player title "&cBaşla!" with subtitle "&b%player% &6vs &b%arg-1%" for 1 seconds
              send arg-1 title "&cBaşla!" with subtitle "&b%player% &6vs &b%arg-1%" for 1 seconds
              delete {beklearena.%player%}
              delete {beklearena.%arg-1%}

              clear player's inventory
              clear arg-1's inventory

              execute console command "kitver %player%"
              execute console command "kitver %arg-1%"
            if {1.sp1} isn't set:
              send "auuu sil beni"

        if {dolu} is true:
          send "&cAremaların hepsi dolu! :("
      if {bekle.%player%} isn't set:
        send "&cIstek onaylanamadı! Istek süresi dolmuş olabilir!"
    if arg-1 isn't online:
      send "&cIstek gönderen kişi oyundan çıkmış!"

on any movement:
  if {beklearena.%player%} is set:
    cancel event
    send "&cOyun daha başlamadı!"
command /kitver [<player>]:
  permission: op
  trigger:
    give a diamond sword to arg-1
    give a bow to arg-1
    give 12 of golden apple to arg-1
    give a iron helmet to arg-1
    give a iron chestplate to arg-1
    give a iron leggings to arg-1
    give a iron boots to arg-1
on death:
  if {vs.%player%} is set:
    delete {vs.%victim%}
    delete {vs.%attacker%}
    delete {%{tamam.%victim%}%}
    delete {%{tamam.%attacker%}%}

    execute console command "spawn %attacker%"
    set {_ddd} to value "deaths" get of "plugins/ArenaPVP/playerdata/%victim%.yml"
    add 1 to {_ddd}
    set "deaths" to "%{_ddd}%" in yml file "plugins/arenapvp/playerdata/%victim%.yml"
    set {_rrr} to value "kills" get of "plugins/arenapvp/playerdata/%attacker%.yml"
    add 1 to {_rrr}
    set "kills" to "%{_rrr}%" in yml file "plugins/arenapvp/playerdata/%attacker%.yml"
    set {_ccc} to value "coin" get of "plugins/Arenapvp/playerdata/%attacker%.yml"
    add 1 to {_ccc}
    set "coin" to "%{_ccc}%" in yml file "plugins/arenapvp/playerdata/%attacker%.yml"
    send attacker title "&bKazandın!" with subtitle "&eHelal olsun :)" for 3 seconds
command /ar [<text>] [<text>] [<text>]:
  permission: op
  trigger:
    if arg-1 is not set:
      if arg-2 is not set:
        if arg-3 is not set:
          send "&a&lArenaPVP &cKodlayan&7: &eVasen"
          send ""
          send "&b/ar create <1-10 arasinda arena isimi giriniz. Ornek: 2>"
          send "&b/ar setsp <arena kodu> <1 yada 2 yazin. 2 oyuncunun dogacagi yer burasi.>"
    if arg-1 is "create":
      if arg-2 is set:
        if {arena::%arg-2%} isn't set:
          if arg-3 isn't set:
            set arg-2 to {arena::%arg-2%}
            send "&eArena oluşturuldu!"
    if arg-1 is "setsp":
      if {arena::%arg-2%} is set:
        if arg-3 is "1":
          set {%arg-2%.sp1} to location of player
          send "&c%arg-2% &earenası için &c%arg-3% &enolu spawn eklendi!"
        if arg-3 is "2":
          set {%arg-2%.sp2} to location of player
          send "&c%arg-2% &earenası için &c%arg-3% &enolu spawn eklendi!"
 

Absolatte

Demir Madencisi
En iyi cevaplar
0
Kod:
if file "x" isn't exists:
kısmı bende bir ara çalışmıyordu o kısmı send ile bir test eder misin?
Çalışıyor mu çalışmıyor mu görelim?
 
Üst