Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
fadedparadox
Beginner


Joined: 11 Jan 2007
Posts: 10

PostPosted: Thu Mar 15, 2007 10:54 am   

Achaea: Slain Tracker Script
 
Trevize from Achaea here. I maintain and update a website with scripts for Achaea that I wrote.

I figured I might as well post some of my scripts here. As always, the newest versions of my scripts are at achaea.fadedparadox.com.

Quoted from my website:

Quote:
This script tracks everything you kill. Use SLAIN SHOW to see your stats, SLAIN RESET to reset the counter, and SLAIN SEARCH <item> to see all kills matching the pattern. The slain script installs into the Shadow|Slain directory.

Code:
#CLASS {Shadow}
#CLASS 0
#DELC {Shadow|Slain}
#CLASS {Shadow|Slain}
#VAR slainversion {1.1}
#CLASS 0
#CLASS {Shadow|Slain|slainscript}
#ALIAS slain {#if ("%1" == "show") {#var killdisplay 0;slainshow} {#if ("%1" == "search") {#var killdisplay 0;#var killmatch 0;slainsearch %-2} {#if ("%-1" == "reset") {slainreset} {slainhelp}}}}
#ALIAS slainsearch {#pri {#say " ";#say " ";#say %ansi( 2)You have killed:;#loopdb @killcounter {#if (%pos( %upper( %1), %upper( %key))) {#if (%eval( @killdisplay\2) == 0) {#sayp " "};#sayp " "%ansi( 9)~[%ansi( 7)%repeat( " ", 4-%len( %val))%val%ansi( 9)~]" "%ansi( grey)%key;#if (%eval( @killdisplay\2) == 1) {#say ""} {#if ( %eval( %len( %key)>32)) {#say "";#var killdisplay 0} {#sayp %repeat( " ", 32-%len( %key))}};#var killdisplay %eval( @killdisplay + 1);#var killmatch %eval( @killmatch + 1)}};#if (!@killmatch) {#say %ansi( 7)No entries found.};#var killdisplay 0;#var killmatch 0;#send " "}}
#ALIAS slainshow {#pri {#say " ";#say " ";#say %ansi( 2)You have killed:;#loopdb @killcounter {#if (%eval( @killdisplay\2) == 0) {#sayp " "};#sayp " "%ansi( 9)~[%ansi( 7)%repeat( " ", 4-%len( %val))%val%ansi( 9)~]" "%ansi( grey)%key;#if (%eval( @killdisplay\2) == 1 or %iskey( @killcounter, %key) == %numkeys( @killcounter)) {#say ""} {#if ( %eval( %len( %key)>32)) {#say "";#var killdisplay 1} {#sayp %repeat( " ", 32-%len( %key))}};#add killdisplay 1};#if (@killcounter=%null) {#say %ansi( 7)No kills recorded.};#var killdisplay 0;#send " "}}
#ALIAS slainreset {#say " ";#say " ";killcounter=%null;#say %ansi( 7)Slain counter reset.;#send " "}
#ALIAS slainhelp {#say " ";#say " ";#say {%ansi( 7)SLAIN SHOW - display your kills};#say {%ansi( 7)SLAIN RESET - reset your kill counter};#say {%ansi( 7)SLAIN SEARCH <item> - searches for specific kills};#send " "}
#VAR killcounter {}
#VAR killdisplay {0} {0}
#VAR killmatch {0} {0}
#REGEX {^You have slain (.+?)\, retrieving the corpse\.$} {#addkey killcounter {%1} %eval( %db( @killcounter, "%1")+1)}
#CLASS 0
#SAY [Shadow] Slain script 1.1 installed.


Enjoy!
Reply with quote
fadedparadox
Beginner


Joined: 11 Jan 2007
Posts: 10

PostPosted: Thu Mar 15, 2007 10:55 am   
 
Sample output:

Code:
You have killed:
  [   2] a mhun architect                 [  19] a Mhun guard
  [   6] an elite Mhun Keeper             [   5] a Mhun knight
  [  18] a Mhun warrior                   [   6] a Mhun bodyguard
  [   3] a majestic moose                 [   3] a feisty badger
  [   6] a speckled fawn                  [  10] a gorgeous pheasant
  [   3] a large buck                     [  23] an orc soldier
  [   5] a female orc                     [   4] an orc guard
  [   9] an orc archer                    [   6] an ogre bowman
  [   3] a Mhun demolitionist             [   3] a master Mhun miner
  [   7] a Mhun miner                     [   1] a Horkval guard
  [   4] a pirate with an eye-patch       [   1] a scantily dressed prostitute
  [   1] Brodie, a bawdy pirate           [   2] a pirate lass
  [   2] a drunken pirate                 [   1] Cassian, a blue-robed mage
  [   1] a cave ecalith                   [   2] a Mhun scout
  [  13] a murderous thug                 [   2] an adolescent orc
  [   3] a juvenile orc                   [   1] an adolescent female orc
  [   4] an orc warrior                   [   3] an ogre knight
  [   3] an ogre sentry                   [   1] an ogre warrior
  [   1] an ogre huntress                 [   3] a drunk orc
  [   1] Xulu, an orc witchdoctor         [   1] an ogre captain
  [   1] an orc captain                   [   3] a crimson pyrapede
  [   1] a rock beetle                    [   4] a cunning black wolf
  [   1] a wild kelpie                    [   1] a swamp dweller
  [   1] a Fomori of Unsidhe              [   2] an Unsidhe Banshee
  [   1] the Great Mhunna                 [   4] a Mhun labourer
  [   2] a lithe buckawn                  [   6] a black lamassu
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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