Advertisement
Kusa_Haenai_wWW

Untitled

Jul 12th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. every tick:
  2. loop all players:
  3. if {temotikabu::%loop-player%} is not set:
  4. set {temotikabu::%loop-player%} to 0
  5. if {money::%loop-player%} is not set:
  6. set {money::%loop-player%} to 0
  7. if {rc::%loop-player%} is not set:
  8. set {rc::%loop-player%} to 0
  9. if {a} is not set:
  10. set {a} to 500
  11. else:
  12. set {b} to random integer between 1 and 4
  13. if {b} is 1:
  14. add 1 to {a}
  15. if {b} is 2:
  16. add 2 to {a}
  17. if {b} is 3:
  18. add -1 to {a}
  19. if {b} is 4:
  20. add -2 to {a}
  21. if {a} >= 1000:
  22. broadcast "&c君たちがこれ以上儲かるといけないので倒産ってことで^^"
  23. set {a} to 500
  24. set {temotikabu::*} to 0
  25. if {a} <= 0:
  26. broadcast "&c株は倒産してしまった..."
  27.  
  28. command /kabu [<text>] [<integer>]:
  29. trigger:
  30. if arg-1 or arg-2 is not set:
  31. message "&c/kabu <sell・buy> <個数>"
  32. if arg-1 and arg-1 is set:
  33. if arg-1 is "buy":
  34. set {d} to round({a} * arg-2)
  35. if {money::%player%} >= {d}:
  36. add arg-2 to {temotikabu::%player%}
  37. message "&b株を&d%arg-2%&b個購入しました!!"
  38. delete {d}
  39. else:
  40. message "&c購入金額が所持金を上回っています!!"
  41. if arg-2 >= 100:
  42. message "&c数が多すぎます!! 1~100 にしてください!!"
  43. if arg-2 <= 0:
  44. message "&c数が少なすぎます!! 1~100 にしてください!!"
  45. if arg-1 is "sell":
  46. set {d} to round({a} * arg-2)
  47. if {temotikabu::%player%} >= arg-2:
  48. add {d} to {money::%player%}
  49. message "&b株を&d%arg-2%&b個売却しました!!"
  50. delete {d}
  51. if arg-2 >= 100:
  52. message "&c数が多すぎます!! 1~100 にしてください!!"
  53. if arg-2 <= 0:
  54. message "&c数が少なすぎます!! 1~100 にしてください!!"
  55.  
  56. command /rc [<integer>]:
  57. trigger:
  58. if arg-1 is not set:
  59. message "&c/rc <RCに転送したい数字>"
  60. if arg-1 <= {money::%player%}:
  61. add arg-2 to {rc::%player%}
  62. remove arg-2 from {money::%player%}
  63.  
  64. command /givemoney [<player>] [<integer>]:
  65. permission: sk.admin
  66. trigger:
  67. if arg-1 is not set:
  68. message "&c/givemoney <player> <数字>"
  69. add arg-2 to {money::%arg-1%}
  70.  
  71. every 1 seconds:
  72. loop all players:
  73. set action bar of loop-player to "&c所持株数 &d%{temotikabu::%loop-player%}% &eMoney &d%{money::%loop-player%}% &bRC &d%{rc::%loop-player%}% &a&l株価 &d&l%{a}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement