# First join on join: if {enchant.autodelete.%player%} is not set: set {enchant.autodelete.%player%} to true stop # Prevent bug on quit: if {enchant.autodelete.%player%} is true: if {enchant.stage.%player%} is "Iron Sword": set {enchant.autodelete.%player%} to false delete {enchant.stage.%player%} give a paper named "&5Iron Sword Enchant Scroll" to the player stop # Enchant Stage 1 : Pemakaian Scroll on leftclick using a paper: targeted block is anvil if {enchant.stage.%player%} is not set: # Jenis Scroll if name of the held item is "&5Iron Sword Enchant Scroll": set {enchant.stage.%player%} to "Iron Sword" remove 1 of held item from player's inventory message "Silahkan klik item yang ingin di enchant. Klik kanan untuk membatalkan tahap enchant." stop message "Anda masih dalam tahap mengenchant %{enchant.stage.%player%}%" # Time limit enchant every 5 seconds: loop all players: if {enchant.autodelete.%loop-player%} is false: set {enchant.autodelete.%loop-player%} to true if {enchant.stage.%loop-player%} is not set: stop wait for 10 seconds if {enchant.stage.%loop-player%} is not set: stop if {enchant.stage.%loop-player%} is set: # Jenis Scroll # if {enchant.stage.%loop-player%} is "Iron Sword": delete {enchant.stage.%loop-player%} give a paper named "&5Iron Sword Enchant Scroll" to the loop-player send "Limit waktu untuk meng enchant telah habis. Silahkan mengulang proses enchant kembali." to loop-player stop # Enchant Cancellation on rightclick: if {enchant.stage.%player%} is set: # Jenis Scroll if {enchant.stage.%player%} is "Iron Sword": delete {enchant.stage.%player%} give a paper named "&5Iron Sword Enchant Scroll" to the player message "Berhasil membatalkan proses enchant." set {enchant.autodelete.%player%} to false stop # Enchant Stage 2 : Pemasangan pada item on leftclick using a wooden sword or stone sword or iron sword or diamond sword: targeted block is anvil # Jenis Barang yang ingin di enchant if {enchant.stage.%player%} is "Iron Sword": if player is not holding an iron sword: message "&cAnda hanya dapat meng enchant Iron Sword menggunakan scroll ini, enchant dibatalkan." give a paper named "&5Iron Sword Enchant Scroll" to the player delete {enchant.stage.%player%} stop # Nama barang if name of held item of the player is "&8Scimitar": chance of 65%: wait for 1 tick execute console command "/exec u:%player% a:addperm v:powernbt.use" wait for 1 tick make player execute command "/nbt item display.Name = ""&4[+1] &8Scimitar"" " wait for 1 tick make player execute command "/nbt item display.Lore rem" wait for 1 tick make player execute command "/nbt item display.Lore[0] = ""&c9-15 DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[1] = ""&c3s (19%) FIRE DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[2] = ""&7This is the description of the weapon"" " wait for 1 tick execute console command "/exec u:%player% a:rmperm v:powernbt.use" delete {enchant.stage.%player%} else: send "Upgrade weapon tidak berhasil!" to player delete {enchant.stage.%player%} stop if name of held item of the player is "&4[+1] &8Scimitar": chance of 45%: wait for 1 tick execute console command "/exec u:%player% a:addperm v:powernbt.use" wait for 1 tick make player execute command "/nbt item display.Name = ""&4[+2] &8Scimitar"" " wait for 1 tick make player execute command "/nbt item display.Lore rem" wait for 1 tick make player execute command "/nbt item display.Lore[0] = ""&c17-23 DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[1] = ""&c5s (23%) FIRE DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[2] = ""&7This is the description of the weapon"" " wait for 1 tick execute console command "/exec u:%player% a:rmperm v:powernbt.use" delete {enchant.stage.%player%} else: wait for 1 tick execute console command "/exec u:%player% a:addperm v:powernbt.use" wait for 1 tick make player execute command "/nbt item display.Name = ""&8Scimitar"" " wait for 1 tick make player execute command "/nbt item display.Lore rem" wait for 1 tick make player execute command "/nbt item display.Lore[0] = ""&c5-7 DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[1] = ""&c2s (14%) FIRE DMG"" " wait for 1 tick make player execute command "/nbt item display.Lore[2] = ""&7This is the description of the weapon"" " wait for 1 tick execute console command "/exec u:%player% a:rmperm v:powernbt.use" delete {enchant.stage.%player%} send "Upgrade tidak berhasil, Scimitar kembali menjadi tier 0!" to player delete {enchant.stage.%player%}