|
zortania Newbie
Joined: 15 Jul 2003 Posts: 6 Location: USA
|
Posted: Sat May 08, 2004 2:57 pm
Text Copy into something like a list |
Okay, this is just for pure boredom's sake, really.
I want to be able to trigger this:
Person has been slain by the might of a thing.
So that it will copy the person and all of the thing into a list that I can echo to see sometimes. And also set up a way to clear it out if I want to eventually. I know this might sound hard, probably is..but I can't think of a way to do it right now.
Help for entertainment's sake?
Plus I want to use this information to make stats of who dies to what the most or such. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat May 08, 2004 4:11 pm |
#HELP TRIGGER
#HELP VARIABLE
#HELP ECHO
#HELP ADDITEM
#HALP ALIAS
#TR {^(%w) has been slain by the might of (*).&} {#ADDITEM deathto {%1"-"%2}}
#ALIAS showlist {#say %expandlist(@deathto,%cr)}
#ALIAS clearlist {#VAR deathto ""}
Usage: showlist
will display the list
Usage: clearlist
will reset the list |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 08, 2004 5:52 pm |
A bit more complex.
#TR {(%w) has been slain by the might of (*).} {#IF %iskey( @KillList, "%2") {#ADDK KillList {%2} {%additem( %db( @KillList, "%2"), "%1")}} {#ADDKEY KillList {%2} {%1}}}
To clear the variable, just set it to a null value.
#VAR KillList {}
Some possible displays:
#SHOWDB @KillList
#LOOPDB @KillList {#SAY {%key: %countlist( %val)}} |
|
|
|
|
|