Advertisement
IchinoseYuki

IY-Dice.sk v2.0

Feb 3rd, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. #Written by IchinoseYuki Discord:一ノ瀬雪#1027
  2. #Request: IY-Core Ver:1.0 or later
  3.  
  4. on script load:
  5. broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Dice&9&l]&e&l&k|||&r &7Ver.2.0"
  6.  
  7. command /dice [<string>] [<string>]:
  8. trigger:
  9. if arg-1 is not set:
  10. set {_error.1} to 1
  11. if arg-1 parsed as number is not more than 0:
  12. if arg-2 is not set:
  13. set {_error.2} to 1
  14. else:
  15. if arg-2 parsed as number is not more than 0:
  16. set {_error.2} to 2
  17. else:
  18. set {_error.2} to 3
  19. else if arg-2 is not set:
  20. set {_success.1} to true
  21. else if arg-2 is set:
  22. if arg-2 parsed as number is not more than 0:
  23. set {_error.2} to 4
  24. else if arg-2 parsed as number is 1:
  25. set {_success.1} to true
  26. else:
  27. set {_success.2} to true
  28. if {_success.1} is true:
  29. 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"
  30. send "&aSuccess: &rサイコロの目は%random integer between 1 and arg-1 parsed as number%です。" if {IY::config::%uuid of player%::language} is "ja"
  31. send "&aSuccess: &rThe dice roll is %random integer between 1 and arg-1 parsed as number%." if {IY::config::%uuid of player%::language} is not set
  32. if {_success.2} is true:
  33. loop arg-2 parsed as number time:
  34. add random integer between 1 and arg-1 parsed as number to {_dice::*}
  35. send "&aSuccess: &rThe dice rolls are %{_dice::*}%." if {IY::config::%uuid of player%::language} is "en"
  36. send "&aSuccess: &rサイコロの目は%{_dice::*}%です。" if {IY::config::%uuid of player%::language} is "ja"
  37. send "&aSuccess: &rThe dice rolls are %{_dice::*}%." if {IY::config::%uuid of player%::language} is not set
  38. if {_error.1} is set:
  39. message "1"
  40. send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is "en"
  41. send "&4失敗: &rコマンドの引数を指定してください。" if {IY::config::%uuid of player%::language} is "ja"
  42. send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is not set
  43. if {_error.2} is set:
  44. send "&4Error: &rIncorrect argument for command." if {IY::config::%uuid of player%::language} is "en"
  45. send "&4失敗: &rコマンドの引数の指定が間違っています。" if {IY::config::%uuid of player%::language} is "ja"
  46. send "&4Error: &rIncorrect argument for command." if {IY::config::%uuid of player%::language} is not set
  47. send "&0: &7/dice &c&n%arg-1%" if {_error.2} is 1
  48. send "&0: &7/dice &c&n%arg-1% %arg-2%" if {_error.2} is 2
  49. send "&0: &7/dice &c&n%arg-1%&7 %arg-2%" if {_error.2} is 3
  50. 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