PDA

View Full Version : Barebone dice function



peterb
January 19th, 2024, 09:44
Just wondered if there's a helper function that just generates the result of a dice roll, i.e result = roll(3, 6). All dice related code that I found presents the result in the chat window, I just need the result. It's easy to write my own, I just wondered if there already was such a function.

Trenloe
January 19th, 2024, 11:44
Try StringManager.evalDice or DiceManager.evalDiceString - these are defined in the CoreRPG scripts\manager_string.lua file and call similar functions in the DiceManager script package. Have a look in these and see which function is appropriate for what you want to do.