sora200507

EnchantManager ver.Dev 1.2

Feb 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.54 KB | None | 0 0
  1. #EnchantManager
  2. #Create by soramame
  3. #二次配布は禁止です 必ずPlayerRealms Skript Communityに参加した状態でダウンロードしてください!
  4. #また バグ報告はsoramame_256#0256にDMでしてください!
  5. #以下 コード 変更する際は自己責任で御願いします 変更されている場合のコードのエラーは対応できません
  6. #---------------------------------------------------------------------------------------
  7. command /enchantmanager:
  8. permission: enchantmanager.use
  9. trigger:
  10. if player's tool isn't air:
  11. open chest with 6 rows named "&bEnchantManager" to player
  12. wait 1 tick
  13. set slot 0 of player's current inventory to player's tool
  14. set slot 10 of player's current inventory to glowing book named "&bダメージ軽減" with lore "&b手に持っているアイテムにダメージ軽減を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  15. set slot 11 of player's current inventory to glowing book named "&b火炎耐性" with lore "&b手に持っているアイテムに火炎耐性を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  16. set slot 12 of player's current inventory to glowing book named "&b落下耐性" with lore "&b手に持っているアイテムに落下耐性を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  17. set slot 13 of player's current inventory to glowing book named "&b爆発耐性" with lore "&b手に持っているアイテムに爆発耐性を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  18. set slot 14 of player's current inventory to glowing book named "&b飛び道具耐性" with lore "&b手に持っているアイテムに飛び道具耐性を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  19. set slot 15 of player's current inventory to glowing book named "&b水中呼吸" with lore "&b手に持っているアイテムに水中呼吸を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  20. set slot 16 of player's current inventory to glowing book named "&b水中採掘" with lore "&b手に持っているアイテムに水中採掘を付与します"
  21. set slot 19 of player's current inventory to glowing book named "&b棘の鎧" with lore "&b手に持っているアイテムに棘の鎧を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  22. set slot 20 of player's current inventory to glowing book named "&b水中歩行" with lore "&b手に持っているアイテムに水中歩行を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  23. set slot 21 of player's current inventory to glowing book named "&bダメージ増加" with lore "&b手に持っているアイテムにダメージ増加を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  24. set slot 22 of player's current inventory to glowing book named "&bアンデット特攻" with lore "&b手に持っているアイテムにアンデット特攻を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  25. set slot 23 of player's current inventory to glowing book named "&b虫特攻" with lore "&b手に持っているアイテムに虫特攻を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  26. set slot 24 of player's current inventory to glowing book named "&bノックバック" with lore "&b手に持っているアイテムにノックバックを付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  27. set slot 25 of player's current inventory to glowing book named "&b火属性" with lore "&b手に持っているアイテムに火属性を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  28. set slot 28 of player's current inventory to glowing book named "&bドロップ増加" with lore "&b手に持っているアイテムにドロップ増加を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  29. set slot 29 of player's current inventory to glowing book named "&b効率強化" with lore "&b手に持っているアイテムに効率強化を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  30. set slot 30 of player's current inventory to glowing book named "&bシルクタッチ" with lore "&b手に持っているアイテムにシルクタッチを付与します"
  31. set slot 31 of player's current inventory to glowing book named "&b耐久力" with lore "&b手に持っているアイテムに耐久力を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  32. set slot 32 of player's current inventory to glowing book named "&b幸運" with lore "&b手に持っているアイテムに幸運を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  33. set slot 33 of player's current inventory to glowing book named "&b射撃ダメージ増加" with lore "&b手に持っているアイテムに射撃ダメージ増加を付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  34. set slot 34 of player's current inventory to glowing book named "&bパンチ" with lore "&b手に持っているアイテムにパンチを付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  35. set slot 37 of player's current inventory to glowing book named "&bフレイム" with lore "&b手に持っているアイテムにフレイムを付与します"
  36. set slot 38 of player's current inventory to glowing book named "&b無限" with lore "&b手に持っているアイテムに無限を付与します"
  37. set slot 39 of player's current inventory to glowing book named "&b宝釣り" with lore "&b手に持っているアイテムに宝釣りを付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  38. set slot 40 of player's current inventory to glowing book named "&b入れ食い" with lore "&b手に持っているアイテムに入れ食いを付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  39. set slot 41 of player's current inventory to glowing book named "&b修繕" with lore "&b手に持ってるアイテムに修繕を付与します"
  40. set slot 42 of player's current inventory to glowing book named "&b氷渡り" with lore "&b手に持っているアイテムに氷渡りを付与します" and "&bレベルの設定はクリック後にチャットでしてください"
  41. set slot 53 of player's current inventory to red wool block named "&cエンチャントをすべて破棄" with lore "&cエンチャントをすべて破棄します"
  42. else:
  43. message "&cError! アイテムを所持した状態でないと使用できません!"
  44. on inventory click:
  45. if name of player's current inventory contains "&bEnchantManager":
  46. if clicked slot is 10:
  47. cancel event
  48. prot(player)
  49. if clicked slot is 11:
  50. cancel event
  51. firepro(player)
  52. if clicked slot is 12:
  53. cancel event
  54. fallpro(player)
  55. if clicked slot is 13:
  56. cancel event
  57. blastpro(player)
  58. if clicked slot is 14:
  59. cancel event
  60. projepro(player)
  61. if clicked slot is 15:
  62. cancel event
  63. resp(player)
  64. if clicked slot is 16:
  65. cancel event
  66. aqua(player)
  67. if clicked slot is 19:
  68. cancel event
  69. thor(player)
  70. if clicked slot is 20:
  71. cancel event
  72. dept(player)
  73. if clicked slot is 21:
  74. cancel event
  75. shar(player)
  76. if clicked slot is 22:
  77. cancel event
  78. smit(player)
  79. if clicked slot is 23:
  80. cancel event
  81. bane(player)
  82. if clicked slot is 24:
  83. cancel event
  84. knoc(player)
  85. if clicked slot is 25:
  86. cancel event
  87. fireas(player)
  88. if clicked slot is 28:
  89. cancel event
  90. loot(player)
  91. if clicked slot is 29:
  92. cancel event
  93. effi(player)
  94. if clicked slot is 30:
  95. cancel event
  96. silk(player)
  97. if clicked slot is 31:
  98. cancel event
  99. unbr(player)
  100. if clicked slot is 32:
  101. cancel event
  102. fort(player)
  103. if clicked slot is 33:
  104. cancel event
  105. pow(player)
  106. if clicked slot is 34:
  107. cancel event
  108. pun(player)
  109. if clicked slot is 37:
  110. cancel event
  111. fla(player)
  112. if clicked slot is 38:
  113. cancel event
  114. infi(player)
  115. if clicked slot is 39:
  116. cancel event
  117. luck(player)
  118. if clicked slot is 40:
  119. cancel event
  120. lure(player)
  121. if clicked slot is 41:
  122. cancel event
  123. mend(player)
  124. if clicked slot is 42:
  125. cancel event
  126. fros(player)
  127. if clicked slot is 53:
  128. disenchant player's tool
  129. cancel event
  130. else:
  131. cancel event
  132. on chat:
  133. if {%sender%.enchant} is set:
  134. cancel event
  135. set {_n} to message parsed as number
  136. if sender's tool isn't air:
  137. if sender has permission "enchantmanager.enchant":
  138. if {_n} <= 32768:
  139. if {%sender%.enchant} is "prot":
  140. set {_n} to "Protection %{_n}%"
  141. evaluate "enchant sender's tool with %{_n}%"
  142. message "&bエンチャントしました" to sender
  143. clear {%sender%.enchant}
  144. if {%sender%.enchant} is "firepro":
  145. set {_n} to "Fire Protection %{_n}%"
  146. evaluate "enchant sender's tool with %{_n}%"
  147. message "&bエンチャントしました" to sender
  148. clear {%sender%.enchant}
  149. if {%sender%.enchant} is "fallpro":
  150. set {_n} to "Feather Falling %{_n}%"
  151. evaluate "enchant sender's tool with %{_n}%"
  152. message "&bエンチャントしました" to sender
  153. clear {%sender%.enchant}
  154. if {%sender%.enchant} is "blastpro":
  155. set {_n} to "Blast Protection %{_n}%"
  156. evaluate "enchant sender's tool with %{_n}%"
  157. message "&bエンチャントしました" to sender
  158. clear {%sender%.enchant}
  159. if {%sender%.enchant} is "projepro":
  160. set {_n} to "Projectile Protection %{_n}%"
  161. evaluate "enchant sender's tool with %{_n}%"
  162. message "&bエンチャントしました" to sender
  163. clear {%sender%.enchant}
  164. if {%sender%.enchant} is "resp":
  165. set {_n} to "Respiration %{_n}%"
  166. evaluate "enchant sender's tool with %{_n}%"
  167. message "&bエンチャントしました" to sender
  168. clear {%sender%.enchant}
  169. if {%sender%.enchant} is "aqua":
  170. set {_n} to "Aqua Affinity %{_n}%"
  171. evaluate "enchant sender's tool with %{_n}%"
  172. message "&bエンチャントしました" to sender
  173. clear {%sender%.enchant}
  174. if {%sender%.enchant} is "thor":
  175. set {_n} to "Thorns %{_n}%"
  176. evaluate "enchant sender's tool with %{_n}%"
  177. message "&bエンチャントしました" to sender
  178. clear {%sender%.enchant}
  179. if {%sender%.enchant} is "dept":
  180. set {_n} to "Depth Strider %{_n}%"
  181. evaluate "enchant sender's tool with %{_n}%"
  182. message "&bエンチャントしました" to sender
  183. clear {%sender%.enchant}
  184. if {%sender%.enchant} is "shar":
  185. set {_n} to "Sharpness %{_n}%"
  186. evaluate "enchant sender's tool with %{_n}%"
  187. message "&bエンチャントしました" to sender
  188. clear {%sender%.enchant}
  189. if {%sender%.enchant} is "smit":
  190. set {_n} to "Smite %{_n}%"
  191. evaluate "enchant sender's tool with %{_n}%"
  192. message "&bエンチャントしました" to sender
  193. clear {%sender%.enchant}
  194. if {%sender%.enchant} is "bane":
  195. set {_n} to "Bane of Arthropods %{_n}%"
  196. evaluate "enchant sender's tool with %{_n}%"
  197. message "&bエンチャントしました" to sender
  198. clear {%sender%.enchant}
  199. if {%sender%.enchant} is "knoc":
  200. set {_n} to "Knockback %{_n}%"
  201. evaluate "enchant sender's tool with %{_n}%"
  202. message "&bエンチャントしました" to sender
  203. clear {%sender%.enchant}
  204. if {%sender%.enchant} is "fireas":
  205. set {_n} to "Fire Aspect %{_n}%"
  206. evaluate "enchant sender's tool with %{_n}%"
  207. message "&bエンチャントしました" to sender
  208. clear {%sender%.enchant}
  209. if {%sender%.enchant} is "loot":
  210. set {_n} to "Looting %{_n}%"
  211. evaluate "enchant sender's tool with %{_n}%"
  212. message "&bエンチャントしました" to sender
  213. clear {%sender%.enchant}
  214. if {%sender%.enchant} is "effi":
  215. set {_n} to "Efficiency %{_n}%"
  216. evaluate "enchant sender's tool with %{_n}%"
  217. message "&bエンチャントしました" to sender
  218. clear {%sender%.enchant}
  219. if {%sender%.enchant} is "unbr":
  220. set {_n} to "Unbreaking %{_n}%"
  221. evaluate "enchant sender's tool with %{_n}%"
  222. message "&bエンチャントしました" to sender
  223. clear {%sender%.enchant}
  224. if {%sender%.enchant} is "fort":
  225. set {_n} to "Fortune %{_n}%"
  226. evaluate "enchant sender's tool with %{_n}%"
  227. message "&bエンチャントしました" to sender
  228. clear {%sender%.enchant}
  229. if {%sender%.enchant} is "pow":
  230. set {_n} to "Power %{_n}%"
  231. evaluate "enchant sender's tool with %{_n}%"
  232. message "&bエンチャントしました" to sender
  233. clear {%sender%.enchant}
  234. if {%sender%.enchant} is "pun":
  235. set {_n} to "Punch %{_n}%"
  236. evaluate "enchant sender's tool with %{_n}%"
  237. message "&bエンチャントしました" to sender
  238. clear {%sender%.enchant}
  239. if {%sender%.enchant} is "fros":
  240. set {_n} to "Frost Walker %{_n}%"
  241. evaluate "enchant sender's tool with %{_n}%"
  242. message "&bエンチャントしました" to sender
  243. clear {%sender%.enchant}
  244. if {%sender%.enchant} is "luck":
  245. set {_n} to "Luck of the Sia %{_n}%"
  246. evaluate "enchant sender's tool with %{_n}%"
  247. message "&bエンチャントしました" to sender
  248. clear {%sender%.enchant}
  249. if {%sender%.enchant} is "lure":
  250. set {_n} to "Lure %{_n}%"
  251. evaluate "enchant sender's tool with %{_n}%"
  252. message "&bエンチャントしました" to sender
  253. clear {%sender%.enchant}
  254. else:
  255. {%sender%.enchant} is set
  256. message "&cError! 実行中に不明なエラーが発生しました! soramame_256#0256に報告してください!"
  257. stop
  258. else:
  259. message "&c数値は32768以下にしてください!"
  260. else:
  261. message "&c権限が足りません!"
  262. clear {%sender%.enchant}
  263. else:
  264. message "&c手にアイテムを持ってください!"
  265. else:
  266. stop
  267. function prot(p: player):
  268. close {_p}'s inventory
  269. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  270. set {%{_p}%.enchant} to "prot"
  271. stop
  272. function firepro(p: player):
  273. close {_p}'s inventory
  274. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  275. set {%{_p}%.enchant} to "firepro"
  276. stop
  277. function fallpro(p: player):
  278. close {_p}'s inventory
  279. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  280. set {%{_p}%.enchant} to "fallpro"
  281. stop
  282. function blastpro(p: player):
  283. close {_p}'s inventory
  284. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  285. set {%{_p}%.enchant} to "blastpro"
  286. stop
  287. function projepro(p: player):
  288. close {_p}'s inventory
  289. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  290. set {%{_p}%.enchant} to "projepro"
  291. stop
  292. function resp(p: player):
  293. close {_p}'s inventory
  294. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  295. set {%{_p}%.enchant} to "resp"
  296. stop
  297. function aqua(p: player):
  298. close {_p}'s inventory
  299. message "&bエンチャントしました" to {_p}
  300. enchant {_p}'s tool with Aqua Affinity
  301. stop
  302. function thor(p: player):
  303. close {_p}'s inventory
  304. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  305. set {%{_p}%.enchant} to "thor"
  306. stop
  307. function dept(p: player):
  308. close {_p}'s inventory
  309. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  310. set {%{_p}%.enchant} to "dept"
  311. stop
  312. function shar(p: player):
  313. close {_p}'s inventory
  314. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  315. set {%{_p}%.enchant} to "shar"
  316. stop
  317. function smit(p: player):
  318. close {_p}'s inventory
  319. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  320. set {%{_p}%.enchant} to "smit"
  321. stop
  322. function bane(p: player):
  323. close {_p}'s inventory
  324. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  325. set {%{_p}%.enchant} to "bane"
  326. stop
  327. function knoc(p: player):
  328. close {_p}'s inventory
  329. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  330. set {%{_p}%.enchant} to "knoc"
  331. stop
  332. function fireas(p: player):
  333. close {_p}'s inventory
  334. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  335. set {%{_p}%.enchant} to "fireas"
  336. stop
  337. function loot(p: player):
  338. close {_p}'s inventory
  339. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  340. set {%{_p}%.enchant} to "loot"
  341. stop
  342. function effi(p: player):
  343. close {_p}'s inventory
  344. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  345. set {%{_p}%.enchant} to "effi"
  346. stop
  347. function silk(p: player):
  348. close {_p}'s inventory
  349. message "&bエンチャントしました" to {_p}
  350. enchant {_p}'s tool with Silk Touch
  351. stop
  352. function unbr(p: player):
  353. close {_p}'s inventory
  354. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  355. set {%{_p}%.enchant} to "unbr"
  356. stop
  357. function fort(p: player):
  358. close {_p}'s inventory
  359. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  360. set {%{_p}%.enchant} to "fort"
  361. stop
  362. function mend(p: player):
  363. close {_p}'s inventory
  364. enchant {_p}'s tool with Mending
  365. message "&bエンチャントしました" to {_p}
  366. stop
  367. function pow(p: player):
  368. close {_p}'s inventory
  369. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  370. set {%{_p}%.enchant} to "pow"
  371. stop
  372. function pun(p: player):
  373. close {_p}'s inventory
  374. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  375. set {%{_p}%.enchant} to "pun"
  376. stop
  377. function fla(p: player):
  378. close {_p}'s inventory
  379. enchant {_p}'s tool with Flame
  380. message "&bエンチャントしました" to {_p}
  381. stop
  382. function infi(p: player):
  383. close {_p}'s inventory
  384. enchant {_p}'s tool with Infinity
  385. message "&bエンチャントしました" to {_p}
  386. stop
  387. function fros(p: player):
  388. close {_p}'s inventory
  389. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  390. set {%{_p}%.enchant} to "fros"
  391. stop
  392. function luck(p: player):
  393. close {_p}'s inventory
  394. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  395. set {%{_p}%.enchant} to "luck"
  396. stop
  397. function lure(p: player):
  398. close {_p}'s inventory
  399. message "&bチャットに付与するエンチャントのレベルを入力してください" to {_p}
  400. set {%{_p}%.enchant} to "lure"
  401. stop
Add Comment
Please, Sign In to add comment