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
zortania
Newbie


Joined: 15 Jul 2003
Posts: 6
Location: USA

PostPosted: Sat May 08, 2004 2:57 pm   

Text Copy into something like a list
 
Okay, this is just for pure boredom's sake, really. Very Happy
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.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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)}}
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