Advertisement
Kusa_Haenai_wWW

Untitled

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