Comments (5)
Hello, I didn't test anything but by looking at your command, you aren't using the same compare method in your ifs. The first one is a i:[>=$2] (on final value of $1) where the others are comparing the threshold with each dice value
from diceparser.
Thx for your answer.
Unfortunately, the error seems to be yet there. :'(
!macro add ([0-99]+)p([0-99]+) "1d10+\1;$1i:[=1]{-3}{$1};\2;\2+7;\2-7;$1i:[>=$4]{\"Critical success $2\"}{i[>=$3]{\"Success $2\"}{i[<$5]{\"Critical fail $2\"}{\"Fail $2\"}}}" True
Warning: Unexpected character at 50 - end of command was ignored "Critical success $2"}{i[>=$3]{"Success $2"}{i[<$5]{"Critical fail $2"}{"Fail $2"}}}""
No valid value at index: $4
from diceparser.
!macro add ([0-99]+)p([0-99]+) 1d10+\1;$1i:[=1]{-3}{$1};\2;\2+7;\2-7;$1i:[>=$4]{"Critical success $2"}{i:[>=$3]{"Success $2"}{i:[<$5]{"Critical fail $2"}{"Fail $2"}}} True
It is better to use the Switch operator instead of ifs. See the documentation: https://invent.kde.org/rolisteam/rolisteam-diceparser/-/blob/master/HelpMe.md#switch-case-s
from diceparser.
Hello Obiwan & folks,
So, I tried the Switch/Case operator in many ways without successful full results.
Here is the last macro used:
!macro add ([0-9]+)a([0-9]+) \1;1d[-3..10]R[=-2|=-1|=0|=1];$1+$2;\2;$4+7;$4-7;$3S[>=$5]{"Critical success $3"}[>=$4]{"Success $3"}[<=$6]{"Critical fail $3"}[<$4]{"Fail $3"} true
I don't found how to have a successful macro with the following constraints:
The "\1" is the attribute + skill value
The "\2" is the value to success
Critical success with margin of success at 7+
Critical fail with margin of faillure at 7-
We roll 1d10 which has the "1" face replaced by a "-3" face
Could I have any help to find what I missed, pls?
Thx in advance.
from diceparser.
The command is fine, There was some forgotten code on the Switch/case operator side. I just implemented it. It will be deploy soon.
from diceparser.
Related Issues (20)
- Exploding Doubles HOT 1
- 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
- Possible bug: wrong macro called/rolled HOT 1
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.