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
Enathe
Novice


Joined: 17 Nov 2001
Posts: 34
Location: USA

PostPosted: Wed Jul 06, 2005 7:54 pm   

Damage Capture
 
I have a mud output that looks like this:

Your pierce injures the bureaucrat's torso! [20]
Your well-placed pierce mutilates the bureaucrat's hands! [21]
Your well-placed pierce mutilates the bureaucrat's neck! [22]
Your well-placed pierce mutilates the bureaucrat's arms! [24]
*** an exceptional adamantium katar hums violently in your hands! ***
Your deadly greater vine strike ANNIHILATES the bureaucrat. [79]
Your pierce maims the bureaucrat's arms! [15]
The bureaucrat is incapacitated and will slowly die, if not aided.
Your powerful pierce massacres the bureaucrat's head! [28]


Your well-placed pierce mutilates the secretary's torso! [22]
Your pierce maims the secretary's arms! [15]
Your pierce injures the secretary's hands! [20]
Your pierce injures the secretary's torso! [16]
Your pierce injures the secretary's torso! [19]
Your pierce injures the secretary's torso! [17]
Your pierce injures the secretary's arms! [17]
Your pierce injures the secretary's torso! [18]
Your pierce injures the secretary's legs! [16]
Your pierce injures the secretary's legs! [16]


What I would like to do is capture the damage and add it up and have a round total in another window. And at the end of that battle trigger on

is dead! R.I.P.

and bring me the total damage done that battle.

The only thing seperating the rounds is the battle prompt which looks like

2478H 535M 2329S -- [a tired worker = 1%, melee]>

I begin fights by just typing "k mob".

So far I can capture single lines like

You receive your share of experience -- 615 points.

But I cannot seem to get it to capture wildcards nor do I have the slightest idea on how to make it add up all the output of a specific round.

Any suggestions would be great. Thanks

Enathe
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 06, 2005 9:04 pm   
 
I'm just going to assume that no where else in the mud uses the line "Your blah blah blah [20]"

#TRIGGER {^Your %* ~[%1~]} {#add dmg %1}

#TRIGGER {is dead! R.I.P.} {#show @dmg}

Also, make this alias (to make things better)

#ALIAS k %1 {#var dmg 0;kill %1}

That has been tested, and it should work.

As for the other window, put it in the status window. Just...

#STW @dmg

That's just a basic one. All it'll do is show you the damage as it increases. You can make it say anything you want by editing it in the setting editor (much easier that way.)

Either way, your damage calculation is shown.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Jul 07, 2005 1:52 am   
 
*untested* But if it works you might like it :P

Code:
#TRIGGER "damage_capture" {^Your * ~[(%d)~]} {
  #ADD damage.round %1
  #ADD damage.total %1
 }
#TRIGGER "on_prompt" {%dH %dM %dS -- ~[* = %d~%, (*)~]~>} {
  #PSUB {%1, Total=@damage.total, Round=@damage.round} %x1
  #VARIABLE damage.round=0
 } "" {prompt|nocr}
#TRIGGER "death_message" {is dead! R.I.P(.)} {
  #PSUB {. Total Damage was @damage.total, Last Round was @damage.round} %x1
  damage.round=0
  damage.total=0
 }
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Enathe
Novice


Joined: 17 Nov 2001
Posts: 34
Location: USA

PostPosted: Thu Jul 07, 2005 2:05 am   
 
Nex,

Where does all this information come up? I have input all the proper triggers and they seem to work excpet I don't see the information anywhere. Does it go into the editor? Seperate window?

Enathe
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Jul 07, 2005 2:26 am   
 
Should come up on your prompt line and also on the is DEAD line What version of zmud are you using?
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Enathe
Novice


Joined: 17 Nov 2001
Posts: 34
Location: USA

PostPosted: Thu Jul 07, 2005 2:30 am   
 
7.13 and I don't see it there. I have entered it exactly as it appears.

Perhaps there may be some issue I am overlooking I will try once again.
Reply with quote
Enathe
Novice


Joined: 17 Nov 2001
Posts: 34
Location: USA

PostPosted: Thu Jul 07, 2005 2:34 am   
 
I have entered it exactly as is again and I see the Variable in my variables list and it has values but the values don't clear on death and it doesn't show up anywhere else.

Hrm....
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Jul 07, 2005 2:46 am   
 
Past a short fight between some code tags (to keep formating)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Jul 07, 2005 4:04 am   
 
Enathe, did you try my suggestion? My works perfectly, as far as mine was tested. And it'd show up in the main window, as well.

Charneus
Reply with quote
Enathe
Novice


Joined: 17 Nov 2001
Posts: 34
Location: USA

PostPosted: Thu Jul 07, 2005 4:07 am   
 
Yes I did, and it worked great for displaying the damage. I struggle still with getting it to display BOTH round and battle total in the status window. The settings are IDENTICAL for both and I can get total but never round. Oh well. I can play with it and see if I make progress.

Thanks all the for the help.
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