Advertisement
IchinoseYuki

IY-Dice.sk v2.3

Feb 15th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. #Written by IchinoseYuki Discord:一ノ瀬雪#1027
  2. #Request: IY-Core Ver:1.0 or later
  3. #Recommended: IY-Core Ver:1.2 or later
  4.  
  5. on script load:
  6. broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Dice&9&l]&e&l&k|||&r &7Ver.2.3"
  7.  
  8. command /dice [<string>] [<string>]:
  9. trigger:
  10. if arg-1 is not set:
  11. set {_error.1} to 1
  12. if arg-1 parsed as number is not more than 0:
  13. if arg-2 is not set:
  14. set {_error.2} to 1
  15. else:
  16. if arg-2 parsed as number is not more than 0:
  17. set {_error.2} to 2
  18. else:
  19. set {_error.2} to 3
  20. else if arg-2 is not set:
  21. set {_success.1} to true
  22. else if arg-2 is set:
  23. if arg-2 parsed as number is not more than 0:
  24. set {_error.2} to 4
  25. else if arg-2 parsed as number is 1:
  26. set {_success.1} to true
  27. else:
  28. set {_success.2} to true
  29. if {_success.1} is true:
  30. 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"
  31. send "&a成功: &rサイコロの目は %random integer between 1 and arg-1 parsed as number% です。" if {IY::config::%uuid of player%::language} is "ja"
  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 "&a成功: &rサイコロの目は %{_dice::*}% です。" if {IY::config::%uuid of player%::language} is "ja"
  37. if {_error.1} is set:
  38. message "1"
  39. send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is "en"
  40. send "&4失敗: &rコマンドの引数を指定してください。" if {IY::config::%uuid of player%::language} is "ja"
  41. if {_error.2} is set:
  42. send "&4Error: &rIncorrect argument for command." if {IY::config::%uuid of player%::language} is "en"
  43. send "&4失敗: &rコマンドの引数の指定が間違っています。" if {IY::config::%uuid of player%::language} is "ja"
  44. send "&0: &7/dice &c&n%arg-1%" if {_error.2} is 1
  45. send "&0: &7/dice &c&n%arg-1% %arg-2%" if {_error.2} is 2
  46. send "&0: &7/dice &c&n%arg-1%&7 %arg-2%" if {_error.2} is 3
  47. send "&0: &7/dice %arg-1% &c&n%arg-2%" if {_error.2} is 4
  48.  
  49. on tab complete:
  50. set {_args::*} to substring of event-string from 2 to length of event-string split at " "
  51. {_args::1} is "dice"
  52. if size of {_args::*} is 2:
  53. the first 1 characters of {_args::2} is not set
  54. add "&5<&eRoll&5>&r" to completions
  55. if size of {_args::*} is 3:
  56. the first 1 characters of {_args::3} is not set
  57. add "&5<&eAmount&5>&r" to completions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement