Advertisement
SosigSenpai

Damage+ Skript

Sep 1st, 2022 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 41.35 KB | None | 0 0
  1. # ________     ________     ___       ___     ________     _________     _________            
  2. #|  ____  \   /  ____  \   /   \     /   \   /  ____  \   /  _______\   |   ______\          
  3. #| |    \  | |  /    \  |  |    \   /    |  |  /    \  |  |  |          |  |____           /  |
  4. #| |    |  | |  |____|  |  |     \_/     |  |  |____|  |  |  |   ____   |      /      _____|  |_____
  5. #| |    |  | |          |  |  |\     /|  |  |          |  |  |  |__  \  |   __/       \____    ____/
  6. #| |____/  | |   /__\   |  |  | \___/ |  |  |   /__\   |  |  |____|  |  |  |_______        |  |
  7. #|________/  |__/    \__|  |__/       \__|  |__/    \__|  \__________/  |_________/        |  /
  8. #      
  9. #==================================================================================================#
  10. #
  11. #                                      /!\ /!\ UYARI /!\ /!\                                      
  12. #
  13. # -Bu skripti kendinizinmis gibi gosterip satmayiniz!
  14. # -Bu skripti istediginiz yerde paylasabilirsiniz fakat kendinizinmis gibi gostermeyiniz!
  15. #
  16. #==========================================[! ONEMLI !]============================================#
  17. #
  18. # -Bug/hata bulursaniz lutfen forum veya discord uzerinden bana bildiriniz!
  19. # -Discordumu asagida bulabilirsiniz.
  20. # -Olasi hatalar icin bazi hata mesajlari ve debug komutlari birakilmistir.
  21. # -"Bir hata meydana geldi (Bilinmiyor?)" gibi bir mesaj gelirse lutfen bildiriniz!
  22. # -Debug komutlarini kafaniza gore kullanmayiniz.
  23. # -Size herhangi bir debug komudu kullanmanizi soylersem ancak o zaman kullanin!
  24. # -Bazi pluginler skriptin islevini bozabilir!
  25. # -Skript surumu otomatik kontrol edilmektedir, reload atildiginda guncelleme varsa uyarir.
  26. # -Guncellemeler otomatik inmemektedir, yeni surumu forum uzerinden indiriniz.
  27. # -Forumda cogu sey hakkinda bilgi edinebilirsiniz, neyi nasil kullanacaginizi cozemediyseniz bir bakin.
  28. #
  29. # -Forum linki: EKLENECEK, eklemeyi unuttuysam uyarin!
  30. #
  31. # -Bu skript 1.8.x icin kodlanmistir, ust surumlerde dogru calismayabilir.
  32. # -Eger 1.8 uzerinde bir surumde oynuyorsaniz (+1.9), olusabilecek sorunlardan sorumlu degilim!
  33. #
  34. #==================================[! GUNCELLEMELER HAKKINDA !]====================================#
  35. #
  36. # -Yeni bir guncelleme geldiginde skript uzerinde yapmis oldugunuz degisiklikler silinir!
  37. # -YAML dosyasi guncelleme yapsaniz bile silmediginiz surece oldugu gibi kalir.
  38. #
  39. # -Ileriki surumlerde guncelleme yapilsa bile ayarlariniz gitmesin diye cogu seyi yaml uzerine tasiyabilirim.
  40. # -Guncelleme geldiginde skripte reload atildiginda size guncelleme oldugunu soyluyor.
  41. # -Forumdan guncellemeyi indirebilirsiniz. Guncellemeler otomatik degildir.
  42. #
  43. # -Guncelleme yapmadan once mevcut surumun bir yedegini alin, herhangi bir sorunda onceki surume donunuz.
  44. # -Yeni indirdiginiz surumde karsilastiginiz sorunlari bildirebilirsiniz, duzgun calismamasi vs.
  45. #
  46. # -Guncellemede neler eklendigini Forum uzerinden okuyabilirsiniz.
  47. #
  48. # -Guncellemelere yardimci olmak icin buldugunuz sorunlari/hatalari bildirebilirsiniz.
  49. # -Forum veya discord uzerinden bildirebilirsiniz, discordum asagida var.
  50. #
  51. # -Skripti gelistirmeme yardimci olmak isterseniz (bug bildirmek disinda koddada yardim etmek isterseniz),
  52. # discord uzerinden bana ulasabilirsiniz.
  53. # -Yardimci olan herkese simdiden tesekkurler :) Yardimci olan olursa isimleri eklenecektir.
  54. #
  55. #==================================[! ALPHA SURUMU HAKKINDA !]=====================================#
  56. #
  57. # -Bazi komutlar henuz tamamlanmamistir, sorunlu olabilirler.
  58. # -Bu komutlarin listesi: /dmg+ stats | /dmg+ create | /dmg+ yaml komutlari
  59. # -Ileriki surumlerde bu komutlar duzeltilecektir, yeni komutlar eklenecektir.
  60. #
  61. # -Skript henuz Alpha'da oldugundan bir cok sorunu olabilir.
  62. # -Hatta simdilik kullanmanizi tavsiye etmiyorum, sizin tercihiniz tabii.
  63. #
  64. # -Yukarida birden fazla kez bahsettim ama tekrar soyluyorum;
  65. # -Hatalari/Sorunlari lutfen bildiriniz. Discord veya Forum uzerinden bildirebilirsiniz.
  66. #
  67. # -Klavyem ingilizce oldugundan simdilik cogu sey turkce karakter icermiyor (bazi seylere gene de ekledim.)
  68. # -Ileriki surumlerde turkce karakterleri ekleyecegim, yardim etmek isteyen olursa yazabilir.
  69. #
  70. #====================================[! ADDONLAR HAKKINDA !]=======================================#
  71. #
  72. # -Lutfen addonlari indirdiginizden emin olun, indirirken surumlerine dikkat edin!
  73. #
  74. # -Gerekli skript surumu: Skript 2.2dev36
  75. #
  76. # -Gerekli addonlar:
  77. # -TuSKe 1.8.2-pikachu-patch-3
  78. # -SK-NBeeT 2.11.1
  79. # -SkQuery 3.6.1-Lime
  80. # -skript-yaml 1.3.2
  81. # -MorkazSk 1.1
  82. # -skript-mirror 2.0.0
  83. #
  84. # -Ayni listeyi forumda da bulabilirsiniz.
  85. # -Ileriki guncellemelerde gerekli addonlar degisebilir. Guncelleme geldiginde kontrol ediniz.
  86. #
  87. #==================================================================================================#    
  88. #>> Damage+ version: ALPHA 0.6
  89. #>> na2000 tarafindan yapilmistir
  90. #>> Discord: Lil.Sosig#7850
  91.  
  92. #------------------------------------------#
  93. # LUTFEN ONCE YUKARIDAKI YAZILARI OKUYUNUZ #
  94. #------------------------------------------#
  95.  
  96. options:
  97.     pd: &cDamage+ &8&l> #Prefix
  98.     defaultlore: &7Siradan bir esya o kadar... #Esyaya verilen otomatik lore, &r yazarsaniz hicbirsey koymaz. Satir atlamak icin araya || koyunuz. Degistirdikten sonra skripte reload atiniz.
  99.  
  100. on load:
  101.     set {atk::hand} to 0.5 #Bos elle vurulan hasar.
  102.     set {atk::unkown} to 0.5 #Hasari bilinmeyen bir esyanin vurdugu hasar.
  103.     set {atk::mob} to 1.5 #Yaratik hasari. (Eli bos iken)
  104.     set {_v_current} to "ALPHA 0.6" #Mevcut surum
  105.     wait 0.5 seconds
  106.     load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus"
  107.     if yaml "damageplus" is empty:
  108.         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
  109.         wait 2 tick
  110.         #-------------------#
  111.         #Ornek yaml esyalari#
  112.         #-------------------#
  113.         #-
  114.         # Kilic -> Items.Swords.(Esya Adi).(atk/critdmg/critchance/lore)
  115.         # Zirh  -> Items.Armors.(Esya Adi).(helmet/chestplate/leggings/boots).(armor/toughness/lore)
  116.         #-
  117.         #>> Ornek Kilic 1
  118.         set yaml value "Items.Swords.&cDeneme123.atk" from "damageplus" to 25 #Hasar
  119.         set yaml value "Items.Swords.&cDeneme123.critdmg" from "damageplus" to 100 #Kritik Hasar (%)
  120.         set yaml value "Items.Swords.&cDeneme123.critchance" from "damageplus" to 50 #Kritik Sansi
  121.         #>> Ornek Zirh (Kask)
  122.         set yaml value "Items.Armors.&bDenemeZirhSeti.Helmet.armor" from "damageplus" to 7 #Zirh
  123.         set yaml value "Items.Armors.&bDenemeZirhSeti.Helmet.toughness" from "damageplus" to 4 #Zirh Sertligi
  124.         #>> Ornek Zirh (Gogusluk)
  125.         set yaml value "Items.Armors.&bDenemeZirhSeti.Chestplate.armor" from "damageplus" to 15 #Zirh
  126.         set yaml value "Items.Armors.&bDenemeZirhSeti.Chestplate.toughness" from "damageplus" to 8 #Zirh Sertligi
  127.         #>> Ornek Zirh (Bacaklik)
  128.         set yaml value "Items.Armors.&bDenemeZirhSeti.Leggings.armor" from "damageplus" to 10 #Zirh
  129.         set yaml value "Items.Armors.&bDenemeZirhSeti.Leggings.toughness" from "damageplus" to 6 #Zirh Sertligi
  130.         #>> Ornek Zirh (Bot)
  131.         set yaml value "Items.Armors.&bDenemeZirhSeti.Boots.armor" from "damageplus" to 7 #Zirh
  132.         set yaml value "Items.Armors.&bDenemeZirhSeti.Boots.toughness" from "damageplus" to 2 #Zirh Sertligi
  133.         #>> Ornek Kilic 2 (Lore Ornegi)
  134.         set yaml value "Items.Swords.&dSuperKilic.atk" from "damageplus" to 25 #Hasar
  135.         set yaml value "Items.Swords.&dSuperKilic.critdmg" from "damageplus" to 100 #Kritik Hasar (%)
  136.         set yaml value "Items.Swords.&dSuperKilic.critchance" from "damageplus" to 50 #Kritik Sansi
  137.         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.
  138.         #>> Ornek Kilic 3 (Sadece Lore)
  139.         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.
  140.         #>> Ornek Zirh 2 (Sadece Kask + Lore)
  141.         set yaml value "Items.Armors.&eHavali Kask.Helmet.armor" from "damageplus" to 15 #Zirh
  142.         set yaml value "Items.Armors.&eHavali Kask.Helmet.toughness" from "damageplus" to 10 #Zirh Sertligi
  143.         set yaml value "Items.Armors.&eHavali Kask.Helmet.Lore" from "damageplus" to "&fBu zirhin sadece kaski ayarli!"
  144.         #>> Ornek Zirh 3 (Sadece Bot + Sadece zirh puani ve lore)
  145.         set yaml value "Items.Armors.&aTuhaf Bot.Boots.armor" from "damageplus" to 1 #Zirh
  146.         set yaml value "Items.Armors.&aTuhaf Bot.Boots.Lore" from "damageplus" to "&fSadece zirh puani ayarli bir bot!"
  147.         #>> Ornek Balta 1
  148.         set yaml value "Items.Axes.&3Deneme Balta.atk" from "damageplus" to 10 #Hasar
  149.         set yaml value "Items.Axes.&3Deneme Balta.critdmg" from "damageplus" to 200 #Kritik Hasar (%)
  150.         set yaml value "Items.Axes.&3Deneme Balta.critchance" from "damageplus" to 10 #Kritik Sansi
  151.         set yaml value "Items.Axes.&3Deneme Balta.Lore" from "damageplus" to "&fDeneme Balta" #Lore, satir atlamak icin || koyunuz.
  152.         #-------------------#
  153.         save yaml "damageplus" #Kaydetme
  154.         load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus" #Tekrar yukleme
  155.     loop yaml nodes with keys "Items" from "damageplus":
  156.         loop yaml nodes with keys "Items.%loop-value-1%" from "damageplus":
  157.             if loop-value-1 is "Armors":
  158.                 loop yaml nodes with keys "Items.Armors.%loop-value-2%" from "damageplus":
  159.                     add loop-value-3 to {_i::*}
  160.             else:
  161.                 add loop-value-2 to {_i::*}
  162.     send "{@pd} &fYuklenen esyalar: &9%size of {_i::*}%" to ops and console
  163.     set {_v_check} to text from "https://rentry.co/damageplus/raw" #Guncel surum
  164.     wait 1 seconds
  165.     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
  166.     if {_v_current} is not {_v_check}: #Surum kontrolu
  167.         send "{@pd} &eGuncelleme Mevcut! &8(&7%{_v_current}% &8-> &9%{_v_check}%&8)" to ops and console #Guncelleme mesaji
  168.  
  169. function itemIdGenerator(e: item, n: number):
  170.     loop {_n} times:
  171.         add random letter to {_i::*}
  172.         chance of 35%:
  173.             add "%random integer between 0 and 9%" to {_i::*}
  174.     set {_id} to join {_i::*} using ""
  175.     add "{GeneratedId:[""%{_e}%%{_id}%""]}" to nbt of {_e}
  176.  
  177. function getItemId(e: item) :: text:
  178.     set {_value} to tag "GeneratedId" of nbt of {_e}
  179.     replace every "[" and "]" and ":" and """" in {_value} with ""
  180.     return {_value}
  181.  
  182. function setItemStats(e: item):
  183.     set {_value} to getItemId({_e})
  184.     if {_value} is not set:
  185.         itemIdGenerator({_e}, 10) #<--- ??
  186.         set {_value} to getItemId({_e})
  187.     if {_e} is a sword or axe:
  188.         if {_e} is sword:
  189.             set {_type} to "Swords"
  190.         else if {_e} is axe:
  191.             set {_type} to "Axes"
  192.         if {atk::%{_value}%} is not set:
  193.             #if {_e} is a sword:
  194.             set {_i} to "%{_e}%"
  195.             set {_i::*} to {_i} split at "_" #<--- ??
  196.             set {_i} to {_i::1}
  197.             if {_i} is "Wooden":
  198.                 set {atk::%{_value}%} to 4
  199.                 set {critchance::%{_value}%} to 0
  200.                 set {critdmg::%{_value}%} to 0
  201.             else if {_i} is "Golden":
  202.                 set {atk::%{_value}%} to 4
  203.                 set {critchance::%{_value}%} to 10
  204.                 set {critdmg::%{_value}%} to 150
  205.             else if {_i} is "Stone":
  206.                 set {atk::%{_value}%} to 5
  207.                 set {critchance::%{_value}%} to 1
  208.                 set {critdmg::%{_value}%} to 50
  209.             else if {_i} is "Iron":
  210.                 set {atk::%{_value}%} to 6
  211.                 set {critchance::%{_value}%} to 2
  212.                 set {critdmg::%{_value}%} to 75
  213.             else if {_i} is "Diamond":
  214.                 set {atk::%{_value}%} to 7
  215.                 set {critchance::%{_value}%} to 5
  216.                 set {critdmg::%{_value}%} to 100
  217.             else:
  218.                 set {atk::%{_value}%} to 0
  219.                 set {critchance::%{_value}%} to 0
  220.                 set {critdmg::%{_value}%} to 0
  221.             if {_type} is "Axes":
  222.                 add 2 to {critchance::%{_value}%}
  223.                 add 50 to {critdmg::%{_value}%}
  224.             if yaml path "Items.%{_type}%.%name of {_e}%" in "damageplus" has value:
  225.                 loop yaml nodes with keys "Items.%{_type}%.%name of {_e}%" from "damageplus":
  226.                     if loop-value is "atk" or "hasar":
  227.                         set {atk::%{_value}%} to ("%loop-val%" parsed as number)
  228.                     if loop-value is "critdmg":
  229.                         set {critdmg::%{_value}%} to ("%loop-val%" parsed as number)
  230.                     if loop-value is "critchance":
  231.                         set {critchance::%{_value}%} to ("%loop-val%" parsed as number)
  232.                 if lore of {_e} is "":
  233.                     if yaml path "Items.%{_type}%.%name of {_e}%.Lore" in "damageplus" has value:
  234.                         set lore of {_e} to yaml value "Items.%{_type}%.%name of {_e}%.Lore" from "damageplus"
  235.             if {atk::%{_value}%} is set:
  236.                 add "{HideFlags:62}" to nbt of {_e} #<- 63'u dene ???
  237.                 if lore of {_e} is not "":
  238.                     set {_i} to lore of {_e}
  239.                 else:
  240.                     set {_i} to "{@defaultlore}"
  241.                 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---------------"
  242.     else if {_e} is helmet or chestplate or leggings or boots:
  243.         if {armor::%{_value}%} is not set:
  244.             set {_i} to "%{_e}%"
  245.             set {_i::*} to {_i} split at "_" #<--- ??
  246.             set {_i} to {_i::1}
  247.             if {_i} is "Leather":
  248.                 if {_e} is helmet or boots:
  249.                     set {armor::%{_value}%} to 1
  250.                     set {toughness::%{_value}%} to 0
  251.                 if {_e} is chestplate:
  252.                     set {armor::%{_value}%} to 3
  253.                     set {toughness::%{_value}%} to 0
  254.                 if {_e} is leggings:
  255.                     set {armor::%{_value}%} to 2
  256.                     set {toughness::%{_value}%} to 0
  257.             else if {_i} is "Golden":
  258.                 if {_e} is helmet:
  259.                     set {armor::%{_value}%} to 2
  260.                     set {toughness::%{_value}%} to 0
  261.                 if {_e} is chestplate:
  262.                     set {armor::%{_value}%} to 5
  263.                     set {toughness::%{_value}%} to 3
  264.                 if {_e} is leggings:
  265.                     set {armor::%{_value}%} to 3
  266.                     set {toughness::%{_value}%} to 2
  267.                 if {_e} is boots:
  268.                     set {armor::%{_value}%} to 1
  269.                     set {toughness::%{_value}%} to 0
  270.             else if {_i} is "Chain" or "Chainmail":
  271.                 if {_e} is helmet:
  272.                     set {armor::%{_value}%} to 2
  273.                     set {toughness::%{_value}%} to 0
  274.                 if {_e} is chestplate:
  275.                     set {armor::%{_value}%} to 5
  276.                     set {toughness::%{_value}%} to 0
  277.                 if {_e} is leggings:
  278.                     set {armor::%{_value}%} to 4
  279.                     set {toughness::%{_value}%} to 0
  280.                 if {_e} is boots:
  281.                     set {armor::%{_value}%} to 1
  282.                     set {toughness::%{_value}%} to 0
  283.             else if {_i} is "Iron":
  284.                 if {_e} is helmet or boots:
  285.                     set {armor::%{_value}%} to 2
  286.                     set {toughness::%{_value}%} to 0
  287.                 if {_e} is chestplate:
  288.                     set {armor::%{_value}%} to 6
  289.                     set {toughness::%{_value}%} to 2
  290.                 if {_e} is leggings:
  291.                     set {armor::%{_value}%} to 5
  292.                     set {toughness::%{_value}%} to 1
  293.             else if {_i} is "Diamond":
  294.                 if {_e} is helmet or boots:
  295.                     set {armor::%{_value}%} to 3
  296.                     set {toughness::%{_value}%} to 1
  297.                 if {_e} is chestplate:
  298.                     set {armor::%{_value}%} to 8
  299.                     set {toughness::%{_value}%} to 3
  300.                 if {_e} is leggings:
  301.                     set {armor::%{_value}%} to 6
  302.                     set {toughness::%{_value}%} to 2
  303.             else:
  304.                 if {_e} is helmet:
  305.                     set {armor::%{_value}%} to 0
  306.                     set {toughness::%{_value}%} to 0
  307.                 if {_e} is chestplate:
  308.                     set {armor::%{_value}%} to 0
  309.                     set {toughness::%{_value}%} to 0
  310.                 if {_e} is leggings:
  311.                     set {armor::%{_value}%} to 0
  312.                     set {toughness::%{_value}%} to 0
  313.                 if {_e} is boots:
  314.                     set {armor::%{_value}%} to 0
  315.                     set {toughness::%{_value}%} to 0
  316.             if yaml path "Items.Armors.%name of {_e}%" in "damageplus" has value:
  317.                 add "Helmet" and "Chestplate" and "Leggings" and "Boots" to {_piece::*}
  318.                 loop {_piece::*}:
  319.                     if {_e} is (loop-value-1 parsed as itemtype):
  320.                         loop yaml nodes with keys "Items.Armors.%name of {_e}%.%loop-value-1%" from "damageplus":
  321.                             if loop-value-2 is "armor":
  322.                                 set {armor::%{_value}%} to ("%loop-val%" parsed as number)
  323.                             if loop-value-2 is "toughness":
  324.                                 set {toughness::%{_value}%} to ("%loop-val%" parsed as number)
  325.                     if lore of {_e} is "":
  326.                         if yaml path "Items.Armors.%name of {_e}%.%loop-value-1%.Lore" in "damageplus" has value:
  327.                             set lore of {_e} to yaml value "Items.Armors.%name of {_e}%.%loop-value-1%.Lore" from "damageplus"
  328.             if {armor::%{_value}%} is set:
  329.                 add "{HideFlags:62}" to nbt of {_e} #<-
  330.                 if lore of {_e} is not "":
  331.                     set {_i} to lore of {_e}
  332.                 else:
  333.                     set {_i} to "{@defaultlore}"
  334.                 set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fZirh &e+%{armor::%{_value}%}%||&8&l> &fZirh Sertligi &e+%{toughness::%{_value}%}%||&8&m---------------"
  335.  
  336. function reLore(e: item, customlore: text):
  337.     set {_value} to getItemId({_e})
  338.     if {_value} is not set:
  339.         setItemStats({_e})
  340.         set {_value} to getItemId({_e})
  341.     add "{HideFlags:62}" to nbt of {_e}
  342.     if {_customlore} is not "":
  343.         set {_i} to {_customlore}
  344.     else:
  345.         set {_i} to customLore({_e})
  346.     if {_e} is sword or axe:
  347.         if {_e} is enchanted with sharpness:
  348.             set {_sharpness} to 0.5*(level of sharpness on {_e}) + 1
  349.             set {_sharpness} to "&9 (+%{_sharpness}%)"
  350.         else:
  351.             set {_sharpness} to "&r"
  352.         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---------------"
  353.     else if {_e} is helmet or chestplate or leggings or boots:
  354.         set lore of {_e} to "%{_i}%||&8&m---------------||&8&l> &fZirh &e+%{armor::%{_value}%}%||&8&l> &fZirh Sertligi &e+%{toughness::%{_value}%}%||&8&m---------------"
  355.  
  356. function customLore(e: item) :: text:
  357.     set {_lore::*} to lore of {_e} split at "||"
  358.     loop (size of {_lore::*}-5) times:
  359.         add line loop-number of lore of {_e} to {_i::*}
  360.     set {_lore} to "%{_i::*}%"
  361.     replace all " and " and ", " in {_lore} with "||"
  362.     return {_lore}
  363.  
  364. function saveCreation(e: item, p: player):
  365.     save yaml "damageplus"
  366.     send "{@pd} &r%name of {_e}% &fadli esyanin statlari ayarlandi!" and "{@pd} &fLutfen &9/dmg+ yaml reload &fkomudunu kullaniniz!" to {_p}
  367.     delete {confirmed::%{_p}%}
  368.  
  369. on pickup:
  370.     if event-item is a sword or pickaxe or axe or hoe or shovel or bow or helmet or chestplate or leggings or boots:
  371.         set {_e} to event-item
  372.         setItemStats({_e})
  373.  
  374. on damage:
  375.     if damage cause is fall or drowning or entity explosion or projectile or burning or lava or poison:
  376.         stop
  377.     if projectile exists:
  378.         stop
  379.     if attacker's held item is not air:
  380.         set {_e} to attacker's held item
  381.         if {_e} is sword or axe: #<--- Daha fazla esya turu ekle
  382.             set {_value} to getItemId({_e})
  383.             if {_value} is not set:
  384.                 setItemStats({_e})
  385.         else:
  386.             set {_value} to "unkown"
  387.     if attacker's held item is air:
  388.         if attacker is a player:
  389.             set {_value} to "hand"
  390.         else:
  391.             set {_value} to "mob"
  392.     set {_armor} to 0
  393.     set {_toughness} to 0
  394.     set {_protect} to 0
  395.     if victim's helmet is not air:
  396.         set {_e} to victim's helmet
  397.         set {_a} to getItemId({_e})
  398.         if {armor::%{_a}%} is not set:
  399.             setItemStats({_e})
  400.             set {_a} to getItemId({_e})
  401.         add {armor::%{_a}%} to {_armor}
  402.         add {toughness::%{_a}%} to {_toughness}
  403.         add level of protection on victim's helmet to {_protect}
  404.     delete {_a}
  405.     if victim's chestplate is not air:
  406.         set {_e} to victim's chestplate
  407.         set {_a} to getItemId({_e})
  408.         if {armor::%{_a}%} is not set:
  409.             setItemStats({_e})
  410.             set {_a} to getItemId({_e})
  411.         add {armor::%{_a}%} to {_armor}
  412.         add {toughness::%{_a}%} to {_toughness}
  413.         add level of protection on victim's chestplate to {_protect}
  414.     delete {_a}
  415.     if victim's leggings is not air:
  416.         set {_e} to victim's leggings
  417.         set {_a} to getItemId({_e})
  418.         if {armor::%{_a}%} is not set:
  419.             setItemStats({_e})
  420.             set {_a} to getItemId({_e})
  421.         add {armor::%{_a}%} to {_armor}
  422.         add {toughness::%{_a}%} to {_toughness}
  423.         add level of protection on victim's leggings to {_protect}
  424.     delete {_a}
  425.     if victim's boots is not air:
  426.         set {_e} to victim's boots
  427.         set {_a} to getItemId({_e})
  428.         if {armor::%{_a}%} is not set:
  429.             setItemStats({_e})
  430.             set {_a} to getItemId({_e})
  431.         add {armor::%{_a}%} to {_armor}
  432.         add {toughness::%{_a}%} to {_toughness}
  433.         add level of protection on victim's boots to {_protect}
  434.     if {atk::%{_value}%} is set:
  435.         #KRITIK VURMA OLASILIGI
  436.         chance of {critchance::%{_value}%}%: #<-- Kritik sansi
  437.             set {_crit} to true
  438.         if {_i} is less than 0:
  439.             set {_i} to 0
  440.         #KRITIK KONTROL
  441.         if {_crit} is set: #Kritik vurulacaksa hasari ayarliyor
  442.             set {_damage} to ({atk::%{_value}%}+({atk::%{_value}%}*({critdmg::%{_value}%}/100))) #<-- Kritik vurulacak hasar
  443.         else:
  444.             set {_damage} to {atk::%{_value}%} #<-- Orjinal hasar
  445.         #----------BUYULER----------#
  446.         if level of sharpness on attacker's held item is greater than 0:
  447.             add 0.5*(level of sharpness on attacker's held item) + 1 to {_damage}
  448.         #---------------------------#
  449.         #------IKSIR EFEKTLERI------#
  450.         set {_tier} to tier of potion effect strength of attacker
  451.         if {_tier} is greater than 0:
  452.             add {_tier}*3 to {_damage}
  453.         delete {_tier}
  454.         set {_tier} to tier of potion effect weakness of attacker
  455.         if {_tier} is greater than 0:
  456.             remove 4 from {_damage}
  457.         delete {_tier}
  458.         set {_tier} to tier of potion effect resistance of victim
  459.         if {_tier} is greater than 0:
  460.             set {_damage} to {_damage}-({_damage}*({_tier}*20)/100)
  461.         #---------------------------#
  462.         set {_a1} to {_armor} / 5
  463.         set {_a2} to {_armor} - {_damage} / (2 + {_toughness} / 4)
  464.         if {_a1} is greater than {_a2}:
  465.             set {_a} to {_a1}
  466.         else:
  467.             set {_a} to {_a2}
  468.         if {_damage} * (1 - ({_a}) / 25) is less than 0:
  469.             set {_damage} to 0.01
  470.         else:
  471.             set {_damage} to {_damage} * (1 - ({_a}) / 25)
  472.         if {_protect} is greater than 20:
  473.             set {_protect} to 20
  474.         #send "%{_crit}% / %{_i}% | %{_protect}% | %{_damage}-({_damage}*({_protect}*4)/100)%" to attacker
  475.         set {_i} to victim's health-({_damage}-({_damage}*({_protect}*4)/100)) #<--- Can kontrolu (orjinal minecraft zirhini, efektlerini vs. gormezden gelmek icin)
  476.         set damage to {_damage}-({_damage}*({_protect}*4)/100) #<--- Hasar ayarlama
  477.         wait 1 tick
  478.         #if {_crit} is set:
  479.         if victim's health is not 0:
  480.             if victim's health is not {_i}:
  481.                 set victim's health to {_i}
  482.         wait 2 tick
  483.         #send "%damage% | %final damage% /// %victim's health% | %victim's max health%" to attacker and victim #Hasari gormek icin debug mesaji.
  484.         #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).
  485.  
  486. command /damage+ [<text>] [<text>] [<text>]:
  487.     aliases: damageplus, dmg+, dmgplus, damage, dmg
  488.     permission: damageplus.adm
  489.     trigger:
  490.         if arg 1 is "help" or "yardim" or "yardm" or "yrd" or "yrdm":
  491.             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>> >"
  492.         else if arg 1 is "stats" or "stat" or "menu" or "statsmenu":
  493.             create a gui with virtual chest with 6 rows named "&8&l<< &cDamage+ Stats &8&l>>":
  494.                 set {_slot} to 0
  495.                 wait 1 tick
  496.                 loop ({_slot}+9*6) times:
  497.                     make gui slot {_slot} with gray stained glass named "&f"
  498.                     add 1 to {_slot}
  499.                 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!"
  500.                 make gui slot 19 with blue stained glass named "&f&lESYAYI BURAYA KOY" with lore "&7Statlarini degistirmek istedigin||&7esyayi buraya koy.":
  501.                     if gui-cursor-item is not air:
  502.                         if gui-clicked-item is not gray stained glass or black stained glass:
  503.                             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:
  504.                                 set {_e} to gui-cursor-item
  505.                                 set {_value} to getItemId({_e})
  506.                                 if {_e} is sword:
  507.                                     if {atk::%{_value}%} is not set:
  508.                                         setItemStats({_e})
  509.                                         set {_value} to getItemId({_e})
  510.                                     set {_atk} to {atk::%{_value}%}
  511.                                     set {_critdmg} to {critdmg::%{_value}%}
  512.                                     set {_critchance} to {critchance::%{_value}%}
  513.                                 if {_e} is helmet or chestplate or leggings or boots:
  514.                                     if {armor::%{_value}%} is not set:
  515.                                         setItemStats({_e})
  516.                                         set {_value} to getItemId({_e})
  517.                                     set {_armor} to {armor::%{_value}%}
  518.                                     set {_toughness} to {toughness::%{_value}%}
  519.                                 if gui-clicked-item is not blue stained glass:
  520.                                     set gui-cursor-item to gui-clicked-item
  521.                                 else:
  522.                                     set gui-cursor-item to air
  523.                                 set gui-clicked-item to {_e}
  524.                                 set {_f} to gui-clicked-item
  525.                                 if {_e} is sword or axe:
  526.                                     make gui slot 13 with iron sword with no nbt named "&f&lHASAR" with lore "&f":
  527.                                         if gui-click-action is left mouse button:
  528.                                             add 1 to {atk::%{_value}%}
  529.                                         if gui-click-action is left mouse button with shift:
  530.                                             add 10 to {atk::%{_value}%}
  531.                                         if gui-click-action is right mouse button:
  532.                                             remove 1 from {atk::%{_value}%}
  533.                                         if gui-click-action is right mouse button with shift:
  534.                                             remove 10 from {atk::%{_value}%}
  535.                                         reLore({_f}, "")
  536.                                     make gui slot 22 with arrow named "&f&lKRITIK HASAR" with lore "&f":
  537.                                         if gui-click-action is left mouse button:
  538.                                             add 1 to {critdmg::%{_value}%}
  539.                                         if gui-click-action is left mouse button with shift:
  540.                                             add 10 to {critdmg::%{_value}%}
  541.                                         if gui-click-action is right mouse button:
  542.                                             remove 1 from {critdmg::%{_value}%}
  543.                                         if gui-click-action is right mouse button with shift:
  544.                                             remove 10 from {critdmg::%{_value}%}
  545.                                         reLore({_f}, "")
  546.                                     make gui slot 31 with emerald named "&f&lKRITIK SANS" with lore "&f":
  547.                                         if gui-click-action is left mouse button:
  548.                                             add 1 to {critchance::%{_value}%}
  549.                                         if gui-click-action is left mouse button with shift:
  550.                                             add 10 to {critchance::%{_value}%}
  551.                                         if gui-click-action is right mouse button:
  552.                                             remove 1 from {critchance::%{_value}%}
  553.                                         if gui-click-action is right mouse button with shift:
  554.                                             remove 10 from {critchance::%{_value}%}
  555.                                         reLore({_f}, "")
  556.                                 if {_e} is helmet or chestplate or leggings or boots:
  557.                                     make gui slot 13 with iron chestplate with no nbt named "&f&lZIRH" with lore "&f":
  558.                                         if gui-click-action is left mouse button:
  559.                                             add 1 to {armor::%{_value}%}
  560.                                         if gui-click-action is left mouse button with shift:
  561.                                             add 10 to {armor::%{_value}%}
  562.                                         if gui-click-action is right mouse button:
  563.                                             remove 1 from {armor::%{_value}%}
  564.                                         if gui-click-action is right mouse button with shift:
  565.                                             remove 10 from {armor::%{_value}%}
  566.                                         reLore({_f}, "")
  567.                                     make gui slot 22 with chain chestplate named "&f&lZIRH SERTLIGI" with lore "&f":
  568.                                         if gui-click-action is left mouse button:
  569.                                             add 1 to {toughness::%{_value}%}
  570.                                         if gui-click-action is left mouse button with shift:
  571.                                             add 10 to {toughness::%{_value}%}
  572.                                         if gui-click-action is right mouse button:
  573.                                             remove 1 from {toughness::%{_value}%}
  574.                                         if gui-click-action is right mouse button with shift:
  575.                                             remove 10 from {toughness::%{_value}%}
  576.                                         reLore({_f}, "")
  577.                                 run when close the gui:
  578.                                     if slot 19 of player's current inventory is not blue stained glass:
  579.                                         give player 1 of {_f}
  580.                             else:
  581.                                 send "{@pd} &fBu esyayi koyamassin!"
  582.                     else:
  583.                         if gui-clicked-item is not gray stained glass or black stained glass or blue stained glass:
  584.                             set gui-cursor-item to gui-clicked-item
  585.                             set gui-clicked-item to blue stained glass named "&f&lESYAYI BURAYA KOY" with lore "&7Statlarini degistirmek istedigin||&7esyayi buraya koy."
  586.                             make gui slot 13 and 22 and 31 with gray stained glass named "&f"
  587.                 make gui slot 53 with barrier named "&cMenuyu Kapat" with lore "&fMenuyu kapamak icin tiklayin.":
  588.                     close player's inventory
  589.             open last gui to player
  590.         else if arg 1 is "lore":
  591.             if player's held item is not air:
  592.                 if player's held item is sword or axe or helmet or chestplate or leggings or boots:
  593.                     #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!"
  594.                     set {confirmed::%player%} to 5
  595.                     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)"
  596.                 else:
  597.                     send "{@pd} &fBu esyanin Damage+ lore'unu degisemessin!"
  598.             else:
  599.                 send "{@pd} &fElinizde bir esya tutmuyorsunuz!"
  600.         else if arg 1 is "create":
  601.             if player's held item is sword or axe or helmet or chestplate or leggings or boots:
  602.                 if {confirmed::%player%} is not set:
  603.                     send "" and "{@pd} &7Islem sirasinda elinizdeki esyayi degistirirseniz islem &f&niptal edilir!" and "{@pd} &7Veya &9iptal &7yazarak iptal edebilirsiniz!"
  604.                     set {confirmed::%player%} to 1
  605.                     send "" and "{@pd} &fLutfen esyanin adini belirleyiniz. &8(&7Sohbete yaziniz&8)"
  606.                 else:
  607.                     send "{@pd} &fSuanda zaten bir esya olusturuyorsunuz! &fIptal etmek icin &9iptal &fyaziniz!"
  608.             else:
  609.                 send "{@pd} &fBu esyanin Damage+ statlari ayarlanamaz!"
  610.         else if arg 1 is "yaml" or "yml":
  611.             if arg 2 is "help" or "yardim" or "yrdm" or "yrd" or "yardım":
  612.                 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>> >"
  613.             else if arg 2 is "liste" or "list" or "listele":
  614.                 if arg 3 is "Swords" or "Kiliclar" or "kilic" or "sword" or "kılıç":
  615.                     send "" and "{@pd} &9&lKILICLAR &flisteleniyor..."
  616.                     loop yaml nodes with keys "Items.Swords" from "damageplus":
  617.                         add 1 to {_i}
  618.                         send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
  619.                     send "{@pd} &9&lKILICLAR &flistelendi! &8(&e%{_i}% &7Adet&8)"
  620.                 else if arg 3 is "Armors" or "Zirhlar" or "zirh" or "armor" or "zırh":
  621.                     send "" and "{@pd} &9&lZIRHLAR &flisteleniyor..."
  622.                     loop yaml nodes with keys "Items.Armors" from "damageplus":
  623.                         add 1 to {_i}
  624.                         send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
  625.                     send "{@pd} &9&lZIRHLAR &flistelendi! &8(&e%{_i}% &7Adet&8)"
  626.                 else if arg 3 is "all" or "hepsi" or "Items":
  627.                     send "{@pd} &fHenuz eklenmedi!"
  628.                 else:
  629.                     if arg 3 is set:
  630.                         set {_m} to arg 3
  631.                         replace all "&" in {_m} with "§"
  632.                         send "" and "&9&lItems.%{_m}% &flisteleniyor..."
  633.                         loop yaml nodes with keys "Items.%{_m}%" from "damageplus":
  634.                             add 1 to {_i}
  635.                             send "&1&l< &f&l+ &1&l> &r%loop-value% &7| &f%loop-val%"
  636.                         send "" and "&9&lItems.%{_m}% &flistelendi! &8(&e%{_i}% &7Adet&8)"
  637.                     else:
  638.                         send "{@pd} &fLutfen liste tagi seciniz! &9/dmg+ yaml liste <tag(lar)>"
  639.             else if arg 2 is "reload":
  640.                 send "{@pd} &fEsyalar yukleniyor..."
  641.                 load yaml "plugins/Skript/scripts/damageplus.yml" as "damageplus"
  642.                 loop yaml nodes with keys "Items" from "damageplus":
  643.                     loop yaml nodes with keys "Items.%loop-value-1%" from "damageplus":
  644.                         if loop-value-1 is "Armors":
  645.                             loop yaml nodes with keys "Items.Armors.%loop-value-2%" from "damageplus":
  646.                                 add loop-value-3 to {_i::*}
  647.                         else:
  648.                             add loop-value-2 to {_i::*}
  649.                 save yaml "damageplus"
  650.                 send "{@pd} &fYuklenen esyalar: &9%size of {_i::*}%"
  651.             else:
  652.                 execute player command "damageplus yaml help"
  653.         else:
  654.             execute player command "damageplus help"
  655.  
  656. on quit:
  657.     delete {confirmed::%player%}
  658.  
  659. on chat:
  660.     if {confirmed::%player%} is set:
  661.         cancel event
  662.         if message is "iptal" or "iptalet" or "iptal et" or "cancel":
  663.             delete {confirmed::%player%}
  664.             send "{@pd} &fIslem iptal edildi!"
  665.             stop
  666.         if {confirmed::%player%} is 1:
  667.             set name of player's held item to "%message%"
  668.             send "{@pd} &fEsyanin adi %message% &folarak ayarlandi!"
  669.             set {confirmed::%player%} to 2
  670.             wait 1 seconds
  671.             send "{@pd} &fEsyanin lore'unu giriniz. &9null &fyazarak lore islemini atlayabilirsiniz."
  672.             stop
  673.         if {confirmed::%player%} is 2:
  674.             if message is "null":
  675.                 send "{@pd} &fLore islemi atlandi!"
  676.             else:
  677.                 set lore of player's held item to "&7%message%"
  678.                 send "{@pd} &fLore ayarlandi!"
  679.             set {confirmed::%player%} to 3
  680.             wait 1 seconds
  681.             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!"
  682.             send "" and "{@pd} &fEsyanin statlarini giriniz. Ustteki yazilari okuyunuz!" and "{@pd} &fIsiniz bittikten sonra &9tamam &fyaziniz!"
  683.         if {confirmed::%player%} is 3:
  684.             if message is "tamam" or "tamamla" or "bitir":
  685.                 saveCreation(player's held item, player)
  686.                 stop
  687.             set {_i::*} to message split at " "
  688.             loop {_i::*}:
  689.                 set {_i} to loop-value
  690.                 #send "&e##1 %{_i}%"
  691.                 replace all ":" in {_i} with " "
  692.                 #send "&e##2 %{_i}%"
  693.                 if player's held item is sword or axe:
  694.                     set {_critdmg} to 0
  695.                     set {_atk} to 0
  696.                     set {_critchance} to 0
  697.                     if player's held item is sword:
  698.                         set {_type} to "Swords"
  699.                     if player's held item is axe:
  700.                         set {_type} to "Axes"
  701.                     if {_i} contains "kritikhasar " or "kritik " or "krit " or "critdmg " or "crit " or "kritikdmg ":
  702.                         replace all "kritikhasar " and "kritik " and "krit " and "critdmg " and "crit " and "kritikdmg " in {_i} with ""
  703.                         set {_critdmg} to ({_i} parsed as number)
  704.                         set yaml value "Items.%{_type}%.%name of player's held item%.critdmg" from "damageplus" to {_critdmg}
  705.                     if {_i} contains "hasar " or "attackdamage " or "atk " or "dmg " or "damage ":
  706.                         replace all "hasar " and "attackdamage " and "atk " and "dmg " and "damage " in {_i} with ""
  707.                         set {_atk} to ({_i} parsed as number)
  708.                         set yaml value "Items.%{_type}%.%name of player's held item%.atk" from "damageplus" to {_atk}  
  709.                     if {_i} contains "kritiksans " or "kritikşans " or "kritsans " or "critchance " or "critsans " or "kritikchance ":
  710.                         replace all "kritiksans " and "kritikşans " and "kritsans " and "critchance " and "critsans " and "kritikchance " in {_i} with ""
  711.                         set {_critchance} to ({_i} parsed as number)
  712.                         set yaml value "Items.%{_type}%.%name of player's held item%.critchance" from "damageplus" to {_critchance}
  713.                     if lore of player's held item is set:
  714.                         set yaml value "Items.%{_type}%.%name of player's held item%.Lore" from "damageplus" to lore of player's held item
  715.                 else if player's held item is helmet or chestplate or leggings or boots:
  716.                     if player's held item is helmet:
  717.                         set {_type} to "Helmet"
  718.                     else if player's held item is chestplate:
  719.                         set {_type} to "Chestplate"
  720.                     else if player's held item is leggings:
  721.                         set {_type} to "Leggings"
  722.                     else if player's held item is boots:
  723.                         set {_type} to "Boots"
  724.                     else:
  725.                         send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
  726.                         stop
  727.                     set {_armor} to 0
  728.                     set {_toughness} to 0
  729.                     if {_i} contains "zirhsertligi " or "zirhtoughness " or "toughness " or "armortoughness " or "sertlik " or "zırhsertliği " or "zirhsertlik ":
  730.                         replace all "zirhsertligi " and "zirhtoughness " and "toughness " and "armortoughness " and "sertlik " and "zırhsertliği " and "zirhsertlik " in {_i} with ""
  731.                         set {_toughness} to ({_i} parsed as number)
  732.                         set yaml value "Items.Armors.%name of player's held item%.%{_type}%.toughness" from "damageplus" to {_toughness}
  733.                     if {_i} contains "zirh " or "armor " or "armorpoint " or "def " or "zırh ":
  734.                         replace all "zirh " and "armor " and "armorpoint " and "def " and "zırh " in {_i} with ""
  735.                         set {_armor} to ({_i} parsed as number)
  736.                         set yaml value "Items.Armors.%name of player's held item%.%{_type}%.armor" from "damageplus" to {_armor}
  737.                     if lore of player's held item is set:
  738.                         set yaml value "Items.Armors.%name of player's held item%.%{_type}%.Lore" from "damageplus" to lore of player's held item
  739.                 else:
  740.                     send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
  741.                     stop
  742.         if {confirmed::%player%} is 5:
  743.             if player's held item is sword or axe or helmet or chestplate or leggings or boots:
  744.                 set {_e} to player's held item
  745.                 reLore({_e}, colored message)
  746.                 send "{@pd} &fLore degistirildi! &7Islemi bitirmek icin &9iptal &7yazabilirsiniz, isterseniz devam da edebilirsiniz."
  747.             else:
  748.                 send "{@pd} &fBir hata meydana geldi &6(Bilinmiyor?) &9Lutfen bu hatayi bildiriniz!"
  749.                 stop
  750. on tool change:
  751.     if {confirmed::%player%} is set:
  752.         delete {confirmed::%player%}
  753.         send "{@pd} &fIslem iptal edildi!"
  754.  
  755. #Esya lore duzenleme eylemleri.
  756.  
  757. on enchant:
  758.     if event-item is sword or axe:
  759.         wait 5 tick
  760.         set {_e} to event-item
  761.         reLore({_e}, "")
  762.  
  763. on anvil combine:
  764.     if event-item-three is sword or axe:
  765.         set {_e} to event-item-three
  766.         reLore({_e}, "")
  767.  
  768. on command "/enchant":
  769.     set {_full_command} to full command
  770.     set {_command_args::*} to {_full_command} split at " "
  771.     if {_command_args::2} is set:
  772.         if player's held item is sword or axe:
  773.             wait 5 tick
  774.             set {_e} to player's held item
  775.             reLore({_e}, "")
  776.  
  777. on preparing craft of sword or axe or helmet or chestplate or leggings or boots:
  778.     if type of event-inventory is workbench inventory:
  779.         set {_e} to event-item
  780.         reLore({_e}, "")
  781.         set slot 0 of event-inventory to {_e}
  782.  
  783. #========================================================#
  784. #                /!\ DEBUG KOMUTLARI /!\                 #
  785. #        Bu komutlari kafaniza gore kullanmayiniz!       #
  786. #========================================================#
  787.  
  788. command /relore [<text>] [<number>] [<number>] [<number>]:
  789.     permission: relore.adm
  790.     trigger:
  791.         if player's held item is air:
  792.             send "&cElinde bir esya yok!"
  793.             stop
  794.         set {_e} to player's held item
  795.         set {_value} to getItemId({_e})
  796.         if {_value} is not set:
  797.             setItemStats({_e})
  798.             set {_value} to getItemId({_e})
  799.         if player's held item is helmet or chestplate or leggings or boots:
  800.             if arg 2 is set:
  801.                 set {armor::%{_value}%} to arg 2
  802.             if arg 3 is set:
  803.                 set {toughness::%{_value}%} to arg 3
  804.         else:
  805.             if arg 2 is set:
  806.                 set {atk::%{_value}%} to arg 2
  807.             if arg 3 is set:
  808.                 set {critchance::%{_value}%} to arg 3
  809.             if arg 4 is set:
  810.                 set {critdmg::%{_value}%} to arg 4
  811.         if arg 1 is "null" or "<none>":
  812.             reLore({_e}, "")
  813.         else:
  814.             reLore({_e}, colored arg 1)
  815.  
  816. command /showmyenchantments:
  817.     permission: showmy.adm
  818.     trigger:
  819.         set {_i::*} to enchantments of player's held item
  820.         loop {_i::*}:
  821.             send "%loop-value% %loop-index%"
  822.  
  823. command /showmyeffects:
  824.     permission: showmy.adm
  825.     trigger:
  826.         #loop active potion effects of player: #<---- sorun yaratiyor??
  827.         #   send loop-value
  828.         #set {_i::*} to active potion effects of player #<----- sorun yaratiyor??
  829.         #loop {_i::*}:
  830.         #   send loop-value
  831.         set {_tier} to tier of potion effect strength of player
  832.         send "%{_tier}%"
  833.  
  834.  
  835. command /showmylore:
  836.     permission: showmy.adm
  837.     trigger:
  838.         set {_e} to player's held item
  839.         set {_lore::*} to lore of {_e} split at "||"
  840.         loop (size of {_lore::*}-5) times:
  841.             add line loop-number of lore of {_e} to {_i::*}
  842.         set {_lore} to "%{_i::*}%"
  843.         replace all " and " and ", " in {_lore} with "||"
  844.         send "%{_lore}%"
  845.  
  846. command /showmyids:
  847.     permission: showmy.adm
  848.     trigger:
  849.         loop {armor::*}:
  850.             send "%loop-index% &c%loop-value%"
  851.         loop {atk::*}:
  852.             send "%loop-index% &c%loop-value%"
  853.         send "&7Total (Atk): &c%size of {atk::*}%" and "&7Total (Armor): &c%size of {armor::*}%" and "&7Total (All): &c%size of {atk::*} + size of {armor::*}%"
  854.  
  855. command /deletemyids:
  856.     permission: showmy.adm
  857.     trigger:
  858.         send "{@pd} &9%size of {atk::*} + size of {armor::*}% &7adet veri (ID) silindi! &cLutfen skripte reload atiniz!"
  859.         delete {atk::*} and {critdmg::*} and {critchance::*} and {armor::*} and {toughness::*}
  860.  
  861. command /creationphase [<integer>]:
  862.     permission: showmy.adm
  863.     trigger:
  864.         set {confirmed::%player%} to arg 1
  865.  
  866. command /checkfromyml:
  867.     permission: showmy.adm
  868.     trigger:
  869.         loop yaml nodes with keys "Items.Swords.%name of player's held item%" from "damageplus":
  870.             send "%loop-value% | %loop-val%"
  871.  
  872. command /showmyver:
  873.     permission: showmy.adm
  874.     trigger:
  875.         set {_v} to text from "https://rentry.co/damageplus/raw" #Eski --> "https://rentry.co/ncbkk/raw"
  876.         send "ver -> %{_v}%"   
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement