Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ________ ________ ___ ___ ________ _________ _________
- #| ____ \ / ____ \ / \ / \ / ____ \ / _______\ | ______\
- #| | \ | | / \ | | \ / | | / \ | | | | |____ / |
- #| | | | | |____| | | \_/ | | |____| | | | ____ | / _____| |_____
- #| | | | | | | |\ /| | | | | | |__ \ | __/ \____ ____/
- #| |____/ | | /__\ | | | \___/ | | | /__\ | | |____| | | |_______ | |
- #|________/ |__/ \__| |__/ \__| |__/ \__| \__________/ |_________/ | /
- #
- #==================================================================================================#
- #
- # /!\ /!\ UYARI /!\ /!\
- #
- # -Bu skripti kendinizinmis gibi gosterip satmayiniz!
- # -Bu skripti istediginiz yerde paylasabilirsiniz fakat kendinizinmis gibi gostermeyiniz!
- #
- #==========================================[! ONEMLI !]============================================#
- #
- # -Bug/hata bulursaniz lutfen forum veya discord uzerinden bana bildiriniz!
- # -Discordumu asagida bulabilirsiniz.
- # -Olasi hatalar icin bazi hata mesajlari ve debug komutlari birakilmistir.
- # -"Bir hata meydana geldi (Bilinmiyor?)" gibi bir mesaj gelirse lutfen bildiriniz!
- # -Debug komutlarini kafaniza gore kullanmayiniz.
- # -Size herhangi bir debug komudu kullanmanizi soylersem ancak o zaman kullanin!
- # -Bazi pluginler skriptin islevini bozabilir!
- # -Skript surumu otomatik kontrol edilmektedir, reload atildiginda guncelleme varsa uyarir.
- # -Guncellemeler otomatik inmemektedir, yeni surumu forum uzerinden indiriniz.
- # -Forumda cogu sey hakkinda bilgi edinebilirsiniz, neyi nasil kullanacaginizi cozemediyseniz bir bakin.
- #
- # -Forum linki: EKLENECEK, eklemeyi unuttuysam uyarin!
- #
- # -Bu skript 1.8.x icin kodlanmistir, ust surumlerde dogru calismayabilir.
- # -Eger 1.8 uzerinde bir surumde oynuyorsaniz (+1.9), olusabilecek sorunlardan sorumlu degilim!
- #
- #==================================[! GUNCELLEMELER HAKKINDA !]====================================#
- #
- # -Yeni bir guncelleme geldiginde skript uzerinde yapmis oldugunuz degisiklikler silinir!
- # -YAML dosyasi guncelleme yapsaniz bile silmediginiz surece oldugu gibi kalir.
- #
- # -Ileriki surumlerde guncelleme yapilsa bile ayarlariniz gitmesin diye cogu seyi yaml uzerine tasiyabilirim.
- # -Guncelleme geldiginde skripte reload atildiginda size guncelleme oldugunu soyluyor.
- # -Forumdan guncellemeyi indirebilirsiniz. Guncellemeler otomatik degildir.
- #
- # -Guncelleme yapmadan once mevcut surumun bir yedegini alin, herhangi bir sorunda onceki surume donunuz.
- # -Yeni indirdiginiz surumde karsilastiginiz sorunlari bildirebilirsiniz, duzgun calismamasi vs.
- #
- # -Guncellemede neler eklendigini Forum uzerinden okuyabilirsiniz.
- #
- # -Guncellemelere yardimci olmak icin buldugunuz sorunlari/hatalari bildirebilirsiniz.
- # -Forum veya discord uzerinden bildirebilirsiniz, discordum asagida var.
- #
- # -Skripti gelistirmeme yardimci olmak isterseniz (bug bildirmek disinda koddada yardim etmek isterseniz),
- # discord uzerinden bana ulasabilirsiniz.
- # -Yardimci olan herkese simdiden tesekkurler :) Yardimci olan olursa isimleri eklenecektir.
- #
- #==================================[! ALPHA SURUMU HAKKINDA !]=====================================#
- #
- # -Bazi komutlar henuz tamamlanmamistir, sorunlu olabilirler.
- # -Bu komutlarin listesi: /dmg+ stats | /dmg+ create | /dmg+ yaml komutlari
- # -Ileriki surumlerde bu komutlar duzeltilecektir, yeni komutlar eklenecektir.
- #
- # -Skript henuz Alpha'da oldugundan bir cok sorunu olabilir.
- # -Hatta simdilik kullanmanizi tavsiye etmiyorum, sizin tercihiniz tabii.
- #
- # -Yukarida birden fazla kez bahsettim ama tekrar soyluyorum;
- # -Hatalari/Sorunlari lutfen bildiriniz. Discord veya Forum uzerinden bildirebilirsiniz.
- #
- # -Klavyem ingilizce oldugundan simdilik cogu sey turkce karakter icermiyor (bazi seylere gene de ekledim.)
- # -Ileriki surumlerde turkce karakterleri ekleyecegim, yardim etmek isteyen olursa yazabilir.
- #
- #====================================[! ADDONLAR HAKKINDA !]=======================================#
- #
- # -Lutfen addonlari indirdiginizden emin olun, indirirken surumlerine dikkat edin!
- #
- # -Gerekli skript surumu: Skript 2.2dev36
- #
- # -Gerekli addonlar:
- # -TuSKe 1.8.2-pikachu-patch-3
- # -SK-NBeeT 2.11.1
- # -SkQuery 3.6.1-Lime
- # -skript-yaml 1.3.2
- # -MorkazSk 1.1
- # -skript-mirror 2.0.0
- #
- # -Ayni listeyi forumda da bulabilirsiniz.
- # -Ileriki guncellemelerde gerekli addonlar degisebilir. Guncelleme geldiginde kontrol ediniz.
- #
- #==================================================================================================#
- #>> Damage+ version: ALPHA 0.6
- #>> na2000 tarafindan yapilmistir
- #>> Discord: Lil.Sosig#7850
- #------------------------------------------#
- # LUTFEN ONCE YUKARIDAKI YAZILARI OKUYUNUZ #
- #------------------------------------------#
- options:
- pd: &cDamage+ &8&l> #Prefix
- defaultlore: &7Siradan bir esya o kadar... #Esyaya verilen otomatik lore, &r yazarsaniz hicbirsey koymaz. Satir atlamak icin araya || koyunuz. Degistirdikten sonra skripte reload atiniz.
- on load:
- set {atk::hand} to 0.5 #Bos elle vurulan hasar.
- set {atk::unkown} to 0.5 #Hasari bilinmeyen bir esyanin vurdugu hasar.
- set {atk::mob} to 1.5 #Yaratik hasari. (Eli bos iken)
- set {_v_current} to "ALPHA 0.6" #Mevcut surum
- wait 0.5 seconds
- load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus"
- if yaml "damageplus" is empty:
- send "{@pd} &c&lUYARI! &fdamageplus.yml bulunamadi veya bos?" and "{@pd} &7&oBu uyariyi almaya devam ederseniz bildiriniz!" and "{@pd} &fdamageplus.yml olsuturuluyor..." to ops and console
- wait 2 tick
- #-------------------#
- #Ornek yaml esyalari#
- #-------------------#
- #-
- # Kilic -> Items.Swords.(Esya Adi).(atk/critdmg/critchance/lore)
- # Zirh -> Items.Armors.(Esya Adi).(helmet/chestplate/leggings/boots).(armor/toughness/lore)
- #-
- #>> Ornek Kilic 1
- set yaml value "Items.Swords.&cDeneme123.atk" from "damageplus" to 25 #Hasar
- set yaml value "Items.Swords.&cDeneme123.critdmg" from "damageplus" to 100 #Kritik Hasar (%)
- set yaml value "Items.Swords.&cDeneme123.critchance" from "damageplus" to 50 #Kritik Sansi
- #>> Ornek Zirh (Kask)
- set yaml value "Items.Armors.&bDenemeZirhSeti.Helmet.armor" from "damageplus" to 7 #Zirh
- set yaml value "Items.Armors.&bDenemeZirhSeti.Helmet.toughness" from "damageplus" to 4 #Zirh Sertligi
- #>> Ornek Zirh (Gogusluk)
- set yaml value "Items.Armors.&bDenemeZirhSeti.Chestplate.armor" from "damageplus" to 15 #Zirh
- set yaml value "Items.Armors.&bDenemeZirhSeti.Chestplate.toughness" from "damageplus" to 8 #Zirh Sertligi
- #>> Ornek Zirh (Bacaklik)
- set yaml value "Items.Armors.&bDenemeZirhSeti.Leggings.armor" from "damageplus" to 10 #Zirh
- set yaml value "Items.Armors.&bDenemeZirhSeti.Leggings.toughness" from "damageplus" to 6 #Zirh Sertligi
- #>> Ornek Zirh (Bot)
- set yaml value "Items.Armors.&bDenemeZirhSeti.Boots.armor" from "damageplus" to 7 #Zirh
- set yaml value "Items.Armors.&bDenemeZirhSeti.Boots.toughness" from "damageplus" to 2 #Zirh Sertligi
- #>> Ornek Kilic 2 (Lore Ornegi)
- set yaml value "Items.Swords.&dSuperKilic.atk" from "damageplus" to 25 #Hasar
- set yaml value "Items.Swords.&dSuperKilic.critdmg" from "damageplus" to 100 #Kritik Hasar (%)
- set yaml value "Items.Swords.&dSuperKilic.critchance" from "damageplus" to 50 #Kritik Sansi
- set yaml value "Items.Swords.&dSuperKilic.Lore" from "damageplus" to "&cSelam!||&fWow! 2. Satir!||&3Yok artik! 3. Satir!!||&e4. Satir!?||&c&lBU NE KADAR DEVAM EDIYOR!!!" #Lore, satir atlamak icin || koyunuz.
- #>> Ornek Kilic 3 (Sadece Lore)
- set yaml value "Items.Swords.&3LoreKilic.Lore" from "damageplus" to "&fBu esyanin sadece ozel bir lore'u var!||&fEvet... Siradan bir kilic...||&fSadece lore'u var..." #Lore, satir atlamak icin || koyunuz.
- #>> Ornek Zirh 2 (Sadece Kask + Lore)
- set yaml value "Items.Armors.&eHavali Kask.Helmet.armor" from "damageplus" to 15 #Zirh
- set yaml value "Items.Armors.&eHavali Kask.Helmet.toughness" from "damageplus" to 10 #Zirh Sertligi
- set yaml value "Items.Armors.&eHavali Kask.Helmet.Lore" from "damageplus" to "&fBu zirhin sadece kaski ayarli!"
- #>> Ornek Zirh 3 (Sadece Bot + Sadece zirh puani ve lore)
- set yaml value "Items.Armors.&aTuhaf Bot.Boots.armor" from "damageplus" to 1 #Zirh
- set yaml value "Items.Armors.&aTuhaf Bot.Boots.Lore" from "damageplus" to "&fSadece zirh puani ayarli bir bot!"
- #>> Ornek Balta 1
- set yaml value "Items.Axes.&3Deneme Balta.atk" from "damageplus" to 10 #Hasar
- set yaml value "Items.Axes.&3Deneme Balta.critdmg" from "damageplus" to 200 #Kritik Hasar (%)
- set yaml value "Items.Axes.&3Deneme Balta.critchance" from "damageplus" to 10 #Kritik Sansi
- set yaml value "Items.Axes.&3Deneme Balta.Lore" from "damageplus" to "&fDeneme Balta" #Lore, satir atlamak icin || koyunuz.
- #-------------------#
- save yaml "damageplus" #Kaydetme
- load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus" #Tekrar yukleme
- loop yaml nodes with keys "Items" from "damageplus":
- loop yaml nodes with keys "Items.%loop-value-1%" from "damageplus":
- if loop-value-1 is "Armors":
- loop yaml nodes with keys "Items.Armors.%loop-value-2%" from "damageplus":
- add loop-value-3 to {_i::*}
- else:
- add loop-value-2 to {_i::*}
- send "{@pd} &fYuklenen esyalar: &9%size of {_i::*}%" to ops and console
- set {_v_check} to text from "https://rentry.co/damageplus/raw" #Guncel surum
- wait 1 seconds
- send "{@pd} &fSurum: &c&l%{_v_current}%&f, cesitli sorunlar/buglar olabilir!" and "{@pd} &9na2000 &ftarafindan yapilmistir! &8(&7Lil.Sosig##7850&8)" and "{@pd} &fKomutlari gormek icin: &e/dmg+ &8(&7/dmg&8, &7/damage&8)" to ops and console
- if {_v_current} is not {_v_check}: #Surum kontrolu
- send "{@pd} &eGuncelleme Mevcut! &8(&7%{_v_current}% &8-> &9%{_v_check}%&8)" to ops and console #Guncelleme mesaji
- function itemIdGenerator(e: item, n: number):
- loop {_n} times:
- add random letter to {_i::*}
- chance of 35%:
- add "%random integer between 0 and 9%" to {_i::*}
- set {_id} to join {_i::*} using ""
- add "{GeneratedId:[""%{_e}%%{_id}%""]}" to nbt of {_e}
- function getItemId(e: item) :: text:
- set {_value} to tag "GeneratedId" of nbt of {_e}
- replace every "[" and "]" and ":" and """" in {_value} with ""
- return {_value}
- function setItemStats(e: item):
- set {_value} to getItemId({_e})
- if {_value} is not set:
- itemIdGenerator({_e}, 10) #<--- ??
- set {_value} to getItemId({_e})
- if {_e} is a sword or axe:
- if {_e} is sword:
- set {_type} to "Swords"
- else if {_e} is axe:
- set {_type} to "Axes"
- if {atk::%{_value}%} is not set:
- #if {_e} is a sword:
- set {_i} to "%{_e}%"
- set {_i::*} to {_i} split at "_" #<--- ??
- set {_i} to {_i::1}
- if {_i} is "Wooden":
- set {atk::%{_value}%} to 4
- set {critchance::%{_value}%} to 0
- set {critdmg::%{_value}%} to 0
- else if {_i} is "Golden":
- set {atk::%{_value}%} to 4
- set {critchance::%{_value}%} to 10
- set {critdmg::%{_value}%} to 150
- else if {_i} is "Stone":
- set {atk::%{_value}%} to 5
- set {critchance::%{_value}%} to 1
- set {critdmg::%{_value}%} to 50
- else if {_i} is "Iron":
- set {atk::%{_value}%} to 6
- set {critchance::%{_value}%} to 2
- set {critdmg::%{_value}%} to 75
- else if {_i} is "Diamond":
- set {atk::%{_value}%} to 7
- set {critchance::%{_value}%} to 5
- set {critdmg::%{_value}%} to 100
- else:
- set {atk::%{_value}%} to 0
- set {critchance::%{_value}%} to 0
- set {critdmg::%{_value}%} to 0
- if {_type} is "Axes":
- add 2 to {critchance::%{_value}%}
- add 50 to {critdmg::%{_value}%}
- if yaml path "Items.%{_type}%.%name of {_e}%" in "damageplus" has value:
- loop yaml nodes with keys "Items.%{_type}%.%name of {_e}%" from "damageplus":
- if loop-value is "atk" or "hasar":
- set {atk::%{_value}%} to ("%loop-val%" parsed as number)
- if loop-value is "critdmg":
- set {critdmg::%{_value}%} to ("%loop-val%" parsed as number)
- if loop-value is "critchance":
- set {critchance::%{_value}%} to ("%loop-val%" parsed as number)
- if lore of {_e} is "":
- if yaml path "Items.%{_type}%.%name of {_e}%.Lore" in "damageplus" has value:
- set lore of {_e} to yaml value "Items.%{_type}%.%name of {_e}%.Lore" from "damageplus"
- if {atk::%{_value}%} is set:
- add "{HideFlags:62}" to nbt of {_e} #<- 63'u dene ???
- if lore of {_e} is not "":
- set {_i} to lore of {_e}
- else:
- set {_i} to "{@defaultlore}"
- set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fHasar &e+%{atk::%{_value}%}%||&8&l> &fKritik Hasar &e+%%%{critdmg::%{_value}%}% (x%{critdmg::%{_value}%}/100%)||&8&l> &fKritik Sans &e%%%{critchance::%{_value}%}%||&8&m---------------"
- else if {_e} is helmet or chestplate or leggings or boots:
- if {armor::%{_value}%} is not set:
- set {_i} to "%{_e}%"
- set {_i::*} to {_i} split at "_" #<--- ??
- set {_i} to {_i::1}
- if {_i} is "Leather":
- if {_e} is helmet or boots:
- set {armor::%{_value}%} to 1
- set {toughness::%{_value}%} to 0
- if {_e} is chestplate:
- set {armor::%{_value}%} to 3
- set {toughness::%{_value}%} to 0
- if {_e} is leggings:
- set {armor::%{_value}%} to 2
- set {toughness::%{_value}%} to 0
- else if {_i} is "Golden":
- if {_e} is helmet:
- set {armor::%{_value}%} to 2
- set {toughness::%{_value}%} to 0
- if {_e} is chestplate:
- set {armor::%{_value}%} to 5
- set {toughness::%{_value}%} to 3
- if {_e} is leggings:
- set {armor::%{_value}%} to 3
- set {toughness::%{_value}%} to 2
- if {_e} is boots:
- set {armor::%{_value}%} to 1
- set {toughness::%{_value}%} to 0
- else if {_i} is "Chain" or "Chainmail":
- if {_e} is helmet:
- set {armor::%{_value}%} to 2
- set {toughness::%{_value}%} to 0
- if {_e} is chestplate:
- set {armor::%{_value}%} to 5
- set {toughness::%{_value}%} to 0
- if {_e} is leggings:
- set {armor::%{_value}%} to 4
- set {toughness::%{_value}%} to 0
- if {_e} is boots:
- set {armor::%{_value}%} to 1
- set {toughness::%{_value}%} to 0
- else if {_i} is "Iron":
- if {_e} is helmet or boots:
- set {armor::%{_value}%} to 2
- set {toughness::%{_value}%} to 0
- if {_e} is chestplate:
- set {armor::%{_value}%} to 6
- set {toughness::%{_value}%} to 2
- if {_e} is leggings:
- set {armor::%{_value}%} to 5
- set {toughness::%{_value}%} to 1
- else if {_i} is "Diamond":
- if {_e} is helmet or boots:
- set {armor::%{_value}%} to 3
- set {toughness::%{_value}%} to 1
- if {_e} is chestplate:
- set {armor::%{_value}%} to 8
- set {toughness::%{_value}%} to 3
- if {_e} is leggings:
- set {armor::%{_value}%} to 6
- set {toughness::%{_value}%} to 2
- else:
- if {_e} is helmet:
- set {armor::%{_value}%} to 0
- set {toughness::%{_value}%} to 0
- if {_e} is chestplate:
- set {armor::%{_value}%} to 0
- set {toughness::%{_value}%} to 0
- if {_e} is leggings:
- set {armor::%{_value}%} to 0
- set {toughness::%{_value}%} to 0
- if {_e} is boots:
- set {armor::%{_value}%} to 0
- set {toughness::%{_value}%} to 0
- if yaml path "Items.Armors.%name of {_e}%" in "damageplus" has value:
- add "Helmet" and "Chestplate" and "Leggings" and "Boots" to {_piece::*}
- loop {_piece::*}:
- if {_e} is (loop-value-1 parsed as itemtype):
- loop yaml nodes with keys "Items.Armors.%name of {_e}%.%loop-value-1%" from "damageplus":
- if loop-value-2 is "armor":
- set {armor::%{_value}%} to ("%loop-val%" parsed as number)
- if loop-value-2 is "toughness":
- set {toughness::%{_value}%} to ("%loop-val%" parsed as number)
- if lore of {_e} is "":
- if yaml path "Items.Armors.%name of {_e}%.%loop-value-1%.Lore" in "damageplus" has value:
- set lore of {_e} to yaml value "Items.Armors.%name of {_e}%.%loop-value-1%.Lore" from "damageplus"
- if {armor::%{_value}%} is set:
- add "{HideFlags:62}" to nbt of {_e} #<-
- if lore of {_e} is not "":
- set {_i} to lore of {_e}
- else:
- set {_i} to "{@defaultlore}"
- set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fZirh &e+%{armor::%{_value}%}%||&8&l> &fZirh Sertligi &e+%{toughness::%{_value}%}%||&8&m---------------"
- function reLore(e: item, customlore: text):
- set {_value} to getItemId({_e})
- if {_value} is not set:
- setItemStats({_e})
- set {_value} to getItemId({_e})
- add "{HideFlags:62}" to nbt of {_e}
- if {_customlore} is not "":
- set {_i} to {_customlore}
- else:
- set {_i} to customLore({_e})
- if {_e} is sword or axe:
- if {_e} is enchanted with sharpness:
- set {_sharpness} to 0.5*(level of sharpness on {_e}) + 1
- set {_sharpness} to "&9 (+%{_sharpness}%)"
- else:
- set {_sharpness} to "&r"
- set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fHasar &e+%{atk::%{_value}%}%%colored {_sharpness}%||&8&l> &fKritik Hasar &e+%%%{critdmg::%{_value}%}% (x%{critdmg::%{_value}%}/100%)||&8&l> &fKritik Sans &e%%%{critchance::%{_value}%}%||&8&m---------------"
- else if {_e} is helmet or chestplate or leggings or boots:
- set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fZirh &e+%{armor::%{_value}%}%||&8&l> &fZirh Sertligi &e+%{toughness::%{_value}%}%||&8&m---------------"
- function customLore(e: item) :: text:
- set {_lore::*} to lore of {_e} split at "||"
- loop (size of {_lore::*}-5) times:
- add line loop-number of lore of {_e} to {_i::*}
- set {_lore} to "%{_i::*}%"
- replace all " and " and ", " in {_lore} with "||"
- return {_lore}
- function saveCreation(e: item, p: player):
- save yaml "damageplus"
- send "{@pd} &r%name of {_e}% &fadli esyanin statlari ayarlandi!" and "{@pd} &fLutfen &9/dmg+ yaml reload &fkomudunu kullaniniz!" to {_p}
- delete {confirmed::%{_p}%}
- on pickup:
- if event-item is a sword or pickaxe or axe or hoe or shovel or bow or helmet or chestplate or leggings or boots:
- set {_e} to event-item
- setItemStats({_e})
- on damage:
- if damage cause is fall or drowning or entity explosion or projectile or burning or lava or poison:
- stop
- if projectile exists:
- stop
- if attacker's held item is not air:
- set {_e} to attacker's held item
- if {_e} is sword or axe: #<--- Daha fazla esya turu ekle
- set {_value} to getItemId({_e})
- if {_value} is not set:
- setItemStats({_e})
- else:
- set {_value} to "unkown"
- if attacker's held item is air:
- if attacker is a player:
- set {_value} to "hand"
- else:
- set {_value} to "mob"
- set {_armor} to 0
- set {_toughness} to 0
- set {_protect} to 0
- if victim's helmet is not air:
- set {_e} to victim's helmet
- set {_a} to getItemId({_e})
- if {armor::%{_a}%} is not set:
- setItemStats({_e})
- set {_a} to getItemId({_e})
- add {armor::%{_a}%} to {_armor}
- add {toughness::%{_a}%} to {_toughness}
- add level of protection on victim's helmet to {_protect}
- delete {_a}
- if victim's chestplate is not air:
- set {_e} to victim's chestplate
- set {_a} to getItemId({_e})
- if {armor::%{_a}%} is not set:
- setItemStats({_e})
- set {_a} to getItemId({_e})
- add {armor::%{_a}%} to {_armor}
- add {toughness::%{_a}%} to {_toughness}
- add level of protection on victim's chestplate to {_protect}
- delete {_a}
- if victim's leggings is not air:
- set {_e} to victim's leggings
- set {_a} to getItemId({_e})
- if {armor::%{_a}%} is not set:
- setItemStats({_e})
- set {_a} to getItemId({_e})
- add {armor::%{_a}%} to {_armor}
- add {toughness::%{_a}%} to {_toughness}
- add level of protection on victim's leggings to {_protect}
- delete {_a}
- if victim's boots is not air:
- set {_e} to victim's boots
- set {_a} to getItemId({_e})
- if {armor::%{_a}%} is not set:
- setItemStats({_e})
- set {_a} to getItemId({_e})
- add {armor::%{_a}%} to {_armor}
- add {toughness::%{_a}%} to {_toughness}
- add level of protection on victim's boots to {_protect}
- if {atk::%{_value}%} is set:
- #KRITIK VURMA OLASILIGI
- chance of {critchance::%{_value}%}%: #<-- Kritik sansi
- set {_crit} to true
- if {_i} is less than 0:
- set {_i} to 0
- #KRITIK KONTROL
- if {_crit} is set: #Kritik vurulacaksa hasari ayarliyor
- set {_damage} to ({atk::%{_value}%}+({atk::%{_value}%}*({critdmg::%{_value}%}/100))) #<-- Kritik vurulacak hasar
- else:
- set {_damage} to {atk::%{_value}%} #<-- Orjinal hasar
- #----------BUYULER----------#
- if level of sharpness on attacker's held item is greater than 0:
- add 0.5*(level of sharpness on attacker's held item) + 1 to {_damage}
- #---------------------------#
- #------IKSIR EFEKTLERI------#
- set {_tier} to tier of potion effect strength of attacker
- if {_tier} is greater than 0:
- add {_tier}*3 to {_damage}
- delete {_tier}
- set {_tier} to tier of potion effect weakness of attacker
- if {_tier} is greater than 0:
- remove 4 from {_damage}
- delete {_tier}
- set {_tier} to tier of potion effect resistance of victim
- if {_tier} is greater than 0:
- set {_damage} to {_damage}-({_damage}*({_tier}*20)/100)
- #---------------------------#
- set {_a1} to {_armor} / 5
- set {_a2} to {_armor} - {_damage} / (2 + {_toughness} / 4)
- if {_a1} is greater than {_a2}:
- set {_a} to {_a1}
- else:
- set {_a} to {_a2}
- if {_damage} * (1 - ({_a}) / 25) is less than 0:
- set {_damage} to 0.01
- else:
- set {_damage} to {_damage} * (1 - ({_a}) / 25)
- if {_protect} is greater than 20:
- set {_protect} to 20
- #send "%{_crit}% / %{_i}% | %{_protect}% | %{_damage}-({_damage}*({_protect}*4)/100)%" to attacker
- set {_i} to victim's health-({_damage}-({_damage}*({_protect}*4)/100)) #<--- Can kontrolu (orjinal minecraft zirhini, efektlerini vs. gormezden gelmek icin)
- set damage to {_damage}-({_damage}*({_protect}*4)/100) #<--- Hasar ayarlama
- wait 1 tick
- #if {_crit} is set:
- if victim's health is not 0:
- if victim's health is not {_i}:
- set victim's health to {_i}
- wait 2 tick
- #send "%damage% | %final damage% /// %victim's health% | %victim's max health%" to attacker and victim #Hasari gormek icin debug mesaji.
- #send attacker and victim title "&f" with subtitle "&7-&c%final damage% &8(&7%victim's health%&f/&7%victim's max health%&8)" for 2 seconds #Hasari gormek icin debug mesaji (2).
- command /damage+ [<text>] [<text>] [<text>]:
- aliases: damageplus, dmg+, dmgplus, damage, dmg
- permission: damageplus.adm
- trigger:
- if arg 1 is "help" or "yardim" or "yardm" or "yrd" or "yrdm":
- send "" and "&r &8&l< << &f&l+ &cDamage+ Yardim &f&l+ &8&l>> >" and "&7&l> &e/dmg+ help &8&l| &fDamage+ komutlarini gosterir." and "&7&l> &e/dmg+ stats &8&l| &fStats menusunu acar, burada esya statlarini degisebilirsiniz! &7(Hasar, Kritik vs.)" and "&7&l> &e/dmg+ lore &8&l| &fElinizdeki esyanin lore'unu ayarlayabilirsiniz." and "&7&l> &e/dmg+ create &8&l| &fOzel bir esya olusturma komutu." and "&7&l> &e/dmg+ yaml &8&l| &fDamage+ yaml komutlarini gosterir." and "&r &8&l< << &f&l+ &cDamage+ Yardim &f&l+ &8&l>> >"
- else if arg 1 is "stats" or "stat" or "menu" or "statsmenu":
- create a gui with virtual chest with 6 rows named "&8&l<< &cDamage+ Stats &8&l>>":
- set {_slot} to 0
- wait 1 tick
- loop ({_slot}+9*6) times:
- make gui slot {_slot} with gray stained glass named "&f"
- add 1 to {_slot}
- make gui slot 4 with book with no nbt named "&f&lBILGI" with lore "&7Bu menü hakkında bilgi edinmek için okuyunuz.||&r||&7Esyanizi, &3mavi &7renkli camin ustune koyun.||&7Koyduktan sonra yaninda||&7&o(zirh icin &f&o2&7&o, digerleri icin &f&o3&7&o)||&7adet secenek cikacak.||&7Seceneklerin ustune tiklayarak degisebilirsiniz:||&fSol-Tik &8&l-> &a+1||&fSag-Tik &8&l-> &c-1||&fShift + Sol-Tik &8&l-> &a+10||&fShift + Sag-Tik &8&l-> &c-10||&r||&7Imleci menudeki esyanin uzerine getirip||&7degismis olan statlari gorebilirisiniz.||&7Isiniz bittikten sonra,||&7esyaya tekrar tiklayarak alabilirsiniz.||&7Veya direk menuyu kapatabilirsiniz.||&8&oGUI henuz tamamlanmamistir!||&8&oHerhangi bir sorunla karsilasirsaniz,||&8&oLutfen bildiriniz!"
- make gui slot 19 with blue stained glass named "&f&lESYAYI BURAYA KOY" with lore "&7Statlarini degistirmek istedigin||&7esyayi buraya koy.":
- if gui-cursor-item is not air:
- if gui-clicked-item is not gray stained glass or black stained glass:
- if gui-cursor-item is a sword or pickaxe or axe or hoe or shovel or bow or helmet or chestplate or leggings or boots:
- set {_e} to gui-cursor-item
- set {_value} to getItemId({_e})
- if {_e} is sword:
- if {atk::%{_value}%} is not set:
- setItemStats({_e})
- set {_value} to getItemId({_e})
- set {_atk} to {atk::%{_value}%}
- set {_critdmg} to {critdmg::%{_value}%}
- set {_critchance} to {critchance::%{_value}%}
- if {_e} is helmet or chestplate or leggings or boots:
- if {armor::%{_value}%} is not set:
- setItemStats({_e})
- set {_value} to getItemId({_e})
- set {_armor} to {armor::%{_value}%}
- set {_toughness} to {toughness::%{_value}%}
- if gui-clicked-item is not blue stained glass:
- set gui-cursor-item to gui-clicked-item
- else:
- set gui-cursor-item to air
- set gui-clicked-item to {_e}
- set {_f} to gui-clicked-item
- if {_e} is sword or axe:
- make gui slot 13 with iron sword with no nbt named "&f&lHASAR" with lore "&f":
- if gui-click-action is left mouse button:
- add 1 to {atk::%{_value}%}
- if gui-click-action is left mouse button with shift:
- add 10 to {atk::%{_value}%}
- if gui-click-action is right mouse button:
- remove 1 from {atk::%{_value}%}
- if gui-click-action is right mouse button with shift:
- remove 10 from {atk::%{_value}%}
- reLore({_f}, "")
- make gui slot 22 with arrow named "&f&lKRITIK HASAR" with lore "&f":
- if gui-click-action is left mouse button:
- add 1 to {critdmg::%{_value}%}
- if gui-click-action is left mouse button with shift:
- add 10 to {critdmg::%{_value}%}
- if gui-click-action is right mouse button:
- remove 1 from {critdmg::%{_value}%}
- if gui-click-action is right mouse button with shift:
- remove 10 from {critdmg::%{_value}%}
- reLore({_f}, "")
- make gui slot 31 with emerald named "&f&lKRITIK SANS" with lore "&f":
- if gui-click-action is left mouse button:
- add 1 to {critchance::%{_value}%}
- if gui-click-action is left mouse button with shift:
- add 10 to {critchance::%{_value}%}
- if gui-click-action is right mouse button:
- remove 1 from {critchance::%{_value}%}
- if gui-click-action is right mouse button with shift:
- remove 10 from {critchance::%{_value}%}
- reLore({_f}, "")
- if {_e} is helmet or chestplate or leggings or boots:
- make gui slot 13 with iron chestplate with no nbt named "&f&lZIRH" with lore "&f":
- if gui-click-action is left mouse button:
- add 1 to {armor::%{_value}%}
- if gui-click-action is left mouse button with shift:
- add 10 to {armor::%{_value}%}
- if gui-click-action is right mouse button:
- remove 1 from {armor::%{_value}%}
- if gui-click-action is right mouse button with shift:
- remove 10 from {armor::%{_value}%}
- reLore({_f}, "")
- make gui slot 22 with chain chestplate named "&f&lZIRH SERTLIGI" with lore "&f":
- if gui-click-action is left mouse button:
- add 1 to {toughness::%{_value}%}
- if gui-click-action is left mouse button with shift:
- add 10 to {toughness::%{_value}%}
- if gui-click-action is right mouse button:
- remove 1 from {toughness::%{_value}%}
- if gui-click-action is right mouse button with shift:
- remove 10 from {toughness::%{_value}%}
- reLore({_f}, "")
- run when close the gui:
- if slot 19 of player's current inventory is not blue stained glass:
- give player 1 of {_f}
- else:
- send "{@pd} &fBu esyayi koyamassin!"
- else:
- if gui-clicked-item is not gray stained glass or black stained glass or blue stained glass:
- set gui-cursor-item to gui-clicked-item
- set gui-clicked-item to blue stained glass named "&f&lESYAYI BURAYA KOY" with lore "&7Statlarini degistirmek istedigin||&7esyayi buraya koy."
- make gui slot 13 and 22 and 31 with gray stained glass named "&f"
- make gui slot 53 with barrier named "&cMenuyu Kapat" with lore "&fMenuyu kapamak icin tiklayin.":
- close player's inventory
- open last gui to player
- else if arg 1 is "lore":
- if player's held item is not air:
- if player's held item is sword or axe or helmet or chestplate or leggings or boots:
- #open an anvil gui named "&8&l<< &cDamage+ Lore &8&l>>" to player with default text "Esya lore'unu buraya giriniz! (|| koyarak satir atlayabilirsiniz!) << Okuyunuz!"
- set {confirmed::%player%} to 5
- send "" and "{@pd} &7Islem sirasinda elinizdeki esyayi degistirirseniz islem &f&niptal edilir!" and "{@pd} &7Veya &9iptal &7yazarak iptal edebilirsiniz!" and "" and "{@pd} &fIstediginiz lore'u giriniz! &8(&7Sohbete yaziniz&8)"
- else:
- send "{@pd} &fBu esyanin Damage+ lore'unu degisemessin!"
- else:
- send "{@pd} &fElinizde bir esya tutmuyorsunuz!"
- else if arg 1 is "create":
- if player's held item is sword or axe or helmet or chestplate or leggings or boots:
- if {confirmed::%player%} is not set:
- send "" and "{@pd} &7Islem sirasinda elinizdeki esyayi degistirirseniz islem &f&niptal edilir!" and "{@pd} &7Veya &9iptal &7yazarak iptal edebilirsiniz!"
- set {confirmed::%player%} to 1
- send "" and "{@pd} &fLutfen esyanin adini belirleyiniz. &8(&7Sohbete yaziniz&8)"
- else:
- send "{@pd} &fSuanda zaten bir esya olusturuyorsunuz! &fIptal etmek icin &9iptal &fyaziniz!"
- else:
- send "{@pd} &fBu esyanin Damage+ statlari ayarlanamaz!"
- else if arg 1 is "yaml" or "yml":
- if arg 2 is "help" or "yardim" or "yrdm" or "yrd" or "yardım":
- send "" and "&r &8&l< << &f&l+ &cDamage+ Yardim &f&l+ &8&l>> >" and "&7&l> &e/dmg+ yaml &8&l| &fDamage+ yaml komutlarini gosterir." and "&7&l> &e/dmg+ yaml liste <tag(lar)> &8&l| &fOzel itemlari ve statlarini listeler." and "&7&l> &e/dmg+ yaml reload &8&l| &fYamlye kaydedilen esyalari yukler." and "&r &8&l< << &f&l+ &cDamage+ Yardim &f&l+ &8&l>> >"
- else if arg 2 is "liste" or "list" or "listele":
- if arg 3 is "Swords" or "Kiliclar" or "kilic" or "sword" or "kılıç":
- send "" and "{@pd} &9&lKILICLAR &flisteleniyor..."
- loop yaml nodes with keys "Items.Swords" from "damageplus":
- add 1 to {_i}
- send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
- send "{@pd} &9&lKILICLAR &flistelendi! &8(&e%{_i}% &7Adet&8)"
- else if arg 3 is "Armors" or "Zirhlar" or "zirh" or "armor" or "zırh":
- send "" and "{@pd} &9&lZIRHLAR &flisteleniyor..."
- loop yaml nodes with keys "Items.Armors" from "damageplus":
- add 1 to {_i}
- send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
- send "{@pd} &9&lZIRHLAR &flistelendi! &8(&e%{_i}% &7Adet&8)"
- else if arg 3 is "all" or "hepsi" or "Items":
- send "{@pd} &fHenuz eklenmedi!"
- else:
- if arg 3 is set:
- set {_m} to arg 3
- replace all "&" in {_m} with "§"
- send "" and "&9&lItems.%{_m}% &flisteleniyor..."
- loop yaml nodes with keys "Items.%{_m}%" from "damageplus":
- add 1 to {_i}
- send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
- send "" and "&9&lItems.%{_m}% &flistelendi! &8(&e%{_i}% &7Adet&8)"
- else:
- send "{@pd} &fLutfen liste tagi seciniz! &9/dmg+ yaml liste <tag(lar)>"
- else if arg 2 is "reload":
- send "{@pd} &fEsyalar yukleniyor..."
- load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus"
- loop yaml nodes with keys "Items" from "damageplus":
- loop yaml nodes with keys "Items.%loop-value-1%" from "damageplus":
- if loop-value-1 is "Armors":
- loop yaml nodes with keys "Items.Armors.%loop-value-2%" from "damageplus":
- add loop-value-3 to {_i::*}
- else:
- add loop-value-2 to {_i::*}
- save yaml "damageplus"
- send "{@pd} &fYuklenen esyalar: &9%size of {_i::*}%"
- else:
- execute player command "damageplus yaml help"
- else:
- execute player command "damageplus help"
- on quit:
- delete {confirmed::%player%}
- on chat:
- if {confirmed::%player%} is set:
- cancel event
- if message is "iptal" or "iptalet" or "iptal et" or "cancel":
- delete {confirmed::%player%}
- send "{@pd} &fIslem iptal edildi!"
- stop
- if {confirmed::%player%} is 1:
- set name of player's held item to "%message%"
- send "{@pd} &fEsyanin adi %message% &folarak ayarlandi!"
- set {confirmed::%player%} to 2
- wait 1 seconds
- send "{@pd} &fEsyanin lore'unu giriniz. &9null &fyazarak lore islemini atlayabilirsiniz."
- stop
- if {confirmed::%player%} is 2:
- if message is "null":
- send "{@pd} &fLore islemi atlandi!"
- else:
- set lore of player's held item to "&7%message%"
- send "{@pd} &fLore ayarlandi!"
- set {confirmed::%player%} to 3
- wait 1 seconds
- send "{@pd} &7Esyanin statlarini belirlemek icin istediginiz statin adini yazip, yanina &f: &7koyup deger giriniz." and "{@pd} &fOrnek: &9hasar:10" and "{@pd} &7Birden fazla stat girerken aralara &fbosluk &7koyunuz." and "{@pd} &fOrnek: &9hasar:5 kritikhasar:100 kritiksans:10" and "{@pd} &7Bir esyaya verilemeyecek bir stat degeri vermeyiniz! &c&nSorunlara yol acabilir!"
- send "" and "{@pd} &fEsyanin statlarini giriniz. Ustteki yazilari okuyunuz!" and "{@pd} &fIsiniz bittikten sonra &9tamam &fyaziniz!"
- if {confirmed::%player%} is 3:
- if message is "tamam" or "tamamla" or "bitir":
- saveCreation(player's held item, player)
- stop
- set {_i::*} to message split at " "
- loop {_i::*}:
- set {_i} to loop-value
- #send "&e##1 %{_i}%"
- replace all ":" in {_i} with " "
- #send "&e##2 %{_i}%"
- if player's held item is sword or axe:
- set {_critdmg} to 0
- set {_atk} to 0
- set {_critchance} to 0
- if player's held item is sword:
- set {_type} to "Swords"
- if player's held item is axe:
- set {_type} to "Axes"
- if {_i} contains "kritikhasar " or "kritik " or "krit " or "critdmg " or "crit " or "kritikdmg ":
- replace all "kritikhasar " and "kritik " and "krit " and "critdmg " and "crit " and "kritikdmg " in {_i} with ""
- set {_critdmg} to ({_i} parsed as number)
- set yaml value "Items.%{_type}%.%name of player's held item%.critdmg" from "damageplus" to {_critdmg}
- if {_i} contains "hasar " or "attackdamage " or "atk " or "dmg " or "damage ":
- replace all "hasar " and "attackdamage " and "atk " and "dmg " and "damage " in {_i} with ""
- set {_atk} to ({_i} parsed as number)
- set yaml value "Items.%{_type}%.%name of player's held item%.atk" from "damageplus" to {_atk}
- if {_i} contains "kritiksans " or "kritikşans " or "kritsans " or "critchance " or "critsans " or "kritikchance ":
- replace all "kritiksans " and "kritikşans " and "kritsans " and "critchance " and "critsans " and "kritikchance " in {_i} with ""
- set {_critchance} to ({_i} parsed as number)
- set yaml value "Items.%{_type}%.%name of player's held item%.critchance" from "damageplus" to {_critchance}
- if lore of player's held item is set:
- set yaml value "Items.%{_type}%.%name of player's held item%.Lore" from "damageplus" to lore of player's held item
- else if player's held item is helmet or chestplate or leggings or boots:
- if player's held item is helmet:
- set {_type} to "Helmet"
- else if player's held item is chestplate:
- set {_type} to "Chestplate"
- else if player's held item is leggings:
- set {_type} to "Leggings"
- else if player's held item is boots:
- set {_type} to "Boots"
- else:
- send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
- stop
- set {_armor} to 0
- set {_toughness} to 0
- if {_i} contains "zirhsertligi " or "zirhtoughness " or "toughness " or "armortoughness " or "sertlik " or "zırhsertliği " or "zirhsertlik ":
- replace all "zirhsertligi " and "zirhtoughness " and "toughness " and "armortoughness " and "sertlik " and "zırhsertliği " and "zirhsertlik " in {_i} with ""
- set {_toughness} to ({_i} parsed as number)
- set yaml value "Items.Armors.%name of player's held item%.%{_type}%.toughness" from "damageplus" to {_toughness}
- if {_i} contains "zirh " or "armor " or "armorpoint " or "def " or "zırh ":
- replace all "zirh " and "armor " and "armorpoint " and "def " and "zırh " in {_i} with ""
- set {_armor} to ({_i} parsed as number)
- set yaml value "Items.Armors.%name of player's held item%.%{_type}%.armor" from "damageplus" to {_armor}
- if lore of player's held item is set:
- set yaml value "Items.Armors.%name of player's held item%.%{_type}%.Lore" from "damageplus" to lore of player's held item
- else:
- send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
- stop
- if {confirmed::%player%} is 5:
- if player's held item is sword or axe or helmet or chestplate or leggings or boots:
- set {_e} to player's held item
- reLore({_e}, colored message)
- send "{@pd} &fLore degistirildi! &7Islemi bitirmek icin &9iptal &7yazabilirsiniz, isterseniz devam da edebilirsiniz."
- else:
- send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
- stop
- on tool change:
- if {confirmed::%player%} is set:
- delete {confirmed::%player%}
- send "{@pd} &fIslem iptal edildi!"
- #Esya lore duzenleme eylemleri.
- on enchant:
- if event-item is sword or axe:
- wait 5 tick
- set {_e} to event-item
- reLore({_e}, "")
- on anvil combine:
- if event-item-three is sword or axe:
- set {_e} to event-item-three
- reLore({_e}, "")
- on command "/enchant":
- set {_full_command} to full command
- set {_command_args::*} to {_full_command} split at " "
- if {_command_args::2} is set:
- if player's held item is sword or axe:
- wait 5 tick
- set {_e} to player's held item
- reLore({_e}, "")
- on preparing craft of sword or axe or helmet or chestplate or leggings or boots:
- if type of event-inventory is workbench inventory:
- set {_e} to event-item
- reLore({_e}, "")
- set slot 0 of event-inventory to {_e}
- #========================================================#
- # /!\ DEBUG KOMUTLARI /!\ #
- # Bu komutlari kafaniza gore kullanmayiniz! #
- #========================================================#
- command /relore [<text>] [<number>] [<number>] [<number>]:
- permission: relore.adm
- trigger:
- if player's held item is air:
- send "&cElinde bir esya yok!"
- stop
- set {_e} to player's held item
- set {_value} to getItemId({_e})
- if {_value} is not set:
- setItemStats({_e})
- set {_value} to getItemId({_e})
- if player's held item is helmet or chestplate or leggings or boots:
- if arg 2 is set:
- set {armor::%{_value}%} to arg 2
- if arg 3 is set:
- set {toughness::%{_value}%} to arg 3
- else:
- if arg 2 is set:
- set {atk::%{_value}%} to arg 2
- if arg 3 is set:
- set {critchance::%{_value}%} to arg 3
- if arg 4 is set:
- set {critdmg::%{_value}%} to arg 4
- if arg 1 is "null" or "<none>":
- reLore({_e}, "")
- else:
- reLore({_e}, colored arg 1)
- command /showmyenchantments:
- permission: showmy.adm
- trigger:
- set {_i::*} to enchantments of player's held item
- loop {_i::*}:
- send "%loop-value% %loop-index%"
- command /showmyeffects:
- permission: showmy.adm
- trigger:
- #loop active potion effects of player: #<---- sorun yaratiyor??
- # send loop-value
- #set {_i::*} to active potion effects of player #<----- sorun yaratiyor??
- #loop {_i::*}:
- # send loop-value
- set {_tier} to tier of potion effect strength of player
- send "%{_tier}%"
- command /showmylore:
- permission: showmy.adm
- trigger:
- set {_e} to player's held item
- set {_lore::*} to lore of {_e} split at "||"
- loop (size of {_lore::*}-5) times:
- add line loop-number of lore of {_e} to {_i::*}
- set {_lore} to "%{_i::*}%"
- replace all " and " and ", " in {_lore} with "||"
- send "%{_lore}%"
- command /showmyids:
- permission: showmy.adm
- trigger:
- loop {armor::*}:
- send "%loop-index% &c%loop-value%"
- loop {atk::*}:
- send "%loop-index% &c%loop-value%"
- send "&7Total (Atk): &c%size of {atk::*}%" and "&7Total (Armor): &c%size of {armor::*}%" and "&7Total (All): &c%size of {atk::*} + size of {armor::*}%"
- command /deletemyids:
- permission: showmy.adm
- trigger:
- send "{@pd} &9%size of {atk::*} + size of {armor::*}% &7adet veri (ID) silindi! &cLutfen skripte reload atiniz!"
- delete {atk::*} and {critdmg::*} and {critchance::*} and {armor::*} and {toughness::*}
- command /creationphase [<integer>]:
- permission: showmy.adm
- trigger:
- set {confirmed::%player%} to arg 1
- command /checkfromyml:
- permission: showmy.adm
- trigger:
- loop yaml nodes with keys "Items.Swords.%name of player's held item%" from "damageplus":
- send "%loop-value% | %loop-val%"
- command /showmyver:
- permission: showmy.adm
- trigger:
- set {_v} to text from "https://rentry.co/damageplus/raw" #Eski --> "https://rentry.co/ncbkk/raw"
- send "ver -> %{_v}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement