Avex Axon Posted April 11, 2011 Share Posted April 11, 2011 Hi guys....I'm sure this is simple to most here, but completeky out of my comfort zone! I need a script for a rp dice. Ideally I need the ability to allow one person to roll a dice, and an opponent to have *experience added*. So for example if both are using a D4, player 2 gets an automatic +1 (or whatever his experience warrants.)I had thought of simply using a D4 for player one, and a D6 for player 2..... but obviously this means whilst player 2 CAN achieve 6's, he can also score 1's constantly....whereas with a +1 he will ALWAYS have a minimum of 2.I could simply have them ADD the plus one...but visually it would be nicer to an audience if it is clearly there on screenAny help gratefully receieved! Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 11, 2011 Share Posted April 11, 2011 Hmm - what exactly is your question here? Link to comment Share on other sites More sharing options...
Void Singer Posted April 11, 2011 Share Posted April 11, 2011 -~((integer)llFrand( number_of_sides )) //-- same as ((integer)llFrand( number_of_sides ) + 1) this follows the basic format for random integer generation.... (integer)llFrand( range_of_choices ) + lowest_value where highest value = range_of_choices + lowest_value - 1 1 Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted April 11, 2011 Share Posted April 11, 2011 Avex Axon wrote: ..... but obviously this means ... Was that sputnik or something else completely over the top of my head. Didn't understand a word of that! Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 11, 2011 Share Posted April 11, 2011 It's more than a little arcane, but I'm assuming that D4 means a four-sided die (a trigonal pyramid) and D6 means a six-sided die (a cube). That's the only way any of this makes sense, and I think that's what Void was assuming in her response as well. Link to comment Share on other sites More sharing options...
Void Singer Posted April 11, 2011 Share Posted April 11, 2011 it's definitely a gaming application... there's a very common format in gaming systems using dice.... D(number of die sides) + modifiers modifiers are usually static values like skill (+value) and difficulty (-value), and the reult has to be greater than a target number (or competes directly with a similar, but oppsing calculation) there's even one system like that uses the dice directly.... if you physically have that die, you can use it to boost your value.... it's "rulers" for geeks Link to comment Share on other sites More sharing options...
Avex Axon Posted April 11, 2011 Author Share Posted April 11, 2011 apologies. My mistake for assuming prior knowledge. D4 and D6 are indeed *rulers for geeks* in the gaming sense. Let me try again.... Im looking for a dice script, but one that adds1 to the resulting roll. The reason being that if player one has more experience than player two, he automatically gets a +1 to the roll. Rather than use existing dice, and give player one a four sided dice and player two a six sided, I was hoping that a script could enable the automatic addition of the +1. Thus always allowing player two a minimum of 2 on the dice roll, whereas player one might still only score 1. Hope that is a little clearer, and once again, thanks for the help so far. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 11, 2011 Share Posted April 11, 2011 So, Void already gave you the answer. Just use llFrand and add +1 to the result. Link to comment Share on other sites More sharing options...
Avex Axon Posted April 16, 2011 Author Share Posted April 16, 2011 Many thanks for the help. It's strangely addictive to dissect scripts after years of buying them! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now