Hi guys, this is my latest issue.
If you are level 1 you can roll 1 dice.
If you are level 2 you can roll 2 die.
This is the script I have tried:
%RESULT := %RESULT + %LEVEL + "D6"
I then tried to change the dice value instead:
%RESULT := %RESULT + "1D" + %LEVEL
Didn't work either. Do I really have to surrender and script:
IF %LEVEL := 1
THEN %RESULT := 1D6
IF %LEVEL := 2
THEN %LEVEL := 2D6
because this method could take a while.
Any help would be greatly appreciated.
%RESULT := %LEVEL * 1D6
EDIT: Never mind, that will just multiply 1D6 by the level, sorry.
EDIT 2: This solution is slightly shorter than what you have, but still annoyingly recursive.
IF %LEVEL > 0 THEN %RESULT := %RESULT + 1D6
IF %LEVEL > 1 THEN %RESULT := %RESULT + 1D6
IF %LEVEL > 2 THEN %RESULT := %RESULT + 1D6
IF %LEVEL > 3 THEN %RESULT := %RESULT + 1D6
IF %LEVEL > 4 THEN %RESULT := %RESULT + 1D6
That's better than what I have.
It seems like there's no way to make the script infinitely adaptable. If I want to go all the way to level 1000 it would be a slog. But this is an improvement on my current script so thanks. I am grateful :)
I appreciate the suggestion but it hasn't worked.
Instead of rolling 3 separate die it just multiplies the number which limits the result to multiples of the number.
2*1D6 will give me 2, 4, 6, 8, 10, 12
2D6 will give every number between 2 and 12.
Thanks anyway though I appreciate it :)
This was a reply to the previous comment.