variables:
{zaczarowanie.%player%} = 0
command /|zaczarowanie-przedmiotu:
trigger:
set {_gui} to chest inventory with 3 rows named "&8Miksowanie przedmiotu"
set slot 11 of {_gui} to blue dye named "&3Przebonuj Przedmiot" with lore "" and "&0-&4UWAGA! &cKlikajac ten przedmiot" and "&0-&cPrzemieniasz bonus ""DODATKOWE OBRAZENIA""" and "&0-&cbezpowrotnie!" and "" and "&0-&8» &7Koszt: &bZaczarowany Przedmiot x1" and "&0-&8» &7Kliknij, aby przelosować!"
set slot 15 of {_gui} to barrier named "&cZamknij"
set slot 22 of {_gui} to hopper named "&6WYBIERZ PRZEDMIOT!" with lore "&0-&8» &7Kliknij przedmiot w ekwipunku, który" and "&0-&8» &7chciałbyś przebonować!"
open {_gui} to player
on inventory click:
event-inventory is not player's inventory
if name of event-inventory is "&8Miksowanie przedmiotu":
if clicked slot is 15:
close player's inventory
cancel event
if clicked slot is 4:
cancel event
if clicked slot is 11:
if player has 1 of blue dye named "&3&lZaczarowanie Przedmiotu" with lore "&8» &7Kliknij &bprawym&7, aby &bzmienic" and "&8» &7bonusowe &4obrazenia":
clear lore of slot 13 of event-inventory
if slot 13 of event-inventory is wooden sword or stone sword or iron sword or golden sword or diamond sword or netherite sword:
remove 1 of blue dye named "&3&lZaczarowanie Przedmiotu" with lore "&8» &7Kliknij &bprawym&7, aby &bzmienic" and "&8» &7bonusowe &4obrazenia" from player
clear lore of slot 13 of event-inventory
chance of 100%:
set {zaczarowanie.%player%} to a random number between -3 and 29
set lore of slot 13 of event-inventory to "&fDodatkowe obrazenia: %{zaczarowanie.%player%}%%%"
chance of 10%:
set {zaczarowanie.%player%} to a random number between 29 and 41
set lore of slot 13 of event-inventory to "&eDodatkowe obrazenia: %{zaczarowanie.%player%}%%%"
chance of 1%:
set {zaczarowanie.%player%} to a random number between 41 and 60
set lore of slot 13 of event-inventory to "&cDodatkowe obrazenia: %{zaczarowanie.%player%}%%%"
else:
if slot 13 of event-inventory is air:
send message "&cNie możesz ten przedmiot ulepszyć!"
else:
close player's inventory
send message "&cNie masz Wiecej Zaczarowan Przedmiotu! &cZdobadz je z skrzynek lub zakup na &fwww.anarchia.&egg"
if slot 13 of event-inventory is any pickaxe or any axe or any shovel or any hoe or any helmet or any chestplate or any leggings or any boots:
close player's inventory
send message "&cTen przedmiot nie jest MIECZYKIEM!"
cancel event
on damage:
if attacker's tool is any sword with lore "&fDodatkowe obrazenia: %{zaczarowanie.%attacker%}%%%":
increase damage by {zaczarowanie.%attacker%}
on damage:
if attacker's tool is any sword with lore "&eDodatkowe obrazenia: %{zaczarowanie.%attacker%}%%%":
increase damage by {zaczarowanie.%attacker%}
on damage:
if attacker's tool is any sword with lore "&4Dodatkowe obrazenia: %{zaczarowanie.%attacker%}%%%":
increase damage by {zaczarowanie.%attacker%}
on inventory close:
event-inventory is not player's inventory
if name of event-inventory is "&7Miksowanie przedmiotu":
set {_slot} to slot 13 of event-inventory
give {_slot} to player
command /zaczarowanie-przedmiotu:
permission: CustomCode.zaczarowanie.access
permission message: "&cBrak Permisji!"
trigger:
give player 1 of blue dye named "&3&lZaczarowanie Przedmiotu" with lore "&8» &7Kliknij &bprawym&7, aby &bzmienic" and "&8» &7bonusowe &4obrazenia"
on right click with blue dye:
if name of event-item is "&3&lZaczarowanie Przedmiotu":
execute player command "/|zaczarowanie-przedmiotu"
pisz jak nie działa