|
Author
|
Topic: statistics roller
|
|
Gautier UK |
posted 31-03-2003 13:42 GMT
ive thought of a simple way to roll statistics. if anybody has any good ways off making a rolling system, post your ideas here. thanks
|
|
Gautier UK
|
posted 31-03-2003 15:07 GMT
the way ive done it, is how I Think Im Back showed me, and thats to set the stat variable to $rand(8;21)$ each time the 'roll' command is pressed, like so.... command <roll> { set <Strength; $rand(8;21)$> set <Intellect; $rand(8;21)$> set <Agility; $rand(8;21)$> set <Endurance; $rand(8;21)$> set <Knowledge; $rand(8;21)$> set <Charisma; $rand(8;21)$> msg <|clYour stats are now.....|cg|n|n-Strength |cr#Strength#|cg|n-Intellect |cr#Intellect#|cg|n-Agility |cr#Agility#|cg|n-Endurance |cr#Endurance#|cg|n-Knowledge |cr#Knowledge#|cg|n-Charisma |cr#Charisma#|cg|n|n|cb> if ask <Re-Roll?> then exec <roll> else goto <Tavern>} i think this is the best way you can do it. |
|
Gautier UK
|
posted 31-03-2003 15:09 GMT
what i would like to do, is set the stat system, so, for example... a certain race's agility cant go above 18. |
|
Alex
|
posted 31-03-2003 16:32 GMT
If you want to do that, either:1. change $rand(8;21)$ to something like $rand(8;%maxvalue%)$, where maxvalue is a numeric variable containing the maximum value you want to allow OR 2. use a status variable, and in the "on change" script, check whether the value has gone above the allowed maximum (using a conditional "if" script). If it has, reset to the maximum value. |
|
Gautier UK
|
posted 31-03-2003 22:05 GMT
nice one, cheers. |