Advertisement
kama6012

Forge

Aug 31st, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. on rightclick on anvil:
  2. give redstone block named "&c&l大強化石" to player
  3. cancel event
  4. open chest with 1 row named "&k&rForging menu" to player
  5. wait 1 tick
  6. loop 9 times:
  7. add 1 to {_cnt}
  8. format slot {_cnt} - 1 of player with light gray glass pane named " " to act unstealable
  9. format slot 0 of player with enchanted book named "&7強化について" to act unstealable
  10. format slot 4 of player with red glass pane named "&4武器がセットされていません!" with lore "&r武器ををクリックで選択" to act unstealable
  11. format slot 7 of player with anvil named "&r強化石で強化する" to run "anvil 1 %player%"
  12. format slot 8 of player with anvil named "&r大強化石で強化する" to run "anvil 2 %player%"
  13.  
  14. on inventory click:
  15. inventory name of current inventory of player contains "&k&rForging menu"
  16. cancel event
  17. if clicked item is sword:
  18. format slot 4 of player with clicked item to act unstealable
  19. set {Forge::%player%} to clicked item
  20. set {Forgename::%player%} to name of clicked item
  21.  
  22. command /anvil <number> <player>:
  23. trigger:
  24. inventory name of current inventory of player-arg contains "&k&rForging menu"
  25. player-arg has {Forge::%player-arg%}
  26. if arg-1 is 1:
  27. player-arg has redstone dust named "&c&l強化石"
  28. remove 1 of redstone dust named "&c&l強化石" from player-arg
  29. set {_Multi} to 1
  30. else if arg-1 is 2:
  31. player-arg has redstone block named "&c&l大強化石"
  32. remove 1 of redstone block named "&c&l大強化石" from player-arg
  33. set {_Multi} to 10
  34. remove 1 of {Forge::%player-arg%} from player-arg
  35. if {Forgename::%player-arg%} contains "&l&4+":
  36. set {_spl::*} to split {Forgename::%player-arg%} at "&l&4+"
  37. set {_spl::2} to {_spl::2} parsed as number
  38. else:
  39. set {_spl::1} to {Forgename::%player-arg%}
  40. set {_spl::2} to 0
  41. set {_Rand} to random integer between 1 and (10*{_Multi})
  42. if {_Rand} >= 10:
  43. set {_plus} to {_spl::2} + 2
  44. else if {_Rand} is between 6 and 9:
  45. set {_plus} to {_spl::2} + 1
  46. else if {_Rand} is between 2 and 5:
  47. set {_plus} to {_spl::2} - 1
  48. else if {_Rand} is 1:
  49. set {_plus} to {_spl::2} - 2
  50. if {_plus} > 0:
  51. set {Forgename::%player-arg%} to "%{_spl::1}%&l&4+%{_plus}%"
  52. else:
  53. set {Forgename::%player-arg%} to "%{_spl::1}%"
  54. close inventory of player-arg
  55. give 1 of {Forge::%player-arg%} named {Forgename::%player-arg%} to player-arg
  56.  
  57. on damage:
  58. {Forgename::%attacker%} contains "&l&4+"
  59. set {_spl::*} to split {Forgename::%attacker%} at "&l&4+"
  60. set {_spl::2} to {_spl::2} parsed as number
  61. set damage to damage + ({_spl::2}*0.5)
  62. set maximum damage delay of victim to "%max(0.5-{_spl::2}*0.02,0)% seconds" parsed as timespan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement