Advertisement
Kusa_Haenai_wWW

Untitled

Jul 13th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 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 arg-2 >= 101:
  34. stop
  35. message "&c数が多すぎます!! 1~100 にしてください!!"
  36. if arg-2 <= 0:
  37. stop
  38. message "&c数が少なすぎます!! 1~100 にしてください!!"
  39. if {money::%player%} >= {d}:
  40. add arg-2 to {temotikabu::%player%}
  41. message "&b株を&d%arg-2%&b個購入しました!!"
  42. remove {d} from {money::%player%}
  43. delete {d}
  44. else:
  45. message "&c購入金額が所持金を上回っています!!"
  46. if arg-1 is "sell":
  47. set {d} to round({a} * arg-2)
  48. if arg-2 >= 101:
  49. stop
  50. message "&c数が多すぎます!! 1~100 にしてください!!"
  51. if arg-2 <= 0:
  52. stop
  53. message "&c数が少なすぎます!! 1~100 にしてください!!"
  54. if {temotikabu::%player%} >= arg-2:
  55. add {d} to {money::%player%}
  56. message "&b株を&d%arg-2%&b個売却しました!!"
  57. remove arg-2 from {temotikabu::%player%}
  58. delete {d}
  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