I have two things that I'd like to figure out in Lua as an introduction for myself before I begin scripting and triggering. I have the new mushclient, and have a linebreak added in my mud that i was told would supposedly help this.
So the first thing I want to figure out is how to add a timestamp. I don't care if it's the actual local time, or if it is a timer that starts from 0 and counts up for the amount of time that I am online. My reasons are so that I can measure the time it takes to perform certain abilities. I have absolutely no idea how to go about this, so all I can give you is a visual of what I want:
3044h, 2708m, 2875e, 10p ex- <23:30:13>
It'd be ideal to have hours, minutes, seconds and milliseconds, but if that's not possible, then that is understandable. If we can't do that, I'd rather have minutes, seconds, milliseconds instead of hours, minutes, seconds. Any and all help with this would be much appreciated.
The second thing I'd like to achieve is to have a little stamp everytime that I get hit for either health mana or ego loss (as seen in the prompt above.. h-health m-mana e-ego) I'd like to be able to see a little temporary stamp that mentions how much I've lost. It would also be helpful to have it fire everytime I regain one of those stats. I know a little more about this as it deals with math, but the extent of my programming experience is a lot of simple java programs that anyone can do. I'd especially like to have it show all three if I lose all three at once, or two if that happens. For instance, a visual:
3044h, 2708m, 2875e, 10p ex-
2665h, 1708m, 2434e, 10p ex- < -379 -1000 -441 >
3044h, 1708m, 2434e, 10p ex- < +379 > (assuming that I sip health for a 600 plus increase, and it only records what I go up to.)
I assume that if I have passive regeneration on any of these variables that it will automatically grab it anyway.
Thanks in advance for any help that can be given.
So the first thing I want to figure out is how to add a timestamp. I don't care if it's the actual local time, or if it is a timer that starts from 0 and counts up for the amount of time that I am online. My reasons are so that I can measure the time it takes to perform certain abilities. I have absolutely no idea how to go about this, so all I can give you is a visual of what I want:
3044h, 2708m, 2875e, 10p ex- <23:30:13>
It'd be ideal to have hours, minutes, seconds and milliseconds, but if that's not possible, then that is understandable. If we can't do that, I'd rather have minutes, seconds, milliseconds instead of hours, minutes, seconds. Any and all help with this would be much appreciated.
The second thing I'd like to achieve is to have a little stamp everytime that I get hit for either health mana or ego loss (as seen in the prompt above.. h-health m-mana e-ego) I'd like to be able to see a little temporary stamp that mentions how much I've lost. It would also be helpful to have it fire everytime I regain one of those stats. I know a little more about this as it deals with math, but the extent of my programming experience is a lot of simple java programs that anyone can do. I'd especially like to have it show all three if I lose all three at once, or two if that happens. For instance, a visual:
3044h, 2708m, 2875e, 10p ex-
2665h, 1708m, 2434e, 10p ex- < -379 -1000 -441 >
3044h, 1708m, 2434e, 10p ex- < +379 > (assuming that I sip health for a 600 plus increase, and it only records what I go up to.)
I assume that if I have passive regeneration on any of these variables that it will automatically grab it anyway.
Thanks in advance for any help that can be given.