Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
omaek193
Novice


Joined: 10 Oct 2002
Posts: 30
Location: Italy

PostPosted: Wed Nov 19, 2003 2:34 pm   

Single spell status for the entire group window.
 
[zMud 6.62]
I'm trying to create a window in which I control the status of the spell 'aura' for any player of my group.

Typical mud output:

Your group consist of:
Aragorn (leader) HP:100% MN:100% MV:100%
Gimli HP:100% MN:100% MV:100%
Legolas the elf HP:100% MN:100% MV:100%

My trigger:

TRIGGER {^(%w) * HP:(%d)% MN:(%d)% MV:(%d)%} {#ADDITEM GroupMembers %1}

So everytime I store in a stringlist the names of my group members.

Typical mud output (inside parentesys my comments):

Aragorn is surrounded by a white aura. (Aragorn is now affected by aura)
The glowing aura around Gimli starts fading. (Last 2 tick for the aura of Gimli)
The glowing aura around Legolas the elf is faded. (Legolas is no more affected by aura)

My triggers:

#TRIGGER {^(%w) * surrounded by a white aura.$} {#IF (%ismember( %1,@GroupMembers)) {#WIN aura %1 full aura} {#NOOP}}
#TRIGGER {^The glowing aura around (%w) * fading.$} {#IF (%ismember( %1,@GroupMembers)) {#WIN aura %1 last 2 of aura} {#NOOP}}
#TRIGGER {^The glowing aura around (%w) * faded.$} {#IF (%ismember( %1,@GroupMembers)) {#WIN aura %1 aura faded!!!} {#NOOP}}

Please note that all the matter ^(%w) * in triggers is because players may appear as "name" or "name the race", in any case
I use only the name, it's only a trick to match only and always the player name.
I omitted he triggers for my personal aura, they not are useful for my explaination.

Now the problem, at this moment my aura window will appear as a scroll like:

Legolas full aura
Gimli full aura
Legolas last 2 of aura
Gimli last 2 of aura
Aragorn aura faded!!!
Legolas aura faded!!!
Aragorn full aura
Legolas full aura
etc. etc.

I wonder if there's a trick to have a window that presents always one line per group member and the status of the spell for the specific member.

Thank you all in advance.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Nov 19, 2003 11:14 pm   
 
Try using the Status Window for this.
Reply with quote
omaek193
Novice


Joined: 10 Oct 2002
Posts: 30
Location: Italy

PostPosted: Thu Nov 20, 2003 2:28 pm   
 
Sorry... honestly I don't unterstand your hint.
No problem for me in using the status window, but for which reason?
My problem is that I don't know the number of lines of the window, and I think that linking players-variables to status-of-the-spell-on-single-player-variable(s) will result only a whole mess.
Actually the history-style of my window works good, my only wonder is on a method to collapse messages for every single player.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Nov 20, 2003 4:58 pm   
 
#TRIGGER {^(%w) * HP:(%d)~% MN:(%d)~% MV:(%d)~%} {#ADDITEM GroupMembers %1}
#TRIGGER {^({@GroupMembers}) * surrounded by a white aura.$} {#ADDKEY GroupAura %1 {full aura};#ADD STW 1}
#TRIGGER {^The glowing aura around ({@GroupMembers}) * fading.$} {#ADDKEY GroupAura %1 {last 2 of aura};#ADD STW 1}
#TRIGGER {^The glowing aura around ({@GroupMembers}) * faded.$} {#ADDKEY GroupAura %1 {aura faded!!!};#ADD STW 1}
#STW {%expanddb( @GroupAura, %cr)}

NOTE: @STW is simply to ensure that a recognized variable change occurs with each trigger so that the Status Window will update.
Reply with quote
omaek193
Novice


Joined: 10 Oct 2002
Posts: 30
Location: Italy

PostPosted: Thu Nov 20, 2003 5:30 pm   
 
This is absolutely cool.
Works simply perfect.

Go LightBulb Go! Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net