Please upgrade your browser for the best possible experience.

Chrome Firefox Internet Explorer

No /roll function?

ouTJumped's Avatar

02.14.2012 , 11:57 AM | #231

I mean really? Come on.
Vurik- 50 Annihilation Marauder-
Lasmi- 40 Pyrotech Powertech-

Juyo Server

HarvardAce's Avatar

02.14.2012 , 12:59 PM | #232
Quote: Originally Posted by mrdakadoc View Post
I'm a software engineer.

int roll(int max) {
  return rand() % (max) + 1;

int roll() {
  return roll(100);

That code will cost you $200.

If you're a software engineer, then you should know that taking the modulo of a pseudo-random number is a very bad way to generate a random number. Depending on the method used to generate the "random" number, it may be that the number returned by the system always alternates between an odd and an even number. If you then did roll(2), you would always alternate between 1 and 2.

The "proper" way to do it would be:
int roll(int max) {
  return (int) (rand() / (RAND_MAX) * max + 1);
Additionally, many random functions in modern languages return a float between 0 and 1, so the act of multiplying by RAND_MAX is not needed, and many of those languages also provide built-in random functions that return integers between two specified numbers.

ouTJumped's Avatar

02.14.2012 , 03:51 PM | #233
Want to keep this front page so it might get attention.
Vurik- 50 Annihilation Marauder-
Lasmi- 40 Pyrotech Powertech-

Juyo Server

AndrewHanderson's Avatar

02.17.2012 , 10:00 AM | #234

CzaplaM's Avatar

02.19.2012 , 09:45 PM | #235
It is here

Darthinfimus: Do you plan to implement a /roll or /random command for use in master looter situations?

Damion Schubert: Diceslingers of the world rejoice! /roll has already been implemented on our internal development servers and should be coming to you guys Real Soon Now (in an upcoming weekly patch).

Wanabrutbeer's Avatar

02.24.2012 , 08:11 AM | #236
Hey guys, didnt read this whole thread to see if this was mentioned already, but if your guild is using Teamspeak instead of Ventrillo, then there is an addon for the Teamspeak chat window that gives you dice rolling functionality

Only one person has to actually install the addon, probably the raid leader, or master looter.

I agree SWTOR should have this built in, its quite simple, but until they do, this could make things easier for you.

Also, upon updating TS, this stopped working, but there are a few other dice addons for TS, one's a LUA script, it works

This one you would just use the command (d100) in TS chat to roll for 100. Everyone in TS can see the rolls, should suffice until SWTOR gets it together.

Atanvardo's Avatar

02.25.2012 , 08:35 PM | #237
second this nomination.. /roll ftw please.

KingFink's Avatar

02.25.2012 , 08:37 PM | #238

Talorra's Avatar

02.25.2012 , 09:21 PM | #239
Yep, roll is coming in the next patch.

M'arik <Intrepid> 16-player Progression The Harbinger | Live Stream | Recruitment Thread | @Twitter

_tegrof's Avatar

02.27.2012 , 01:25 PM | #240
Not reading all the way through this thread, but adding my voice to this...

What a bone-head move this was. Seriously? No roll?

Here's my "constructive" criticism:

Whoever overlooked this, or let it go without something so simple, yet so crucial.....should be taken outside and flogged.

What a total joke.