|
gukk Beginner
Joined: 18 Aug 2009 Posts: 14
|
Posted: Tue Aug 18, 2009 2:25 am
Advanced trigger gauge script? Or help with a window on top. |
I am looking for a gauge meter that can be updated based on mud output. here are the triggers, but problem is its in 2 lines.
(group)
( Head) Zugg
<469h/469H> <106m/106M>
( Head) Player2
<55h/197H> <106m/106M>
(/group)
now, the triggers looks a bit like this:
mud output:
(group)
( Head) (%w)
<(%w)h/(%w)H> <106m/106M>
triggers:
for ( Head) (%1)
#var hcchar %1
#math hccount 1+@hccount
for <(%w)h/(%w)H> <106m/106M>
#var hchp
#var hcmax
#math hccount hccount+1
and (/group) triggers #var hccount 0
the gauge needs to update on same trigger.. and update trough player1 to player13... something like this:
problem:
#GAUGE @hccount "@hcchar" %1 %2 (%2/3) "" "green" "red"
this doesnt work as it spawns 100s of windows.
2problem: I must delete all gauges with one button when a new group is formed.
here is the question:
Any way to set the #gauge @hccount or count this somehow? I cant seem to find the solution
Otherwise could I get help with a "status window" with larger gauges (I am partially blind... seriously bad vision, goggles dont help), like if I could make a new window with a bit larger gauges on top of the mud screen showing a bar of the hp in a .5 cm wide X 2cm tall in descending colors, amounted to 13 tracked players (maximum group size). I patiently await someone willing to help and I know I ask alot, but I dont know how to code much more than what I already posted :( |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Aug 18, 2009 2:09 pm |
I'm not entirely sure what you are trying to do here. It looks like you get some output from the mud describing the state of all the characters in a party, and you want to create gauges which track each one. Is that correct?
If that is what you are trying to do, there are several problems with your method. For one, each gauge needs a separate variable. A gauge, or a status object, will continue to adjust itself as the variable(s) defining it changes. So to change the gauges, you just change the variable(s) which define it. The "value" of a gauge is supposed to be an expression defining how it calculates the current value, usually based on one or more variables. You do not normally change the maxvalue or lowvalue of a gauge once you create it. So, you normally only use the #gauge command once, to create the gauge in the first place.
What you want to do is rather tricky and requires a clear understanding of how gauges work. Why don't you send us some actual output from the mud so we can try to figure out a procedure (you can change the character names if you want). Also, do parties change around? Do people leave or join parties? Does the order in which characters are listed change? What do you want to happen when the party dissolves? There are a lot of issues to be resolved for this project. |
|
|
|
gukk Beginner
Joined: 18 Aug 2009 Posts: 14
|
Posted: Sun Aug 23, 2009 10:20 pm |
The group can change as people might die in zones or PVP, or people leaving/joining. the order can change due to some types of spells (group recall requires cleric to be last in group order), and when the party dissolves I want the gauges to clear from my screen.
here is the actual mud output, I have lots of triggers already working I just cant figure ou the gauge part..
Ghurdak group-says in orc 'mercs, annoying'
< 316h/316H 178v/178V Pos: standing >
<>
Gangrut suddenly attacks a veteran hobgoblin soldier!
< 316h/316H 178v/178V Pos: standing >
<>
( Head) Druvin
<193h/180H> <135m/135M>
(Front) Gangrut
<476h/476H> <134m/134M>
(Front) Ghurdak
<309h/309H> <114m/114M>
(Front) Gristand
<292h/334H> <135m/135M>
(Front) Kymax
<303h/303H> <157m/157M>
(Front) Alora
<483h/483H> <167m/167M>
(Front) Gerrti
<628h/628H> <149m/149M>
(Front) Gu
<316h/316H> <178m/178M>
(Front) Mandu
<462h/480H> <126m/126M>
(Front) Groc
<342h/342H> <168m/168M>
< 316h/316H 178v/178V Pos: standing >
<>
Alora assists Gangrut heroically.
< 316h/316H 178v/178V Pos: standing >
<>
Gristand assists Gangrut heroically.
A veteran hobgoblin soldier clambers to his feet.
< 316h/316H 178v/178V Pos: standing >
<>
Gerrti assists Gangrut heroically.
< 316h/316H 178v/178V Pos: standing >
<>
Alora attacks a veteran hobgoblin soldier. [0 hits]
Your party has been disbanded. // group disband command from leader
group // command to see group following a disband:
But you are a member of no group?!
You leave the group. // group self. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Aug 24, 2009 8:42 pm |
Okay, I think this should be doable. I don't have time to think about it just now, but could you also send any text the mud shows when a character joins or leaves the party? It might be useful. Also, what text can appear in the parentheses, besides (Head) and (Front)?
There's two ways to attack this that I can see offhand. In both cases, you would keep a list of party members. In the first case you create/destroy gauges as the join, depart, die, whatever, using triggers to catch all these situations. The second is to watch for the health output lines, comparing to your list, and cut it off when the prompt is detected. In this second method, you would create new gauges if you detect new names that you don't have in your list, and destroy gauges for any characters in your list who aren't displayed before the prompt. In either case, when you create/destroy a gauge, you will also create/destroy the associated health variable. When you don't need to create or destroy a gauge, you simply change the value of the variable. I would create every gauge to a standard scale, say 100, and the value in the variable will then be set to a percentage of that, e.g. (currenthp/maxhp)*100. This avoids the difficulty of handling cases where someone's max health changes in mid-combat (if that's possible). |
|
|
|
gukk Beginner
Joined: 18 Aug 2009 Posts: 14
|
Posted: Wed Sep 09, 2009 2:36 pm |
problem is only group leader see who leaves group.
the (front) and (head) are old code not in use, used to be backrank and front rank.
what you will see in pvp is for example Gukk is DEAD!! R.I.P thats about as much info you will get for who leaves group.. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|