Comments (4)
I will say it is normal but diceparser should display warning when you run this kind of command.
The C operator computes how many dice fit the condition. It is useless on scalar number.
The main issue with this command is that !d20+3
as for final result a number, when "!d20" has a dice result array as final result.
!d20c[>0]+3
works.
I don't know what you want to do but I think the If operator may help you. As It can compare any kind of result.
from diceparser.
Hi obiwankennedy thanks for your answer that helped me to sourt out the problem!
I'd like to explain what I'm trying to obtain:
I used (wrongly) this form because my goal is to 'script' on a single roll a hit to roll and if enemy is hit to roll the damage.
This what I was trying to do:
!d20+3c[>11]; d10+3; $2*$3; "damage inflicted is: $4"
this should ouput 0 if enemy is missed (it has AC 12) otherwise d10+3 damage is displayed.
I could use the
!d20c[>8]+3
but is not optimal because I've to recalculate condition to be hit (from >11 to >8).
Maybe I'm doing in the wrong way there is a more convenient way to obtain this?
from diceparser.
The command you want to do is this:
!1d20+3;$1i:[>11]{1d10+3}{0};"inflicted damage: $2 details:[%2]"
First instruction, I roll the dice and add 3.
Second instruction, I compare the result of the first instruction to 11 and if it is greater I roll damage (1d10+3) or return 0 otherwise.
Then, I finally print out the result.
Be careful, that the default parameter of 1 in d10
does not work inside if instruction.
So, it is important to write {1d10+3}
; because {d10+3}
won't work.
from diceparser.
Thanks a lot for the solution!
from diceparser.
Related Issues (20)
- Macros activated from comment (#) and sentence display ("") HOT 1
- Exploding Doubles HOT 1
- No valid value at index HOT 5
- Question re: Syntax for an IF statement based on an Entered Number and a Dice Roll. HOT 2
- Bot stopped working with Discord's latest version HOT 6
- Prefix not working HOT 3
- All dice prefix commands not working HOT 3
- Diceparser not working with webhook
- DiceParser not working September 2022 HOT 1
- /r works but ! does not HOT 5
- Help Noob please! Bot Setup steps for RPG HOT 2
- Weird handling of numbers in lists
- Bot frequently does not respond
- Bot Not Responding In Any Server
- bot does not allow users below the rank of admin to roll HOT 3
- Broken example in HelpMe.md HOT 1
- List weight doesn't seem to work
- Dice Parse offline? HOT 2
- Ambiguous licensing HOT 1
- Discord bot privacy information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diceparser.