Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every seconds:
- loop all players:
- if {temotikabu::%loop-player%} is not set:
- set {temotikabu::%loop-player%} to 0
- if {money::%loop-player%} is not set:
- set {money::%loop-player%} to 1000
- if {a} is not set:
- set {a} to 500
- else:
- set {b} to random integer between 1 and 4
- if {b} is 1:
- add 1 to {a}
- if {b} is 2:
- add 2 to {a}
- if {b} is 3:
- add -1 to {a}
- if {b} is 4:
- add -2 to {a}
- if {a} >= 1000:
- broadcast "&c君たちがこれ以上儲かるといけないので倒産ってことで^^"
- set {a} to 500
- set {temotikabu::*} to 0
- if {a} <= 0:
- broadcast "&c株は倒産してしまった..."
- command /kabu [<text>] [<integer>]:
- trigger:
- if arg-1 or arg-2 is not set:
- message "&c/kabu <sell・buy> <個数>"
- if arg-1 and arg-1 is set:
- if arg-1 is "buy":
- set {d} to round({a} * arg-2)
- if arg-2 >= 101:
- stop
- message "&c数が多すぎます!! 1~100 にしてください!!"
- if arg-2 <= 0:
- stop
- message "&c数が少なすぎます!! 1~100 にしてください!!"
- if {money::%player%} >= {d}:
- add arg-2 to {temotikabu::%player%}
- message "&b株を&d%arg-2%&b個購入しました!!"
- remove {d} from {money::%player%}
- delete {d}
- else:
- message "&c購入金額が所持金を上回っています!!"
- if arg-1 is "sell":
- set {d} to round({a} * arg-2)
- if arg-2 >= 101:
- stop
- message "&c数が多すぎます!! 1~100 にしてください!!"
- if arg-2 <= 0:
- stop
- message "&c数が少なすぎます!! 1~100 にしてください!!"
- if {temotikabu::%player%} >= arg-2:
- add {d} to {money::%player%}
- message "&b株を&d%arg-2%&b個売却しました!!"
- remove arg-2 from {temotikabu::%player%}
- delete {d}
- command /givemoney [<player>] [<integer>]:
- permission: sk.admin
- trigger:
- if arg-1 is not set:
- message "&c/givemoney <player> <数字>"
- add arg-2 to {money::%arg-1%}
- every tick:
- loop all players:
- 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