Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /debug:
- trigger:
- if {debug::*} doesn't contain player:
- add player to {debug::*}
- else:
- remove player from {debug::*}
- #スロット作成手順
- #1. /lbslot.pos <番号> でスロットにするブロックを指定
- #2. /itemid でパターンに入れるアイテムのIDを確認
- #3. /lbslot.create <ID> <使うPosの量> <パターン> でスロットを作成
- #4. /lbslot.opt.time <ID> <回転数> でスロットの回転数を指定
- #5. /lbslot.opt.addhit <ID> <HitID> <Pos> でヒットパターンを指定
- #6. /lbslot.opt.reward.hit <ID> <HitID> <報酬倍率> でヒットパターンごとの報酬倍率を指定
- #7. /lbslot.opt.reward.block <ID> <ブロック> <報酬量> でブロックパターンごとの報酬量を指定
- #8. /lbslot.opt.message <ID> <HitID> <メッセージ> でヒットパターンごとの個人向けのメッセージを指定
- #9. /lbslot.opt.broadcast <ID> <HitID> <メッセージ> でヒットパターンごとの全体向けのメッセージを指定
- #10. /lbslot.opt.chip <ID> <賭け金> でスロットを回すのに必要な賭け金を指定
- #11. /lbslot.execute <ID> @p をコマンドブロックに入れて終わり!
- command /lbslot.pos <integer>:
- permission: lbslot.pos
- trigger:
- set {lbslot::player.%player%::pos::%arg 1%} to location of player's target block
- message "&albslot &7> &9pos &7> &fPos%arg 1%を %location of player's target block% に設定しました"
- command /lbslot.create <text> <integer> <text>:
- permission: lbslot.create
- trigger:
- set {_args::*} to split arg 3 by ","
- loop {_args::*}:
- set {_loopcount} to 1
- set {_dot} to 1
- #message first character of loop-value
- if first character of loop-value is "*":
- set {_char::*} to loop-value split by ""
- set {_exitloop} to false
- loop {_char::*}:
- continue loop if {_exitloop} is true
- #message "... %loop-index-2%:%loop-value-2%"
- continue loop if loop-index-2 is "1"
- if loop-value-2 is ".":
- set {_loopcount} to substring of loop-value-1 from 2 to {_dot}
- set {_loopcount} to {_loopcount} parsed as integer
- #message "%{_dot}% %{_loopcount}%"
- add 2 to {_dot}
- set {_exitloop} to true
- continue loop
- set {_dot} to loop-index-2 parsed as integer
- #message "%{_dot}%,%{_loopcount}%"
- set {_value} to substring of loop-value-1 from {_dot} to length of loop-value-1
- #message "%{_value}%"
- loop {_loopcount} times:
- add 1 to {_index}
- message "%{_index}%:%{_value}%"
- set {lbslot::slot.%arg 1%::pattern::%{_index}%} to {_value} parsed as itemtype
- loop arg-2 times:
- set {lbslot::slot.%arg 1%::location::%loop-number%} to {lbslot::player.%player%::pos::%loop-number%}
- message "&albslot &7> &6create &7> &fスロット ""%arg 1%"" を作成しました"
- command /lbslot.remove <text>:
- permission: lbslot.remove
- trigger:
- message "&albslot &7> &6remove &7> &fスロット ""%arg 1%"" を削除しました"
- clear {lbslot::slot.%arg 1%::*}
- command /lbslot.opt.pattern <text> <text>:
- permission: lobslot.opt.pattern
- trigger:
- clear {lbslot::slot.%arg 1%::pattern::*}
- message "&albslot &7> &6opt &7> &9pattern &7> &fスロット ""%arg 1%"" のパターンを変更しました"
- set {_args::*} to split arg 2 by ","
- loop {_args::*}:
- set {_loopcount} to 1
- set {_dot} to 1
- #message first character of loop-value
- if first character of loop-value is "*":
- set {_char::*} to loop-value split by ""
- set {_exitloop} to false
- loop {_char::*}:
- continue loop if {_exitloop} is true
- #message "... %loop-index-2%:%loop-value-2%"
- continue loop if loop-index-2 is "1"
- if loop-value-2 is ".":
- set {_loopcount} to substring of loop-value-1 from 2 to {_dot}
- set {_loopcount} to {_loopcount} parsed as integer
- #message "%{_dot}% %{_loopcount}%"
- add 2 to {_dot}
- set {_exitloop} to true
- continue loop
- set {_dot} to loop-index-2 parsed as integer
- #message "%{_dot}%,%{_loopcount}%"
- set {_value} to substring of loop-value-1 from {_dot} to length of loop-value-1
- #message "%{_value}%"
- loop {_loopcount} times:
- add 1 to {_index}
- message "%{_index}%:%{_value}%"
- set {lbslot::slot.%arg 1%::pattern::%{_index}%} to {_value} parsed as itemtype
- command /lbslot.opt.pos <text> <integer>:
- permission: lobslot.opt.pos
- trigger:
- clear {lbslot::slot.%arg 1%::location::*}
- message "&albslot &7> &6opt &7> &9pattern &7> &fスロット ""%arg 1%"" のブロック位置を変更しました"
- loop arg-2 times:
- set {lbslot::slot.%arg 1%::location::%loop-number%} to {lbslot::player.%player%::pos::%loop-number%}
- command /lbslot.opt.time <text> <integer>:
- permission: lobslot.opt.pattern
- trigger:
- message "&albslot &7> &6opt &7> &9pattern &7> &fスロット ""%arg 1%"" の回転数を &e%arg 2% &fに変更しました"
- set {lbslot::slot.%arg 1%::loop} to arg 2
- command /lbslot.opt.addhit <text> <text> <text>:
- permission: lobslot.opt.addhit
- trigger:
- message "&albslot &7> &6opt &7> &9addhit &7> &fスロット ""%arg 1%"" に新しいヒットパターンを追加しました"
- message "&a名前: %arg 2% / パターン: %arg 3%"
- set {_args::*} to split arg 3 by ","
- loop {_args::*}:
- set {lbslot::slot.%arg 1%::hit::%arg 2%} to true
- add loop-value to {lbslot::slot.%arg 1%::hit::%arg 2%::*}
- command /lbslot.opt.remhit <text> <text>:
- permission: lobslot.opt.remhit
- trigger:
- message "&albslot &7> &6opt &7> &9remhit &7> &fスロット ""%arg 1%"" から"
- message "&fヒットパターン ""%arg 2%"" を削除しました"
- clear {lbslot::slot.%arg 1%::hit::%arg 2%}
- clear {lbslot::slot.%arg 1%::hit::%arg 2%::*}
- command /lbslot.opt.message <text> <text> <text>:
- permission: lobslot.opt.message
- trigger:
- message "&albslot &7> &6opt &7> &9message &7> &fスロット ""%arg 1%"" ヒットパターン ""%arg 2%"" の"
- message "&fメッセージを設定しました"
- set {lbslot::slot.%arg 1%::hit.message::%arg 2%} to arg 3
- command /lbslot.opt.broadcast <text> <text> <text>:
- permission: lobslot.opt.broadcast
- trigger:
- message "&albslot &7> &6opt &7> &9broadcast &7> &fスロット ""%arg 1%"" ヒットパターン ""%arg 2%"" の"
- message "&f全体メッセージを設定しました"
- set {lbslot::slot.%arg 1%::hit.broadcast::%arg 2%} to arg 3
- command /lbslot.opt.reward.hit <text> <text> <number>:
- permission: lobslot.opt.reward.hit
- trigger:
- message "&albslot &7> &6opt &7> &9reward.hit &7> &fスロット ""%arg 1%"" ヒットパターン ""%arg 2%"" の"
- message "&f報酬倍率を &e%arg 3% &fに設定しました"
- set {lbslot::slot.%arg 1%::hit.reward::%arg 2%} to arg 3
- command /lbslot.opt.reward.block <text> <text> <integer>:
- permission: lobslot.opt.reward.block
- trigger:
- set {_arg2} to arg 2
- replace all "_" with " " in {_arg2}
- set {_arg2} to {_arg2} parsed as itemtype
- message "&albslot &7> &6opt &7> &9reward.block &7> &fスロット ""%arg 1%"" ブロック %{_arg2}% の"
- message "&f報酬額を &e%arg 3% &fに設定しました"
- set {lbslot::slot.%arg 1%::reward::%{_arg2}%} to arg 3
- command /lbslot.opt.chip <text> <integer>:
- permission: lobslot.opt.reward.block
- trigger:
- message "&albslot &7> &6opt &7> &9chip &7> &fスロット ""%arg 1%"" の賭け金を %arg 2% に設定しました"
- set {lbslot::slot.%arg 1%::chip} to arg 2
- command /lbslot.force.doingcancel <text>:
- permission: lbslot.force.doingcancel
- trigger:
- message "&albslot &7> &e&lFORCE &7> &9doingcancel &7> &c&ldoing を解除しました"
- set {lbslot::slot.%arg 1%::stat::doing} to false
- command /lbslot.execute <text> <player>:
- permission: lbslot.execute
- trigger:
- if {lbslot::slot.%arg 1%::chip} > {casino::player.%arg 2%::stat::coin}:
- message "&a&llbslot &7> &cコインが必要数に足りていません (&e%{casino::player.%arg 2%::stat::coin}%/%{lbslot::slot.%arg 1%::chip}%&c)" to arg 2
- stop
- if {lbslot::slot.%arg 1%::stat::doing} is true:
- message "&a&llbslot &7> &cスロットが回転中です" to arg 2
- stop
- remove {lbslot::slot.%arg 1%::chip} from {casino::player.%arg 2%::stat::coin}
- message "&9&llbslot &7> &e%arg 2% Roll %arg 1% &7(Debug Message)" to {debug::*}
- set {lbslot::slot.%arg 1%::stat::doing} to true
- set {lbslot::slot.%arg 1%::loop} to 8 if {lbslot::slot.%arg 1%::loop} is not set
- set {_blocks::*} to {lbslot::slot.%arg 1%::pattern::*}
- loop {lbslot::slot.%arg 1%::location::*}:
- set block at location of loop-value to bedrock
- loop {lbslot::slot.%arg 1%::location::*}:
- loop {lbslot::slot.%arg 1%::loop} times:
- set {_blocks.::*} to {_blocks::*}
- remove {_block} from {_blocks.::*}
- set {_block} to random element out of {_blocks.::*}
- set block at location of loop-value-1 to {_block}
- command "execute %arg 2% ~ ~ ~ playsound block.stone.place master @p ~ ~ ~ 0.3 1 0.1"
- wait 1 tick
- command "execute %arg 2% ~ ~ ~ playsound block.stone.place master @p ~ ~ ~ 1.0 0.5 0.5"
- add {_block} to {_result::*}
- clear {_block}
- set {lbslot::slot.%arg 1%::stat::doing} to false
- loop {lbslot::slot.%arg 1%::hit::*}:
- set {_result} to true
- clear {_dice-prev}
- clear {_dice}
- loop {lbslot::slot.%arg 1%::hit::%loop-index%::*}:
- set {_dice-prev} to {_dice}
- set {_dice} to {_result::%loop-value-2%}
- continue loop if {_dice-prev} is not set
- set {_result} to false if {_dice} isn't {_dice-prev}
- {_result} is true
- add 1 to {_hits}
- command "execute %arg 2% ~ ~ ~ playsound entity.player.levelup master @p ~ ~ ~ 1.0 0.5 0.5"
- set {_reward} to floor({lbslot::slot.%arg 1%::reward::%{_dice}%}*{lbslot::slot.%arg 1%::hit.reward::%loop-index%})
- set {_mes} to colored {lbslot::slot.%arg 1%::hit.message::%loop-index%}
- replace all "[p]" with "%arg 2%" in {_mes}
- replace all "[r]" with "%{_reward}%" in {_mes}
- message "&a&llbslot &7> %{_mes}%" to arg 2 if {_mes} is set
- message "&a&llbslot &7> &e&lHIT! %{_reward}%coins" to arg 2 if {_mes} is not set
- set {_brc} to colored {lbslot::slot.%arg 1%::hit.broadcast::%loop-index%}
- replace all "[p]" with "%arg 2%" in {_brc}
- replace all "[r]" with "%{_reward}%" in {_brc}
- broadcast "&a&llbslot &7> %{_brc}%" if {_brc} is set
- message "&9&llbslot &7> &e%arg 2% &bSucc %arg 1% &7(Debug Message)" to {debug::*}
- add {_reward} to {casino::player.%arg 2%::stat::coin}
- {_hits} is not set
- command "execute %arg 2% ~ ~ ~ playsound entity.player.burp master @p ~ ~ ~ 1.0 1.0 0.5"
- message "&9&llbslot &7> &e%arg 2% &cFail %arg 1% &7(Debug Message)" to {debug::*}
Add Comment
Please, Sign In to add comment