Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /slot [<text>] [<text>] [<number>]:
- permission: skript.admin
- trigger:
- if arg-1 is not set:
- message "&c/slot new <名前> - 新しいスロットマシン"
- message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
- if arg-1 is set:
- if arg-1 is "new":
- if arg-2 is not set:
- message "&c/slot new <名前> - 新しいスロットマシン"
- else:
- if {slot::%arg-2%} is true:
- message "&cすでにそのスロットは存在します。"
- else:
- message "&a%arg-2%を作成しました。"
- message "&a次に、スロットの画面を設定します。"
- message "&a/slot set %arg-2% <1,2,3> - 3個設定してください。"
- set {slot::%arg-2%} to true
- else if arg-1 is "set":
- if arg-2 is not set:
- message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
- else:
- if arg-3 is not 1 or 2 or 3:
- message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
- else:
- if {slot::%arg-2%} is true:
- if arg-3 is 1:
- if {slot.set::%uuid of player%} is true:
- message "&c使用できませんでした。"
- stop
- else:
- message "&a1つ目のブロックをカーソルに合わせてクリックしてください。"
- message "&aキャンセルする場合は/slot setcancel と打ってください。"
- set {slot.set.1::%uuid of player%} to true
- set {slot.set::%uuid of player%} to true
- set {slot.set.g::%uuid of player%} to arg-2
- stop
- if arg-3 is 2:
- if {slot.set::%uuid of player%} is true:
- message "&c使用できませんでした。"
- stop
- else:
- message "&a2つ目のブロックをカーソルに合わせてクリックしてください。"
- message "&aキャンセルする場合は/slot setcancel と打ってください。"
- set {slot.set.2::%uuid of player%} to true
- set {slot.set::%uuid of player%} to true
- stop
- if arg-3 is 3:
- if {slot.set::%uuid of player%} is true:
- message "&c使用できませんでした。"
- stop
- else:
- message "&a3つ目のブロックをカーソルに合わせてクリックしてください。"
- message "&aキャンセルする場合は/slot setcancel と打ってください。"
- set {slot.set.3::%uuid of player%} to true
- set {slot.set::%uuid of player%} to true
- stop
- else:
- message "&cそのスロットはありません。"
- else if arg-1 is "setcancel":
- if {slot.set::%uuid of player%} is true:
- message "&aキャンセルしました。"
- set {slot.set.1::%uuid of player%} to false
- set {slot.set.2::%uuid of player%} to false
- set {slot.set.3::%uuid of player%} to false
- set {slot.set::%uuid of player%} to false
- stop
- else:
- message "&c使用できませんでした。"
- on right click:
- if {slot.set::%uuid of player%} is true:
- if target block is not air:
- if {slot.set.1::%uuid of player%} is true:
- set {slot.%{slot.set.g::%uuid of player%}%.1} to location of target block
- message "&a%{slot.set.g::%uuid of player%}%の1つ目のスロットを設定"
- set {slot.set.1::%uuid of player%} to false
- set {slot.set::%uuid of player%} to false
- if {slot.set.2::%uuid of player%} is true:
- set {slot.%{slot.set.g::%uuid of player%}%.2} to location of target block
- message "&a%{slot.set.g::%uuid of player%}%の2つ目のスロットを設定"
- set {slot.set.2::%uuid of player%} to false
- set {slot.set::%uuid of player%} to false
- if {slot.set.3::%uuid of player%} is true:
- set {slot.%{slot.set.g::%uuid of player%}%.3} to location of target block
- message "&a%{slot.set.g::%uuid of player%}%の2つ目のスロットを設定"
- set {slot.set.3::%uuid of player%} to false
- set {slot.set::%uuid of player%} to false
- on sign change:
- if line 1 is "Slot":
- if line 2 is set:
- if line 3 is set:
- if line 4 is set:
- if {slot::%line 2%} is true:
- message "&a%line 2%を作成しました。"
- message "&a金額: %line 3%"
- message "&a当たり金額: %line 4%"
- set {slot.t::%location%} to true
- set {slot.name::%location%} to line 2
- set {slot.money::%location%} to line 3 parsed as number
- set {slot.win:%location%} to line 4 parsed as number
- set line 1 to "&4&lスロットマシン"
- set line 2 to "&0&l%line 2%"
- set line 3 to "&a&l金額: &0%line 3%"
- set line 4 to "&a&l当たり金額: &0%line 4%"
- else:
- message "&cそのスロットはありません。"
- else:
- message "&c4行目に当たり金額を書いてください。"
- else:
- message "&c3行目に金額を書いてください。"
- else:
- message "&c2行目にスロット名を書いてください。"
- on right click:
- if {slot.t::%location of target block%} is true:
- if player's money is greater than or equal to {slot.money::%location of target block%}:
- if {slot.can::%uuid of player%} is true:
- remove {slot.money::%location of target block%} from player's money
- set {slot.can::%uuid of player%}
- message "&aスロットを引いています〜"
- wait 1 second
- chance of 33%:
- set {_a} to "1"
- set block at {slot.%{slot.name::%location of target block%}%.1} to 35:4
- else:
- chance of 50%:
- set {_a} to "2"
- set block at {slot.%{slot.name::%location of target block%}%.1} to 35:5
- else:
- set {_a} to "3"
- set block at {slot.%{slot.name::%location of target block%}%.1} to 35:6
- wait 1 second
- chance of 33%:
- set {_b} to "1"
- set block at {slot.%{slot.name::%location of target block%}%.2} to 35:4
- else:
- chance of 50%:
- set {_b} to "2"
- set block at {slot.%{slot.name::%location of target block%}%.2} to 35:5
- else:
- set {_b} to "3"
- set block at {slot.%{slot.name::%location of target block%}%.2} to 35:6
- wait 1 second
- chance of 33%:
- set {_c} to "1"
- set block at {slot.%{slot.name::%location of target block%}%.3} to 35:4
- else:
- chance of 50%:
- set {_c} to "2"
- set block at {slot.%{slot.name::%location of target block%}%.3} to 35:5
- else:
- set {_c} to "3"
- set block at {slot.%{slot.name::%location of target block%}%.3} to 35:6
- if {_a} is {_b}:
- if {_b} is {_c}:
- message "&a当たりました!賞金: &e%{slot.win::%location of target block%}%"
- add {slot.win::%location of target block%} to player's money
- set {slot.can::%uuid of player%} to true
- else:
- message "&c時間をあけてください。"
- else:
- message "&c所持金が足りません。"
Add Comment
Please, Sign In to add comment