#(gtnidrol) Dice script

23 messages · Page 1 of 1 (latest)

sage willowBOT
#

(gtnidrol) Dice script

#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

urban wasp
#

Well first of all.

#

Your spacing is wrong, define doesn't need a : after it. That is only for some things such as if statements, foreach commands, and very few other cases.

#

Second of all, this could be more simpler.

#

Consider a data script container, or a data script in your command with indexed numbers and pull the symbol from that instead of doing six different if statements.

#

( I don't know if the guide covers data scripts inside of other scripts, or if there is a lang doc for it, but I know data script containers exist. )

glossy sandal
#

Could you run a debug too, it should highlight the errors. Also please use our pastesite, that will help us to read the script.

#

!info haste debug

shy oysterBOT
#
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

coarse kraken
#

<util.random.int[<1>].to[<6>]> this is wrong, no need to surround the numbers with <>, it's just <util.random.int[1].to[6]>

You could also just do

- define n <util.random.int[1].to[6]>
- define dices <list[⚀|⚁|⚂|⚃|⚄|⚅]>

- narrate "<player.name> <[dices].get[<[n]>]>" targets:<player.location.find_players_within[20]>```
pine prairie
#

!t listtag.random

shy oysterBOT
# pine prairie !t listtag.random

Gets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.

Returns

ObjectTag

Examples
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
coarse kraken
#

yuh that works too

halcyon heraldBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@sinful birch

glossy sandal
#

@tight crescent warn @sinful birch normal rule 8

tight crescentBOT
#
Warning Recorded

Warning from @glossy sandal to @sinful birch recorded.
Reason: "rule 8"

halcyon heraldBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@sinful birch