Heya, a while back I asked a similar question but since then i've lost all my scripts and I can't get something to work anymore.
I have a script that catches my hp and shows it to the screen with a fancy color, this is nice and I got that to work and all, but I still have the following problem.
When I quickly move through rooms I get something like
The Lamedon Road(s, w, n and e)
(HP: 230 EP:230)
The Lamedon Road(s, w, n and e)
(HP: 230 EP:230)
The Lamedon Road(s, w, n, e and se)
(HP: 230 EP:230)
The Plains(s, w, n and e)
(HP: 230 EP:230)
The Plains(s, w, n and e)
(HP: 230 EP:230)
Tarlang's Neck(s, w, n and e)
(HP: 230 EP:230)
Now the (HP: 230 EP:230) I send with my script using
a world.ColourTell
It actually looks like [hp: 230 ep:230] but I omit that output with a trigger that calls the function that colors my statusbar so I never get to see it. But now I'm getting rather spammed as you can see in the example with my statusbar. I want to create a script that gag that hp status of mine if it was already shown in the last 2 lines.... for instance...
(HP: 230 EP:230)
The Lamedon Road(s, w, n and e)
(HP: 230 EP:230) ( <-- this would be gone then since it was shown 2 lines ago )
The Lamedon Road(s, w, n, e and se)
(HP: 230 EP:230) ( <-- this too )
The Plains(s, w, n and e)
(HP: 230 EP:230) ( <-- this too )
The Plains(s, w, n and e)
(HP: 230 EP:230) ( <-- this too )
Tarlang's Neck(s, w, n and e)
(HP: 230 EP:230) ( <-- this too )
A faint glow appears in the east.
The sky is dark blue and a yellow glow comes from the east.
The sky is brilliantly clear.
The only obvious exits are south, west, north and east.
(HP: 230 EP:230) ( <-- it should appear here again since I haven't seen the hp bar in the last 2 lines)
I already thought up something but it doesn't work anymore
I tried to use a * trigger that evaluates every line and then it puts line3 = line2 and line2=line1 and line=thewildcards(0) line3,line2,line1 are global vars. So in my other functions where I output my hp status i tried the following but it woudn't work.
if instr(1,Line3,"[") <> 0 and instr(1,Line2,"[") <> 0 then
world.ColourTell "Red", "", "("
world.ColourTell clrHP, "", "HP: " & thewildcards(1)
world.ColourTell clrEP, "", " EP:" & thewildcards(2)
world.ColourNote "Red", "", ")"
End If
I dunno why it doesn't work cuz it looks quite logical to me but still it doesn't work.
Example:
The Plains(s, w, n and e)
[HP: 230 EP: 230]
1: Now the * trigger fills the global vars as following
line 2 = The Plains(s, w, n and e)
line 1 = [HP: 230 EP: 230]
2: Then at the 2nd line my other function should trigger that changes the color etc of the hp status like this:
(HP: 230 EP:230)
so I get to see
The Plains(s, w, n and e)
(HP: 230 EP: 230)
and since line1 is filled with '[HP: 230 EP: 230]' now it should show this when I walk into another room
The Plains(s, w, n and e)
and not this
The Plains(s, w, n and e)
[HP: 230 EP: 230]
Well ok, this is kinda my question, if anybody has a better way to do this i'll be happy to use it. Hope anybody can understand what i'm talking about, but i'll see soon enough:-D
Greetings Zuurstof,
|