Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- message "&e[HandyCasino]"
- message "&6/coinbutton でまずはお金を貯めましょう!"
- message "&c5コイン貯めたらまずは /uod 5 をしてみましょう!"
- command /coinbutton:
- trigger:
- give stone button named "&eCoin&7Button" to player
- message "&9&l20回押すごとに1コイン支給されます"
- on rightclick:
- if name of player's held item is "&eCoin&7Button":
- if {handycasino::%player%::coinbuttonct} > 0:
- set {handycasino::%player%::coinbuttonct} to 2
- stop
- set {handycasino::%player%::coinbuttonct} to 2
- add 1 to {handycasino::%player%::coinbutton}
- if {handycasino::%player%::coinbutton} > 19:
- message "&e&lGet 1 Coin!"
- command "execute %player% ~ ~ ~ playsound entity.player.levelup master @a ~ ~ ~ 1 2"
- add 1 to {handycasino::%player%::coin}
- set {handycasino::%player%::coinbutton} to 0
- every tick:
- loop all players:
- if {handycasino::%loop-player%::coinbuttonct} > 0:
- remove 1 from {handycasino::%loop-player%::coinbuttonct}
- if {handycasino::%loop-player%::coin} is not set:
- set {handycasino::%loop-player%::coin} to 0
- on place:
- if name of player's held item is "&eCoin&7Button":
- cancel event
- command /uod <integer>:
- trigger:
- if arg 1 < 5:
- message "&c5枚以上で賭けてください"
- stop
- if arg 1 > 100:
- message "&c100枚以下で賭けてください"
- stop
- if {handycasino::%player%::coin} < arg 1:
- message "&cコインが足りない為開始できませんでした"
- stop
- remove arg 1 from {handycasino::%player%::coin}
- set {_kakekin} to arg 1
- message "&c&lUP &6or &9&lDOWN"
- message "&7現在値(1~100)が&bランダム&7で表示されるので、"
- message "&7次に出るランダムな値(比較値)がそれより&c上&l(UP)&7か&9下&l(DOWN)&7かを予想します"
- message "&7成功すれば&6掛け金が&l二倍&7になり、失敗すれば&l全て消えます"
- message "&7現在値と比較値が同じ場合は確定で成功になります"
- message "&7現在賭け金: &b&l%{_kakekin}%"
- set {_rnd} to random integer between 1 to 100
- while true:
- set {_kakekin} to {_kakekin}*2
- set {_rnd2} to random integer between 1 to 100
- message "&7現在値: &a&l%{_rnd}%"
- message "&c&lUP &6or &9&lDOWN&7?"
- message "&c&lUP &7>> &c//u"
- message "&9&lDOWN &7>> &9//d"
- while true:
- if {handycasino::%player%::flag} is "u":
- if {_rnd} > {_rnd2}:
- set {_result} to 0
- else:
- set {_result} to 1
- exit loop
- if {handycasino::%player%::flag} is "d":
- if {_rnd} < {_rnd2}:
- set {_result} to 0
- else:
- set {_result} to 1
- exit loop
- wait a tick
- clear {handycasino::%player%::flag}
- message "&e&l比較値&7: &a&l%{_rnd2}%"
- if {_result} is not 1:
- set {_kakekin} to {_kakekin}/2
- message "&c&l賭 け 失 敗 !"
- message "&c%{_kakekin}%Gは得られませんでした"
- message "&6ゲームを終了します"
- exit loop
- message "&a&l賭 け 成 功 !"
- message "&7現在賭け金: &b&l%{_kakekin}%"
- message "&e&lContinue &7>> &e//c"
- message "&b&lExit &7>> &b//e"
- while true:
- if {handycasino::%player%::flag} is "c":
- exit loop
- if {handycasino::%player%::flag} is "e":
- set {_break} to true
- add {_kakekin} to {handycasino::%player%::coin}
- message "&a%{_kakekin}%Gを得ました"
- message "&6ゲームを終了します"
- exit loop
- wait a tick
- clear {handycasino::%player%::flag}
- if {_break} is true:
- exit loop
- set {_rnd} to {_rnd2}
- command //c:
- trigger:
- set {handycasino::%player%::flag} to "c"
- command //e:
- trigger:
- set {handycasino::%player%::flag} to "e"
- command //u:
- trigger:
- set {handycasino::%player%::flag} to "u"
- command //d:
- trigger:
- set {handycasino::%player%::flag} to "d"
Add Comment
Please, Sign In to add comment