QuacziSK

QEnchant BETA v1.1

Oct 7th, 2016
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.76 KB | None | 0 0
  1. #
  2. # █████ ▓█████ ███▄ █ ▄████▄ ██░ ██ ▄▄▄ ███▄ █ ▄▄▄█████▓
  3. # ▒██▓ ██▒▓█ ▀ ██ ▀█ █ ▒██▀ ▀█ ▓██░ ██▒▒████▄ ██ ▀█ █ ▓ ██▒ ▓▒
  4. # ▒██▒ ██░▒███ ▓██ ▀█ ██▒▒▓█ ▄ ▒██▀▀██░▒██ ▀█▄ ▓██ ▀█ ██▒▒ ▓██░ ▒░
  5. # ░██ █▀ ░▒▓█ ▄ ▓██▒ ▐▌██▒▒▓▓▄ ▄██▒░▓█ ░██ ░██▄▄▄▄██ ▓██▒ ▐▌██▒░ ▓██▓ ░
  6. # ░▒███▒█▄ ░▒████▒▒██░ ▓██░▒ ▓███▀ ░░▓█▒░██▓ ▓█ ▓██▒▒██░ ▓██░ ▒██▒ ░
  7. # ░░ ▒▒░ ▒ ░░ ▒░ ░░ ▒░ ▒ ▒ ░ ░▒ ▒ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒ ░░
  8. # ░ ▒░ ░ ░ ░ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░
  9. # ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░
  10. # ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
  11. # ░
  12. #
  13. #
  14. #
  15. # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
  16. # | QEnchant by Quaczi |
  17. # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
  18. # | Licencja |
  19. # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
  20. # | *Zabraniam publikacji skryptu. |
  21. # | *Zabraniam podszywania sie pod autora. |
  22. # | *Zezwalam na uzywanie skryptu. |
  23. # | *Zezwalam na dowolna edycje kodu. |
  24. # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
  25. # | Milej zabawy ze skryptem. |
  26. # | ~ Quaczi |
  27. # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
  28. #
  29. #
  30. #
  31. #
  32. #
  33. #
  34.  
  35.  
  36.  
  37.  
  38. #
  39. # >====> >====> >====> >====> >====> >====>
  40. # _------------------------------_
  41. # _- -_
  42. # - FUNCKJE -
  43. # ¯- -¯
  44. # ¯------------------------------¯
  45. # <====< <====< <====< <====< <====< <====<
  46. #
  47.  
  48.  
  49.  
  50.  
  51. function openMenu(p: player):
  52. open chest with 5 rows named "&e&oQ&6&oEnchant" to {_p}
  53. wait 2 ticks
  54. format slot 7 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  55. format slot 16 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  56. format slot 17 of {_p} with 1 of bars named "&e/\" with lore "&0_" to be unstealable
  57. format slot 25 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  58. format slot 34 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  59. format slot 43 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  60. format slot 41 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  61. format slot 32 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  62. format slot 23 of {_p} with 1 of book named "&a&lRegaly: &e%{qenchant::%{_p}%::bib}%" with lore "&0_" to be unstealable
  63. format slot 14 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  64. format slot 5 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
  65. format slot 26 of {_p} with 1 of book of unbreaking 1 named "&5> &c&lNIEZNISZCZALNOSC I &5<" with lore "&5> &aXP: &55LvL||&5> &aRegaly: &50" to close then run [make {_p} execute command "qenchant_enchant2 1 unbreaking"]
  66. format slot 35 of {_p} with 1 of book of unbreaking 2 named "&5> &c&lNIEZNISZCZALNOSC II &5<" with lore "&5> &aXP: &510LvL||&5> &aRegaly: &510" to close then run [make {_p} execute command "qenchant_enchant2 2 unbreaking"]
  67. format slot 44 of {_p} with 1 of book of unbreaking 3 named "&5> &c&lNIEZNISZCZALNOSC III &5<" with lore "&5> &aXP: &515LvL||&5> &aRegaly: &510" to close then run [make {_p} execute command "qenchant_enchant2 3 unbreaking"]
  68. format slot 24 of {_p} with 1 of sunflower of fortune 10 named "&5> &c&lLOSUJ ENCHANT &5<" with lore "&5> &aXP: &525LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant random"]
  69. format slot 15 of {_p} with 1 of anvil named "&5> &c&lNAPRAW &5<" with lore "&5> &aXP: &525LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant repair"]
  70. format slot 33 of {_p} with 1 of name tag named "&5> &c&lNAZWIJ &5<" with lore "&5> &aXP: &525LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant nazwij"]
  71.  
  72. function infoZbr(p: player):
  73. loop all numbers between 1 to 5:
  74. set {qenchant::info::protection::%loop-number%::lvl} to single value "cennik.zbroje.protection.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  75. set {qenchant::info::protection::%loop-number%::bib} to single value "cennik.zbroje.protection.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  76. set {qenchant::info::fireprotection::%loop-number%::lvl} to single value "cennik.zbroje.fire protection.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  77. set {qenchant::info::fireprotection::%loop-number%::bib} to single value "cennik.zbroje.fire protection.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  78. set {qenchant::info::blastprotection::%loop-number%::lvl} to single value "cennik.zbroje.blast protection.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  79. set {qenchant::info::blastprotection::%loop-number%::bib} to single value "cennik.zbroje.blast protection.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  80. set {qenchant::info::projectileprotection::%loop-number%::lvl} to single value "cennik.zbroje.projectile protection.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  81. set {qenchant::info::projectileprotection::%loop-number%::bib} to single value "cennik.zbroje.projectile protection.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  82. set {qenchant::info::thorns::%loop-number%::lvl} to single value "cennik.zbroje.thorns.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  83. set {qenchant::info::thorns::%loop-number%::bib} to single value "cennik.zbroje.thorns.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  84.  
  85.  
  86. function infoMie(p: player):
  87. loop all numbers between 1 to 5:
  88. set {qenchant::info::sharpness::%loop-number%::lvl} to single value "cennik.miecze.sharpness.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  89. set {qenchant::info::sharpness::%loop-number%::bib} to single value "cennik.miecze.sharpness.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  90. set {qenchant::info::fireaspect::%loop-number%::lvl} to single value "cennik.miecze.fire aspect.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  91. set {qenchant::info::fireaspect::%loop-number%::bib} to single value "cennik.miecze.fire aspect.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  92. set {qenchant::info::knockback::%loop-number%::lvl} to single value "cennik.miecze.knockback.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  93. set {qenchant::info::knockback::%loop-number%::bib} to single value "cennik.miecze.knockback.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  94. set {qenchant::info::smite::%loop-number%::lvl} to single value "cennik.miecze.smite.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  95. set {qenchant::info::smite::%loop-number%::bib} to single value "cennik.miecze.smite.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  96. set {qenchant::info::looting::%loop-number%::lvl} to single value "cennik.miecze.looting.%loop-number%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  97. set {qenchant::info::looting::%loop-number%::bib} to single value "cennik.miecze.looting.%loop-number%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  98.  
  99. function menuFull(p: player):
  100. wait a tick
  101. if slot 8 of {_p}'s current inventory is any sword:
  102. wait a tick
  103. format slot 0 of {_p} with 1 of book of sharpness 1 named "&5> &c&lOSTROSC I &5<" with lore "&5> &aXP: &5%{qenchant::info::sharpness::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::sharpness::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 sharpness"]
  104. format slot 1 of {_p} with 1 of book of sharpness 2 named "&5> &c&lOSTROSC II &5<" with lore "&5> &aXP: &5%{qenchant::info::sharpness::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::sharpness::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 sharpness"]
  105. format slot 2 of {_p} with 1 of book of sharpness 3 named "&5> &c&lOSTROSC III &5<" with lore "&5> &aXP: &5%{qenchant::info::sharpness::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::sharpness::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 sharpness"]
  106. format slot 3 of {_p} with 1 of book of sharpness 4 named "&5> &c&lOSTROSC IV &5<" with lore "&5> &aXP: &5%{qenchant::info::sharpness::4::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::sharpness::4::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 4 sharpness"]
  107. format slot 4 of {_p} with 1 of book of sharpness 5 named "&5> &c&lOSTROSC V &5<" with lore "&5> &aXP: &5%{qenchant::info::sharpness::5::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::sharpness::5::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 5 sharpness"]
  108. format slot 9 of {_p} with 1 of book of fire aspect 1 named "&5> &c&lOGIEN I &5<" with lore "&5> &aXP: &5%{qenchant::info::fireaspect::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::fireaspect::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 fire aspect"]
  109. format slot 10 of {_p} with 1 of book of fire aspect 2 named "&5> &c&lOGIEN II &5<" with lore "&5> &aXP: &5%{qenchant::info::fireaspect::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::fireaspect::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 fire aspect"]
  110. format slot 18 of {_p} with 1 of book of knockback 1 named "&5> &c&lODRZUT I &5<" with lore "&5> &aXP: &5%{qenchant::info::knockback::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::knockback::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 knockback"]
  111. format slot 19 of {_p} with 1 of book of knockback 2 named "&5> &c&lODRZUT II &5<" with lore "&5> &aXP: &5%{qenchant::info::knockback::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::knockback::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 knockback"]
  112. format slot 27 of {_p} with 1 of book of looting 1 named "&5> &c&lSZCZESCIE I &5<" with lore "&5> &aXP: &5%{qenchant::info::looting::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::looting::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 looting"]
  113. format slot 28 of {_p} with 1 of book of looting 2 named "&5> &c&lSZCZESCIE II &5<" with lore "&5> &aXP: &5%{qenchant::info::looting::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::looting::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 looting"]
  114. format slot 29 of {_p} with 1 of book of looting 3 named "&5> &c&lSZCZESCIE III &5<" with lore "&5> &aXP: &5%{qenchant::info::looting::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::looting::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 looting"]
  115. format slot 36 of {_p} with 1 of book of smite 1 named "&5> &c&lPOGROMCA NIEUMARLYCH I &5<" with lore "&5> &aXP: &5%{qenchant::info::smite::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info:::smite:1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 smite"]
  116. format slot 37 of {_p} with 1 of book of smite 1 named "&5> &c&lPOGROMCA NIEUMARLYCH II &5<" with lore "&5> &aXP: &5%{qenchant::info::smite::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::smite::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 smite"]
  117. format slot 38 of {_p} with 1 of book of smite 1 named "&5> &c&lPOGROMCA NIEUMARLYCH III &5<" with lore "&5> &aXP: &5%{qenchant::info::smite::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::smite::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 smite"]
  118. format slot 39 of {_p} with 1 of book of smite 1 named "&5> &c&lPOGROMCA NIEUMARLYCH IV &5<" with lore "&5> &aXP: &5%{qenchant::info::smite::4::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::smite::4::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 4 smite"]
  119. format slot 40 of {_p} with 1 of book of smite 1 named "&5> &c&lPOGROMCA NIEUMARLYCH V &5<" with lore "&5> &aXP: &5%{qenchant::info::smite::5::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::smite::5::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 5 smite"]
  120. if slot 8 of {_p}'s current inventory is any helmet or any chestplate or any leggings or any boots:
  121. wait a tick
  122. format slot 0 of {_p} with 1 of book of protection 1 named "&5> &c&lOCHRONA I &5<" with lore "&5> &aXP: &5%{qenchant::info::protection::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::protection::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 protection"]
  123. format slot 1 of {_p} with 1 of book of protection 2 named "&5> &c&lOCHRONA II &5<" with lore "&5> &aXP: &5%{qenchant::info::protection::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::protection::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 protection"]
  124. format slot 2 of {_p} with 1 of book of protection 3 named "&5> &c&lOCHRONA III &5<" with lore "&5> &aXP: &5%{qenchant::info::protection::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::protection::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 protection"]
  125. format slot 3 of {_p} with 1 of book of protection 4 named "&5> &c&lOCHRONA IV &5<" with lore "&5> &aXP: &5%{qenchant::info::protection::4::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::protection::4::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 4 protection"]
  126. format slot 9 of {_p} with 1 of book of fire protection 1 named "&5> &c&lOCHRONA PRZED OGINIEM I &5<" with lore "&5> &aXP: &5%{qenchant::info::fireprotection::1::lvl}%LvL||&5> &aRegaly: &515" to close then run [make {_p} execute command "qenchant_enchant2 1 fire protection"]
  127. format slot 10 of {_p} with 1 of book of fire protection 2 named "&5> &c&lOCHRONA PRZED OGINIEM II &5<" with lore "&5> &aXP: &5%{qenchant::info::fireprotection::2::lvl}%LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant_enchant2 2 fire protection"]
  128. format slot 11 of {_p} with 1 of book of fire protection 3 named "&5> &c&lOCHRONA PRZED OGINIEM III &5<" with lore "&5> &aXP: &5%{qenchant::info::fireprotection::3::lvl}%LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant_enchant2 3 fire protection"]
  129. format slot 12 of {_p} with 1 of book of fire protection 4 named "&5> &c&lOCHRONA PRZED OGINIEM IV &5<" with lore "&5> &aXP: &5%{qenchant::info::fireprotection::4::lvl}%LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant_enchant2 4 fire protection"]
  130. format slot 18 of {_p} with 1 of book of projectile protection 1 named "&5> &c&lOCHRONA PRZED POCISKAMI I &5<" with lore "&5> &aXP: &5%{qenchant::info::projectileprotection::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::projectileprotection::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 projectile protection"]
  131. format slot 19 of {_p} with 1 of book of projectile protection 2 named "&5> &c&lOCHRONA PRZED POCISKAMI II &5<" with lore "&5> &aXP: &5%{qenchant::info::projectileprotection::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::projectileprotection::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 projectile protection"]
  132. format slot 20 of {_p} with 1 of book of projectile protection 3 named "&5> &c&lOCHRONA PRZED POCISKAMI III &5<" with lore "&5> &aXP: &5%{qenchant::info::projectileprotection::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::projectileprotection::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 projectile protection"]
  133. format slot 21 of {_p} with 1 of book of projectile protection 4 named "&5> &c&lOCHRONA PRZED POCISKAMI IV &5<" with lore "&5> &aXP: &5%{qenchant::info::projectileprotection::4::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::projectileprotection::4::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 4 projectile protection"]
  134. format slot 27 of {_p} with 1 of book of blast protection 1 named "&5> &c&lOCHRONA PRZED WYBUCHEM I &5<" with lore "&5> &aXP: &5%{qenchant::info::blastprotection::1::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::blastprotection::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 blast protection"]
  135. format slot 28 of {_p} with 1 of book of blast protection 2 named "&5> &c&lOCHRONA PRZED WYBUCHEM II &5<" with lore "&5> &aXP: &5%{qenchant::info::blastprotection::2::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::blastprotection::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 blast protection"]
  136. format slot 29 of {_p} with 1 of book of blast protection 3 named "&5> &c&lOCHRONA PRZED WYBUCHEM III &5<" with lore "&5> &aXP: &5%{qenchant::info::blastprotection::3::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::blastprotection::3::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 blast protection"]
  137. format slot 30 of {_p} with 1 of book of blast protection 4 named "&5> &c&lOCHRONA PRZED WYBUCHEM IV &5<" with lore "&5> &aXP: &5%{qenchant::info::blastprotection::4::lvl}%LvL||&5> &aRegaly: &5%{qenchant::info::blastprotection::4::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 4 blast protection"]
  138. format slot 36 of {_p} with 1 of book of thorns 1 named "&5> &c&lCIERNIE I &5<" with lore "&5> &aXP: &5%{qenchant::info::thorns::1::lvl}%LvL||&5> &aRegaly: &520" to close then run [make {_p} execute command "qenchant_enchant2 1 smite"]
  139. format slot 37 of {_p} with 1 of book of smite 1 named "&5> &c&lCIERNIE II &5<" with lore "&5> &aXP: &5%{qenchant::info::thorns::1::lvl}%LvL||&5> &aRegaly: &%{qenchant::info::thorns::1::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 1 thorns"]
  140. format slot 38 of {_p} with 1 of book of smite 1 named "&5> &c&lCIERNIE III &5<" with lore "&5> &aXP: &5%{qenchant::info::thorns::2::lvl}%LvL||&5> &aRegaly: &%{qenchant::info::thorns::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 2 thorns"]
  141. format slot 38 of {_p} with 1 of book of smite 1 named "&5> &c&lCIERNIE III &5<" with lore "&5> &aXP: &5%{qenchant::info::thorns::2::lvl}%LvL||&5> &aRegaly: &%{qenchant::info::thorns::2::bib}%" to close then run [make {_p} execute command "qenchant_enchant2 3 thorns"]
  142.  
  143. function setName(p: player):
  144. set {qenchant::%{_p}%::name} to true
  145. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::tn}%%{qenchant::wiad::suffix}%" to {_p}
  146.  
  147.  
  148. function itemRepair(p: player):
  149. wait 3 ticks
  150. execute {_p} command "/qenchant_menu"
  151. wait a tick
  152. set {_s} to slot 8 of {_p}'s current inventory
  153. set data of {_s} to 0
  154. set slot 8 of {_p}'s current inventory to {_s}
  155. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::re}%%{qenchant::wiad::suffix}%" to {_p}
  156.  
  157. function enchReload(e: text):
  158. set {qenchant::wiad::nl} to colored single value "NoLVL" get of "plugins/QEnchant/wiadomosci.yml"
  159. set {qenchant::wiad::nb} to colored single value "NoBOOK" get of "plugins/QEnchant/wiadomosci.yml"
  160. set {qenchant::wiad::ns} to colored single value "NoSPACE" get of "plugins/QEnchant/wiadomosci.yml"
  161. set {qenchant::wiad::su} to colored single value "Success" get of "plugins/QEnchant/wiadomosci.yml"
  162. set {qenchant::wiad::ra} to colored single value "Random" get of "plugins/QEnchant/wiadomosci.yml"
  163. set {qenchant::wiad::re} to colored single value "Repair" get of "plugins/QEnchant/wiadomosci.yml"
  164. set {qenchant::wiad::tn} to colored single value "TypeName" get of "plugins/QEnchant/wiadomosci.yml"
  165. set {qenchant::wiad::na} to colored single value "Name" get of "plugins/QEnchant/wiadomosci.yml"
  166. set {qenchant::wiad::prefix} to colored single value "Prefix" get of "plugins/QEnchant/wiadomosci.yml"
  167. set {qenchant::wiad::suffix} to colored single value "Suffix" get of "plugins/QEnchant/wiadomosci.yml"
  168. send "%{qenchant::wiad::prefix}% &aPrzeladowano skrypt%{qenchant::wiad::suffix}%" to console
  169.  
  170. function enchRandom(p: player):
  171. set {_los} to random integer between 1 to 5
  172. if {_los} is 1 or 2:
  173. set {_los2} to random integer between 1 to 5
  174. if {_los} is 1:
  175. set {_full} to "sharpness %{_los2}%" parsed as enchantment type
  176. set {_full2} to "%{_los2}% sharpness" parsed as enchantment type
  177. if {_los} is 2:
  178. set {_full} to "smite %{_los2}%" parsed as enchantment type
  179. set {_full2} to "%{_los2}% smite" parsed as enchantment type
  180. if {_los} is 3 or 4:
  181. set {_los2} to random integer between 1 to 2
  182. if {_los} is 3:
  183. set {_full} to "knockback %{_los2}%" parsed as enchantment type
  184. set {_full2} to "%{_los2}% knockback" parsed as enchantment type
  185. if {_los} is 4:
  186. set {_full} to "fire aspect %{_los2}%" parsed as enchantment type
  187. set {_full2} to "%{_los2}% fire aspect" parsed as enchantment type
  188. if {_los} is 5:
  189. set {_los2} to random integer between 1 to 3
  190. set {_full} to "looting %{_los2}%" parsed as enchantment type
  191. set {_full2} to "%{_los2}% looting" parsed as enchantment type
  192. wait 3 ticks
  193. execute {_p} command "qenchant_enchant2 %{_full2}%"
  194. replace all "_ENCHANT_" with "%{_full}%" in {qenchant::wiad::ra}
  195. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::ra}%%{qenchant::wiad::suffix}%" to {_p}
  196.  
  197. on load:
  198. if file "plugins/QEnchant/config.yml" doesn't exists:
  199. create file "plugins/QEnchant/config.yml"
  200. download from "http://pastebin.com/raw/xL1nuEnn" to "plugins/QEnchant/config.yml"
  201. if file "plugins/QEnchant/wiadomosci.yml" doesn't exists:
  202. create file "plugins/QEnchant/wiadomosci.yml"
  203. wait a tick
  204. set "Prefix" to "&e&oQ&6&oEnchant &8[&6>&8]" in yaml file "plugins/QEnchant/wiadomosci.yml"
  205. set "Suffix" to "&8." in yaml file "plugins/QEnchant/wiadomosci.yml"
  206. set "NoLVL" to "&cNie masz wystarczajacego poziomu" in yaml file "plugins/QEnchant/wiadomosci.yml"
  207. set "NoBOOK" to "&cNie masz wystarczajacego ilosci biblioteczek" in yaml file "plugins/QEnchant/wiadomosci.yml"
  208. set "NoSPACE" to "&cNie masz miejsca w ekwipunku." in yaml file "plugins/QEnchant/wiadomosci.yml"
  209. set "Success" to "&aZaklnales przedmiot na &e&o_ENCHANT_" in yaml file "plugins/QEnchant/wiadomosci.yml"
  210. set "Random" to "&aWylosolwales &e&o_ENCHANT_" in yaml file "plugins/QEnchant/wiadomosci.yml"
  211. set "Repair" to "&aNaprawiles przedmiot" in yaml file "plugins/QEnchant/wiadomosci.yml"
  212. set "TypeName" to "&aNapisz na czacie nazwe przedmiotu" in yaml file "plugins/QEnchant/wiadomosci.yml"
  213. set "Name" to "&aPomyslnie ustawiles nazwe na &e&o_NAZWA_" in yaml file "plugins/QEnchant/wiadomosci.yml"
  214. set "Set" to "&aPostawiles enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
  215. set "Break" to "&aZniszczyles enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
  216. set "Give" to "&aOtrzymales enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
  217. set {_e} to "e"
  218. enchReload({_e})
  219.  
  220.  
  221. on right click on enchantment table:
  222. if {qenchant::%event-block%} is true:
  223. if tool of player is any sword or any helmet or any chestplate or any leggings or any boots:
  224. set {qenchant::%player%::bib} to 0
  225. loop all blocks in radius 3 of event-block:
  226. if loop-block is bookshelf:
  227. if distance between loop-block and event-block is bigger or equal to 2:
  228. if y-coordinate of event-block is less or equal to y-coordinate of loop-block:
  229. add 1 to {qenchant::%player%::bib}
  230. wait 3 ticks
  231. execute player command "qenchant_menu"
  232.  
  233. command /qenchant_enchant2 [<number>] [<text>]:
  234. trigger:
  235. if arg-2 is not "unbreaking":
  236. if arg-2 contains "protection" or "thorns":
  237. set {_lvl} to single value "cennik.zbroje.%arg-2%.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  238. set {_bib} to single value "cennik.zbroje.%arg-2%.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  239. else:
  240. set {_lvl} to single value "cennik.miecze.%arg-2%.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  241. set {_bib} to single value "cennik.miecze.%arg-2%.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  242. if arg-2 is "unbreaking":
  243. set {_lvl} to single value "cennik.unbreaking.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
  244. set {_bib} to single value "cennik.unbreaking.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
  245. if slot 8 of player's current inventory is any sword or any helmet or any chestplate or any leggings or any boots:
  246. if player's level is less than {_lvl}:
  247. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::nl}%%{qenchant::wiad::suffix}%"
  248. stop
  249. if {qenchant::%player%::bib} is less than {_bib}:
  250. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::nb}%%{qenchant::wiad::suffix}%"
  251. stop
  252. if player's level is bigger or equal to {_lvl}:
  253. if {qenchant::%player%::bib} is bigger or equal to {_bib}:
  254. set player's level to player's level -{_lvl}
  255. set {_tier} to arg-1
  256. set {_ench} to arg-2 parsed as enchantment type
  257. set {_full} to "%{_ench}% %{_tier}%" parsed as enchantment type
  258. wait a tick
  259. execute player command "qenchant_menu"
  260. wait 3 ticks
  261. set {_item} to slot 8 of player's current inventory
  262. enchant {_item} with {_full}
  263. wait 2 tick
  264. set slot 8 of player's current inventory to {_item}
  265. replace all "_ENCHANT_" with "%{_full}%" in {qenchant::wiad::su}
  266. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::su}%%{qenchant::wiad::suffix}%"
  267. replace all "%{_full}%" with "_ENCHANT_" in {qenchant::wiad::su}
  268. delete {_full}
  269. delete {_tier}
  270. delete {_ench}
  271. delete {_item}
  272. show 100 "hearth" particles at location of targeted block for player
  273. create ultra fake lightning at targeted block
  274.  
  275.  
  276.  
  277. on chat:
  278. if {qenchant::%player%::name} is true:
  279. cancel event
  280. execute player command "/qenchant_menu"
  281. wait a tick
  282. set {_s} to slot 8 of player's current inventory
  283. set name of {_s} to "%colored message%"
  284. wait a tick
  285. set slot 8 of player's current inventory to {_s}
  286. delete {qenchant::%player%::name}
  287.  
  288.  
  289. command /qenchant_repair:
  290. trigger:
  291. wait 3 ticks
  292. execute player command "/qenchant_menu"
  293. wait a tick
  294. set {_s} to slot 8 of player's current inventory
  295. set data of {_s} to 0
  296. set slot 8 of player's current inventory to {_s}
  297. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::re}%%{qenchant::wiad::suffix}%"
  298.  
  299.  
  300.  
  301. command /qenchant_menu:
  302. trigger:
  303. loop all blocks in radius 6 of player:
  304. if loop-block is enchantment table:
  305. set {_ok} to true
  306. if {_ok} is true:
  307. if player's tool is any sword or any helmet or any chestplate or any leggings or any boots:
  308. if tool of player is any sword:
  309. wait a tick
  310. infoMie(player)
  311. else:
  312. wait a tick
  313. infoZbr(player)
  314. wait a tick
  315. set {qenchant::%player%::menu} to true
  316. openMenu(player)
  317. set slot 8 of current inventory of player to player's tool
  318. set player's tool to air
  319. menuFull(player)
  320. set {qenchant::%player%::tool} to slot 8 of player's current inventory
  321.  
  322.  
  323.  
  324.  
  325. command /qenchant_name:
  326. trigger:
  327. set {qenchant::%player%::toolname} to name of player's tool
  328. set name of player's tool to ""
  329.  
  330.  
  331. command /nazwa [<text>]:
  332. trigger:
  333. set name of player's tool to colored arg
  334.  
  335.  
  336.  
  337. on inventory close:
  338. set {_slot} to slot 8 of player's current inventory
  339. set {qenchant::%player%::tool} to slot 8 of player's current inventory
  340. if {_slot} is {qenchant::%player%::tool}:
  341. if player have space for 1 of {qenchant::%player%::tool}:
  342. give {qenchant::%player%::tool} to player
  343. if player don't have space for 1 of {qenchant::%player%::tool}:
  344. drop {qenchant::%player%::tool} at player
  345.  
  346. on place of enchantment table:
  347. if name of player's tool is "&e&oQ&6&oEnchant":
  348. set {qenchant::%event-block%} to true
  349. set {qenchant::%event-block%::y::min} to y-coordinate of event-block
  350. set {qenchant::%event-block%::y::max} to y-coordinate of event-block
  351. increase y-coordinate of {qenchant::%event-block%::y::max} by +2
  352. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::pe}%%{qenchant::wiad::suffix}%"
  353.  
  354. command /qenchant [<text>] [<text>] [<text>]:
  355. permission: qenchant.admin
  356. trigger:
  357. if arg 1 is "daj" or "give":
  358. if player have permission "qenchant.*" or "qenchant.give":
  359. give player enchantment table named "&e&oQ&6&oEnchant" with lore "&5> &aPostaw na ziemi aby utworzyc magiczny enchant&5."
  360. send "%{qenchant::wiad::prefix}% %{qenchant::wiad::ot}%%{qenchant::wiad::suffix}%"
  361. if arg 1 is "random" or "losuj":
  362. if player's level is bigger or equal to 20:
  363. if {qenchant::%player%::bib} is bigger or equal to 10:
  364. remove 20 from player's level
  365. enchRandom(player)
  366. if arg 1 is "relaod":
  367. enchReload(arg-1)
  368. if arg 1 is "menu":
  369. execute player command "qenchant_menu"
  370. if arg 1 is "repair":
  371. itemRepair(player)
  372. if arg 1 is "name" or "nazwij":
  373. setName(player)
Advertisement
Add Comment
Please, Sign In to add comment