Jump to content

Need help with a Math Script for RP


Virus579
 Share

You are about to reply to a thread that has been inactive for 1568 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello! I'm pretty new to scripting, in which I mean that I don't know how to at all, lol! I would however like some help learning, or figuring out if there's a script that already exists that I need.

So, some friends and I are starting just a mini rp-sim kinda thing that's very loosely based on D&D in which it uses dice rolls, a grid system, and a bit of math to add or subtract health from either players or monsters that they're fighting. Since a lot of them have lower-end PCs the traditional fighting and battle huds won't work for us, since a lot of them require your character to physically move around and attack/hit other players with certain weapons and whatnot. A lot of time some of them lag a lot more than others who have higher end PCs, so it makes the fighting unfair and not very fun. 

I've been trying for a while to figure out how to make a HUD, or a script that when you click on object you're wearing it'll bring up a menu and do the following:

Set a base HP amount, so when you level up your HP can be increased.

Type in an amount to either add or subtract from your HP and it'll automatically do the math and show above your head, or the monster's head. So like "42/100 HP"

I'm just not sure where to start with all of that, and I've been looking for about an hour or more. Any help or advice would be greatly appreciated!!

Link to comment
Share on other sites

I'll tell you one thing, you're going to want to keep it simple. I do like the idea for the dialog input, though. I'm sure it wouldn't be too hard to make a dialog "menu" with buttons, and a few clicks could do most of the work... You could have a couple of options, like healing, damage, etc., and then type in how many points and click "Ok".

I'm tempted to type something up for that... Though I'd probably be tempted also to just use chat commands on a GM channel to deal specific amounts of damage to correspond with the results of dice rolls, like if the roll came up 19 on a d20 (hypothetical d20, mind you), you'd type something like "/12345 playername 19d20" or something similar, and it would tick that many HP off the player whose name you used... Or just type in the channel number, player name, and how many points of damage to deal. Not exactly what you're wanting, though.

It should be easy enough to hack something together with what Xiija posted, but if it gives you too much trouble we're definitely here to help you out; I have quite a bit of experience myself with my own combat meter, which works very similar to what you're describing (it uses messages sent on hidden channels rather than collisions). Please keep us up to date on how it goes, too, even if you get it all finished!

Edited by Berksey
Link to comment
Share on other sites

7 hours ago, Xiija said:

Awesome, those should help. I have a friend trying to help me with it, so I'll send these on over to him! Thanks!

And yeah, we're currently using a titler that says your HP and stuff, but we're having to use a lot of math to deduct how many HP you have left after you calculate how hard the monster hits you and all that jazz. 

Link to comment
Share on other sites

54 minutes ago, Berksey said:

I'll tell you one thing, you're going to want to keep it simple. I do like the idea for the dialog input, though. I'm sure it wouldn't be too hard to make a dialog "menu" with buttons, and a few clicks could do most of the work... You could have a couple of options, like healing, damage, etc., and then type in how many points and click "Ok".

I'm tempted to type something up for that... Though I'd probably be tempted also to just use chat commands on a GM channel to deal specific amounts of damage to correspond with the results of dice rolls, like if the roll came up 19 on a d20 (hypothetical d20, mind you), you'd type something like "/12345 playername 19d20" or something similar, and it would tick that many HP off the player whose name you used... Or just type in the channel number, player name, and how many points of damage to deal. Not exactly what you're wanting, though.

It should be easy enough to hack something together with what Xiija posted, but if it gives you too much trouble we're definitely here to help you out; I have quite a bit of experience myself with my own combat meter, which works very similar to what you're describing (it uses messages sent on hidden channels rather than collisions). Please keep us up to date on how it goes, too, even if you get it all finished!

Yeah, the whole point of what we're trying to do is so that it doesn't rely on collisions, because a lot of our players have low end PCs. I will try to keep y'all updated on how it goes. I had a friend of mine try to take a look at it yesterday who knows at least a little more than I do about scripting and we're trying to figure it out. But we wanted to be able for people to do it while we're offline, because I have a full time job, which is why we're trying to make a hud or something. Lol! I appreciate your help :D

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1568 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...