Colours not Resetting

Posted by Ian Kirker on Sat 10 Jan 2004 02:51 PM — 3 posts, 16,570 views.

#0
I seem to be having some troubles with colours not resetting after I've used a ColourTell.

Example?

I have a script which checks how much damage (or healing) I've taken in a combat round, and displays a "Damage: X" message after the score bar, like so:

Hp: 1839 (2053) Gp: 342 (345) Xp: 361291
Damage: 9

(Only with the Damage message being a fairly light shade of green, and the score bar being a darker shade of green, from the mud.)

The line used to make this is:
world.colourtell hsltorgb(hueindex,0.945,0.5), "", "Damage: " & cstr((world.getVariable("old_hp")-world.getVariable("new_hp"))) & vbCRLF



Now, usually, it all works fine, and the colours go fine, and reset before the next combat message. But sometimes, I get things like this:

<!-- Produced by MuClient v 3.42 - www.muclient.com -->
<table border=0 cellpadding=5 bgcolor="#000000">
<tr><td>
<pre><code><font size=2 face="FixedSys, Lucida Console, Courier New, Courier"><font color="#0">
</font><font color="#008000">Hp: 1987 (2053) Gp: 333 (345) Xp: 361173
</font><font color="#5FF707">Damage: 51
You prepare to shove the rugged troll warrior.
The sai cannot be used to stab.
</font><font color="#C0C0C0">The rugged troll warrior impales your right arm on his spiked club.
Queued command: put sais in loop in pack
&gt; </font><font color="#008000">Hp: 1861 (2053) Gp: 306 (345) Xp: 361246
</font><font color="#9AF707">Damage: 126
</font><font color="#C0C0C0">The rugged troll warrior hits you in the head with his spiked club.
(</font><font color="#00FFFF">inertia</font><font color="#C0C0C0">) </font><font color="#228B22">Seethe</font><font color="#C0C0C0"> al'Nighter: remind me to contract talim
</font><font color="#008000">Hp: 1810 (2053) Gp: 309 (345) Xp: 361249
</font><font color="#5FF707">Damage: 51
You put down a sai.
The hilt of the poniard fits perfectly into your hand, as if made for you.
You draw the poniard from the pair of black soft-soled boots into your left
 hand.
You put down a poniard.
The hilt of the poniard fits perfectly into your hand, as if made for you.
You draw one of the poniards from the pair of black soft-soled boots into your
 left hand.
</font><font color="#008080">Ruffy wisps: when Im about lvl 50 and use godmother help, the consequences are
 just fatigue and no gp, right? lvla dont get taken away yet?
</font><font color="#008000">Hp: 1813 (2053) Gp: 312 (345) Xp: 361252
</font><font color="#C0C0C0">The rugged troll warrior taps you in the stomach with his spiked club but your
 short scaly robe absorbs most of the blow.
</font></font></code></pre>
</td></tr></table>


As you can see, in two instances, the colours do not reset until one or more lines on.

It doesn't seem to happen with ColourNote, so I've switched it to that, now. It only seems to happen when there's a large amount of output at once. And I've no idea why. :)

-I-
Amended on Sat 10 Jan 2004 02:53 PM by Ian Kirker
Australia Forum Administrator #1

I'll put your HTML code into a separate post ...


Hp: 1987 (2053) Gp: 333 (345) Xp: 361173
Damage: 51
You prepare to shove the rugged troll warrior.
The sai cannot be used to stab.
The rugged troll warrior impales your right arm on his spiked club.
Queued command: put sais in loop in pack
> Hp: 1861 (2053) Gp: 306 (345) Xp: 361246
Damage: 126
The rugged troll warrior hits you in the head with his spiked club.
(inertia) Seethe al'Nighter: remind me to contract talim
Hp: 1810 (2053) Gp: 309 (345) Xp: 361249
Damage: 51
You put down a sai.
The hilt of the poniard fits perfectly into your hand, as if made for you.
You draw the poniard from the pair of black soft-soled boots into your left
 hand.
You put down a poniard.
The hilt of the poniard fits perfectly into your hand, as if made for you.
You draw one of the poniards from the pair of black soft-soled boots into your
 left hand.
Ruffy wisps: when Im about lvl 50 and use godmother help, the consequences are
 just fatigue and no gp, right? lvla dont get taken away yet?
Hp: 1813 (2053) Gp: 312 (345) Xp: 361252
The rugged troll warrior taps you in the stomach with his spiked club but your
 short scaly robe absorbs most of the blow.
Australia Forum Administrator #2
I *think* this has been reported before, but in case not I have added it as bug #506.

For now I suggest finishing your notes with a ColourNote, not a ColourTell.

eg.

ColourTell
ColourTell
ColourTell
ColourTell
ColourNote <-- finish line off properly