akon1248

MineSystem

Mar 30th, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.18 KB | None | 0 0
  1. on join:
  2. if {login.%UUID of player%} is not set:
  3. set {login.%UUID of player%} to 1
  4. set player's gamemode to adventure
  5. if {minepoint::%UUID of player%} is not set:
  6. set {minepoint::%UUID of player%} to 0
  7. if {minemoney::%UUID of player%} is not set:
  8. set {minemoney::%UUID of player%} to 0
  9. if {minelevel::%UUID of player%} is not set:
  10. set {minelevel::%UUID of player%} to 1
  11. if {needminepoint.%UUID of player%} is not set:
  12. set {needminepoint.%UUID of player%} to 100
  13. updateMineSideBar(player)
  14. function updateMineSideBar(p: player):
  15. wipe {_p} sidebar
  16. set {_uuid} to UUID of {_p}
  17. set name of sidebar of {_p} to "&b&lYour Status"
  18. set score "&aLEVEL: %{minelevel::%{_uuid}%}%" in sidebar of {_p} to 0
  19. set score "&1" in sidebar of {_p} to -1
  20. set score "&ePOINT: %{minepoint::%{_uuid}%}%/%{needminepoint.%{_uuid}%}%" in sidebar of {_p} to -2
  21. set score "&2" in sidebar of {_p} to -3
  22. set score "&3" in sidebar of {_p} to -5
  23. set score "&6MONEY: %{minemoney::%{_uuid}%}%G" in sidebar of {_p} to -6
  24. if {minelevel::%{_uuid}%} is between 1 and 127:
  25. set score "&dHASTEPOWER: %{minelevel::%{_uuid}%}-1%" in sidebar of {_p} to -4
  26. if {minelevel::%{_uuid}%} is greater than or equal to 128:
  27. set score "&dHASTEPOWER: 127" in sidebar of {_p} to -4
  28. command /money [<text>] [<player>] [<number>]:
  29. trigger:
  30. if player has permission "sk.command.money":
  31. if arg-1 is not set:
  32. send "&bあなたの所持金:&6%{minemoney::%UUID of player%}%G"
  33. stop
  34. if arg-1 is not "set" or "add" or "send" or "remove":
  35. send "&c使用法: /money または /money <add|remove|send|set> <プレイヤー> <数値>"
  36. stop
  37. if arg-2 is not set:
  38. send "&c使用法: /money または /money <add|remove|send|set> <プレイヤー> <数値>"
  39. stop
  40. if arg-3 is not set:
  41. send "&c使用法: /money または /money <add|remove|send|set> <プレイヤー> <数値>"
  42. stop
  43. if arg-1 is "add":
  44. if arg-3 is greater than or equal to 1:
  45. updateMineSideBar(arg-2)
  46. add arg-3 to {minemoney::%arg-2%}
  47. send "&3%arg-2%&bの所持金に&6%arg-3%G&b追加しました"
  48. stop
  49. if arg-3 is smaller than or equal to 0:
  50. send "&c1以上の数値を指定してください"
  51. stop
  52. if arg-1 is "remove":
  53. if arg-3 is greater than or equal to 1:
  54. updateMineSideBar(arg-2)
  55. remove arg-3 from {minemoney::%arg-2%}
  56. send "&3%arg-2%&bの所持金を&6%arg-3%G&b減らしました"
  57. stop
  58. if arg-3 is smaller than or equal to 0:
  59. send "1以上の数値を指定してください"
  60. stop
  61. if arg-1 is "set":
  62. if arg-3 is greater than or equal to 0:
  63. updateMineSideBar(arg-2)
  64. set {minemoney::%arg-2%} to arg-3
  65. send "&3%arg-2%&bの所持金を&6%arg-3%G&bにしました"
  66. stop
  67. if arg-3 is smaller than or equal to -1:
  68. send "0以上の数値を指定してください"
  69. stop
  70. if arg-1 is "send":
  71. if arg-2 is player:
  72. send "&c自分自身に送ることはできません"
  73. stop
  74. else:
  75. if {minemoney::%UUID of player%} is greater than or equal to arg-3:
  76. if arg-3 is greater than or equal to 1:
  77. updateMineSideBar(arg-2)
  78. updateMineSideBar(player)
  79. add arg-3 to {minemoney::%arg-2%}
  80. remove arg-3 from {minemoney::%UUID of player%}
  81. send "&3%arg-2%さん&bに&6%arg-3%G&b送りました"
  82. send "&3%player%さん&bから&6%arg-3%G&b受け取りました" to arg-2
  83. stop
  84. if arg-3 is smaller than or equal to 0:
  85. send "&c1以上の数値を指定してください"
  86. stop
  87. if {minemoney::%UUID of player%} is not greater than or equal to arg-3:
  88. send "&c所持金が足りません"
  89. stop
  90. if player doesn't have permission "sk.command.money":
  91. if arg-1 is not set:
  92. send "&bあなたの所持金:&6%{minemoney::%UUID of player%}%G"
  93. stop
  94. if arg-1 is not "send":
  95. send "&c使用法: /money または /money send <プレイヤー> <数値>"
  96. stop
  97. if arg-2 is not set:
  98. send "&c使用法: /money または /money send <プレイヤー> <数値>"
  99. stop
  100. if arg-3 is not set:
  101. send "&c使用法: /money または /money send <プレイヤー> <数値>"
  102. stop
  103. if arg-1 is "send":
  104. if arg-2 is player:
  105. send "&c自分自身に送ることはできません"
  106. stop
  107. else:
  108. if {minemoney::%UUID of player%} is greater than or equal to arg-3:
  109. if arg-3 is greater than or equal to 1:
  110. updateMineSideBar(arg-2)
  111. updateMineSideBar(player)
  112. add arg-3 to {minemoney::%arg-2%}
  113. remove arg-3 from {minemoney::%UUID of player%}
  114. send "&3%arg-2%さん&bに&6%arg-3%G&b送りました"
  115. send "&3%player%さん&bから&6%arg-3%G&b受け取りました" to arg-2
  116. stop
  117. if arg-3 is smaller than or equal to 0:
  118. send "&c1以上の数値を指定してください"
  119. stop
  120. if {minemoney::%UUID of player%} is not greater than or equal to arg-3:
  121. send "&c所持金が足りません"
  122. stop
  123. on mine:
  124. player's gamemode is not creative
  125. if event-block is coal ore:
  126. cancel event
  127. updateMineSideBar(player)
  128. set {emptyore.%event-location%} to event-location
  129. set block at event-location to cobble block
  130. add coal ore to player's inventory
  131. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  132. add 1 to {minepoint::%UUID of player%}
  133. wait 10 second
  134. set block at event-location to coal ore
  135. delete {emptyore.%event-location%}
  136. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  137. if event-block is iron ore:
  138. cancel event
  139. updateMineSideBar(player)
  140. set {emptyore.%event-location%} to event-location
  141. set block at event-location to cobble block
  142. add iron ore to player's inventory
  143. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  144. add 3 to {minepoint::%UUID of player%}
  145. wait 10 second
  146. set block at event-location to iron ore
  147. delete {emptyore.%event-location%}
  148. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  149. if event-block is lapis ore:
  150. cancel event
  151. updateMineSideBar(player)
  152. set {emptyore.%event-location%} to event-location
  153. set block at event-location to cobble block
  154. add lapis ore to player's inventory
  155. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  156. add 5 to {minepoint::%UUID of player%}
  157. wait 10 second
  158. set block at event-location to lapis ore
  159. delete {emptyore.%event-location%}
  160. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  161. if event-block is gold ore:
  162. cancel event
  163. updateMineSideBar(player)
  164. set {emptyore.%event-location%} to event-location
  165. set block at event-location to cobble block
  166. add gold ore to player's inventory
  167. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  168. add 10 to {minepoint::%UUID of player%}
  169. wait 10 second
  170. set block at event-location to gold ore
  171. delete {emptyore.%event-location%}
  172. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  173. if event-block is diamond ore:
  174. cancel event
  175. updateMineSideBar(player)
  176. set {emptyore.%event-location%} to event-location
  177. set block at event-location to cobble block
  178. add diamond ore to player's inventory
  179. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  180. add 12 to {minepoint::%UUID of player%}
  181. wait 10 second
  182. set block at event-location to diamond ore
  183. delete {emptyore.%event-location%}
  184. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  185. if event-block is nether quartz ore:
  186. cancel event
  187. updateMineSideBar(player)
  188. set {emptyore.%event-location%} to event-location
  189. set block at event-location to cobble block
  190. add nether quartz ore to player's inventory
  191. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  192. add 15 to {minepoint::%UUID of player%}
  193. wait 10 second
  194. set block at event-location to nether quartz ore
  195. delete {emptyore.%event-location%}
  196. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  197. if event-block is emerald ore:
  198. cancel event
  199. updateMineSideBar(player)
  200. set {emptyore.%event-location%} to event-location
  201. set block at event-location to cobble block
  202. add emerald ore to player's inventory
  203. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  204. add 20 to {minepoint::%UUID of player%}
  205. wait 10 second
  206. set block at event-location to emerald ore
  207. delete {emptyore.%event-location%}
  208. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  209. if event-block is obsidian:
  210. cancel event
  211. updateMineSideBar(player)
  212. set {emptyore.%event-location%} to event-location
  213. set block at event-location to cobble block
  214. add obsidian to player's inventory
  215. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  216. add 50 to {minepoint::%UUID of player%}
  217. wait 10 second
  218. set block at event-location to obsidian
  219. delete {emptyore.%event-location%}
  220. show 30 Villager Happy particle at event-location offset by 0.35, 0.35, 0.35
  221. on break:
  222. if event-location is {emptyore.%event-location%}:
  223. cancel event
  224. on break:
  225. player's gamemode is not creative
  226. cancel event
  227. on place:
  228. player's gamemode is not creative
  229. cancel event
  230. every tick:
  231. loop all players:
  232. set {levelranking::%loop-player%} to {minelevel::%UUID of loop-player%}
  233. if loop-player have permission "sk.admin":
  234. loop-player do not have permission "sk.command.enderchest"
  235. execute console command "pex user %loop-player% add sk.command.enderchest"
  236. else:
  237. loop-player have permission "sk.command.enderchest"
  238. execute console command "pex user %loop-player% add -sk.command.enderchest"
  239. command /enderchest [<offline player>] [<text>]:
  240. permission: sk.command.enderchest
  241. permission message: Unknown command. Type "/help" for help
  242. trigger:
  243. if arg-2 is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
  244. send "&c使用法: /enderchest <player> <1~9>"
  245. else:
  246. play sound "block_enderchest_open" to player with volume 1 and pitch 5
  247. execute console command "/menu create enderchest-%UUID of arg-1%-%arg-2% 6 &5エンダーチェスト &5番号: &d%arg-2%"
  248. execute console command "/menu edit %player% enderchest-%UUID of arg-1%-%arg-2%"
  249. on right click:
  250. event-block is ender chest
  251. play sound "block_enderchest_open" to player with volume 1 and pitch 5
  252. cancel event
  253. open chest with 1 row named "&5&l開くエンダーチェストを選択" to player
  254. wait 1 tick
  255. format slot 0 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d1" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 1"]
  256. format slot 1 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d2" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 2"]
  257. format slot 2 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d3" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 3"]
  258. format slot 3 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d4" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 4"]
  259. format slot 4 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d5" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 5"]
  260. format slot 5 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d6" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 6"]
  261. format slot 6 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d7" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 7"]
  262. format slot 7 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d8" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 8"]
  263. format slot 8 of player with ender chest named "&5エンダーチェスト" with lore "&5番号: &d9" to run [execute console command "/superexecute %player% sk.command.enderchest /enderchest %player% 9"]
  264. command /superexecute [<player>] [<text>] [<text>]:
  265. permission: sk.command.superexecute
  266. permission message: &cYou don't have permission.
  267. trigger:
  268. if arg-3 is not set:
  269. send "&c使用法: /superexecute <player> <permission> <command>"
  270. else:
  271. execute console command "pex user %arg-1% add %arg-2%"
  272. execute arg-1 command arg-3
  273. execute console command "pex user %arg-1% add -%arg-2%"
  274. on drop:
  275. player's gamemode is not creative
  276. cancel event
  277. every tick:
  278. loop all players:
  279. set level of loop-player to {minelevel::%UUID of loop-player%}
  280. set level progress of loop-player to {minepoint::%UUID of loop-player%}/{needminepoint.%UUID of loop-player%}
  281. if {minelevel::%UUID of loop-player%} is smaller than or equal to 90:
  282. set {def::%UUID of loop-player%} to {minelevel::%UUID of loop-player%}-1
  283. if {minelevel::%UUID of loop-player%} is greater than or equal to 91:
  284. set {def::%UUID of loop-player%} to 90
  285. if {minepoint::%UUID of loop-player%} is greater than or equal to {needminepoint.%UUID of loop-player%}:
  286. set {minepoint::%UUID of loop-player%} to {minepoint::%UUID of loop-player%}-{needminepoint.%UUID of loop-player%}
  287. set {needminepoint.%UUID of loop-player%} to {needminepoint.%UUID of loop-player%}*1.05
  288. set {needminepoint.%UUID of loop-player%} to round({needminepoint.%UUID of loop-player%})/10
  289. set {needminepoint.%UUID of loop-player%} to round({needminepoint.%UUID of loop-player%})
  290. set {needminepoint.%UUID of loop-player%} to {needminepoint.%UUID of loop-player%}*10
  291. add 1 to {minelevel::%UUID of loop-player%}
  292. send loop-player title "&a&lLEVEL UP" with subtitle "&aYour are now LEVEL %{minelevel::%UUID of loop-player%}%!" for 1 seconds with 0 seconds fade in and 0.5 seconds fade out
  293. play sound "entity_player_levelup" to loop-player with volume 1 and pitch 5
  294. updateMineSideBar(loop-player)
  295. on xp spawn:
  296. cancel event
  297. every tick:
  298. loop all players:
  299. if {minelevel::%UUID of loop-player%} is between 2 and 128:
  300. execute console command "execute %loop-player% ~ ~ ~ effect @s minecraft:haste 1 %{minelevel::%UUID of loop-player%}-2% true"
  301. if {minelevel::%UUID of loop-player%} is greater than or equal to 129:
  302. execute console command "execute %loop-player% ~ ~ ~ effect @s minecraft:haste 1 127 true"
  303. command /resetlevel [<offline player>] [<text>]:
  304. permission: sk.command.resetlevel
  305. permission message: &cYou don't have permission.
  306. trigger:
  307. if arg-1 is not set:
  308. send "&c使用法: /resetlevel <プレイヤー>"
  309. stop
  310. if arg-1 is set:
  311. if {login.%UUID of arg-1%} is not set:
  312. send "&cそのプレイヤーはこのサーバーにログインしたことがありません%nl%&c使用法: /resetlevel <プレイヤー>"
  313. stop
  314. if {arg-2} is set:
  315. send "&cコマンドの入力形式にミスがあります%nl%&c使用法: /resetlevel <player>"
  316. stop
  317. else:
  318. updateMineSideBar(arg-1)
  319. set {needminepoint.%arg-1%} to 100
  320. set {minepoint::%arg-1%} to 0
  321. set {minelevel::%arg-1%} to 1
  322. send "&3%arg-1%&bのレベルに関連するステータスの値をリセットしました"
  323. on hunger bar change:
  324. set player's food to 10
  325. command /ranking:
  326. trigger:
  327. set {_high} to 0
  328. loop {levelranking::*}:
  329. set {_levelranking::%loop-index%} to loop-value
  330. loop 3 times:
  331. loop {_levelranking::*}:
  332. if loop-value-2 is greater than {_high}:
  333. set {_high} to loop-value-2
  334. set {_highplayer} to loop-index
  335. if loop-number is 1:
  336. message "&7=======&3Ranking&7=======%nl%%nl%&6&l%loop-number%st &b%{_highplayer}% &aLEVEL %{_high}%%nl%"
  337. if loop-number is 2:
  338. message "&7&l%loop-number%nd &b%{_highplayer}% &aLEVEL %{_high}%%nl%"
  339. if loop-number is 3:
  340. message "&c&l%loop-number%rd &b%{_highplayer}% &aLEVEL %{_high}%%nl%%nl%&7====================="
  341. set {_high} to 0
  342. delete {_levelranking::%{_highplayer}%}
  343. on damage:
  344. victim is a player
  345. cancel event
  346. on rightclick:
  347. id of clicked block is 145
  348. player's gamemode is not creative
  349. cancel event
  350. on rightclick on crafting table:
  351. player's gamemode is not creative
  352. cancel event
  353. on rightclick on stone button:
  354. player's gamemode is not creative
  355. cancel event
  356. on click on note block:
  357. player's gamemode is not creative
  358. cancel event
  359. on craft:
  360. player's gamemode is not creative
  361. cancel event
  362. command /firstjoinreset [<offline player>] [<text>]:
  363. aliases: /fjr
  364. permission: sk.command.fjr
  365. permission message: &cYou don't have permission.
  366. trigger:
  367. if arg-1 is not set:
  368. send "&c使用法: /firstjoinreset <プレイヤー>"
  369. stop
  370. if {login.%UUID of arg-1%} is not set:
  371. send "&c使用法: /firstjoinreset <プレイヤー>"
  372. stop
  373. if arg-2 is set:
  374. send "&c使用法: /firstjoinreset <プレイヤー>"
  375. stop
  376. else:
  377. delete {login.%UUID of arg-1%}
  378. kick arg-1 due to "&c再度ログインし直してください"
  379. send "&3%arg-1%&bの初ログインフラグを消去しました"
  380. stop
Advertisement
Add Comment
Please, Sign In to add comment