SHARE
TWEET

IY-Dice.sk v2.2

IchinoseYuki Feb 14th, 2020 (edited) 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.1.2"
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top