Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ## Konfiguracja enchantow: guiEnchClick(player, "koszt w lvl", "rodzaj i moc enchantu")
- # ## Konfiguracje zaczynasz od 60 linijki i pamietaj, ze sa 4 typy gui zalezne od przedmiotu w lapce
- # ## Skrypt testowany na 2.4 Skript (1.14.4 PaperSpigot) i z odpowiednimi dodatkami
- # ## ###################################################### ## #
- # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
- # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
- # ## Tutaj mozesz przetestowac dzialanie skryptu: ZONEHC.PL ## #
- # ## ###################################################### ## #
- function guiEnch(p: player,e1: text,e2: text,e3: text,e4: text,ksz1: number ,ksz2: number ,ksz3: number ,ksz4: number,f: text):
- wait a tick
- close {_p}'s inventory
- open chest with 3 row named "&c&lENCHANT" to {_p}
- loop 14 times:
- set {_p}'s current inventory's slot loop-number + loop-number - 2 to 1 of gray stained glass pane named " "
- loop 13 times:
- set {_p}'s current inventory's slot loop-number + loop-number - 1 to 1 of yellow stained glass pane named " "
- set {_p}'s current inventory's slot 13 to {_p}'s tool
- 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 " "
- 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 " "
- 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 " "
- 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 " "
- function guiEnchClick(p: player,ksz: number,ench: enchantment type):
- if {_p}'s level is greater or equal to {_ksz}:
- remove {_ksz} from {_p}'s level
- enchant {_p}'s tool with {_ench}
- send "&7&l(&f&lEnchant&7&l) » &eUlepszyles przedmiot!" to {_p}
- set {_p}'s current inventory's slot 13 to {_p}'s tool
- else:
- send "&7&l(&f&lEnchant&7&l) » &eMasz za maly poziom doswiadczenia!" to {_p}
- close {_p}'s inventory
- on right click on enchantment table:
- if player is sneaking:
- stop
- cancel event
- if player's held item is any sword or any hoe:
- 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")
- stop
- if player's held item is any helmet or any chestplate or any leggings or any boots:
- 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")
- stop
- if player's held item is any pickaxe or any axe or any shovel:
- 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")
- stop
- if player's held item is bow:
- 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")
- stop
- send "&7&l(&f&lEnchant&7&l) » &eProbujesz zaczarowac powietrze lub niedozwolony przedmiot w lapce!"
- send "&7&l(&f&lEnchant&7&l) » &e&6Zwykly enchant = SHIFT + PrawyPrzyciskMyszy (pusta lapka!)"
- on inventory click:
- if "%inventory type of event-inventory%" is "chest":
- if inventory name of player's current inventory is "&c&lENCHANT":
- cancel event
- if player's held item is any sword or any hoe:
- if clicked slot is 10:
- guiEnchClick(player, 50, sharpness 5)
- if clicked slot is 11:
- guiEnchClick(player, 30, unbreaking 4)
- if clicked slot is 15:
- guiEnchClick(player, 20, fire aspect 2)
- if clicked slot is 16:
- guiEnchClick(player, 15, knockback 2)
- if player's held item is any helmet or any chestplate or any leggings or any boots:
- if clicked slot is 10:
- guiEnchClick(player, 50, protection 4)
- if clicked slot is 11:
- guiEnchClick(player, 30, unbreaking 3)
- if clicked slot is 15:
- guiEnchClick(player, 20, thorns 3)
- if clicked slot is 16:
- guiEnchClick(player, 30, feather falling 3)
- if player's held item is any pickaxe or any axe or any shovel:
- if clicked slot is 10:
- guiEnchClick(player, 60, efficiency 5)
- if clicked slot is 11:
- guiEnchClick(player, 30, unbreaking 3)
- if clicked slot is 15:
- guiEnchClick(player, 50, fortune 3)
- if clicked slot is 16:
- guiEnchClick(player, 40, silk touch 1)
- if player's held item is bow:
- if clicked slot is 10:
- guiEnchClick(player, 60, power 5)
- if clicked slot is 11:
- guiEnchClick(player, 30, unbreaking 3)
- if clicked slot is 15:
- guiEnchClick(player, 50, infinity 1)
- if clicked slot is 16:
- guiEnchClick(player, 40, punch 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement