Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # █████ ▓█████ ███▄ █ ▄████▄ ██░ ██ ▄▄▄ ███▄ █ ▄▄▄█████▓
- # ▒██▓ ██▒▓█ ▀ ██ ▀█ █ ▒██▀ ▀█ ▓██░ ██▒▒████▄ ██ ▀█ █ ▓ ██▒ ▓▒
- # ▒██▒ ██░▒███ ▓██ ▀█ ██▒▒▓█ ▄ ▒██▀▀██░▒██ ▀█▄ ▓██ ▀█ ██▒▒ ▓██░ ▒░
- # ░██ █▀ ░▒▓█ ▄ ▓██▒ ▐▌██▒▒▓▓▄ ▄██▒░▓█ ░██ ░██▄▄▄▄██ ▓██▒ ▐▌██▒░ ▓██▓ ░
- # ░▒███▒█▄ ░▒████▒▒██░ ▓██░▒ ▓███▀ ░░▓█▒░██▓ ▓█ ▓██▒▒██░ ▓██░ ▒██▒ ░
- # ░░ ▒▒░ ▒ ░░ ▒░ ░░ ▒░ ▒ ▒ ░ ░▒ ▒ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒ ░░
- # ░ ▒░ ░ ░ ░ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░
- # ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░
- # ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
- # ░
- #
- #
- #
- # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
- # | QEnchant by Quaczi |
- # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
- # | Licencja |
- # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
- # | *Zabraniam publikacji skryptu. |
- # | *Zabraniam podszywania sie pod autora. |
- # | *Zezwalam na uzywanie skryptu. |
- # | *Zezwalam na dowolna edycje kodu. |
- # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
- # | Milej zabawy ze skryptem. |
- # | ~ Quaczi |
- # |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
- #
- #
- #
- #
- #
- #
- #
- # >====> >====> >====> >====> >====> >====>
- # _------------------------------_
- # _- -_
- # - FUNCKJE -
- # ¯- -¯
- # ¯------------------------------¯
- # <====< <====< <====< <====< <====< <====<
- #
- function openMenu(p: player):
- open chest with 5 rows named "&e&oQ&6&oEnchant" to {_p}
- wait 2 ticks
- format slot 7 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 16 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 17 of {_p} with 1 of bars named "&e/\" with lore "&0_" to be unstealable
- format slot 25 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 34 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 43 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 41 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 32 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 23 of {_p} with 1 of book named "&a&lRegaly: &e%{qenchant::%{_p}%::bib}%" with lore "&0_" to be unstealable
- format slot 14 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- format slot 5 of {_p} with 1 of bars named "&e>" with lore "&0_" to be unstealable
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- function infoZbr(p: player):
- loop all numbers between 1 to 5:
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- function infoMie(p: player):
- loop all numbers between 1 to 5:
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- function menuFull(p: player):
- wait a tick
- if slot 8 of {_p}'s current inventory is any sword:
- wait a tick
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- if slot 8 of {_p}'s current inventory is any helmet or any chestplate or any leggings or any boots:
- wait a tick
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- function setName(p: player):
- set {qenchant::%{_p}%::name} to true
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::tn}%%{qenchant::wiad::suffix}%" to {_p}
- function itemRepair(p: player):
- wait 3 ticks
- execute {_p} command "/qenchant_menu"
- wait a tick
- set {_s} to slot 8 of {_p}'s current inventory
- set data of {_s} to 0
- set slot 8 of {_p}'s current inventory to {_s}
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::re}%%{qenchant::wiad::suffix}%" to {_p}
- function enchReload(e: text):
- set {qenchant::wiad::nl} to colored single value "NoLVL" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::nb} to colored single value "NoBOOK" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::ns} to colored single value "NoSPACE" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::su} to colored single value "Success" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::ra} to colored single value "Random" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::re} to colored single value "Repair" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::tn} to colored single value "TypeName" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::na} to colored single value "Name" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::prefix} to colored single value "Prefix" get of "plugins/QEnchant/wiadomosci.yml"
- set {qenchant::wiad::suffix} to colored single value "Suffix" get of "plugins/QEnchant/wiadomosci.yml"
- send "%{qenchant::wiad::prefix}% &aPrzeladowano skrypt%{qenchant::wiad::suffix}%" to console
- function enchRandom(p: player):
- set {_los} to random integer between 1 to 5
- if {_los} is 1 or 2:
- set {_los2} to random integer between 1 to 5
- if {_los} is 1:
- set {_full} to "sharpness %{_los2}%" parsed as enchantment type
- set {_full2} to "%{_los2}% sharpness" parsed as enchantment type
- if {_los} is 2:
- set {_full} to "smite %{_los2}%" parsed as enchantment type
- set {_full2} to "%{_los2}% smite" parsed as enchantment type
- if {_los} is 3 or 4:
- set {_los2} to random integer between 1 to 2
- if {_los} is 3:
- set {_full} to "knockback %{_los2}%" parsed as enchantment type
- set {_full2} to "%{_los2}% knockback" parsed as enchantment type
- if {_los} is 4:
- set {_full} to "fire aspect %{_los2}%" parsed as enchantment type
- set {_full2} to "%{_los2}% fire aspect" parsed as enchantment type
- if {_los} is 5:
- set {_los2} to random integer between 1 to 3
- set {_full} to "looting %{_los2}%" parsed as enchantment type
- set {_full2} to "%{_los2}% looting" parsed as enchantment type
- wait 3 ticks
- execute {_p} command "qenchant_enchant2 %{_full2}%"
- replace all "_ENCHANT_" with "%{_full}%" in {qenchant::wiad::ra}
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::ra}%%{qenchant::wiad::suffix}%" to {_p}
- on load:
- if file "plugins/QEnchant/config.yml" doesn't exists:
- create file "plugins/QEnchant/config.yml"
- download from "http://pastebin.com/raw/xL1nuEnn" to "plugins/QEnchant/config.yml"
- if file "plugins/QEnchant/wiadomosci.yml" doesn't exists:
- create file "plugins/QEnchant/wiadomosci.yml"
- wait a tick
- set "Prefix" to "&e&oQ&6&oEnchant &8[&6>&8]" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Suffix" to "&8." in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "NoLVL" to "&cNie masz wystarczajacego poziomu" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "NoBOOK" to "&cNie masz wystarczajacego ilosci biblioteczek" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "NoSPACE" to "&cNie masz miejsca w ekwipunku." in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Success" to "&aZaklnales przedmiot na &e&o_ENCHANT_" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Random" to "&aWylosolwales &e&o_ENCHANT_" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Repair" to "&aNaprawiles przedmiot" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "TypeName" to "&aNapisz na czacie nazwe przedmiotu" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Name" to "&aPomyslnie ustawiles nazwe na &e&o_NAZWA_" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Set" to "&aPostawiles enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Break" to "&aZniszczyles enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set "Give" to "&aOtrzymales enchant" in yaml file "plugins/QEnchant/wiadomosci.yml"
- set {_e} to "e"
- enchReload({_e})
- on right click on enchantment table:
- if {qenchant::%event-block%} is true:
- if tool of player is any sword or any helmet or any chestplate or any leggings or any boots:
- set {qenchant::%player%::bib} to 0
- loop all blocks in radius 3 of event-block:
- if loop-block is bookshelf:
- if distance between loop-block and event-block is bigger or equal to 2:
- if y-coordinate of event-block is less or equal to y-coordinate of loop-block:
- add 1 to {qenchant::%player%::bib}
- wait 3 ticks
- execute player command "qenchant_menu"
- command /qenchant_enchant2 [<number>] [<text>]:
- trigger:
- if arg-2 is not "unbreaking":
- if arg-2 contains "protection" or "thorns":
- set {_lvl} to single value "cennik.zbroje.%arg-2%.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
- set {_bib} to single value "cennik.zbroje.%arg-2%.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
- else:
- set {_lvl} to single value "cennik.miecze.%arg-2%.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
- set {_bib} to single value "cennik.miecze.%arg-2%.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
- if arg-2 is "unbreaking":
- set {_lvl} to single value "cennik.unbreaking.%arg-1%.LvL" get of "plugins/QEnchant/config.yml" parsed as integer
- set {_bib} to single value "cennik.unbreaking.%arg-1%.Biblioteczki" get of "plugins/QEnchant/config.yml" parsed as integer
- if slot 8 of player's current inventory is any sword or any helmet or any chestplate or any leggings or any boots:
- if player's level is less than {_lvl}:
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::nl}%%{qenchant::wiad::suffix}%"
- stop
- if {qenchant::%player%::bib} is less than {_bib}:
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::nb}%%{qenchant::wiad::suffix}%"
- stop
- if player's level is bigger or equal to {_lvl}:
- if {qenchant::%player%::bib} is bigger or equal to {_bib}:
- set player's level to player's level -{_lvl}
- set {_tier} to arg-1
- set {_ench} to arg-2 parsed as enchantment type
- set {_full} to "%{_ench}% %{_tier}%" parsed as enchantment type
- wait a tick
- execute player command "qenchant_menu"
- wait 3 ticks
- set {_item} to slot 8 of player's current inventory
- enchant {_item} with {_full}
- wait 2 tick
- set slot 8 of player's current inventory to {_item}
- replace all "_ENCHANT_" with "%{_full}%" in {qenchant::wiad::su}
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::su}%%{qenchant::wiad::suffix}%"
- replace all "%{_full}%" with "_ENCHANT_" in {qenchant::wiad::su}
- delete {_full}
- delete {_tier}
- delete {_ench}
- delete {_item}
- show 100 "hearth" particles at location of targeted block for player
- create ultra fake lightning at targeted block
- on chat:
- if {qenchant::%player%::name} is true:
- cancel event
- execute player command "/qenchant_menu"
- wait a tick
- set {_s} to slot 8 of player's current inventory
- set name of {_s} to "%colored message%"
- wait a tick
- set slot 8 of player's current inventory to {_s}
- delete {qenchant::%player%::name}
- command /qenchant_repair:
- trigger:
- wait 3 ticks
- execute player command "/qenchant_menu"
- wait a tick
- set {_s} to slot 8 of player's current inventory
- set data of {_s} to 0
- set slot 8 of player's current inventory to {_s}
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::re}%%{qenchant::wiad::suffix}%"
- command /qenchant_menu:
- trigger:
- loop all blocks in radius 6 of player:
- if loop-block is enchantment table:
- set {_ok} to true
- if {_ok} is true:
- if player's tool is any sword or any helmet or any chestplate or any leggings or any boots:
- if tool of player is any sword:
- wait a tick
- infoMie(player)
- else:
- wait a tick
- infoZbr(player)
- wait a tick
- set {qenchant::%player%::menu} to true
- openMenu(player)
- set slot 8 of current inventory of player to player's tool
- set player's tool to air
- menuFull(player)
- set {qenchant::%player%::tool} to slot 8 of player's current inventory
- command /qenchant_name:
- trigger:
- set {qenchant::%player%::toolname} to name of player's tool
- set name of player's tool to ""
- command /nazwa [<text>]:
- trigger:
- set name of player's tool to colored arg
- on inventory close:
- set {_slot} to slot 8 of player's current inventory
- set {qenchant::%player%::tool} to slot 8 of player's current inventory
- if {_slot} is {qenchant::%player%::tool}:
- if player have space for 1 of {qenchant::%player%::tool}:
- give {qenchant::%player%::tool} to player
- if player don't have space for 1 of {qenchant::%player%::tool}:
- drop {qenchant::%player%::tool} at player
- on place of enchantment table:
- if name of player's tool is "&e&oQ&6&oEnchant":
- set {qenchant::%event-block%} to true
- set {qenchant::%event-block%::y::min} to y-coordinate of event-block
- set {qenchant::%event-block%::y::max} to y-coordinate of event-block
- increase y-coordinate of {qenchant::%event-block%::y::max} by +2
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::pe}%%{qenchant::wiad::suffix}%"
- command /qenchant [<text>] [<text>] [<text>]:
- permission: qenchant.admin
- trigger:
- if arg 1 is "daj" or "give":
- if player have permission "qenchant.*" or "qenchant.give":
- give player enchantment table named "&e&oQ&6&oEnchant" with lore "&5> &aPostaw na ziemi aby utworzyc magiczny enchant&5."
- send "%{qenchant::wiad::prefix}% %{qenchant::wiad::ot}%%{qenchant::wiad::suffix}%"
- if arg 1 is "random" or "losuj":
- if player's level is bigger or equal to 20:
- if {qenchant::%player%::bib} is bigger or equal to 10:
- remove 20 from player's level
- enchRandom(player)
- if arg 1 is "relaod":
- enchReload(arg-1)
- if arg 1 is "menu":
- execute player command "qenchant_menu"
- if arg 1 is "repair":
- itemRepair(player)
- if arg 1 is "name" or "nazwij":
- setName(player)
Advertisement
Add Comment
Please, Sign In to add comment