Now that I have a current version of TBA, I wanted to play with snippets. I'm hoping that someone can fix this snippet for me. I know that this is totally irritating for anyone who understands code because I treated it like a
frankentrigger
.
I got so many errors that I took it apart, shook it up, stuck parts of it into the existing code and left parts of it out. (Hmm, I wonder what these three screws are supposed to be for...) but now it actually runs (sorta).
I understand that the first error is that it says:
m) Mana Points M) Max Mana Points\r\n");
g) Gold M) Alignment\r\n");
and yeah, that doesn't go well. The alignment code is actually "a".
So this is what the output looks like:
> display all
100h(101H) 100m(100M) 99v(100V) XP:172021
Gold:6757 MoOkay.
The part after Gold:6757 is in red because the prompt thinks it's the mob prompt. Part of the text is a repeat of the last line sent to the screen.
Here's what happens while fighting:
99h(101H) 100m(100M) 99v(100V) XP:172030 Gold:6757
Align:(10%) Awful condition > >
-That 10% after the align is actually the mob percentage.
> display eEgax
XP:172081
Gold:6767 TNL:77919 Align:56 Mob: N/A> >
Here's what happens while fighting:
XP:172113
Gold:6767 TNL:77919 Align:56(20%) Pretty hurt > >
You can see that this is not too bad except that the (28%) looks like alignment when it's actually mob percentages.
This one is even better!
101h(101H) 100m(100M) 100v(100V) XP:172304
Gold:6767 AligThe creepy crawler is incapacitated and will slowly
die, if not aided.
(-30%) Bleeding awfully from big wounds > >
First, I think the line length is too short. You can see that by the way it cuts off.
Second, I changed :
count = snprintf(prompt + len, sizeof(prompt) - len, " %sMob: %sN/A", CCNRM(d->character, C_NRM), CCRED(d->character, C_NRM));
to
count = snprintf(prompt + len, sizeof(prompt) - len, " %sMob: %sN/A", CCRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
just to stop all the text on screen from being red. It seems to have also added an extra > to the prompt.
I've probably also done a lot of things in the most inefficient way possible. I also thought that the colours for hp, mana, moves were different but they're now all white. I'm not sure about that though.
This is the mess the current code is in:
If anyone wants to play with this trigger in its original form, there's a link further up but I'll
repeat it
.
Thanks for any help you can give me. I forgot that the bespoke prompt was there so I might try that one next but I'm still finding patches confusing.