newroll

Privateunrated

Content

40 lines
{=(comment):these are the default range values}
{=(lb):1}
{=(ub):100}

{=(bindex):{1}}

{=(comment):numbertests; this tests if the possible number(s) bindex holds are whole numbers}
{=(nt1):{if({bindex(1):-}=={m:trunc({bindex(1):-}/1)}):{bindex(1):-}|-1}}
{=(nt2):{if({bindex(2):-}=={m:trunc({bindex(2):-}/1)}):{bindex(2):-}|-1}}

{=(comment):these are the different possible outcomes}
{=(err):error}
{=(error):What do you expect me to do with that?}
{=(default):range:{lb}-{ub}}
{=(both):range:{m:trunc(abs({nt1}))}-{m:trunc(abs({nt2}))}}
{=(up):range:{lb}-{m:trunc(abs({nt2}))}}
{=(low):range:{m:trunc(abs({nt1}))}-{ub}}

{=(logic_breakdown):if {1} is empty, default, if {1} is 0 error, if abs value of {1} is 0, error}
{=(logic_breakdown):if both numtests are -1 (error), use default range as no whole number or range was given}
{=(logic_breakdown):if only one numtests is -1 (error), set new bound to non-error corresponding numtest bound}
{=(logic_breakdown):if both numtests are not -1 (error), if numtests are not equal to {1}, new upper and lower bounds provided, if 1st num is lower than 2nd num use both since range was given}
{=(logic_breakdown):if both numtests are not -1 (error), but both numtests = {1}, only new upper bound as only one number was provided. if numtests are equal to each other but not to {1}, it should error anyways as a null range was provided}

{=(outcome):{if(=={1}):default|{if({1}==0):err|{if({m:trunc(abs({1}))}==0):err|{all({nt1}==-1|{nt2}==-1):default|{if({nt2}==-1):low|{if({nt1}==-1):up|{all({nt1}!={1}|{nt2}!={1}):{if({nt1}<{nt2}):both|err}|{all({nt1}=={1}|{nt2}=={1}):up}}}}}}}}}

{=(comment):this is either the result of the range, {error}}
{=(RNG):{{{outcome}}}}

{=(comment):this sets a blank message for the custom roll message feature that will display UNLESS a static variable below overrides it. keep empty unless you want a message to be included with every roll outcome other than those specified in the next section. including error message outputs. so it's wise to keep this empty.}
{=(m{RNG}):}

{=(comment):this is where custom output messages can be added. follow the variable naming format: {m#} . a few are provided as examples}
{=(m1):One is the loneliest number}
{=(m50):Perfectly balanced...as all things should be}
{=(m100):💯}

{=(comment):this is the tag output}
{if({RNG(1)}==What):{RNG}|**{user}** rolls **{RNG}** ({{outcome}(2)::})}
{m{RNG}}
Raw JSON
{
  "id": 190789,
  "created_at": "2022-04-26T10:36:12.856Z",
  "tag_name": "newroll",
  "nsfw": false,
  "owner_id": "129419437911572480",
  "uses": 57,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "632187193162465281",
  "sharer": "129419437911572480",
  "content": "{=(comment):these are the default range values}\n{=(lb):1}\n{=(ub):100}\n\n{=(bindex):{1}}\n\n{=(comment):numbertests; this tests if the possible number(s) bindex holds are whole numbers}\n{=(nt1):{if({bindex(1):-}=={m:trunc({bindex(1):-}/1)}):{bindex(1):-}|-1}}\n{=(nt2):{if({bindex(2):-}=={m:trunc({bindex(2):-}/1)}):{bindex(2):-}|-1}}\n\n{=(comment):these are the different possible outcomes}\n{=(err):error}\n{=(error):What do you expect me to do with that?}\n{=(default):range:{lb}-{ub}}\n{=(both):range:{m:trunc(abs({nt1}))}-{m:trunc(abs({nt2}))}}\n{=(up):range:{lb}-{m:trunc(abs({nt2}))}}\n{=(low):range:{m:trunc(abs({nt1}))}-{ub}}\n\n{=(logic_breakdown):if {1} is empty, default, if {1} is 0 error, if abs value of {1} is 0, error}\n{=(logic_breakdown):if both numtests are -1 (error), use default range as no whole number or range was given}\n{=(logic_breakdown):if only one numtests is -1 (error), set new bound to non-error corresponding numtest bound}\n{=(logic_breakdown):if both numtests are not -1 (error), if numtests are not equal to {1}, new upper and lower bounds provided, if 1st num is lower than 2nd num use both since range was given}\n{=(logic_breakdown):if both numtests are not -1 (error), but both numtests = {1}, only new upper bound as only one number was provided. if numtests are equal to each other but not to {1}, it should error anyways as a null range was provided}\n\n{=(outcome):{if(=={1}):default|{if({1}==0):err|{if({m:trunc(abs({1}))}==0):err|{all({nt1}==-1|{nt2}==-1):default|{if({nt2}==-1):low|{if({nt1}==-1):up|{all({nt1}!={1}|{nt2}!={1}):{if({nt1}<{nt2}):both|err}|{all({nt1}=={1}|{nt2}=={1}):up}}}}}}}}}\n\n{=(comment):this is either the result of the range, {error}}\n{=(RNG):{{{outcome}}}}\n\n{=(comment):this sets a blank message for the custom roll message feature that will display UNLESS a static variable below overrides it. keep empty unless you want a message to be included with every roll outcome other than those specified in the next section. including error message outputs. so it's wise to keep this empty.}\n{=(m{RNG}):}\n\n{=(comment):this is where custom output messages can be added. follow the variable naming format: {m#} . a few are provided as examples}\n{=(m1):One is the loneliest number}\n{=(m50):Perfectly balanced...as all things should be}\n{=(m100):💯}\n\n{=(comment):this is the tag output}\n{if({RNG(1)}==What):{RNG}|**{user}** rolls **{RNG}** ({{outcome}(2)::})}\n{m{RNG}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T21:30:42.471Z"
}