Advertisement
UDON_JP

Untitled

May 5th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.46 KB | None | 0 0
  1. on server start:
  2. delete {aucsys::*}
  3.  
  4. command /auchelp:
  5. aliases: /auctionhelp
  6. trigger:
  7. send "&6‡&7==============================&6&lAuction&7==============================&6‡"
  8. send "&c/auc <開始金額> [<即決金額(任意)>]&4: &6手に持っているアイテムをオークションに出します"
  9. send "&c/aucs&4: &6自分が開催しているオークションを中止します"
  10. send "&c/bid <金額>&4: &6開催しているオークションに入札します"
  11. send "&c/aucd&4: &6出品された品を確認します"
  12. send "&6‡&7====================================================================&6‡"
  13.  
  14. command /auc <integer> [<integer>]:
  15. aliases: /auction
  16. usage: /auction <開始金額> [<即決金額(任意)>]
  17. trigger:
  18. if {aucsys::cond} is 1:
  19. send "&c今は他の誰かがオークションをしています"
  20. else:
  21. if player's tool is air:
  22. send "&c無は出品できません"
  23. else:
  24. if arg 1 is less than 1:
  25. send "&c開始金額は1以上にしてください"
  26. else:
  27. if arg 2 is set:
  28. if arg 2 is less than arg 1:
  29. send "&c即決金額は開始金額より高くしてください"
  30. else:
  31. set {aucsys::selr} to player
  32. set {aucsys::cond} to 1
  33. set {aucsys::valu} to arg 1
  34. set {aucsys::item} to player's tool
  35. set {aucsys::time} to 180
  36. set {aucsys::dire} to arg 2
  37. delete player's tool
  38. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  39. broadcast "&f&l%player%&6さんがオークションを始めました"
  40. broadcast "&6開始金額は&c%arg 1%$"
  41. broadcast "&6即決金額は&4%arg 2%$&6です"
  42. broadcast "&a/aucd&6で出品された品を確認できます"
  43. broadcast "&6‡&7====================================================================&6‡"
  44. while {aucsys::time} is more than 0:
  45. if {aucsys::stop} is 1:
  46. delete {aucsys::*}
  47. stop
  48. else:
  49. wait 1 second
  50. remove 1 from {aucsys::time}
  51. if {aucsys::time} is 5, 10, 30, 60 or 120:
  52. broadcast "&7[&6Auction&7] &6%player%さんのオークションはあと%{aucsys::time}%秒で終わります"
  53. if {aucsys::time} is 0:
  54. if {aucsys::buyr} is set:
  55. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  56. broadcast "&f%player%&6さんのオークションが終了しました"
  57. broadcast "&f&l%{aucsys::buyr}%&6さんが&6&l%{aucsys::valu}%$&6で落札しました"
  58. broadcast "&6‡&7====================================================================&6‡"
  59. send "&6‡&6%{aucsys::valu}%$を%{aucsys::selr}%に送りました" to {aucsys::buyr}
  60. send "&6‡&6%{aucsys::valu}%$を%{aucsys::buyr}%から受け取りました"
  61. remove {aucsys::valu} from {aucsys::buyr}'s money
  62. add {aucsys::valu} to player's money
  63. aucend()
  64. stop
  65. else:
  66. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  67. broadcast "&f%player%&6さんのオークションが終了しました"
  68. broadcast "&6入札者は誰も居ませんでした"
  69. broadcast "&6‡&7====================================================================&6‡"
  70. aucdead()
  71. else:
  72. set {aucsys::selr} to player
  73. set {aucsys::cond} to 1
  74. set {aucsys::item} to player's tool
  75. set {aucsys::time} to 180
  76. set {aucsys::valu} to arg 1
  77. delete player's tool
  78. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  79. broadcast "&f&l%player%&6さんがオークションを始めました"
  80. broadcast "&6開始金額は&c%arg 1%$&6です"
  81. broadcast "&a/aucd&6で出品された品を確認できます"
  82. broadcast "&6‡&7====================================================================&6‡"
  83. while {aucsys::time} is more than 0:
  84. if {aucsys::stop} is 1:
  85. delete {aucsys::*}
  86. stop
  87. else:
  88. wait 1 second
  89. remove 1 from {aucsys::time}
  90. if {aucsys::time} is 5, 10, 20 or 30:
  91. broadcast "&7[&6Auction&7] &6%player%さんのオークションはあと%{aucsys::time}%秒で終わります"
  92. if {aucsys::time} is 0:
  93. if {aucsys::buyr} is set:
  94. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  95. broadcast "&f%player%&6さんのオークションが終了しました"
  96. broadcast "&f&l%{aucsys::buyr}%&6さんが&6&l%{aucsys::valu}%$&6で落札しました"
  97. broadcast "&6‡&7====================================================================&6‡"
  98. send "&7[&6Auction&7] &6%{aucsys::valu}%$を%{aucsys::selr}%に送りました" to {aucsys::buyr}
  99. send "&7[&6Auction&7] &6%{aucsys::valu}%$を%{aucsys::buyr}%から受け取りました"
  100. remove {aucsys::valu} from {aucsys::buyr}'s money
  101. add {aucsys::valu} to player's money
  102. aucend()
  103. stop
  104. else:
  105. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  106. broadcast "&f%player%&6さんのオークションが終了しました"
  107. broadcast "&6入札者は誰も居ませんでした"
  108. broadcast "&6‡&7====================================================================&6‡"
  109. aucdead()
  110. stop
  111.  
  112. command /auctionstop:
  113. aliases: /aucs
  114. permission: auction.start
  115. trigger:
  116. if {aucsys::cond} is 1:
  117. if {aucsys::selr} is player:
  118. set {aucsys::stop} to 1
  119. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  120. broadcast "&f%player%&6さんのオークションが中止されました"
  121. broadcast "&6‡&7====================================================================&6‡"
  122. aucdead()
  123. else if player has the permission "auction.fstop":
  124. set {aucsys::stop} to 1
  125. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  126. broadcast "&f%{aucsys::selr}%&6さんのオークションは管理者によって中止されました"
  127. broadcast "&6‡&7====================================================================&6‡"
  128. aucdead()
  129. else:
  130. send "&cオークションの出品者以外は中止できません"
  131. else:
  132. send "&c今は誰もオークションをしていません"
  133.  
  134. command /bid <integer>:
  135. usage: /bid <入札額(整数)>
  136. trigger:
  137. if player is not {aucsys::selr}:
  138. if {aucsys::cond} is not 1:
  139. send "&c今は誰もオークションをしていません"
  140. else:
  141. if arg is less than or equal to {aucsys::valu}:
  142. send "&c最高入札額より高く設定してください"
  143. else:
  144. if player's money is less than arg:
  145. send "&c所持金が足りません"
  146. else:
  147. if {aucsys::dire} is set:
  148. if arg is more than or equal to {aucsys::dire}:
  149. broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
  150. broadcast "&f%{aucsys::selr}%&6さんのオークションが終了しました"
  151. broadcast "&f&l%player%&6さんが&6&l%{aucsys::dire}%$&6即決で落札しました"
  152. broadcast "&6‡&7====================================================================&6‡"
  153. set {aucsys::buyr} to player
  154. set {aucsys::stop} to 1
  155. remove {aucsys::dire} from player's money
  156. add {aucsys::dire} to {aucsys::selr}'s money
  157. send "&6‡&6%{aucsys::dire}%$を%{aucsys::selr}%に送りました""
  158. aucend()
  159. stop
  160. else:
  161. set {aucsys::valu} to arg
  162. set {aucsys::buyr} to player
  163. broadcast "&7[&6Auction&7] &6%player%さんが%arg%$で入札"
  164. if {aucsys::time} is less than 10:
  165. add 13 to {aucsys::time}
  166. else:
  167. set {aucsys::valu} to arg
  168. set {aucsys::buyr} to player
  169. broadcast "&7[&6Auction&7] &6%player%さんが%arg%$で入札"
  170. if {aucsys::time} is less than 10:
  171. set {aucsys::time} to 13
  172. else:
  173. loop 12 times:
  174. send "&4&l!!!出品者は入札できません!!!"
  175. wait 1 tick
  176.  
  177. function aucend():
  178. if {aucsys::buyr} has air:
  179. loop 36 times:
  180. if slot (loop-number - 1) of {aucsys::buyr}'s inventory is air:
  181. set slot (loop-number - 1) of {aucsys::buyr}'s inventory to {aucsys::item}
  182. delete {aucsys::*}
  183. stop
  184. drop {aucsys::item} at location of {aucsys::buyr}
  185. send "&6‡インベントリに空きが無かった為足元にアイテムをドロップしました" to {aucsys::buyr}
  186. delete {aucsys::*}
  187.  
  188. function aucdead():
  189. if {aucsys::selr} has air:
  190. loop 36 times:
  191. if slot (loop-number - 1) of {aucsys::selr}'s inventory is air:
  192. set slot (loop-number - 1) of {aucsys::selr}'s inventory to {aucsys::item}
  193. delete {aucsys::*}
  194. stop
  195. drop {aucsys::item} at location of {aucsys::selr}
  196. send "&6‡インベントリに空きが無かった為足元にアイテムをドロップしました" to {aucsys::selr}
  197. delete {aucsys::*}
  198.  
  199. command /aucd:
  200. trigger:
  201. if {aucsys::cond} is 1:
  202. open chest with 1 row named "&6Auction Display" to player
  203. wait 1 tick
  204. set {_q} to iron bars named "&b値札"
  205. if {aucsys::dire} is set:
  206. set line 1 of lore of {_q} to "&a現在&8: &6%{aucsys::valu}%$"
  207. set line 2 of lore of {_q} to "&c即決&8: &6%{aucsys::dire}%$"
  208. set line 3 of lore of {_q} to "&b最高入札者&8: &6%{aucsys::buyr}%"
  209. else:
  210. set line 1 of lore of {_q} to "&a現在&8: &6%{aucsys::valu}%$"
  211. set line 2 of lore of {_q} to "&b最高入札者&8: &6%{aucsys::buyr}%"
  212. loop 9 times:
  213. set {_a} to loop-number - 1
  214. set slot {_a} of player's current inventory to {_q}
  215. delete slot 4 of player's current inventory
  216. wait 1 tick
  217. set slot 4 of player's current inventory to {aucsys::item}
  218. else:
  219. send "&c今は誰もオークションをしていません"
  220.  
  221. on inventory click:
  222. name of player's current inventory is "&6Auction Display"
  223. cancel event
  224. close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement