Advertisement
sora200507

EnchantManager ver.Release 1.0

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