Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

equals a number

Is there a way to make a command so that if it equals a number then it gives back one, and if it does not then it gives back zero. So if I had [[2456=2456]] it would give back 1, and if I had [[2=2456]] it would give back 0. 
Need some context in where this is being used. An inline roll or a table or something else?
Something like this [button](~Macros|[[(@{selected|token_name}*101)+(@{selected|token_name}*102)+(@{selected|token_name}*103)]]) I don't have it all planned out yet, but I know I need to be able to have one value equal 1 and all other values equal zero. It needs to be arbitrary, so the same macro will find different numbers depending on the circumstance. 
[[ {@{selected|token_name} + d0}=101 ]] The above will resolved to 1 if @{selected|token_name} equals 101. Otherwise, it will resolve to 0.
Awesome. Thanks a lot.