Advertisement
kama6012

EnchantUpgrade

Oct 21st, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. on right click on enchantment table:
  2. block under block is glowstone block
  3. cancel event
  4. player's tool exist
  5. open chest with 3 rows named "&3強化しますか?" to player
  6. wait 1 tick
  7. format slot 13 of player with anvil named "&4&l強化する!" to close then run "anvil 1 %player%"
  8.  
  9. command /anvil <number> <player>:
  10. trigger:
  11. if arg 1 is 1:
  12. wait 2 tick
  13. open chest with 3 rows named "&3強化アイテム" to arg 2
  14. wait 1 tick
  15. format slot 0 of arg 2 with iron helmet named "&4&l防具強化" with lore "&f手に持っている防具を強化します" to run "anvil 2 %arg 2%"
  16. format slot 9 of arg 2 with iron helmet named "&4&l防具強化" with lore "&f手に持っている防具を強化します" to run "anvil 2 %arg 2%"
  17. format slot 18 of arg 2 with iron helmet named "&4&l防具強化" with lore "&f手に持っている防具を強化します" to run "anvil 2 %arg 2%"
  18. format slot 8 of arg 2 with iron sword named "&4&l武器強化" with lore "&f手に持っている武器を強化します" to run "anvil 3 %arg 2%"
  19. format slot 17 of arg 2 with iron sword named "&4&l武器強化" with lore "&f手に持っている武器を強化します" to run "anvil 3 %arg 2%"
  20. format slot 26 of arg 2 with iron sword named "&4&l武器強化" with lore "&f手に持っている武器を強化します" to run "anvil 3 %arg 2%"
  21. if arg 1 is 2:
  22. if arg 2 has 1 nether star:
  23. if level of PROTECTION of the arg 2's tool is less than 50:
  24. remove 1 nether star from arg 2's inventory
  25. set {_chance} to (0.1*(level of PROTECTION of the arg 2's tool))^2
  26. if chance of (100-{_chance})%:
  27. message "&f強化成功!" to arg 2
  28. message "&f強化レベル:%level of PROTECTION of the arg 2's tool%→%level of PROTECTION of the arg 2's tool +1%" to arg 2
  29. set {_lv} to level of PROTECTION of the arg 2's tool +1
  30. enchant the arg 2's tool with "PROTECTION %{_lv}%" parsed as enchantment types
  31. else:
  32. message "&f強化失敗..." to arg 2
  33. else:
  34. message "&f強化上限です!" to arg 2
  35. else:
  36. message "&fネザースターがありません!" to arg 2
  37. if arg 1 is 3:
  38. if arg 2 has 1 nether star:
  39. if level of sharpness of the arg 2's tool is less than 50:
  40. remove 1 nether star from arg 2's inventory
  41. set {_chance} to (0.1*(level of sharpness of the arg 2's tool))^2
  42. if chance of (100-{_chance})%:
  43. message "&f強化成功!" to arg 2
  44. message "&f強化レベル:%level of sharpness of the arg 2's tool%→%level of sharpness of the arg 2's tool +1%" to arg 2
  45. set {_lv} to level of sharpness of the arg 2's tool +1
  46. enchant the arg 2's tool with "sharpness %{_lv}%" parsed as enchantment types
  47. else:
  48. message "&f強化失敗..." to arg 2
  49. else:
  50. message "&f強化上限です!" to arg 2
  51. else:
  52. message "&fネザースターがありません!" to arg 2
  53. if arg is 60:
  54. kick all players
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement