7mm

Skript: Fishing

7mm
Feb 9th, 2019
1,659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.64 KB | None | 0 0
  1. on join:
  2. wait a second
  3. command "/init %player%"
  4.  
  5. command /hey <player>:
  6. trigger:
  7. set {hey::%arg 1%} to true
  8. message "&c&lHey! &7%player%さんに呼び出しされました" to arg 1
  9. message "&7動くとアラームは止まります" to arg 1
  10. message "&a%arg 1%さんを呼び出しました"
  11. while {hey::%arg 1%} is set:
  12. loop 7 times:
  13. command "execute %arg 1% ~ ~ ~ playsound minecraft:block.note.pling master @s ~ ~ ~ 1.0 1.5"
  14. wait 2 tick
  15. wait 7 tick
  16.  
  17. on any movement:
  18. clear {hey::%player%}
  19.  
  20. every 2 seconds:
  21. loop all players:
  22. set action bar of loop-player to coloured "&a&lRank %{fishing::%uuid of loop-player%::rank}% &f- %{fishing::%uuid of loop-player%::rankname}%"
  23.  
  24. if stylish scoreboard "status.%loop-player%" does not exist:
  25. create new stylish scoreboard named "status.%loop-player%"
  26. if {fishing::%uuid of loop-player%::sidebar} is not set:
  27. set {fishing::%uuid of loop-player%} to "status"
  28. if {fishing::%uuid of loop-player%::sidebar} is "status":
  29. create a new id based score "status.%loop-player%.1" with text "&a&lRank %{fishing::%uuid of loop-player%::rank}% &f- %{fishing::%uuid of loop-player%::rankname}%" slot -1 for stylish scoreboard "status.%loop-player%"
  30. set {_rankup} to floor((10+{fishing::%uuid of loop-player%::rank})^1.7)
  31. if {fishing::%uuid of loop-player%::rank} < 320:
  32. create a new id based score "status.%loop-player%.2" with text "&d&lXP: &e&l%{fishing::%uuid of loop-player%::xp}%&7&l/&c&l&n%{_rankup}%" slot -2 for stylish scoreboard "status.%loop-player%"
  33. else:
  34. create a new id based score "status.%loop-player%.2" with text "&d&lXP: &e&l%{fishing::%uuid of loop-player%::xp}%&7&l/&c&l&oMAXRANK" slot -2 for stylish scoreboard "status.%loop-player%"
  35. set title of stylish scoreboard "status.%loop-player%" to "&c&lYour Status"
  36. if {fishing::%uuid of loop-player%::sidebar} is "ranking":
  37. set {_cnt} to {fishing::%uuid of loop-player%::sidebar.top}-1
  38. loop 10 times:
  39. add 1 to {_cnt}
  40. if {fishing::-sys::ranking.player::%{_cnt}%} is uuid of loop-player:
  41. create a new id based score "status.%loop-player%.%{_cnt}%" with text "&b&l%{_cnt}%. &c&l%loop-player% &7&l... &c&l%{fishing::-sys::ranking.value::%{_cnt}%}%" slot loop-number*-1 for stylish scoreboard "status.%loop-player%"
  42. else:
  43. set {_playername} to {fishing::-sys::ranking.player::%{_cnt}%} parsed as player
  44. if {_playername} is not set:
  45. set {_playername} to "-"
  46. create a new id based score "status.%loop-player%.%{_cnt}%" with text "&b&l%{_cnt}%. &e&l%{_playername}% &7&l... &6&l%{fishing::-sys::ranking.value::%{_cnt}%}%" slot loop-number*-1 for stylish scoreboard "status.%loop-player%"
  47. clear {_playername}
  48. create a new id based score "status.%loop-player%.11" with text "&e&l%{fishing::-sys::ranking.number::%uuid of loop-player%}%. &d&l%loop-player% &7&l... &d&l%{fishing::-sys::ranking.value::%{fishing::-sys::ranking.number::%uuid of loop-player%}%}%" slot -11 for stylish scoreboard "status.%loop-player%"
  49. set title of stylish scoreboard "status.%loop-player%" to "&d&lRank Ranking"
  50. set stylish scoreboard of loop-player to "status.%loop-player%"
  51.  
  52. command /rk:
  53. trigger:
  54. loop 10 times:
  55. add 1 to {_cnt}
  56. message "%{_cnt}% %{fishing::-sys::ranking.value::%{_cnt}%}% %{fishing::-sys::ranking.player::%{_cnt}%}%"
  57.  
  58. command /status:
  59. trigger:
  60. message "&aサイドバーを&7「&c&lYour Status&7」&aに変更しました"
  61. delete stylish scoreboard "status.%player%"
  62. set {fishing::%uuid of player%::sidebar} to "status"
  63.  
  64. command /ranking [<text>]:
  65. trigger:
  66. if arg 1 is not set:
  67. message "&aサイドバーを&7「&c&lRank Ranking&7」&aに変更しました"
  68. delete stylish scoreboard "status.%player%"
  69. set {fishing::%uuid of player%::sidebar} to "ranking"
  70. set {fishing::%uuid of player%::sidebar.top} to 1
  71. else if arg 1 is "my":
  72. message "&aサイドバーを&7「&c&lRank Ranking&7」&aに変更しました"
  73. delete stylish scoreboard "status.%player%"
  74. set {fishing::%uuid of player%::sidebar} to "ranking"
  75. set {fishing::%uuid of player%::sidebar.top} to {fishing::-sys::ranking.number::%player%}-4
  76. if {fishing::%uuid of player%::sidebar.top} < 1:
  77. set {fishing::%uuid of player%::sidebar.top} to 1
  78. if {fishing::-sys::ranking.amount} < 10:
  79. set {fishing::%uuid of player%::sidebar.top} to 1
  80. else if {fishing::%uuid of player%::sidebar.top} > {fishing::-sys::ranking.amount}-9:
  81. set {fishing::%uuid of player%::sidebar.top} to {fishing::-sys::ranking.amount}-9
  82. else:
  83. set {_arg1} to arg 1 parsed as integer
  84. if {_arg1} is set:
  85. message "&aサイドバーを&7「&c&lRank Ranking&7」&aに変更しました"
  86. delete stylish scoreboard "status.%player%"
  87. set {fishing::%uuid of player%::sidebar} to "ranking"
  88. set {fishing::%uuid of player%::sidebar.top} to {_arg1}
  89. if {fishing::%uuid of player%::sidebar.top} < 1:
  90. set {fishing::%uuid of player%::sidebar.top} to 1
  91. if {fishing::-sys::ranking.amount} < 10:
  92. set {fishing::%uuid of player%::sidebar.top} to 1
  93. else if {fishing::%uuid of player%::sidebar.top} > {fishing::-sys::ranking.amount}-9:
  94. set {fishing::%uuid of player%::sidebar.top} to {fishing::-sys::ranking.amount}-9
  95.  
  96. command /rankingreset:
  97. permission: fishing.command.rankingreset
  98. trigger:
  99. clear {fishing::-sys::*}
  100. set {fishing::-sys::ranking.amount} to 10
  101. loop 10 times:
  102. add "-%loop-number%" to {fishing::-sys::ranking.player::*}
  103. add -1 to {fishing::-sys::ranking.value::*}
  104.  
  105. command /rankingset <player>:
  106. permission: fishing.command.rankingadd
  107. trigger:
  108. if arg 1 has permission "fishing.rankingset":
  109. stop
  110. set {_p} to {fishing::-sys::ranking.number::%uuid of arg 1%}
  111. if {_p} is set:
  112. set {fishing::-sys::ranking.value::%{_p}%} to {fishing::%uuid of arg 1%::rank}
  113. else:
  114. add 1 to {fishing::-sys::ranking.amount}
  115. set {fishing::-sys::ranking.value::%{fishing::-sys::ranking.amount}%} to {fishing::%uuid of arg 1%::rank}
  116. set {fishing::-sys::ranking.player::%{fishing::-sys::ranking.amount}%} to uuid of arg 1
  117. set {fishing::-sys::ranking.number::%uuid of arg 1%} to {fishing::-sys::ranking.amount}
  118. command "/rankingreplace"
  119.  
  120. command /rankingreplace:
  121. permission: fishing.command.rankingreplace
  122. trigger:
  123. set {_high} to -2
  124. loop {fishing::-sys::ranking.value::*}:
  125. set {_value::%{fishing::-sys::ranking.player::%loop-index%}%} to loop-value
  126. add 1 to {_cnt}
  127. loop {fishing::-sys::ranking.amount} times:
  128. loop {_value::*}:
  129. loop-value-2 > {_high}
  130. set {_high} to loop-value-2
  131. set {_highplayer} to loop-index
  132. set {fishing::-sys::ranking.value::%loop-number%} to {_high}
  133. set {fishing::-sys::ranking.player::%loop-number%} to {_highplayer}
  134. set {fishing::-sys::ranking.number::%{_highplayer}%} to loop-number
  135. set {_high} to -2
  136. clear {_value::%{_highplayer}%}
  137. clear {_highplayer}
  138.  
  139. command /init <player>:
  140. permission: fishing.command.init
  141. trigger:
  142. if {fishing::%uuid of player%::rank} is not set:
  143. command "/clearrank %player%"
  144.  
  145. command /skr:
  146. permission: fishing.command.skr
  147. trigger:
  148. execute player command "skript reload scripts"
  149.  
  150. command /givexp <player> <integer>:
  151. permission: fishing.command.givexp
  152. trigger:
  153. message "&b%arg 2%XP &aを獲得しました" to arg 1
  154. add arg-2 to {fishing::%uuid of arg-1%::xp}
  155. if {fishing::%uuid of arg-1%::rank} >= 320:
  156. stop
  157. set {_rankup} to floor((10+{fishing::%uuid of arg-1%::rank})^1.7)
  158. while {fishing::%uuid of arg-1%::xp} >= {_rankup}:
  159. if {fishing::%uuid of arg-1%::rank} = 320:
  160. exit loop
  161. remove {_rankup} from {fishing::%uuid of arg-1%::xp}
  162. add 1 to {fishing::%uuid of arg-1%::rank}
  163. set {_rankup} to floor((10+{fishing::%uuid of arg-1%::rank})^1.7)
  164. message "&c==============================" to arg 1
  165. broadcast "&e&l&o%arg-1% &c&lRANKUP! &6&l[ %{fishing::%uuid of arg-1%::rank}% ]"
  166. if {fishing::%uuid of arg-1%::rank} < 320:
  167. message "&d&lNEXT: &c&l&n%{_rankup}%" to arg 1
  168. else:
  169. message "&c&lMAX RANK!"
  170. message "&c==============================" to arg 1
  171. command "/rankingset %arg 1%"
  172. command "/setrankname %arg 1%"
  173.  
  174. command /clearrank <player>:
  175. permission: fishing.command.clearrank
  176. trigger:
  177. command "/setxp %arg 1% 0"
  178. command "/setrank %arg 1% 0"
  179.  
  180. command /setrank <player> <integer>:
  181. permission: fishing.command.setrank
  182. trigger:
  183. set {fishing::%uuid of arg-1%::rank} to arg 2
  184. command "/setrankname %arg 1%"
  185. command "/rankingset %arg 1%"
  186.  
  187. command /setxp <player> <integer>:
  188. permission: fishing.command.setxp
  189. trigger:
  190. set {fishing::%uuid of arg-1%::xp} to arg 2
  191.  
  192. command /setrankname <player>:
  193. permission: fishing.command.setrankname
  194. trigger:
  195. if {fishing::%uuid of arg-1%::rank} < 10:
  196. set {fishing::%uuid of arg-1%::rankname} to "&7Newbie"
  197. else if {fishing::%uuid of arg-1%::rank} < 20:
  198. set {fishing::%uuid of arg-1%::rankname} to "&9Beginner"
  199. else if {fishing::%uuid of arg-1%::rank} < 30:
  200. set {fishing::%uuid of arg-1%::rankname} to "&3Elementary"
  201. else if {fishing::%uuid of arg-1%::rank} < 40:
  202. set {fishing::%uuid of arg-1%::rankname} to "&aNovice"
  203. else if {fishing::%uuid of arg-1%::rank} < 50:
  204. set {fishing::%uuid of arg-1%::rankname} to "&bIntermediate"
  205. else if {fishing::%uuid of arg-1%::rank} < 60:
  206. set {fishing::%uuid of arg-1%::rankname} to "&eAdvanced"
  207. else if {fishing::%uuid of arg-1%::rank} < 70:
  208. set {fishing::%uuid of arg-1%::rankname} to "&6Expert"
  209. else if {fishing::%uuid of arg-1%::rank} < 80:
  210. set {fishing::%uuid of arg-1%::rankname} to "&dSpecialist"
  211. else if {fishing::%uuid of arg-1%::rank} < 90:
  212. set {fishing::%uuid of arg-1%::rankname} to "&cProfessional"
  213. else if {fishing::%uuid of arg-1%::rank} < 100:
  214. set {fishing::%uuid of arg-1%::rankname} to "&5Master"
  215. else if {fishing::%uuid of arg-1%::rank} < 110:
  216. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&7Newbie"
  217. else if {fishing::%uuid of arg-1%::rank} < 120:
  218. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&9Beginner"
  219. else if {fishing::%uuid of arg-1%::rank} < 130:
  220. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&3Elementary"
  221. else if {fishing::%uuid of arg-1%::rank} < 140:
  222. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&aNovice"
  223. else if {fishing::%uuid of arg-1%::rank} < 150:
  224. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&bIntermediate"
  225. else if {fishing::%uuid of arg-1%::rank} < 160:
  226. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&eAdvanced"
  227. else if {fishing::%uuid of arg-1%::rank} < 170:
  228. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&6Expert"
  229. else if {fishing::%uuid of arg-1%::rank} < 180:
  230. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&dSpecialist"
  231. else if {fishing::%uuid of arg-1%::rank} < 190:
  232. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&cProfessional"
  233. else if {fishing::%uuid of arg-1%::rank} < 200:
  234. set {fishing::%uuid of arg-1%::rankname} to "&f&lRe:&5Master"
  235. else if {fishing::%uuid of arg-1%::rank} < 210:
  236. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&7Newbie"
  237. else if {fishing::%uuid of arg-1%::rank} < 220:
  238. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&9Beginner"
  239. else if {fishing::%uuid of arg-1%::rank} < 230:
  240. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&3Elementary"
  241. else if {fishing::%uuid of arg-1%::rank} < 240:
  242. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&aNovice"
  243. else if {fishing::%uuid of arg-1%::rank} < 250:
  244. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&bIntermediate"
  245. else if {fishing::%uuid of arg-1%::rank} < 260:
  246. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&eAdvanced"
  247. else if {fishing::%uuid of arg-1%::rank} < 270:
  248. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&6Expert"
  249. else if {fishing::%uuid of arg-1%::rank} < 280:
  250. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&dSpecialist"
  251. else if {fishing::%uuid of arg-1%::rank} < 290:
  252. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&cProfessional"
  253. else if {fishing::%uuid of arg-1%::rank} < 300:
  254. set {fishing::%uuid of arg-1%::rankname} to "&e&lRe:Re:&5Master"
  255. else if {fishing::%uuid of arg-1%::rank} < 310:
  256. set {fishing::%uuid of arg-1%::rankname} to "&2&lL&a&le&2&lg&a&le&2&ln&a&ld"
  257. else if {fishing::%uuid of arg-1%::rank} < 320:
  258. set {fishing::%uuid of arg-1%::rankname} to "&4&lM&c&ly&4&lt&c&lh&4&lo&c&ll&4&lo&c&lg&4&ly"
  259. else if {fishing::%uuid of arg-1%::rank} = 320:
  260. set {fishing::%uuid of arg-1%::rankname} to "&6&lThe &e&lGod"
  261.  
  262. on chat:
  263. broadcast "&f&l&o(&7&l&o&n%{fishing::%uuid of player%::rank}%&f&l&o) &0[%{fishing::%uuid of player%::rankname}%&0] &f%player%&a: &7%message%"
  264. cancel event
Advertisement
Add Comment
Please, Sign In to add comment