|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sun Jun 29, 2008 7:36 am
Made a total damage trigger with #math string. Need help with the #SHOW or #ECHO |
Hello, I have made a trigger for the mud that I play. It looks something like this, "You land [ 6 of 7] attacks on a wererat guard: Disfiguring (215) damage!".
Now, it takes the 6 attack and the 215 and multiplies that like this, " #math var1 %1*%3" and I display it with either #show @var1 or what I like a little bit more #Echo @var1
This shows the total damage right bellow that mud string of "You land [ 6 of 7] attacks on a wererat guard: Disfiguring (215) damage! What I really need help in is putting this in front or directly behind the mud string. So I would like it in front of You or right behind damage. (preferably in front of). A long time ago I had this set up and I remember it took a bit of work but I can't remember how I did it for the life of me. If anyone could help I would greatly appreciate it! |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sun Jun 29, 2008 8:37 am |
You're going to need to use #SUB and sub the entire line... of course
So: You land [ 6 of 7] attacks on a wererat guard: Disfiguring (215) damage!
Becomes: You land [ 6 of 7] attacks on a wererat guard: Disfiguring (215) damage for a total of 1,290 damage! |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun Jun 29, 2008 6:04 pm |
#SAYADD might also work
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sun Jun 29, 2008 9:25 pm |
MOO, Or just do what I suggested.
Code: |
#CLASS {DamAvg}
#VAR totdam {1290}
#TRIGGER {You land ~[%s(%d)%sof%s%d~] attacks *~: *~((%d)~) damage!} {
#VAR totdam %eval( %1 * %2)
#SUB {%line For a total of %format("&.0n", @totdam) damage.}
}
#CLASS 0 |
:p Simple!
K.I.S.S.
Keep it Simple Stupid! :D |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
|
|