Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Written by IchinoseYuki Discord:一ノ瀬雪#1027
- #Request: IY-Core Ver:1.0 or later
- #Recommended: IY-Core Ver:1.2 or later
- on script load:
- broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Dice&9&l]&e&l&k|||&r &7Ver.1.2"
- command /dice [<string>] [<string>]:
- trigger:
- if arg-1 is not set:
- set {_error.1} to 1
- if arg-1 parsed as number is not more than 0:
- if arg-2 is not set:
- set {_error.2} to 1
- else:
- if arg-2 parsed as number is not more than 0:
- set {_error.2} to 2
- else:
- set {_error.2} to 3
- else if arg-2 is not set:
- set {_success.1} to true
- else if arg-2 is set:
- if arg-2 parsed as number is not more than 0:
- set {_error.2} to 4
- else if arg-2 parsed as number is 1:
- set {_success.1} to true
- else:
- set {_success.2} to true
- if {_success.1} is true:
- send "&aSuccess: &rThe dice roll is %random integer between 1 and arg-1 parsed as number%." if {IY::config::%uuid of player%::language} is "en"
- send "&a成功: &rサイコロの目は %random integer between 1 and arg-1 parsed as number% です。" if {IY::config::%uuid of player%::language} is "ja"
- if {_success.2} is true:
- loop arg-2 parsed as number time:
- add random integer between 1 and arg-1 parsed as number to {_dice::*}
- send "&aSuccess: &rThe dice rolls are %{_dice::*}%." if {IY::config::%uuid of player%::language} is "en"
- send "&a成功: &rサイコロの目は %{_dice::*}% です。" if {IY::config::%uuid of player%::language} is "ja"
- if {_error.1} is set:
- message "1"
- send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is "en"
- send "&4失敗: &rコマンドの引数を指定してください。" if {IY::config::%uuid of player%::language} is "ja"
- if {_error.2} is set:
- send "&4Error: &rIncorrect argument for command." if {IY::config::%uuid of player%::language} is "en"
- send "&4失敗: &rコマンドの引数の指定が間違っています。" if {IY::config::%uuid of player%::language} is "ja"
- send "&0: &7/dice &c&n%arg-1%" if {_error.2} is 1
- send "&0: &7/dice &c&n%arg-1% %arg-2%" if {_error.2} is 2
- send "&0: &7/dice &c&n%arg-1%&7 %arg-2%" if {_error.2} is 3
- send "&0: &7/dice %arg-1% &c&n%arg-2%" if {_error.2} is 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement