Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- CurrencySingularForm: 炎
- CurrencyPluralForm: 炎
- function RegularMoneyNotation(number: number) :: text:
- if {_number} is 1:
- return "%{_number}%{@CurrencySingularForm}"
- else:
- return "%{_number}%{@CurrencyPluralForm}"
- function mod(a: number, b: number) :: number:
- return {_a} - floor({_a} / {_b}) * {_b}
- command /bet <number>:
- usage: /bet <賭け金>
- trigger:
- if {%player%.betted} isn't set:
- set {%player%.betted} to false
- if {%player%.betted} is false:
- if arg is more than player's money:
- message "【ベットシステム】この金額はベット出来ません。所持金以下にしてください。(所持金:%player's money%)"
- else if arg is less than 0:
- message "【ベットシステム】この金額はベット出来ません。正の数にして下さい。(入力値:%arg%)"
- else:
- set {%player%.betMoney} to arg
- remove arg from player's money
- set {%player%.betted} to true
- message "【ベットシステム】%RegularMoneyNotation({%player%.betMoney})%のベットに成功しました。"
- else:
- message "【ベットシステム】あなたは既にベットしています。"
- command /checkbet:
- trigger:
- if {%player%.betted} is true:
- message "【ベットシステム】あなたは既に%RegularMoneyNotation({%player%.betMoney})%ベットしています。"
- else:
- message "【ベットシステム】/betでベットしてください。"
- command /resetbet:
- trigger:
- add {%player%.betMoney} to player's money
- set {%player%.betMoney} to 0
- set {%player%.betted} to false
- message "【ベットシステム】ベットをリセットしました。"
- command /tyouhan <text>:
- usage: /tyouhan <丁|半>
- trigger:
- if {%player%.betted} is true:
- if arg is "丁" or "半":
- set {%player%.dice::1} to random integer between 1 and 6
- set {%player%.dice::2} to random integer between 1 and 6
- set {%player%.total} to {%player%.dice::1} + {%player%.dice::2}
- if mod({%player%.total}, 2) is 0:
- set {%player%.tyouhan} to "丁"
- else:
- set {%player%.tyouhan} to "半"
- message "【丁半】%{%player%.dice::1}%+%{%player%.dice::2}%=%{%player%.total}%(%{%player%.tyouhan}%)"
- if {%player%.tyouhan} is arg:
- add {%player%.betMoney} * 2 to player's money
- message "【丁半】当たり!"
- message "【丁半】%RegularMoneyNotation({%player%.betMoney} * 2)%獲得しました!"
- else:
- message "【丁半】外れ…。"
- set {%player%.betted} to false
- else:
- message "【丁半】丁か半で入力してください。"
- else:
- message "【丁半】先に/betコマンドでベットして下さい。"
- command /dicehit <integer>:
- usage: /dicehit <賭ける数 2-12>
- trigger:
- if {%player%.betted} is true:
- set {%player%.dice::1} to random integer between 1 and 6
- set {%player%.dice::2} to random integer between 1 and 6
- set {%player%.total} to {%player%.dice::1} + {%player%.dice::2}
- if arg is between 2 and 12:
- message "【ダイスヒット】%{%player%.dice::1}%+%{%player%.dice::2}%=%{%player%.total}%"
- if {%player%.total} is arg:
- if arg is 2 or 12:
- add {%player%.betMoney} * 36 to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation({%player%.betMoney} * 36)%獲得しました!"
- if arg is 3 or 11:
- add {%player%.betMoney} * 18 to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation({%player%.betMoney} * 18)%獲得しました!"
- if arg is 4 or 10:
- add {%player%.betMoney} * 12 to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation({%player%.betMoney} * 12)%獲得しました!"
- if arg is 5 or 9:
- add {%player%.betMoney} * 9 to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation({%player%.betMoney} * 9)%獲得しました!"
- if arg is 6 or 8:
- add floor({%player%.betMoney} * 7.2) to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation(floor({%player%.betMoney} * 7.2))%獲得しました!"
- if arg is 7:
- add {%player%.betMoney} * 6 to player's money
- message "【ダイスヒット】当たり!"
- message "【ダイスヒット】%RegularMoneyNotation({%player%.betMoney} * 6)%獲得しました!"
- else:
- message "【ダイスヒット】外れ…。"
- set {%player%.betted} to false
- else:
- message "2〜12で入力してください。"
- else:
- message "【ダイスヒット】先に/betコマンドでベットして下さい。"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement