Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2. SYSTEM_PREFIX: &7》
  3. GAME_PREFIX: &9》
  4. MATCH_TIME: 120
  5. STICK_TIME: 30
  6. SHOWDOWN_TIME: 60
  7. DEATHMATCH_TIME: 90
  8. CHEST_ROWS: 6
  9.  
  10. command /sumoadm [<text>] [<text>]:
  11. permission: admin
  12. permission message: §7》 §c必要な権限を持っていません
  13. trigger:
  14. if arg 1 is "waitingpoint":
  15. set {stage.waitingPoint} to location of player
  16. message "{@SYSTEM_PREFIX}&7待機場所を&a%location of player%&7に設定しました"
  17. else if arg 1 is "lobby":
  18. set {lobby} to location of player
  19. message "{@SYSTEM_PREFIX}&7ロビーを&a%location of player%&7に設定しました"
  20. else if arg 1 is "standpoint":
  21. if arg 2 is "A":
  22. set {stage.standPoint::A} to location of player
  23. message "{@SYSTEM_PREFIX}&7プレイヤー&eA&7のスタート地点を&a%location of player%&7に設定しました"
  24. else if arg 2 is "B":
  25. set {stage.standPoint::B} to location of player
  26. message "{@SYSTEM_PREFIX}&7プレイヤー&eB&7のスタート地点を&a%location of player%&7に設定しました"
  27. else:
  28. message "&c使用方法: /sumoadm standpoint <A / B>"
  29. else if arg 1 is "start":
  30. clear {game.result::*}
  31. clear {game.firstJoiners::*}
  32. clear {game.totalRateChange::*}
  33. clear {game.matchTime}
  34. set {game.isStarted} to true
  35. clear inventory of {game.joiners::*}
  36. teleport {game.joiners::*} to {stage.waitingpoint}
  37. set {game.mode} to "RANKED"
  38. loop {game.joiners::*}:
  39. add loop-value to {game.firstJoiners::*}
  40. set slot 4 of player to nether star named "&e総当たり表を確認する"
  41. loop {game.joiners::*}:
  42. if loop-value-1 is not loop-value-2:
  43. set {game.result::%loop-value-1%::%loop-value-2%} to "NONE"
  44. else:
  45. set {game.result::%loop-value-1%::%loop-value-2%} to "MYSELF"
  46. gameLoop()
  47. else if arg 1 is "stop":
  48. loop {game.joiers::*}:
  49. updateTablist(loop-value)
  50. set slot 4 of loop-value to slimeball named "&a参加する"
  51. if loop-value is op:
  52. set slot 8 of ops to prismarine shard named "&b参加プレイヤーを確認する"
  53. clear inventory of {game.joiners::*}
  54. teleport {game.joiners::*} to {lobby}
  55. clear {game.joiners::*}
  56. clear {game.firstJoiners::*}
  57. clear {game.result::*}
  58. clear {game.totalRateChange::*}
  59. set {game.isStarted} to false
  60.  
  61. command /join:
  62. trigger:
  63. if {game.joiners::*} doesn't contain player:
  64. if {game.isStarted} is false:
  65. add player to {game.joiners::*}
  66. play sound "UI_BUTTON_CLICK" to player with volume 1 and pitch 8
  67. broadcast "{@GAME_PREFIX}&e%player%&7がゲームに参加しました"
  68. else:
  69. message "{@GAME_PREFIX}&c既に開始しています"
  70. else:
  71. message "{@GAME_PREFIX}&c既に参加しています"
  72.  
  73. command /evaluate <text>:
  74. permission: admin
  75. trigger:
  76. evaluate arg
  77.  
  78. command /oi <text> <integer> <integer>:
  79. executable by: console
  80. trigger:
  81. openTable(arg 1 parsed as player, arg 2, arg 3)
  82.  
  83. command /forcejoin <text> <player>:
  84. permission: admin
  85. trigger:
  86. if arg 1 is "one":
  87. if arg 2 is set:
  88. if {game.joiners::*} contains arg 2:
  89. message "{@SYSTEM_PREFIX}&cそのプレイヤーはすでに参加しています"
  90. else:
  91. make arg 2 execute command "join"
  92. else:
  93. message "{@SYSTEM_PREFIX}&c引数が足りません"
  94. else if arg 1 is "all":
  95. loop getNotJoinedPlayers():
  96. make loop-value execute command "join"
  97.  
  98. on drop:
  99. cancel event
  100.  
  101. on damage of player:
  102. if {game.isStarted} is false:
  103. cancel event
  104. else if {game.joiners::*} doesn't contain victim:
  105. cancel event
  106. else if {game.isMatching::%attacker%} is false:
  107. cancel event
  108. else if {game.isMatching::%victim%} is false:
  109. cancel event
  110. else if "%damage cause%" is "void":
  111. set {_list::*} to getMatchingPlayers()
  112. remove victim from {_list::*}
  113. finishMatch(getSinglePlayer({_list::*}), victim, "O")
  114. else if {game.harmable} is false:
  115. heal victim
  116. else:
  117. if damage cause is projectile:
  118. set damage to damage * 0.3
  119. else if damage cause is attack:
  120. set damage to damage * 0.6
  121. else:
  122. cancel event
  123.  
  124. on death of player:
  125. if {game.isMatching::%victim%} is true:
  126. heal victim
  127. set {_list::*} to getMatchingPlayers()
  128. remove victim from {_list::*}
  129. finishMatch(getSinglePlayer({_list::*}), victim, "O")
  130.  
  131. on quit:
  132. set the quit message to "{@SYSTEM_PREFIX}&6%player%&7が退出しました"
  133. if {game.joiners::*} contains player:
  134. if {game.isStarted} is true:
  135. remove player from {game.joiners::*}
  136. if {game.isMatching::%player%} is true:
  137. set {_list::*} to getMatchingPlayers()
  138. remove player from {_list::*}
  139. finishMatch(getSinglePlayer({_list::*}), player, "O")
  140. loop {game.result::%player%::*}:
  141. set {game.result::%player%::%loop-index%} to "LOSE"
  142. set {game.result::%loop-index%::%player%} to "WIN"
  143.  
  144. on join:
  145. set the join message to "{@SYSTEM_PREFIX}&6%player%&7がサーバーに参加しました"
  146. if {stats.rate::%uuid of player%} is not set:
  147. set {stats.rate::%uuid of player%} to 5000
  148. if {stats.playedTimes::%uuid of player%} is not set:
  149. set {stats.playedTimes::%uuid of player%} to 0
  150. clear player's inventory
  151. set slot 4 of player to 1 of slimeball named "&a参加する"
  152. if player is op:
  153. set slot 8 of ops to prismarine shard named "&b参加プレイヤーを確認する"
  154. updateTablist(player)
  155.  
  156. on chat:
  157. cancel event
  158. broadcast "&8[%getRank({stats.rate::%uuid of player%})%&8] &e%player%&f》 %message%"
  159.  
  160. on rightclick:
  161. if tool of player is nether star named "&e総当たり表を確認する":
  162. if {game.joiners::*} contains player:
  163. openTable(player, 1, 1)
  164. else:
  165. message "{@GAME_PREFIX}&cそのアイテムは参加者以外は使えません"
  166. else if tool of player is slimeball named "&a参加する":
  167. make player execute command "join"
  168. else if tool of player is prismarine shard named "&b参加プレイヤーを確認する":
  169.  
  170.  
  171. on drop:
  172. cancel event
  173.  
  174. on any move:
  175. {game.moveable} is false
  176. getMatchingPlayers() contains player
  177. cancel event
  178.  
  179. function getNotJoinedPlayers() :: players:
  180. set {_temp::*} to all players
  181. loop {game.joiners::*}:
  182. remove loop-value from {_temp::*}
  183. return {_temp::*}
  184.  
  185. function getSinglePlayer(p: players) :: player:
  186. loop {_p::*}:
  187. if loop-value is set:
  188. return loop-value
  189.  
  190. function openPlayersListTable(player: player):
  191. {_player} is op
  192. open chest with floor(size of {game.joiners::*} / 9) + floor(size of getNotJoinedPlayers() / 9) + 2 rows named "すべてのプレイヤー" to {_player}
  193. wait a tick
  194. if size of {game.joiners::*} > 0:
  195. format slot 0 of {_player} with 1 of light green stained glass pane named "&a&l参加しているプレイヤー" to be unstealable
  196. set {_n} to 0
  197. loop {game.joiners::*}:
  198. add 1 to {_n}
  199. format slot {_n} of {_player} with 1 of skull of loop-value named "&a%loop-value%" to be unstealable
  200. if size of getNotJoinedPlayers() > 0:
  201. format slot (floor(size of {game.joiners::*} / 9) + 1) * 9 of {_player} with 1 of red stained glass pane named "&c&l参加していないプレイヤー" with lore "&f" and "&eクリックですべてのプレイヤーを強制参加" to close then run [make {_player} execute command "forcejoin all"]
  202. set {_n} to (floor(size of {game.joiners::*} / 9) + 1) * 9
  203. loop getNotJoinedPlayers():
  204. add 1 to {_n}
  205. format slot {_n} of {_player} with 1 of skull of loop-value named "&c%loop-value%" with lore "&f" and "&eクリックでこのプレイヤーを強制参加" to run [make {_player} execute command "forcejoin one %loop-value%"]
  206.  
  207. function openTable(player: player, pageX: integer, pageY: integer):
  208. open chest with {@CHEST_ROWS} rows named "総当たり表(%{_pageX}%, %{_pageY}%)" to {_player}
  209. wait a tick
  210. set {_a} to 0
  211. loop {game.firstJoiners::*}:
  212. add 1 to {_a}
  213. if floor(({_a} - 1) / 6) + 1 is {_pageX}:
  214. set {_slot} to mod(({_a} - 1), 6) + 2
  215. format slot {_slot} of {_player} with skull of loop-value named "&c%loop-value%" with lore "&f" and "&7レート: &a%{stats.rate::%uuid of loop-value%}%" to be unstealable
  216. if floor(({_a} - 1) / ({@CHEST_ROWS} - 1)) + 1 is {_pageY}:
  217. set {_slot} to ((mod(({_a} - 1), ({@CHEST_ROWS} - 1)) + 1) * 9) + 1
  218. format slot {_slot} of {_player} with skull of loop-value named "&e%loop-value%" with lore "&f" and "&7レート: &a%{stats.rate::%uuid of loop-value%}%" to be unstealable
  219. set {_b} to 0
  220. loop {game.firstJoiners::*}:
  221. add 1 to {_b}
  222. set {_value2} to loop-value-2
  223. set {_value1} to loop-value-1
  224. if floor(({_b} - 1) / 6) + 1 is {_pageX}:
  225. set {_slot} to (mod({_a} - 1, {@CHEST_ROWS} - 1) + 1) * 9 + 2 + mod({_b} - 1, 6)
  226. #broadcast "1: %loop-value-1% 2: %loop-value-2% slot: %{_slot}%"
  227. if loop-value-1 is not loop-value-2:
  228. if {game.result::%loop-value-1%::%loop-value-2%} is "WIN":
  229. format slot {_slot} of {_player} with 1 of white stained glass pane named "&e%loop-value-1%" with lore "&f" and "&f&l勝利" to be unstealable
  230. else if {game.result::%loop-value-1%::%loop-value-2%} is "LOSE":
  231. format slot {_slot} of {_player} with 1 of black stained glass pane named "&e%loop-value-1%" with lore "&f" and "&0&l敗北" to be unstealable
  232. else if {game.result::%loop-value-1%::%loop-value-2%} is "DRAW":
  233. format slot {_slot} of {_player} with 1 of light gray stained glass pane named "&e%loop-value-1%" with lore "&f" and "&7&l引き分け" to be unstealable
  234. else if {game.result::%loop-value-1%::%loop-value-2%} is "NONE":
  235. format slot {_slot} of {_player} with 1 of glass pane named "&e%loop-value-1%" with lore "&f" and "&7&lまだ試合が行われていません" to be unstealable
  236. else:
  237. format slot {_slot} of {_player} with 1 of barrier named "&c" to be unstealable
  238. else:
  239. format slot {_slot} of {_player} with 1 of barrier named "&c" to be unstealable
  240. if {_pageY} > 1:
  241. format slot 0 of {_player} with 1 arrow named "&e上ページへ行く" to run "oi %{_player}% %{_pageX}% %{_pageY} - 1%"
  242. if {_pageX} > 1:
  243. format slot 27 of {_player} with 1 arrow named "&e左ページへ行く" to run "oi %{_player}% %{_pageX} - 1% %{_pageY}%"
  244. if {_pageY} < floor((size of {game.firstJoiners::*} - 1) / ({@CHEST_ROWS} - 1)) + 1:
  245. format slot 53 of {_player} with 1 arrow named "&e下ページへ行く" to run "oi %{_player}% %{_pageX}% %{_pageY} + 1%"
  246. if {_pageX} < floor((size of {game.firstJoiners::*} - 1) / 6) + 1:
  247. format slot 26 of {_player} with 1 arrow named "&e右ページへ行く" to run "oi %{_player}% %{_pageX} + 1% %{_pageY}%"
  248.  
  249. function updateTablist(player: player):
  250. set {_uuid} to uuid of {_player}
  251. set tablist name of {_player} to "&8[%getRank({stats.rate::%{_uuid}%})%&8] &e%{_player}%"
  252.  
  253. function getGamesLeft() :: number:
  254. loop {game.joiners::*}:
  255. loop {game.result::%loop-value%::*}:
  256. add 1 to {_all}
  257. if {game.result::%loop-value-2%} is "NONE":
  258. add 1 to {_value}
  259. return {_all} - {_value}
  260.  
  261. function gameLoop():
  262. set {_isGameFinished} to true
  263. loop {game.joiners::*}:
  264. if {game.result::%loop-value%::*} contains "NONE":
  265. set {_isGameFinished} to false
  266. exit a loop
  267. if {_isGameFinished} is true:
  268. wait 1 second
  269. finishGame()
  270. else:
  271. makeMatch()
  272.  
  273. function finishGame():
  274. message "{@GAME_PREFIX}&7すべての試合が終了しました" to {game.joiners::*}
  275. play sound "ENTITY_ENDERDRAGON_AMBIENT" to {game.joiners::*} with volume 1 and pitch 7
  276. clear {_data::*}
  277. loop {game.firstJoiners::*}:
  278. set {_wins} to 0
  279. set {_loses} to 0
  280. loop {game.result::%loop-value%::*}:
  281. if loop-value-2 is "WIN":
  282. add 1 to {_wins}
  283. else if loop-value-2 is "LOSE":
  284. add 1 to {_loses}
  285. set {_data::%loop-value%::wins} to {_wins}
  286. set {_data::%loop-value%::loses} to {_loses}
  287. loop {game.firstJoiners::*}:
  288. set {_point} to {_data::%loop-value%::wins} - {_data::%loop-value%::loses}
  289. broadcast "%loop-value% : %{_point}%"
  290. set {_place} to 1
  291. loop {game.firstJoiners::*}:
  292. set {_comparedPoint} to {_data::%loop-value-2%::wins} - {_data::%loop-value-2%::loses}
  293. if {_point} < {_comparedPoint}:
  294. add 1 to {_place}
  295. set {_data::%loop-value%::place} to {_place}
  296. loop {game.joiners::*}:
  297. send loop-value title "&a---- GAME END ----" with subtitle "&eあなたは &6&l##%{_data::%loop-value%::place}%&eでした" for 3 seconds
  298. message "&7----------------------------" to {game.joiners::*}
  299. message "&f" to {game.joiners::*}
  300. message "{@GAME_PREFIX}&a&l最終結果" to {game.joiners::*}
  301. message "&f" to {game.joiners::*}
  302. set {_number} to 1
  303. loop size of {game.firstJoiners::*} times:
  304. loop {game.firstJoiners::*}:
  305. if {_number} is {_data::%loop-value-2%::place}:
  306. message "{@GAME_PREFIX}&e&l##%{_number}% &6%loop-value-2% &7(&f%{_data::%loop-value-2%::wins}%&7勝 &0%{_data::%loop-value-2%::loses}%&7敗)" to {game.joiners::*}
  307. add 1 to {_number}
  308. message "&f" to {game.joiners::*}
  309. message "&7----------------------------" to {game.joiners::*}
  310. if {game.mode} is "RANKED":
  311. message "&7----------------------------" to {game.joiners::*}
  312. message "&f" to {game.joiners::*}
  313. message "{@GAME_PREFIX}&a&lレート変動" to {game.joiners::*}
  314. message "&f" to {game.joiners::*}
  315. loop {game.firstJoiners::*}:
  316. if {game.totalRateChange::%loop-value%} < 0:
  317. message "{@GAME_PREFIX}&6%loop-value% &e%{stats.rate::%uuid of loop-value%}% &f> &c%{game.totalRateChange::%loop-value%}% &f> &4&l%{stats.rate::%uuid of loop-value%} + {game.totalRateChange::%loop-value%}%" to {game.joiners::*}
  318. else if {game.totalRateChange::%loop-value%} > 0:
  319. message "{@GAME_PREFIX}&6%loop-value% &e%{stats.rate::%uuid of loop-value%}% &f> &b+%{game.totalRateChange::%loop-value%}% &f> &9&l%{stats.rate::%uuid of loop-value%} + {game.totalRateChange::%loop-value%}%" to {game.joiners::*}
  320. else:
  321. message "{@GAME_PREFIX}&6%loop-value% &e%{stats.rate::%uuid of loop-value%}% &f> &a±0 &f> &f&l%{stats.rate::%uuid of loop-value%} + {game.totalRateChange::%loop-value%}%" to {game.joiners::*}
  322. add {game.totalRateChange::%loop-value%} to {stats.rate::%uuid of loop-value%}
  323. add 1 to {stats.playedTimes::%uuid of loop-value%}
  324. message "&f" to {game.joiners::*}
  325. message "&7----------------------------" to {game.joiners::*}
  326. command "sumoadm stop"
  327.  
  328. function makeMatch():
  329. set {_a} to random element out of {game.joiners::*}
  330. while {game.result::%{_a}%::*} doesn't contain "NONE":
  331. set {_a} to random element out of {game.joiners::*}
  332. while 1 is 1:
  333. if {_a} is not {_b}:
  334. if {game.result::%{_b}%::%{_a}%} is "NONE":
  335. exit a loop
  336. else:
  337. set {_b} to random element out of {game.joiners::*}
  338. else:
  339. set {_b} to random element out of {game.joiners::*}
  340. loop random integer between 5 and 20 times:
  341. play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to {game.joiners::*} with volume 1 and pitch 8
  342. send {game.joiners::*} title "&e%random element out of {game.joiners::*}% &8> vs < &e%random element out of {game.joiners::*}%" with subtitle "&7抽選中です..." for 2 seconds
  343. wait 4 ticks
  344. set {_list::*} to {game.joiners::*}
  345. remove {_a} and {_b} from {_list::*}
  346. play sound "ENTITY_PLAYER_LEVELUP" to {game.joiners::*} with volume 1 and pitch 1
  347. send {_a} title "&6&l%{_a}% &8> vs < &e%{_b}%" with subtitle "&a試合に出場します" for 4 seconds
  348. message "{@GAME_PREFIX}&6&l%{_a}% &8> vs < &e%{_b}% &7(残り%getGamesLeft()%試合)" to {_a}
  349. send {_b} title "&e%{_a}% &8> vs < &6&l%{_b}%" with subtitle "&a試合に出場します" for 4 seconds
  350. message "{@GAME_PREFIX}&e%{_a}% &8> vs < &6&l%{_b}% &7(残り%getGamesLeft()%試合)" to {_b}
  351. send {_list::*} title "&e%{_a}% &8> vs < &e%{_b}%" with subtitle "&7試合を観戦します" for 4 seconds
  352. message "{@GAME_PREFIX}&e%{_a}% &8> vs < &e%{_b}% &7(残り%getGamesLeft()%試合)" to {_list::*}
  353. wait 3 seconds
  354. startMatch({_a}, {_b})
  355.  
  356. function startMatch(a: player, b: player):
  357. set {game.isMatching::%{_a}%} to true
  358. set {game.isMatching::%{_b}%} to true
  359. set {game.matching} to false
  360. set {game.harmable} to false
  361. set {game.moveable} to false
  362. set {game.stopMatch} to false
  363. set {game.matchTime} to 0
  364. teleport {_a} to {stage.standPoint::A}
  365. teleport {_b} to {stage.standPoint::B}
  366. clear inventory of getMatchingPlayers()
  367. set {_str} to "%random number between 0.9 and 4.0% seconds"
  368. set {_wait} to {_str} parsed as time span
  369. send getMatchingPlayers() title "&8---- &8&lREADY &8----" with subtitle "&f" for {_wait}
  370. wait {_wait}
  371. send getMatchingPlayers() title "&8---! &6&lFIGHT &8!---" with subtitle "&f" for {_wait}
  372. set {game.moveable} to true
  373. loop {@MATCH_TIME} times:
  374. wait 1 second
  375. add 1 to {game.matchTime}
  376. if {game.matchTime} is {@STICK_TIME}:
  377. giveStick()
  378. else if {game.matchTime} is {@SHOWDOWN_TIME}:
  379. showDown()
  380. else if {game.matchTime} is {@DEATHMATCH_TIME}:
  381. deathMatch()
  382. if {game.stopMatch} is true:
  383. stop
  384. finishMatch({_a}, {_b}, "X")
  385.  
  386. function giveStick():
  387. give stick of sharpness 2 and knockback 1 named "&6タオルの腕" to be unbreakable to getMatchingPlayers()
  388.  
  389. function showDown():
  390. send {game.joiners::*} title "&8--!! &c&lSHOWDOWN &8!!--" with subtitle "&7弓矢が使用可能になった" for 2 seconds
  391. message "{@GAME_PREFIX}&cショーダウン!!" to {game.joiners::*}
  392. give bow of infinity 1 and punch 1 named "&6タオルの胸" to be unbreakable to getMatchingPlayers()
  393. give arrow named "&7タオルの脚" to getMatchingPlayers()
  394.  
  395. function deathMatch():
  396. send {game.joiners::*} title "&8-!!! &4&lDEATHMATCH &8!!!-" with subtitle "&7ダメージを受けるようになった" for 2 seconds
  397. message "{@GAME_PREFIX}&4デスマッチ!!!" to {game.joiners::*}
  398. set {game.harmable} to true
  399.  
  400. function finishMatch(winner: player, loser: player, xo: text):
  401. if {_xo} is "X":
  402. send {game.joiners::*} title "&8--- &a&lDRAW &8---" with subtitle "&7時間切れ" for 4 seconds
  403. set {game.result::%{_winner}%::%{_loser}%} to "DRAW"
  404. set {game.result::%{_loser}%::%{_winner}%} to "DRAW"
  405. else if {_xo} is "O":
  406. send {game.joiners::*} title "&8--- &7WINNER: &6&l%{_winner}% &8---" with subtitle "&7試合時間: &6%{game.matchTime}%&7秒" for 4 seconds
  407. message "{@SYSTEM_PREFIX}&6%{_winner}% &e》勝利 》 &8%{_loser}%" to {game.joiners::*}
  408. set {_UUIDOfWinner} to uuid of {_winner}
  409. set {_UUIDOfLoser} to uuid of {_loser}
  410. set {game.result::%{_winner}%::%{_loser}%} to "WIN"
  411. set {game.result::%{_loser}%::%{_winner}%} to "LOSE"
  412. add 1 to {stats.aganist::%{_UUIDOfLoserWinner}%::%{_UUIDOfLoser}%::wins}
  413. add 1 to {stats.aganist::%{_UUIDOfLoser}%::%{_UUIDOfLoserWinner}%::loses}
  414. if {game.mode} is "RANKED":
  415. set {_x} to {stats.rate::%{_UUIDOfWinner}%} - {stats.rate::%{_UUIDOfLoser}%}
  416. add getRateChange({_x}) * 1 to {game.totalRateChange::%{_winner}%}
  417. add getRateChange({_x}) * -1 to {game.totalRateChange::%{_loser}%}
  418. set {game.matching} to false
  419. set {game.moveable} to false
  420. set {game.harmable} to false
  421. set {game.stopMatch} to true
  422. loop getMatchingPlayers():
  423. heal loop-value
  424. clear loop-value's inventory
  425. set slot 4 of loop-value to nether star named "&e総当たり表を確認する"
  426. teleport loop-value to {stage.waitingPoint}
  427. set {game.isMatching::%loop-value%} to false
  428. wait 1.5 seconds
  429. gameLoop()
  430.  
  431. function getMatchingPlayers() :: players:
  432. clear {_temp::*}
  433. loop {game.joiners::*}:
  434. if {game.isMatching::%loop-value%} is true:
  435. add loop-value to {_temp::*}
  436. return {_temp::*}
  437.  
  438. function getRank(rate: integer) :: text:
  439. if {_rate} < 2500:
  440. return "&7ガリガリ"
  441. else if {_rate} < 4000:
  442. return "&7ガリ"
  443. else if {_rate} < 4500:
  444. return "&7ヤセ"
  445. else if {_rate} < 5500:
  446. return "&f新人"
  447. else if {_rate} < 5200:
  448. return "&fおデブ"
  449. else if {_rate} < 5400:
  450. return "&f幕下"
  451. else if {_rate} < 5800:
  452. return "&f十両"
  453. else if {_rate} < 6000:
  454. return "&7前頭"
  455. else if {_rate} < 6500:
  456. return "&f小結"
  457. else if {_rate} < 7000:
  458. return "&f関脇"
  459. else if {_rate} < 7500:
  460. return "&f大関"
  461.  
  462. function getRateChange(val: number) :: integer:
  463. if {_val} > 6590:
  464. return 0
  465. else if {_val} > 4999:
  466. return 1
  467. else if {_val} > 3963:
  468. return 2
  469. else if {_val} > 3233:
  470. return 3
  471. else if {_val} > 2671:
  472. return 4
  473. else if {_val} > 2212:
  474. return 5
  475. else if {_val} > 1819:
  476. return 6
  477. else if {_val} > 1476:
  478. return 7
  479. else if {_val} > 1168:
  480. return 8
  481. else if {_val} > 889:
  482. return 9
  483. else if {_val} > 633:
  484. return 10
  485. else if {_val} > 395:
  486. return 11
  487. else if {_val} > 174:
  488. return 12
  489. else if {_val} > -34:
  490. return 13
  491. else if {_val} > -231:
  492. return 14
  493. else if {_val} > -418:
  494. return 15
  495. else if {_val} > -596:
  496. return 16
  497. else if {_val} > -767:
  498. return 17
  499. else if {_val} > -931:
  500. return 18
  501. else if {_val} > -1090:
  502. return 19
  503. else if {_val} > -1243:
  504. return 20
  505. else if {_val} > -1392:
  506. return 21
  507. else if {_val} > -1536:
  508. return 22
  509. else if {_val} > -1676:
  510. return 23
  511. else if {_val} > -1813:
  512. return 24
  513. else if {_val} > -1946:
  514. return 25
  515. else if {_val} > -2076:
  516. return 26
  517. else if {_val} > -2203:
  518. return 27
  519. else if {_val} > -2329:
  520. return 28
  521. else if {_val} > -2450:
  522. return 29
  523. else if {_val} > -2569:
  524. return 30
  525. else if {_val} > -2687:
  526. return 31
  527. else if {_val} > -2803:
  528. return 32
  529. else if {_val} > -2915:
  530. return 33
  531. else if {_val} > -3027:
  532. return 34
  533. else if {_val} > -3136:
  534. return 35
  535. else if {_val} > -3245:
  536. return 36
  537. else if {_val} > -3353:
  538. return 37
  539. else if {_val} > -3456:
  540. return 38
  541. else if {_val} > -3557:
  542. return 39
  543. else if {_val} > -3682:
  544. return 40
  545. else if {_val} > -3760:
  546. return 41
  547. else if {_val} > -3861:
  548. return 42
  549. else if {_val} > -3959:
  550. return 43
  551. else if {_val} > -4055:
  552. return 44
  553. else if {_val} > -4150:
  554. return 45
  555. else if {_val} > -4252:
  556. return 46
  557. else if {_val} > -4344:
  558. return 47
  559. else if {_val} > -4443:
  560. return 48
  561. else if {_val} > -4525:
  562. return 49
  563. else if {_val} > -4608:
  564. return 50
  565. else if {_val} > -4697:
  566. return 51
  567. else if {_val} > -4804:
  568. return 52
  569. else if {_val} > -4895:
  570. return 53
  571. else if {_val} > -4958:
  572. return 54
  573. else if {_val} > -5050:
  574. return 55
  575. else if {_val} > -5133:
  576. return 56
  577. else if {_val} > -5252:
  578. return 57
  579. else if {_val} > -5301:
  580. return 58
  581. else if {_val} > -5419:
  582. return 59
  583. else if {_val} > -5487:
  584. return 60
  585. else if {_val} > -5551:
  586. return 61
  587. else if {_val} > -5641:
  588. return 62
  589. else if {_val} > -5723:
  590. return 63
  591. else if {_val} > -5793:
  592. return 64
  593. else if {_val} > -5882:
  594. return 65
  595. else if {_val} > -5966:
  596. return 66
  597. else if {_val} > -6046:
  598. return 67
  599. else if {_val} > -6117:
  600. return 68
  601. else if {_val} > -6208:
  602. return 69
  603. else if {_val} > -6299:
  604. return 70
  605. else if {_val} > -6341:
  606. return 71
  607. else if {_val} > -6420:
  608. return 72
  609. else if {_val} > -6504:
  610. return 73
  611. else if {_val} > -6596:
  612. return 74
  613. else if {_val} > -6691:
  614. return 75
  615. else if {_val} > -6728:
  616. return 76
  617. else if {_val} > -6834:
  618. return 77
  619. else if {_val} > -6912:
  620. return 78
  621. else if {_val} > -7017:
  622. return 79
  623. else if {_val} > -7066:
  624. return 80
  625. else if {_val} > -7204:
  626. return 81
  627. else if {_val} > -7286:
  628. return 82
  629. else if {_val} > -7324:
  630. return 83
  631. else if {_val} > -7427:
  632. return 84
  633. else if {_val} > -7495:
  634. return 85
  635. else if {_val} > -7534:
  636. return 86
  637. else if {_val} > -7631:
  638. return 87
  639. else if {_val} > -7708:
  640. return 88
  641. else if {_val} > -7784:
  642. return 89
  643. else if {_val} > -7834:
  644. return 90
  645. else if {_val} > -8011:
  646. return 91
  647. else if {_val} > -8109:
  648. return 92
  649. else if {_val} > -8133:
  650. return 93
  651. else if {_val} > -8216:
  652. return 94
  653. else if {_val} > -8275:
  654. return 95
  655. else if {_val} > -8411:
  656. return 96
  657. else if {_val} > -8505:
  658. return 97
  659. else if {_val} > -8615:
  660. return 98
  661. else if {_val} > -8764:
  662. return 99
  663. else if {_val} > -8844:
  664. return 100
  665. else if {_val} > -8936:
  666. return 101
  667. else if {_val} > -9054:
  668. return 102
  669. else if {_val} > -9144:
  670. return 103
  671. else if {_val} > -9240:
  672. return 104
  673. else if {_val} > -9349:
  674. return 105
  675. else if {_val} > -9472:
  676. return 106
  677. else if {_val} > -9582:
  678. return 107
  679. else if {_val} > -9693:
  680. return 108
  681. else if {_val} > -9845:
  682. return 109
  683. else if {_val} > -9959:
  684. return 110
  685. else:
  686. return 111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement