• Help with coding a simple math-based DarkRP plugin.
    1 replies, posted
Hi guys, I'm Barrel! I'm an admin on a DarkRP-based Star Wars RP server, and I want to code a simple roll-based plugin for our server. Lately, our server has been trying to focus more on /roll RP, and we've been doing simple modifiers. For instance, a certain class may have +10 on combat rolls which means if they roll a 64, they really have a 74. You get it. Now however, we are introducing class-based modifier pre-rolls. In simpler terms, say we have a Rocket trooper with a perk called Spontaneous. His perk means he's allowed to roll once before an RP scenario, and depending on that one roll, he'll get a modifier. If the roll is 0-10, -5 on all rolls. 11-20, no change, 21-30, +1 bonus, 31-50 +2 bonus, 51-60, +3 bonus, 61-80, +5 bonus, 81-95 +7 bonus, 96-99, +10 bonus, 100, +15 bonus. So that's some complex rules, right? And last thing we want is to scare people off with all those numbers. So instead, I'd like to program a custom roll command, (lets call it /sroll,) and so now, say this rocket trooper does /sroll before an RP scenario. the command would randomly pick a number, 0-100, same as regular roll, but depending on what the number that is picked, the chat would display a message to everyone within earshot stating which bonus the trooper gets, without needing the player to remember the rules. So he does /sroll and the game chat displays "[NAME] rolled a [#0-100]. [NAME] gets a [DESIGNATED] bonus!" From there, the players involved can then proceed to play out their /me's and /roll's, manually adding whatever multiplier was displayed. I hope that makes sense. I'd like to be able to code multiple new roll-based commands into the game. Thanks for the help, if you need me to clarify, let me know and I'd be happy to answer. Again, thanks guys! :smile:
Then freakin' code it, what's stopping you? Also nobody will give me back these 40 seconds.
Sorry, you need to Log In to post a reply to this thread.