Advertisement
Kusa_Haenai_wWW

Untitled

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