7mm

MakinMagician Skript

7mm
Jul 29th, 2019
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.85 KB | None | 0 0
  1. command /class:
  2. aliases: /.c
  3. trigger:
  4. open chest with 6 rows named "&2&lClass &3&lList" to player
  5. wait a tick
  6. set {_slot} to 10
  7. loop {mnmn::sys.cl.list::*}:
  8. set {_icon} to {mnmn::sys.cl::%loop-value%::opt::icon} parsed as item
  9. set {_name} to {mnmn::sys.cl::%loop-value%::opt::name}
  10. set {_lore::*} to {mnmn::sys.cl::%loop-value%::opt::lore} split by "||"
  11. set slot {_slot} of player's current inventory to {_icon} named {_name} with lore colored {_lore::*}
  12. add 1 to {_slot}
  13. if mod({_slot}-1,9) > 6:
  14. add 2 to {_slot}
  15.  
  16. command /classlist <text> <text>:
  17. permission: skript.classlist
  18. aliases: /.cl
  19. trigger:
  20. if arg 1 is "add":
  21. add arg 2 to {mnmn::sys.cl.list::*}
  22. if arg 1 is "remove":
  23. remove all arg 2 from {mnmn::sys.cl.list::*}
  24.  
  25. command /setclass <text> <text>:
  26. permission: skript.setclass
  27. aliases: /.sc
  28. trigger:
  29. set {_p} to arg 1
  30. if arg 1 is "@":
  31. set {_p} to player
  32. set {mnmn::player::%{_p}%::class::classname} to arg 2
  33. set {mnmn::player::%{_p}%::skillboard::boardname} to {mnmn::sys.cl::%arg 2%::opt::board}
  34. set {_coord::*} to {mnmn::sys.cl::%arg 2%::start} split by ","
  35. set {mnmn::player::%{_p}%::skillboard::coord.x} to {_coord::1} parsed as integer
  36. set {mnmn::player::%{_p}%::skillboard::coord.y} to {_coord::2} parsed as integer
  37. remove 1 from {mnmn::player::%{_p}%::skillboard::coord.x}
  38. remove 1 from {mnmn::player::%{_p}%::skillboard::coord.y}
  39.  
  40. command /skillboardsetting <text> <text> <text> <text>:
  41. permission: skript.skillboardsetting
  42. aliases: /.sbs
  43. trigger:
  44. set {mnmn::sys.sb::%arg 1%::layout::%arg 2%,%arg 3%} to arg 4
  45. if arg 4 is "1":
  46. set {mnmn::sys.sb::%arg 1%::start} to "%arg 2%,%arg 3%"
  47.  
  48. command /skillboardremove <text> <text> <text>:
  49. permission: skript.skillboardremove
  50. aliases: /.sbrm
  51. trigger:
  52. clear {mnmn::sys.sb::%arg 1%::layout::%arg 2%,%arg 3%}
  53.  
  54. command /skillboardreset <text>:
  55. permission: skript.skillboardreset
  56. aliases: /.sbr
  57. trigger:
  58. set {_p} to arg 1
  59. if arg 1 is "@":
  60. set {_p} to player
  61. set {_coord::*} to {mnmn::sys.cl::%{mnmn::player::%{_p}%::skillboard::boardname}%::start} split by ","
  62. set {mnmn::player::%{_p}%::skillboard::coord.x} to {_coord::1} parsed as integer
  63. set {mnmn::player::%{_p}%::skillboard::coord.y} to {_coord::2} parsed as integer
  64. remove 1 from {mnmn::player::%{_p}%::skillboard::coord.x}
  65. remove 1 from {mnmn::player::%{_p}%::skillboard::coord.y}
  66. clear {mnmn::player::%{_p}%::skillboard::status::*}
  67. clear {mnmn::player::%{_p}%::attributes::*}
  68.  
  69. command /classsetting <text> <text> <text>:
  70. permission: skript.classsetting
  71. aliases: /.cs
  72. trigger:
  73. set {mnmn::sys.cl::%arg 1%::opt::%arg 2%} to arg 3
  74.  
  75. command /setstatus <text> <text> <integer>:
  76. permission: skript.setstatus
  77. aliases: /.ss
  78. trigger:
  79. set {_p} to arg 1
  80. if arg 1 is "@":
  81. set {_p} to player
  82. set {mnmn::player::%arg 1%::status::%arg 2%} to arg 3
  83.  
  84. command /skillboard:
  85. aliases: /.sb
  86. trigger:
  87. if {mnmn::player::%player%::skillboard::boardname} is not set:
  88. message "&cボードが未設定です"
  89. stop
  90. open chest with 6 rows named "&4&lSkill &1&lBoard &0&l- %{mnmn::player::%player%::skillboard::boardname}%&0(%{mnmn::player::%player%::skillboard::coord.x}%,%{mnmn::player::%player%::skillboard::coord.y}%)" to player
  91. wait a tick
  92. set {_name} to {mnmn::player::%player%::skillboard::boardname}
  93. set {_y} to 0
  94. loop 6 times:
  95. set {_x} to 0
  96. loop 9 times:
  97. set {_slot} to (5-{_y})*9+{_x}
  98. set {_fieldx} to {_x}+{mnmn::player::%player%::skillboard::coord.x}
  99. set {_fieldy} to {_y}+{mnmn::player::%player%::skillboard::coord.y}
  100. if {mnmn::sys.sb::%{_name}%::layout::%{_fieldx}%,%{_fieldy}%} is "1":
  101. set {_icon} to sugar
  102. set {_lore::*} to "&e&lボード開始地点" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  103. set {_iconname} to "&7---"
  104. else if {mnmn::sys.sb::%{_name}%::layout::%{_fieldx}%,%{_fieldy}%} is "2":
  105. if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} > 0:
  106. if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 1:
  107. set {_icon} to red dye
  108. set {_lore::*} to "&7カケラ設定済: &c&l赤" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  109. set {_iconname} to "&7---"
  110. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 2:
  111. set {_icon} to orange dye
  112. set {_lore::*} to "&7カケラ設定済: &6&l橙" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  113. set {_iconname} to "&7---"
  114. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 3:
  115. set {_icon} to yellow dye
  116. set {_lore::*} to "&7カケラ設定済: &e&l黄" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  117. set {_iconname} to "&7---"
  118. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 4:
  119. set {_icon} to lime dye
  120. set {_lore::*} to "&7カケラ設定済: &a&l緑" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  121. set {_iconname} to "&7---"
  122. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 5:
  123. set {_icon} to light blue dye
  124. set {_lore::*} to "&7カケラ設定済: &b&l青" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  125. set {_iconname} to "&7---"
  126. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 6:
  127. set {_icon} to cyan dye
  128. set {_lore::*} to "&7カケラ設定済: &9&l藍" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  129. set {_iconname} to "&7---"
  130. else if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy}%} is 7:
  131. set {_icon} to purple dye
  132. set {_lore::*} to "&7カケラ設定済: &d&l紫" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  133. set {_iconname} to "&7---"
  134. else:
  135. set {_fieldx_} to {_fieldx}-1
  136. set {_fieldy_} to {_fieldy}-1
  137. if {_fieldy} is 0:
  138. if {mnmn::player::%player%::skillboard::status::%{_fieldx_}%,%{_fieldy}%} > 0:
  139. set {_icon} to magma cream
  140. set {_lore::*} to "&7&lカケラ設定可" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  141. set {_iconname} to "&e&lカケラ &aを設定する"
  142. else if {mnmn::sys.sb::%{_name}%::layout::%{_fieldx_}%,%{_fieldy}%} is "1":
  143. set {_icon} to magma cream
  144. set {_lore::*} to "&7&lカケラ設定可" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  145. set {_iconname} to "&e&lカケラ &aを設定する"
  146. else:
  147. set {_icon} to snowball
  148. set {_lore::*} to "&7カケラ未設定" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  149. set {_iconname} to "&7---"
  150. else:
  151. if {mnmn::player::%player%::skillboard::status::%{_fieldx}%,%{_fieldy_}%} > 0:
  152. set {_icon} to magma cream
  153. set {_lore::*} to "&7&lカケラ設定可" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  154. set {_iconname} to "&e&lカケラ &aを設定する"
  155. else if {mnmn::sys.sb::%{_name}%::layout::%{_fieldx}%,%{_fieldy_}%} is "1":
  156. set {_icon} to magma cream
  157. set {_lore::*} to "&7&lカケラ設定可" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  158. set {_iconname} to "&e&lカケラ &aを設定する"
  159. else:
  160. set {_icon} to snowball
  161. set {_lore::*} to "&7カケラ未設定" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  162. set {_iconname} to "&7---"
  163. else if {mnmn::sys.sb::%{_name}%::layout::%{_fieldx}%,%{_fieldy}%} is "3":
  164. set {_icon} to glowstone dust
  165. set {_lore::*} to "&e&lボード終了地点" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  166. set {_iconname} to "&7---"
  167. else:
  168. set {_icon} to light gray stained glass pane
  169. set {_lore::*} to "&8カケラ設定不可" and "&f座標: (%{_fieldx}%,%{_fieldy}%)"
  170. set {_iconname} to "&7---"
  171. if {_x} is 0:
  172. set slot {_slot} of player's current inventory to {_icon} named "&e&l左 &aにスクロールする" with lore {_lore::*}
  173. if {_y} is 5:
  174. set slot {_slot} of player's current inventory to {_icon} named "&e横 &aの移動量を &e上げる" with lore {_lore::*}
  175. if {_y} is 0:
  176. set slot {_slot} of player's current inventory to {_icon} named "&e横 &aの移動量を &e下げる" with lore {_lore::*}
  177. else if {_x} is 8:
  178. set slot {_slot} of player's current inventory to {_icon} named "&e&l右 &aにスクロールする" with lore {_lore::*}
  179. if {_y} is 5:
  180. set slot {_slot} of player's current inventory to {_icon} named "&e縦 &aの移動量を &e上げる" with lore {_lore::*}
  181. if {_y} is 0:
  182. set slot {_slot} of player's current inventory to {_icon} named "&e縦 &aの移動量を &e下げる" with lore {_lore::*}
  183. else if {_y} is 0:
  184. set slot {_slot} of player's current inventory to {_icon} named "&e&l下 &aにスクロールする" with lore {_lore::*}
  185. else if {_y} is 5:
  186. set slot {_slot} of player's current inventory to {_icon} named "&e&l上 &aにスクロールする" with lore {_lore::*}
  187. else:
  188. set slot {_slot} of player's current inventory to {_icon} named "%{_iconname}%" with lore {_lore::*}
  189. add 1 to {_x}
  190. add 1 to {_y}
  191.  
  192. on inventory click:
  193. if name of player's current inventory contains "&4&lSkill &1&lBoard":
  194. cancel event
  195. if {mnmn::player::%player%::skillboard::move.x} is not set:
  196. set {mnmn::player::%player%::skillboard::move.x} to 1
  197. if {mnmn::player::%player%::skillboard::move.y} is not set:
  198. set {mnmn::player::%player%::skillboard::move.y} to 1
  199. if name of clicked item contains "左 ":
  200. remove {mnmn::player::%player%::skillboard::move.x} from {mnmn::player::%player%::skillboard::coord.x}
  201. execute player command "/sb"
  202. if name of clicked item contains "右 ":
  203. add {mnmn::player::%player%::skillboard::move.x} to {mnmn::player::%player%::skillboard::coord.x}
  204. execute player command "/sb"
  205. if name of clicked item contains "下 ":
  206. remove {mnmn::player::%player%::skillboard::move.y} from {mnmn::player::%player%::skillboard::coord.y}
  207. execute player command "/sb"
  208. if name of clicked item contains "上 ":
  209. add {mnmn::player::%player%::skillboard::move.y} to {mnmn::player::%player%::skillboard::coord.y}
  210. execute player command "/sb"
  211. if name of clicked item contains "縦" and "上げる":
  212. if {mnmn::player::%player%::skillboard::move.y} >= 10:
  213. message "&cこれ以上上がりません"
  214. else:
  215. add 1 to {mnmn::player::%player%::skillboard::move.y}
  216. message "&a%{mnmn::player::%player%::skillboard::move.y}%に設定しました"
  217. execute player command "/sb"
  218. if name of clicked item contains "縦" and "下げる":
  219. if {mnmn::player::%player%::skillboard::move.y} <= 1:
  220. message "&cこれ以上下がりません"
  221. else:
  222. add -1 to {mnmn::player::%player%::skillboard::move.y}
  223. message "&a%{mnmn::player::%player%::skillboard::move.y}%に設定しました"
  224. execute player command "/sb"
  225. if name of clicked item contains "横" and "上げる":
  226. if {mnmn::player::%player%::skillboard::move.x} >= 10:
  227. message "&cこれ以上上がりません"
  228. else:
  229. add 1 to {mnmn::player::%player%::skillboard::move.x}
  230. message "&a%{mnmn::player::%player%::skillboard::move.x}%に設定しました"
  231. execute player command "/sb"
  232. if name of clicked item contains "横" and "下げる":
  233. if {mnmn::player::%player%::skillboard::move.x} <= 1:
  234. message "&cこれ以上下がりません"
  235. else:
  236. add -1 to {mnmn::player::%player%::skillboard::move.x}
  237. message "&a%{mnmn::player::%player%::skillboard::move.x}%に設定しました"
  238. execute player command "/sb"
  239. if name of clicked item contains "設定":
  240. if {mnmn::player::%player%::status::ap} is not set:
  241. set {mnmn::player::%player%::status::ap} to 0
  242. if {mnmn::player::%player%::status::ap} <= 0:
  243. message "&cアトリビュートポイントが足りません"
  244. execute player command "/sb"
  245. stop
  246. set {mnmn::temp::skillboard.clickedslot::%player%} to clicked slot
  247. open chest with 1 rows named "&4Select Attributes-Piece" to player
  248. wait a tick
  249. set slot 0 of player's current inventory to barrier named "&7キャンセル" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%"
  250. set slot 2 of player's current inventory to red dye named "&c&l赤 &cのカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&c割り振り済み: &l%{mnmn::player::%player%::attributes::1}%"
  251. set slot 3 of player's current inventory to orange dye named "&6&l橙 &6のカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&6割り振り済み: &l%{mnmn::player::%player%::attributes::2}%"
  252. set slot 4 of player's current inventory to yellow dye named "&e&l黄 &eのカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&e割り振り済み: &l%{mnmn::player::%player%::attributes::3}%"
  253. set slot 5 of player's current inventory to lime dye named "&a&l緑 &aのカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&a割り振り済み: &l%{mnmn::player::%player%::attributes::4}%"
  254. set slot 6 of player's current inventory to light blue dye named "&b&l青 &bのカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&b割り振り済み: &l%{mnmn::player::%player%::attributes::5}%"
  255. set slot 7 of player's current inventory to cyan dye named "&9&l藍 &9のカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&9割り振り済み: &l%{mnmn::player::%player%::attributes::6}%"
  256. set slot 8 of player's current inventory to purple dye named "&d&l紫 &dのカケラ&fを設定する" with lore "&3所持AP: &l%{mnmn::player::%player%::status::ap}%" and "&d割り振り済み: &l%{mnmn::player::%player%::attributes::7}%"
  257. else if name of player's current inventory contains "&4Select Attributes-Piece":
  258. cancel event
  259. set {_x} to mod({mnmn::temp::skillboard.clickedslot::%player%},9)
  260. set {_y} to 5-floor({mnmn::temp::skillboard.clickedslot::%player%}/9)
  261. add {mnmn::player::%player%::skillboard::coord.x} to {_x}
  262. add {mnmn::player::%player%::skillboard::coord.y} to {_y}
  263. if name of clicked item contains "キャンセル":
  264. execute player command "/sb"
  265. stop
  266. add -1 to {mnmn::player::%player%::status::ap}
  267. if name of clicked item contains "赤":
  268. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 1
  269. add 1 to {mnmn::player::%player%::attributes::1}
  270. execute player command "/sb"
  271. if name of clicked item contains "橙":
  272. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 2
  273. add 1 to {mnmn::player::%player%::attributes::2}
  274. execute player command "/sb"
  275. if name of clicked item contains "黄":
  276. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 3
  277. add 1 to {mnmn::player::%player%::attributes::3}
  278. execute player command "/sb"
  279. if name of clicked item contains "緑":
  280. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 4
  281. add 1 to {mnmn::player::%player%::attributes::4}
  282. execute player command "/sb"
  283. if name of clicked item contains "青":
  284. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 5
  285. add 1 to {mnmn::player::%player%::attributes::5}
  286. execute player command "/sb"
  287. if name of clicked item contains "藍":
  288. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 6
  289. add 1 to {mnmn::player::%player%::attributes::6}
  290. execute player command "/sb"
  291. if name of clicked item contains "紫":
  292. set {mnmn::player::%player%::skillboard::status::%{_x}%,%{_y}%} to 7
  293. add 1 to {mnmn::player::%player%::attributes::7}
  294. execute player command "/sb"
  295.  
  296.  
  297.  
  298. on death:
  299. attacker is a player
  300. wait 3 ticks
  301. loop 3 times:
  302. chance of 25%:
  303. drop a bonemeal named "&f&l白のカケラ" with lore "&7色のついていないカケラ" and "&7他の色に変換することができそうだ" at location of victim
  304. if victim is a player:
  305. chance of 4%:
  306. drop a red dye named "&c&l赤のカケラ" with lore "&a赤色のカケラ" and "&a炎の象徴の色だ" at location of victim
  307. chance of 4%:
  308. drop a orange dye named "&6&l橙のカケラ" with lore "&b橙色のカケラ" and "&b地の象徴の色だ" at location of victim
  309. chance of 4%:
  310. drop a yellow dye named "&e&l黄のカケラ" with lore "&9黄色のカケラ" and "&9光の象徴の色だ" at location of victim
  311. chance of 4%:
  312. drop a lime dye named "&a&l緑のカケラ" with lore "&d緑色のカケラ" and "&d木の象徴の色だ" at location of victim
  313. chance of 4%:
  314. drop a light blue dye named "&b&l青のカケラ" with lore "&c青色のカケラ" and "&c風の象徴の色だ" at location of victim
  315. chance of 4%:
  316. drop a cyan dye named "&9&l藍のカケラ" with lore "&6藍色のカケラ" and "&6水の象徴の色だ" at location of victim
  317. chance of 4%:
  318. drop a purple dye named "&d&l紫のカケラ" with lore "&e紫色のカケラ" and "&e闇の象徴の色だ" at location of victim
  319.  
  320.  
  321.  
  322. on place of hopper:
  323. set {_loc} to location of event-block
  324. if block 1 below {_loc} is coal block:
  325. give a hopper named "&f&l抽出機 &7&l&o[C]" with lore "&e残り耐久値&7:&f 20" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 45" to player
  326. set block 1 below {_loc} to air
  327. else if block 1 below {_loc} is iron block:
  328. give a hopper named "&f&l抽出機 &f&l&o[I]" with lore "&e残り耐久値&7:&f 35" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 60" to player
  329. set block 1 below {_loc} to air
  330. else if block 1 below {_loc} is gold block:
  331. give a hopper named "&f&l抽出機 &e&l&o[G]" with lore "&e残り耐久値&7:&f 10" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 95" to player
  332. set block 1 below {_loc} to air
  333. else if block 1 below {_loc} is diamond block:
  334. give a hopper named "&f&l抽出機 &b&l&o[D]" with lore "&e残り耐久値&7:&f 50" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 75" to player
  335. set block 1 below {_loc} to air
  336. else if block 1 below {_loc} is emerald block:
  337. give a hopper named "&f&l抽出機 &a&l&o[E]" with lore "&e残り耐久値&7:&f 20" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 85" to player
  338. set block 1 below {_loc} to air
  339. else if block 1 below {_loc} is lapis block:
  340. give a hopper named "&f&l抽出機 &9&l&o[L]" with lore "&e残り耐久値&7:&f 20" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 30" to player
  341. set block 1 below {_loc} to air
  342. else if block 1 below {_loc} is redstone block:
  343. give a hopper named "&f&l抽出機 &c&l&o[R]" with lore "&e残り耐久値&7:&f 1" , "&b貯蔵FP&7:&f 0" and "&6成功確率(%%)&7:&f 90" to player
  344. set block 1 below {_loc} to air
  345. else:
  346. stop
  347. set block at {_loc} to air
  348.  
  349. command /canexcfp <text> [<integer>]:
  350. permission: mnmn.canexcfp
  351. aliases: /.cef
  352. trigger:
  353. if arg 1 is "add":
  354. arg 2 is set
  355. add player's held item to {canexcfp::*}
  356. set {_id} to "%player's held item%"
  357. set {canexcfp.rate::%{_id}%} to arg 2
  358. if arg 1 is "remove":
  359. remove all player's held item from {canexcfp::*}
  360. set {_id} to "%player's held item%"
  361. clear {canexcfp.rate::%{_id}%}
  362. if arg 1 is "check":
  363. message "Id: %player's held item% / Rate: %{canexcfp.rate::%player's held item%}%"
  364. if arg 1 is "list":
  365. loop {canexcfp.rate::*}:
  366. message "%loop-index%: %loop-value%"
  367.  
  368. on rightclick with hopper:
  369. name of player's held item contains "抽出機"
  370. set {close.hopper::%player%} to false
  371. open virtual hopper inventory named "&0&l抽出機" to player
  372. while {close.hopper::%player%} is false:
  373. set {_lore1::*} to line 1 of lore of player's held item parsed as "%text% %number%"
  374. set {_lore2::*} to line 2 of lore of player's held item parsed as "%text% %number%"
  375. set {_lore3::*} to line 3 of lore of player's held item parsed as "%text% %number%"
  376. format gui slot 0 of player with barrier named "&c&l閉じる" with lore "&f抽出機のステータス" and "&bFP: %{_lore2::2}% &8- &e残り %{_lore1::2}%回 &6(%{_lore3::2}%%%)" to close
  377. command "execute %player% ~ ~ ~ playsound block.anvil.place master @p ~ ~ ~ 0.4 2.0"
  378. set {_exit} to false
  379. while {_exit} is false:
  380. wait 3 tick
  381. set {_cnt} to -1
  382. loop all items in player's current inventory:
  383. wait 3 tick
  384. add 1 to {_cnt}
  385. clear {_id}
  386. clear {_amount}
  387. {canexcfp::*} contains type of loop-item
  388. set {_id} to "%type of loop-item%"
  389. set {_fp} to {_lore2::2}+{canexcfp.rate::%{_id}%}
  390. set line 2 of lore of player's held item to "&b貯蔵FP&7:&f %{_fp}%"
  391. set {_exit} to true
  392. set {_amount} to item amount of loop-item
  393. remove 1 from {_amount}
  394. if {_amount} > 0:
  395. clear slot {_cnt} of player's current inventory
  396. exit loop-3
  397. set {_item} to {_id} parsed as item
  398. set slot {_cnt} of player's current inventory to {_amount} of {_item}
  399. exit loop-3
  400. wait 3 tick
  401.  
  402. on inventory close:
  403. set {close.hopper::%player%} to true
Advertisement
Add Comment
Please, Sign In to add comment