Advertise Here

Author Topic: php Die Roller Program  (Read 6384 times)

0 Members and 1 Guest are viewing this topic.

guest3567

  • Guest
php Die Roller Program
« on: August 14, 2008, 09:03:31 pm »
What I am looking for is a program to integrate a dice roller into the site i am working on... primarily for roleplaying and such like and to incorporate most of the following vectors, i have seen similar programs written for other non smfforfree sites and was wondering if there is anyone here that is either able to write one or is able to give me a few pointers as i have never coded in php before...

Dice: is the number of dice to roll, from 1 to 50.
Sides: is the number of sides to the dice, from 1 to two billion. For 1 side, it rolls between 0 and 1.
Keep: if positive, keeps the highest given number of dice. If negative, keeps the lowest.
Extra: if positive, rolls an additional die when equal to or higher than the given value. If negative, rolls an extra die when equal to or lesser. Total number of dice rolled (normal and extra) will never exceed 50.
Over: for Overroll. Works like extra, except it adds the result to the die instead. Only one overroll is made per die.
Mod: adds its value to all dice rolled.
Add: adds its value to the final total.
TN1: first target number. If positive, counts as a "1" if the result is equal to or higher. If negative, counts as a 1 if equal to or less.
TN2: works just like TN1, and stacks. For an Exalted roller, for example, set TN1 to 7 and TN2 to 10, to count 10s as double successes.
Total TN: if positive, returns a success if the total result is equal to or higher (L5R, d20). If negative, returns a success if the total result is equal to or less (BESM).
Comment: a comment for this roll.

if not possible to incorporate all these vectors, what about the main stay of the die roller?

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
2770 Views
Last post August 25, 2006, 05:52:17 pm
by nowares
6 Replies
2094 Views
Last post May 24, 2007, 03:22:34 pm
by Vorro
3 Replies
1634 Views
Last post June 17, 2007, 01:34:49 pm
by Crasy
12 Replies
2995 Views
Last post April 24, 2008, 06:17:13 pm
by cooldude101
2 Replies
1475 Views
Last post December 19, 2008, 11:20:30 pm
by [JeReMy]