Advertisement
Kusa_Haenai_wWW

Untitled

Jul 12th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 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. remove {d} from {money::%player%}
  39. delete {d}
  40. else:
  41. message "&c購入金額が所持金を上回っています!!"
  42. if arg-2 >= 100:
  43. message "&c数が多すぎます!! 1~100 にしてください!!"
  44. if arg-2 <= 0:
  45. message "&c数が少なすぎます!! 1~100 にしてください!!"
  46. if arg-1 is "sell":
  47. set {d} to round({a} * arg-2)
  48. if {temotikabu::%player%} >= arg-2:
  49. add {d} to {money::%player%}
  50. message "&b株を&d%arg-2%&b個売却しました!!"
  51. remove arg-2 from {temotikabu::%player%}
  52. delete {d}
  53. if arg-2 >= 100:
  54. message "&c数が多すぎます!! 1~100 にしてください!!"
  55. if arg-2 <= 0:
  56. message "&c数が少なすぎます!! 1~100 にしてください!!"
  57.  
  58. command /rc [<integer>]:
  59. trigger:
  60. if arg-1 is not set:
  61. message "&c/rc <RCに転送したい数字>"
  62. if arg-1 <= {money::%player%}:
  63. add arg-2 to {rc::%player%}
  64. remove arg-2 from {money::%player%}
  65.  
  66. command /givemoney [<player>] [<integer>]:
  67. permission: sk.admin
  68. trigger:
  69. if arg-1 is not set:
  70. message "&c/givemoney <player> <数字>"
  71. add arg-2 to {money::%arg-1%}
  72.  
  73. every tick:
  74. loop all players:
  75. 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