Advertisement
Guest User

Wybierany enchant

a guest
Dec 14th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. # ## Konfiguracja enchantow: guiEnchClick(player, "koszt w lvl", "rodzaj i moc enchantu")
  2. # ## Konfiguracje zaczynasz od 60 linijki i pamietaj, ze sa 4 typy gui zalezne od przedmiotu w lapce
  3. # ## Skrypt testowany na 2.4 Skript (1.14.4 PaperSpigot) i z odpowiednimi dodatkami
  4.  
  5. # ## ###################################################### ## #
  6. # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
  7. # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
  8. # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
  9. # ## ###################################################### ## #
  10.  
  11. function guiEnch(p: player,e1: text,e2: text,e3: text,e4: text,ksz1: number ,ksz2: number ,ksz3: number ,ksz4: number,f: text):
  12. wait a tick
  13. close {_p}'s inventory
  14. open chest with 3 row named "&c&lENCHANT" to {_p}
  15. loop 14 times:
  16. set {_p}'s current inventory's slot loop-number + loop-number - 2 to 1 of gray stained glass pane named " "
  17. loop 13 times:
  18. set {_p}'s current inventory's slot loop-number + loop-number - 1 to 1 of yellow stained glass pane named " "
  19. set {_p}'s current inventory's slot 13 to {_p}'s tool
  20. set {_p}'s current inventory's slot 10 to 1 of enchanted book named " " with lore "%{_f}%" and " " and " &f» &6&lINFORMACJE&8&L:" and " &f» &eRodzaj zaklecia: &3&l%{_e1}%" and " &f» &eKoszt zaklecia: &9&l%{_ksz1}% LvL" and " &f» &7&lKliknij, aby zaczarowac przedmiot!" and " " and "%{_f}%" and " "
  21. set {_p}'s current inventory's slot 11 to 1 of enchanted book named " " with lore "%{_f}%" and " " and " &f» &6&lINFORMACJE&8&L:" and " &f» &eRodzaj zaklecia: &3&l%{_e2}%" and " &f» &eKoszt zaklecia: &9&l%{_ksz2}% LvL" and " &f» &7&lKliknij, aby zaczarowac przedmiot!" and " " and "%{_f}%" and " "
  22. set {_p}'s current inventory's slot 15 to 1 of enchanted book named " " with lore "%{_f}%" and " " and " &f» &6&lINFORMACJE&8&L:" and " &f» &eRodzaj zaklecia: &3&l%{_e3}%" and " &f» &eKoszt zaklecia: &9&l%{_ksz3}% LvL" and " &f» &7&lKliknij, aby zaczarowac przedmiot!" and " " and "%{_f}%" and " "
  23. set {_p}'s current inventory's slot 16 to 1 of enchanted book named " " with lore "%{_f}%" and " " and " &f» &6&lINFORMACJE&8&L:" and " &f» &eRodzaj zaklecia: &3&l%{_e4}%" and " &f» &eKoszt zaklecia: &9&l%{_ksz4}% LvL" and " &f» &7&lKliknij, aby zaczarowac przedmiot!" and " " and "%{_f}%" and " "
  24.  
  25. function guiEnchClick(p: player,ksz: number,ench: enchantment type):
  26. if {_p}'s level is greater or equal to {_ksz}:
  27. remove {_ksz} from {_p}'s level
  28. enchant {_p}'s tool with {_ench}
  29. send "&7&l(&f&lEnchant&7&l) » &eUlepszyles przedmiot!" to {_p}
  30. set {_p}'s current inventory's slot 13 to {_p}'s tool
  31. else:
  32. send "&7&l(&f&lEnchant&7&l) » &eMasz za maly poziom doswiadczenia!" to {_p}
  33. close {_p}'s inventory
  34.  
  35. on right click on enchantment table:
  36. if player is sneaking:
  37. stop
  38. cancel event
  39. if player's held item is any sword or any hoe:
  40. guiEnch(player, "ostrosc 5", "niezniszczalnosc 3", "zaklety ogien 2", "odrzut 2", 50, 30, 20, 15, "&f&m | &e&m &6&m &c&m &4&m &0&m &4&m &c&m &6&m &e&m &f&m | &r")
  41. stop
  42. if player's held item is any helmet or any chestplate or any leggings or any boots:
  43. guiEnch(player, "ochrona 4", "niezniszczalnosc 3", "ciernie 3", "powolne opadanie 3", 50, 30, 20, 30, "&f&m | &e&m &6&m &c&m &4&m &0&m &4&m &c&m &6&m &e&m &f&m | &r")
  44. stop
  45. if player's held item is any pickaxe or any axe or any shovel:
  46. guiEnch(player, "wydajnosc 5", "niezniszczalnosc 3", "szczescie 3", "jedwabny dotyk 1", 60, 30, 50, 40, "&f&m | &e&m &6&m &c&m &4&m &0&m &4&m &c&m &6&m &e&m &f&m | &r")
  47. stop
  48. if player's held item is bow:
  49. guiEnch(player, "moc 5", "niezniszczalnosc 3", "nieskonczonosc 1", "uderzenie 2", 60, 30, 50, 40, "&f&m | &e&m &6&m &c&m &4&m &0&m &4&m &c&m &6&m &e&m &f&m | &r")
  50. stop
  51. send "&7&l(&f&lEnchant&7&l) » &eProbujesz zaczarowac powietrze lub niedozwolony przedmiot w lapce!"
  52. send "&7&l(&f&lEnchant&7&l) » &e&6Zwykly enchant = SHIFT + PrawyPrzyciskMyszy (pusta lapka!)"
  53.  
  54. on inventory click:
  55. if "%inventory type of event-inventory%" is "chest":
  56. if inventory name of player's current inventory is "&c&lENCHANT":
  57. cancel event
  58. if player's held item is any sword or any hoe:
  59. if clicked slot is 10:
  60. guiEnchClick(player, 50, sharpness 5)
  61. if clicked slot is 11:
  62. guiEnchClick(player, 30, unbreaking 4)
  63. if clicked slot is 15:
  64. guiEnchClick(player, 20, fire aspect 2)
  65. if clicked slot is 16:
  66. guiEnchClick(player, 15, knockback 2)
  67. if player's held item is any helmet or any chestplate or any leggings or any boots:
  68. if clicked slot is 10:
  69. guiEnchClick(player, 50, protection 4)
  70. if clicked slot is 11:
  71. guiEnchClick(player, 30, unbreaking 3)
  72. if clicked slot is 15:
  73. guiEnchClick(player, 20, thorns 3)
  74. if clicked slot is 16:
  75. guiEnchClick(player, 30, feather falling 3)
  76. if player's held item is any pickaxe or any axe or any shovel:
  77. if clicked slot is 10:
  78. guiEnchClick(player, 60, efficiency 5)
  79. if clicked slot is 11:
  80. guiEnchClick(player, 30, unbreaking 3)
  81. if clicked slot is 15:
  82. guiEnchClick(player, 50, fortune 3)
  83. if clicked slot is 16:
  84. guiEnchClick(player, 40, silk touch 1)
  85. if player's held item is bow:
  86. if clicked slot is 10:
  87. guiEnchClick(player, 60, power 5)
  88. if clicked slot is 11:
  89. guiEnchClick(player, 30, unbreaking 3)
  90. if clicked slot is 15:
  91. guiEnchClick(player, 50, infinity 1)
  92. if clicked slot is 16:
  93. guiEnchClick(player, 40, punch 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement