Jump to content
Sign in to follow this  
Virus579

Need help with a Math Script for RP

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!!

Share this post


Link to post
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

Share this post


Link to post
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. 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

If you run into any real obstacles or get stumped, do feel free to ask for more help. You'll get plenty of it. ^-^

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...