|
undergod Wanderer
Joined: 27 Jun 2001 Posts: 82
|
Posted: Fri Sep 20, 2002 1:49 am
A kill counter? |
I want to keep a record of all the mobs I kill, and how many I kill of each one. So, increment a counter if I have killed a mob of that type before, or create one if I haven't.
I've tried to get this to work, but I am not sure how to get the database set up, or how to add entries to it.
The syntax I get when I kill a mob is - "You have killed Orc!".
Another problem I have is: sometimes my MUD sends a > character before a line.. so I need to filter out all the >'s before I add them to the database.
Also, I'm looking for a quick way to check to see how many of a mob I've killed with the quickmenu. That'd be great! |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Fri Sep 20, 2002 6:34 am |
The quick and dirty method would be to use a record variable, although in the long term you will benefit by setting up a database.
#TR {You have killed (*)!} {#ADDKEY mobkills "%1" %eval(%db(@mobkills,"%1")+1)}
Since the pattern isn't anchored at its beginning, the existence of extraneous ">"s won't impede the trigger.
To check how many of a mob you've killed. You can use this quickmenu:
#MENU {Mob Count} {#ECHO You have killed %db(@mobkills,%selected) %selected~.}
Highlight the short name of the mob then right-click to open the quickmenu.
Troubadour
(Win 98, Pentium III, 550 MHz) |
|
|
|
undergod Wanderer
Joined: 27 Jun 2001 Posts: 82
|
Posted: Sun Sep 22, 2002 3:04 am |
Okay... one last question. I've tried to do it, and I can't get it to work. (everything else works perfectly, by the way, thanks!)
How can I loop through the database and just list all the mobs I've killed with the number I've killed right beside it? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Sep 22, 2002 3:38 am |
#LOOPDB @mobkills {#SHOW %key%val}
|
|
|
|
DaraisDarkwave Beginner
Joined: 09 Nov 2007 Posts: 28 Location: Fairbanks, Alaska
|
Posted: Wed Nov 28, 2007 12:19 am |
Is there a way to get this stuff to show up in like a Status Window?
|
|
|
|
|
|