Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[SCRIPT] Error - WeightedDice.js

1442943393
AquaAlex
Sheet Author
Translator
API Scripter
For reference, the error message generated was: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ ReferenceError: version is not defined at Object.WeightedDice.CheckInstall (evalmachine.<anonymous>:986:34) at Sandbox.<anonymous> (evalmachine.<anonymous>:1062:15) at eval (
1442947723
The Aaron
Pro
API Scripter
I've committed a fix for this issue. &nbsp;Give this one a try: &nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/We" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/We</a>...
1442952824

Edited 1442952972
AquaAlex
Sheet Author
Translator
API Scripter
Thanks for being so quick on this, there seems to be another small bug :) /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ TypeError: Object [object Object] has no method 'indexOf' at RollStats.handleChatMessage (evalmachine.:1445:64) at eval (
1442953827
The Aaron
Pro
API Scripter
That's in RollStats, a completely different t script. Try disabling it.&nbsp; Ill look ion into that when I get home anyway. I tried to fix a bug in it earlier.&nbsp;
1442958163

Edited 1442958211
AquaAlex
Sheet Author
Translator
API Scripter
o lol Cool thanks, i assume do not have to log a bug for that :) Maybe when I use the two together it causes an issue?
1442958412

Edited 1442958421
The Aaron
Pro
API Scripter
Nah, it's a bug in RollStats. &nbsp;I sent a patch for it, you can get my patched version here:&nbsp; <a href="https://github.com/shdwjk/roll20-api-scripts/blob/" rel="nofollow">https://github.com/shdwjk/roll20-api-scripts/blob/</a>... I sent a pull request for the main repo, so it should show up there soon.
1442958498

Edited 1442958627
AquaAlex
Sheet Author
Translator
API Scripter
Thanks a lot! You are a star :) How do I see to use the weighted die? I see from code &nbsp;to use:&nbsp; !weighted-die [number of sides] [minimum roll number] and that then&nbsp;creates a table but how do I do say 4d6min2
1442958512
The Aaron
Pro
API Scripter
It makes rollable tables, so you'd need to roll them like this: /roll 1t[d6min4] or [[ 1t[d6min4] ]]
1442958737

Edited 1442958765
AquaAlex
Sheet Author
Translator
API Scripter
ok never mind :) just replace the 1t with number of dice Thanks Again
1442958790
The Aaron
Pro
API Scripter
AquaAlex said: Thanks a lot! You are a star :) How do I see to use the weighted die? I see from code &nbsp;to use:&nbsp; !weighted-die [number of sides] [minimum roll number] and that then&nbsp;creates a table but how do I do say 4d6min2 [[ 4t[d6min2] ]] You can use them like you would normal dice, except you can't build the name of them from a stat: Hit points: [[ 4t[d6min2]+4*@{ConMod} ]] Damage: [[ @{level}t[d6min2] ]] etc.
1442959015
AquaAlex
Sheet Author
Translator
API Scripter
Did you put that some where in docs or wiki? Or can I update it?&nbsp; Can i use dl1 kh4 dh2 option as well?
1442959076
AquaAlex
Sheet Author
Translator
API Scripter
very cool ! like your scripts, dowloaded a few, trying to figure them out :)
1442960175
The Aaron
Pro
API Scripter
Thanks! &nbsp;Let me know if you need any help with them. &nbsp;Almost all of them respond to a --help command (certainly the newer and larger ones do.): !token-mod --help !torch --help !group-init --help All of them have a forum post about them somewhere, so you can usually search and find them. &nbsp;If you have any questions, I can direct you to the help. =D