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
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Sun Jun 12, 2005 6:17 pm   

Medievia - Death List, Rest In Peace
 
The script is an experience points tracker that records the experience points awarded for each mob killed.

Commands:

rip ~ display the Death List
ripreset ~ reset the Death List
ripsub ~ subtract mob from the Death List

Here is an example of the output from the rip alias:

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
         28,832         57,664   2   pixie maiden
         37,067        185,335   5   local patron
          8,531         17,062   2   male dancer
         16,942         33,885   2   serving maid
         10,697         21,395   2   female dancer
         11,445         11,445   1   card player
          7,742          7,742   1   drunkard
         82,525         82,525   1   water weird
         28,908         57,817   2   horrifying Mudmonster
          8,497         67,980   8   member of the Veiled Society
         23,841         47,682   2   prisoner
         29,382         29,382   1   lost adventurer
          2,991         26,920   9   rat
------------------------------
        297,400        646,834       Death Count: 38


I have four columns:

1. Average Xp ~ Average Mob Experience Awarded for each Mob
2. Total Xp ~ Total Mob Experience Awarded for each Mob
3. # ~ Death Count for each Mob
4. Death List, R.I.P. ~ Mob Name

Also, I calculate the total of the first three columns.

Death List Code [written in zMUD version 7.05]:

Updated 6-14-2005
Updated 6-16-2005 (last one I hope)

Code:
#CLASS {RIP}
#VAR rip_db_xp {0} {0}
#VAR rip_db_mob {0} {0}
#VAR rip_mob {0} {0}
#VAR rip_sum_average_xp {0} {0}
#VAR rip_sum_total_xp {0} {0}
#VAR rip_death_count {0} {0}
#ALIAS rip {#variable rip_sum_average_xp 0;#variable rip_sum_total_xp 0;#variable rip_death_count 0;#show {};#if (@rip_db_mob = 0) {#show {Error: death list is empty}} {#show {%ansi(06)"     Average Xp       Total Xp   #   Death List, R.I.P."};#show {%ansi(07)%repeat("-",56)};#loopdb @rip_db_mob {#show {%ansi(02) %format( "&14.0n", %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key))) %format( "&14.0n", %db( @rip_db_xp, %key)) %format( "&3.0f", %val) %char(32) %key}};#show {%ansi(07)%repeat("-",30)};#loopdb @rip_db_mob {#add rip_sum_average_xp %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key));#add rip_sum_total_xp %db( @rip_db_xp, %key);#add rip_death_count %db( @rip_db_mob, %key)};#show {%ansi(02) %format( "&14.0n", @rip_sum_average_xp) %format( "&14.0n", @rip_sum_total_xp) %ansi(06)"      Death Count:" @rip_death_count}}}
#ALIAS ripreset {#show {};#show {Death List Reset};#variable rip_db_mob 0;#variable rip_db_xp 0;#variable rip_mob 0;#variable rip_sum_average_xp 0;#variable rip_sum_total_xp 0;#variable rip_death_count 0}
#ALIAS ripsub {#delkey rip_db_xp {%-1};#delkey rip_db_mob {%-1};#if (@rip_db_xp = %null) {#variable rip_db_xp 0};#if (@rip_db_mob = %null) {#variable rip_db_mob 0}}
#TRIGGER {^You are awarded (%d) experience points for the battle.} {#if (%ends(%line2,"DEAD!!")) {#variable rip_mob %line2;#variable rip_mob %remove(" is DEAD!!",@rip_mob);#if (%word(@rip_mob,1) = "A") {#variable rip_mob %remove("A ",@rip_mob)};#if (%word(@rip_mob,1) = "An") {#variable rip_mob %remove("An ",@rip_mob)};#if (%word(@rip_mob,1) = "The") {#variable rip_mob %remove("The ",@rip_mob)};#if (@rip_db_mob = 0) {#variable rip_db_mob %null};#if (@rip_db_xp = 0) {#variable rip_db_xp %null};#addkey rip_db_mob @rip_mob %eval(%db(@rip_db_mob,@rip_mob)+1);#addkey rip_db_xp @rip_mob %eval(%db(@rip_db_xp,@rip_mob)+%1)}}
#CLASS 0


Import:

1. save code to a file
2. open zMUD and type: #menu {Settings|Import|Script}
3. open code file

Test Input:

#echo {A test mob one is DEAD!!}
#echo {You are awarded 100 experience points for the battle.}
#echo {An test mob two is DEAD!!}
#echo {You are awarded 200 experience points for the battle.}
#echo {An test mob two is DEAD!!}
#echo {You are awarded 200 experience points for the battle.}
#echo {The test mob three is DEAD!!}
#echo {You are awarded 300 experience points for the battle.}
#echo {The test mob three is DEAD!!}
#echo {You are awarded 300 experience points for the battle.}
#echo {The test mob three is DEAD!!}
#echo {You are awarded 300 experience points for the battle.}

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
            100            100   1   test mob one
            200            400   2   test mob two
            300            900   3   test mob three
------------------------------
            600          1,400       Death Count: 6


Warning:

I am a newbie to Medievia, so the script may have a problem I have yet to encounter.

Other Muds:

You can edit the script for another mud if the mud's output is similiar to this:

^A large demon is DEAD!!
^You are awarded 12345 experience points for the battle.

Comments Welcome Twisted Evil


Last edited by Full Throttle on Thu Jun 16, 2005 1:24 pm; edited 2 times in total
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Tue Jun 14, 2005 3:46 pm   
 
A test mob one is DEAD!!
You are awarded 100 experience points for the battle.
Variable rip_mob removed.
An test mob two is DEAD!!
You are awarded 200 experience points for the battle.
Variable rip_mob removed.
An test mob two is DEAD!!
You are awarded 200 experience points for the battle.
Variable rip_mob removed.
The test mob three is DEAD!!
You are awarded 300 experience points for the battle.
Variable rip_mob removed.
The test mob three is DEAD!!
You are awarded 300 experience points for the battle.
Variable rip_mob removed.
The test mob three is DEAD!!
You are awarded 300 experience points for the battle.
Variable rip_mob removed.
Average Xp Total Xp # Death List, R.I.P.
--------------------------------------------------------
100 100 1 test mob one
200 400 2 test mob two
300 900 3 test mob three
------------------------------
600 1,400 Death Count: 6
Variable rip_sum_average_xp removed.
Variable rip_sum_total_xp removed.
Variable rip_death_count removed.


Not sure why the stuff i hilited in red is showing up.
But it's a nice code.
If i understand the vars right:
#VAR rip_db_xp {None} {None}
#VAR rip_db_mob {None} {None}
This means that when u restart zmud all data is deleted? Almost would rather keep a LONG list of kills :-) Might work something in there for that myself.
_________________
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Tue Jun 14, 2005 10:38 pm   
 
Thanks for reply.

DeathDealer wrote:
Not sure why the stuff in red is showing up.


There is an option to echo zMUD information messages to the screen called "Echo messages" in preferences. I have this option turned off.

I updated the code above, it works with the "Echo messages" option turned on or off.

DeathDealer wrote:
This means that when u restart zmud all data is deleted?


Nod. If you leave the default value blank, then the variable will not be reset on login.

And about keeping a LONG list of kills Very Happy I was thinking of that too when I read Megamog75's Annual Report script.

http://forums.zuggsoft.com/phpbb/viewtopic.php?t=11570

It would be cool if we had a script similiar to Annual Report but gave the info shown in the RIP script.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 15, 2005 12:26 am   
 
Full Throttle wrote:
There is an option to echo zMUD information messages to the screen called "Echo messages" in preferences. I have this option turned off.

I updated the code above, it works with the "Echo messages" option turned on or off.
1st time i've ever seen anything actually happen to the vars tho. and I got loads of vars. that was the reason for my confusion. Looks great now!

Full Throttle wrote:
And about keeping a LONG list of kills Very Happy I was thinking of that too when I read Megamog75's Annual Report script.

http://forums.zuggsoft.com/phpbb/viewtopic.php?t=11570

It would be cool if we had a script similiar to Annual Report but gave the info shown in the RIP script.
I was working on something more indepth for Aard, but stopped to fix a spellup script, and never went back to it. Time to revisit that I guess :-)
_________________
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Thu Jun 16, 2005 8:34 am   
 
>rip
Average Xp Total Xp # Death List, R.I.P.
--------------------------------------------------------
40,253 40,253 1 paranoid goblin
101,661 101,661 1 meadow fairy slave master
89,740 89,740 1 Prince Keener
------------------------------
231,654 Death Count: 3

>rip
Average Xp Total Xp # Death List, R.I.P.
--------------------------------------------------------
40,253 40,253 1 paranoid goblin
101,661 101,661 1 meadow fairy slave master
89,740 89,740 1 Prince Keener
------------------------------
463,308 Death Count: 6

>rip
Average Xp Total Xp # Death List, R.I.P.
--------------------------------------------------------
40,253 40,253 1 paranoid goblin
101,661 101,661 1 meadow fairy slave master
89,740 89,740 1 Prince Keener
------------------------------
694,962 Death Count: 9



Any reason it's not reseting the average exp/etc?
(for my mud I had to change the two %line2's to %line3's, and change the wording on the parsing pattern since the mud output is like...

+-- --+
Prince Keener is DEAD!!
+-- --+
You receive 89740 experience points.


The trigger is this atm.
#trigger {^You receive (%d) experience points.} {#if (%ends( %line3, "DEAD!!")) {
#variable rip_mob %line3
#variable rip_mob %remove( " is DEAD!!", @rip_mob)
#if (%word( @rip_mob, 1) = "A") {#variable rip_mob %remove( "A ", @rip_mob)}
#if (%word( @rip_mob, 1) = "An") {#variable rip_mob %remove( "An ", @rip_mob)}
#if (%word( @rip_mob, 1) = "The") {#variable rip_mob %remove( "The ", @rip_mob)}
#if (@rip_db_mob = 0) {#variable rip_db_mob %null}
#if (@rip_db_xp = 0) {#variable rip_db_xp %null}
#addkey rip_db_mob @rip_mob %eval( %db( @rip_db_mob, @rip_mob)+1)
#addkey rip_db_xp @rip_mob %eval( %db( @rip_db_xp, @rip_mob)+%1)
}
}


Some help please? I'm thinking probably somewhere in the rip alias need to put it to make a few variables 0 or something like that, but I'm not really sure.
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Thu Jun 16, 2005 1:47 pm   
 
Thanks for posting, Darkspot.

I forgot to initialize rip_sum_average_xp, rip_sum_total_xp, and rip_death_count to zero at the start of the rip alias.

I updated the code (for Medievia users) in the top post.

Here is code for Darkspot's MUD:

Code:
#CLASS {RIP}
#VAR rip_db_xp {0} {0}
#VAR rip_db_mob {0} {0}
#VAR rip_mob {0} {0}
#VAR rip_sum_average_xp {0} {0}
#VAR rip_sum_total_xp {0} {0}
#VAR rip_death_count {0} {0}
#ALIAS rip {#variable rip_sum_average_xp 0;#variable rip_sum_total_xp 0;#variable rip_death_count 0;#show {};#if (@rip_db_mob = 0) {#show {Error: death list is empty}} {#show {%ansi(06)"     Average Xp       Total Xp   #   Death List, R.I.P."};#show {%ansi(07)%repeat("-",56)};#loopdb @rip_db_mob {#show {%ansi(02) %format( "&14.0n", %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key))) %format( "&14.0n", %db( @rip_db_xp, %key)) %format( "&3.0f", %val) %char(32) %key}};#show {%ansi(07)%repeat("-",30)};#loopdb @rip_db_mob {#add rip_sum_average_xp %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key));#add rip_sum_total_xp %db( @rip_db_xp, %key);#add rip_death_count %db( @rip_db_mob, %key)};#show {%ansi(02) %format( "&14.0n", @rip_sum_average_xp) %format( "&14.0n", @rip_sum_total_xp) %ansi(06)"      Death Count:" @rip_death_count}}}
#ALIAS ripreset {#show {};#show {Death List Reset};#variable rip_db_mob 0;#variable rip_db_xp 0;#variable rip_mob 0;#variable rip_sum_average_xp 0;#variable rip_sum_total_xp 0;#variable rip_death_count 0}
#ALIAS ripsub {#delkey rip_db_xp {%-1};#delkey rip_db_mob {%-1};#if (@rip_db_xp = %null) {#variable rip_db_xp 0};#if (@rip_db_mob = %null) {#variable rip_db_mob 0}}
#TRIGGER {^You receive (%d) experience points.} {#if (%ends(%line3,"DEAD!!")) {#variable rip_mob %line3;#variable rip_mob %remove(" is DEAD!!",@rip_mob);#if (%word(@rip_mob,1) = "A") {#variable rip_mob %remove("A ",@rip_mob)};#if (%word(@rip_mob,1) = "An") {#variable rip_mob %remove("An ",@rip_mob)};#if (%word(@rip_mob,1) = "The") {#variable rip_mob %remove("The ",@rip_mob)};#if (@rip_db_mob = 0) {#variable rip_db_mob %null};#if (@rip_db_xp = 0) {#variable rip_db_xp %null};#addkey rip_db_mob @rip_mob %eval(%db(@rip_db_mob,@rip_mob)+1);#addkey rip_db_xp @rip_mob %eval(%db(@rip_db_xp,@rip_mob)+%1)}}
#CLASS 0


Test Input/Output:

#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
         89,740         89,740   1   Prince Keener
------------------------------
         89,740         89,740       Death Count: 1


#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}
#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
         89,740        269,220   3   Prince Keener
------------------------------
         89,740        269,220       Death Count: 3


#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}
#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}
#echo {Prince Keener is DEAD!!}
#echo {+-- --+}
#echo {You receive 89740 experience points.}

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
         89,740        538,440   6   Prince Keener
------------------------------
         89,740        538,440       Death Count: 6


I hope no more silly bugs Twisted Evil
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Thu Jun 16, 2005 4:49 pm   
 
Thank you. :)
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Thu Jun 16, 2005 6:00 pm   
 
Question. Is there an easy way to sort this? I like things in alphabetical order. I found a way to sort it into a string list.. but can't convert it back. I honestly am horrible with db's and the db functions. I always have troubles when working with them, so I try to stay away from them, but this script is cool. Anyways what I have so far is

in the beginning of rip
#var rip_db_mob {%sort( %expanddb( @rip_db_mob, |, ",") )}
#var rip_db_xp {%sort( %expanddb( @rip_db_xp, |, ",") )}

is there a way to convert those back... or maybe a db function? I didn't spot one, but there easily could be one.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Jun 16, 2005 8:45 pm   
 
Starting to see that i might not be able to modify this for Aard at all.
The msgs of death change depending on what is the method.
Weapons all have diff damage types resulting in diff msgs.
Spells give diff msg for each spell.
In between the death and exp there could be a msg depending on something like if it's a quest mob or what not.
To many variables of differences.
I'll try to see if I can come up with something i guess.
About to head home, and already closed down zmud so I don't have a log of kills to display. I'll try to come up with that later?
I like this a heck of a lot better than using Aards Last Kill command and my script that does the avg.
http://forums.zuggsoft.com/phpbb/viewtopic.php?p=81714#81714
_________________
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Fri Jun 17, 2005 1:09 am   
 
Darkspot, check out this topic on Database Variable Sorting:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=19800

This is an add-on alias for the Death List. (works for Medievia or Darkspot's MUD)

Command:

ripmobsort ~ display the Death List in abc order

Code:
#CLASS {RIP}
#VAR sort_db_input {0} {0}
#VAR sort_db_output {0} {0}
#VAR sort_key_list {0} {0}
#ALIAS ripmobsort {#variable rip_sum_average_xp 0;#variable rip_sum_total_xp 0;#variable rip_death_count 0;#show {};#if (@rip_db_mob = 0) {#show {Error: death list is empty}} {#show {%ansi(06)"     Average Xp       Total Xp   #   Death List, R.I.P."};#show {%ansi(07)%repeat("-",56)};#variable sort_db_input @rip_db_mob;#variable sort_key_list %null;#loopdb @sort_db_input {#additem sort_key_list {%key}};#variable sort_key_list %sort(@sort_key_list);#variable sort_db_output %null;#forall @sort_key_list {#addkey sort_db_output {%i} {%db(@sort_db_input,"%i")}};#loopdb @sort_db_output {#show {%ansi(02) %format( "&14.0n", %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key))) %format( "&14.0n", %db( @rip_db_xp, %key)) %format( "&3.0f", %val) %char(32) %key}};#show {%ansi(07)%repeat("-",30)};#loopdb @rip_db_mob {#add rip_sum_average_xp %eval( %db( @rip_db_xp, %key)/%db( @rip_db_mob, %key));#add rip_sum_total_xp %db( @rip_db_xp, %key);#add rip_death_count %db( @rip_db_mob, %key)};#show {%ansi(02) %format( "&14.0n", @rip_sum_average_xp) %format( "&14.0n", @rip_sum_total_xp) %ansi(06)"      Death Count:" @rip_death_count}}}
#CLASS 0


Test Input:

#variable rip_db_mob %null
#variable rip_db_xp %null
#addkey rip_db_mob {Mob E=4|Mob B=5|Mob A=2|Mob D=2|Mob C=2}
#addkey rip_db_xp {Mob E=8000|Mob B=5000|Mob A=5000|Mob D=1000|Mob C=4000}

Alias "rip" Output:

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
          2,000          8,000   4   Mob E
          1,000          5,000   5   Mob B
          2,500          5,000   2   Mob A
            500          1,000   2   Mob D
          2,000          4,000   2   Mob C
------------------------------
          8,000         23,000       Death Count: 15


Alias "ripmobsort" Output:

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
          2,500          5,000   2   Mob A
          1,000          5,000   5   Mob B
          2,000          4,000   2   Mob C
            500          1,000   2   Mob D
          2,000          8,000   4   Mob E
------------------------------
          8,000         23,000       Death Count: 15


I would think sorting the Death List by Average Xp would be more useful Twisted Evil
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Fri Jun 17, 2005 2:52 am   
 
DeathDealer, I see... Aardwolf does have a lot of death messages.

http://build.aardmud.org/builders/mobfiles/mobsdamtype.htm

How about making a list of all death messages, then redoing the trigger to cycle through them.

Code:
#var death_message %null
#additem death_message {" is slain by a final deadly slash!!"}
#additem death_message {" crumbles as it is battered to death!!"}
#additem death_message {" is slain by a final deadly stab!!"}
#additem death_message {" screams as the flames engulf it!!"}
#additem death_message {" screams in agony as the acid consumes it!!"}


Code:
#trigger {^You receive (%d) experience points.} {
#loop %numitems(@death_message) {
 #if %ends(%line2,%item(@death_message,%i)) {
   #variable rip_mob %line2
   #if (%word(@rip_mob,1) = "A") {#variable rip_mob %remove("A ",@rip_mob)}
   #if (%word(@rip_mob,1) = "An") {#variable rip_mob %remove("An ",@rip_mob)}
   #if (%word(@rip_mob,1) = "The") {#variable rip_mob %remove("The ",@rip_mob)}
   #variable rip_mob %remove(%item(@death_message,%i),@rip_mob)
   #if (@rip_db_mob = 0) {#variable rip_db_mob %null}
   #if (@rip_db_xp = 0) {#variable rip_db_xp %null}
   #addkey rip_db_mob @rip_mob %eval(%db(@rip_db_mob,@rip_mob)+1)
   #addkey rip_db_xp @rip_mob %eval(%db(@rip_db_xp,@rip_mob)+%1)}}}


Test Input:

#echo {A kobold is slain by a final deadly slash!!}
#echo {You receive 100 experience points.}
#echo {A troll crumbles as it is battered to death!!}
#echo {You receive 200 experience points.}
#echo {A dragon is slain by a final deadly stab!!}
#echo {You receive 300 experience points.}
#echo {A demon screams as the flames engulf it!!}
#echo {You receive 400 experience points.}
#echo {A gnoll screams in agony as the acid consumes it!!}
#echo {You receive 500 experience points.}

Code:
     Average Xp       Total Xp   #   Death List, R.I.P.
--------------------------------------------------------
            100            100   1   kobold
            200            200   1   troll
            300            300   1   dragon
            400            400   1   demon
            500            500   1   gnoll
------------------------------
          1,500          1,500       Death Count: 5


The diku mud I used to play had three different death messages. I had to code something similiar to make the script work.
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Fri Jun 17, 2005 8:41 am   
 
Awesome addon, and sorting by average xp isn't so hard. look for the number that sticks furthest to the left. the part was I was trying to look up how one mob was doing, and I'd have to remember how long ago my first kill with the new script was. that was a pain :P

Thanks again, especially for the link to the thread.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Fri Jun 17, 2005 4:58 pm   
 
Red is my dagger msgs. Blue is my current spell msg. Green is the EXP msg. Violet is the actual death msg.
As you can see with exp, there's also text in between them if there is a double exp event going on. (the bonus exp msg is generally the same at the begining, the end of if can be diff)
So pretty much, there's no (easy) way to use the last damage attack, or the actual death msg.

[2] Your pierce pimpslaps Gorlab Warrior! [245]
Gorlab Warrior is slain by a final deadly stab!!
You receive 156 experience points.
You raise a level!!
INFO: Constantly traveling, Vitae wanders 36 miles off the beaten path.
You gain 28 hit points, 20 mana, 26 moves, 9 practices and 5 trains.
Lucky! You gain an extra 1 training session!
You gain a bonus Luck point!
You can now use the following skills and spells :
Spell Intellect fortress.
Spell Infernal voice.
You receive 156 bonus experience points in honor of Meow reaching superhero.
You hear Gorlab Warrior's death cry.
You get 98 gold coins from the perforated corpse of Gorlab Warrior.
Devel gives you 25 gold coins for your perforated corpse of Gorlab Warrior.

[2] Your pierce pimpslaps Gorlab Warrior! [207]
Gorlab Warrior is slain by a final deadly stab!!
You receive 126 experience points.
You receive 126 bonus experience points in honor of Meow reaching superhero.
You hear Gorlab Warrior's death cry.
You get 130 gold coins from the perforated corpse of Gorlab Warrior.
Devel gives you 24 gold coins for your perforated corpse of Gorlab Warrior.

[2] Your pierce pimpslaps Gorlab Warrior! [207]
Gorlab Warrior is slain by a final deadly stab!!
You receive 149 experience points.
Gorlab Warrior's severed head plops on the ground.
You get 156 gold coins from the perforated corpse of Gorlab Warrior.
Devel gives you 24 gold coins for your perforated corpse of Gorlab Warrior.

Your psychic crush ***** PULVERIZES ***** Gorlab Warrior! [102]
Gorlab Warrior's brain explodes from his ears!!
You receive 182 experience points.
Gorlab Warrior's heart is torn from his chest.
You get 195 gold coins from the brainless corpse of Gorlab Warrior.
Devel gives you 25 gold coins for your brainless corpse of Gorlab Warrior.

Your psychic crush -=- VAPORIZES -=- Gorlab soldier! [113]
Gorlab soldier's brain explodes from his ears!!
You receive 131 experience points.
You hear Gorlab soldier's death cry.
You get 87 gold coins from the brainless corpse of Gorlab soldier.

[1] Your pierce pimpslaps gorlab trainee! [134]
Gorlab trainee is slain by a final deadly stab!!
You receive 0 experience points.
Gorlab trainee hits the ground ... DEAD.
You get 27 gold coins from the perforated corpse of gorlab trainee.
Devel gives you 12 gold coins for your perforated corpse of gorlab trainee.

Edit:
NOTE to any that care:
I'm going to be making a new profile on here named Vitae and that is what I am going to be using from now on. Asked Zugg if a name change on here was doable so that my posts would remain and just have my new name copied over, but he said it can't be done. Aw well :( Back to newbie poster status.
_________________
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Fri Jun 17, 2005 5:55 pm   
 
And of course i put in the wrong email for DeathDealer so that I can continue to use my gmail, so i can't confirm i want to use the OTHER email for DeathDealer meaning I can't log in to make a copy of my PM's which i forgot to do....*mutter* this is why name changes on forums are a PITA

Full Throttle, what would be changed in there if I wanted to sort by diff ways?
Like ripmobs ripexp ripavg ripkills
That is *IF* i ever figure out how to get it to log the kills :-)

got a new monitor at work that sucks ass.
Dell LCD, updated the drivers and the text STILL has a blurry haze around it. *mutter*
_________________
http://www.Aardwolf.com
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Sun Jun 19, 2005 2:11 am   
 
Death List Sorting Version for Medievia (complete version, not an add-on)

Commands:

rip ~ standard Death List format in order of kill
rip m ~ Death List sorted by mob
rip c ~ Death List sorted by count
rip t ~ Death List sorted by total xp
rip a ~ Death List sorted by average xp
ripreset ~ reset the Death List variables
ripremove ~ remove a mob name from the Death List
ripsave ~ save Death List variables to file
ripload ~ load Death List variables from file

Updated 6-30-2005

Code:
#CLASS {RIP}
#VAR rip_mob {0} {0}
#VAR rip_death_message {0} {0}
#VAR rip_db_average_xp {0} {0}
#VAR rip_db_total_xp {0} {0}
#VAR rip_db_death_count {0} {0}
#VAR rip_sum_average_xp {0} {0}
#VAR rip_sum_total_xp {0} {0}
#VAR rip_sum_death_count {0} {0}
#VAR sort_db {0} {0}
#VAR sort_temp {0} {0}
#ALIAS keysort {#variable sort_temp %null;#variable %2 %null;#loopdb @{%1} {#additem sort_temp {%key}};#variable sort_temp %sort(@sort_temp);#forall @sort_temp {#addkey %2 {%i} {%db(@{%1},"%i")}}}
#ALIAS valuesort {#variable sort_temp %null;#variable %2 %null;#loopdb @{%1} {#variable sort_temp %concat(@sort_temp,%repeat("0",10-%len(%val)),%val,%char(30),%key,"|")};#variable sort_temp %leftback(@sort_temp,1);#variable sort_temp %sort(@sort_temp);#variable sort_temp %replace(@sort_temp,"|",%char(29));#loopdb @sort_temp {#variable %2 %concat(@{%2},%val,%char(30),%eval(%key),%char(29))};#variable %2 %leftback(@{%2},1)}
#ALIAS valuesum {#loopdb @{%1} {#add %2 %db( @{%1}, %key)}}
#ALIAS rip {#variable rip_sum_death_count 0;#variable rip_sum_total_xp 0;#variable rip_sum_average_xp 0;#show {};#if (@rip_db_death_count = 0) {#show {Error: death list is empty}} {#show {%ansi(06)"     Average Xp       Total Xp   #   Death List, R.I.P."};#show {%ansi(07)%repeat("-",56)};valuesum rip_db_death_count rip_sum_death_count;valuesum rip_db_total_xp rip_sum_total_xp;valuesum rip_db_average_xp rip_sum_average_xp;#variable sort_db @rip_db_death_count;#if %begins(%1,"m") {keysort rip_db_death_count sort_db};#if %begins(%1,"c") {valuesort rip_db_death_count sort_db};#if %begins(%1,"t") {valuesort rip_db_total_xp sort_db};#if %begins(%1,"a") {valuesort rip_db_average_xp sort_db};#loopdb @sort_db {#show {%ansi(02) %format( "&14.0n", %eval( %db( @rip_db_total_xp, %key)/%db( @rip_db_death_count, %key))) %format( "&14.0n", %db( @rip_db_total_xp, %key)) %format( "&3.0f", %db( @rip_db_death_count, %key)) %char(32) %key}};#show {%ansi(07)%repeat("-",30)};#show {%ansi(02) %format( "&14.0n", @rip_sum_average_xp) %format( "&14.0n", @rip_sum_total_xp) %ansi(06)"      Death Count:" @rip_sum_death_count}}}
#ALIAS ripreset {#show {};#show {Death List Reset};#variable rip_mob 0;#variable rip_death_message 0;#variable rip_db_death_count 0;#variable rip_db_total_xp 0;#variable rip_db_average_xp 0;#variable rip_sum_death_count 0;#variable rip_sum_total_xp 0;#variable rip_sum_average_xp 0;#variable sort_db 0;#variable sort_temp 0}
#ALIAS ripremove {#delkey rip_db_death_count {%-1};#delkey rip_db_total_xp {%-1};#delkey rip_db_average_xp {%-1};#if (@rip_db_death_count = %null) {#variable rip_db_death_count 0};#if (@rip_db_total_xp = %null) {#variable rip_db_total_xp 0};#if (@rip_db_average_xp = %null) {#variable rip_db_total_xp 0}}
#ALIAS ripsave {#show {};#show {Death List Save};#file 1 death.list.txt;#erase 1;#file 1 death.list.txt;#write 1 {~#var rip_db_death_count ~"@rip_db_death_count~"};#write 1 {~#var rip_db_total_xp ~"@rip_db_total_xp~"};#write 1 {~#var rip_db_average_xp ~"@rip_db_average_xp~"};#close 1}
#ALIAS ripload {#show {};#show {Death List Load};#read death.list.txt}
#TRIGGER {^You are awarded (%d) experience points for the battle.} {#variable rip_death_message %null;#variable rip_sum_death_count 0;#variable rip_sum_total_xp 0;#variable rip_sum_average_xp 0;#additem rip_death_message {" is DEAD!!"};#loop %numitems(@rip_death_message) {#if %ends(%line2,%item(@rip_death_message,%i)) {#variable rip_mob %line2;#if (%word(@rip_mob,1) = "A") {#variable rip_mob %remove("A ",@rip_mob)};#if (%word(@rip_mob,1) = "An") {#variable rip_mob %remove("An ",@rip_mob)};#if (%word(@rip_mob,1) = "The") {#variable rip_mob %remove("The ",@rip_mob)};#variable rip_mob %remove(%item(@rip_death_message,%i),@rip_mob);#if (@rip_db_death_count = 0) {#variable rip_db_death_count %null};#if (@rip_db_total_xp = 0) {#variable rip_db_total_xp %null};#if (@rip_db_average_xp = 0) {#variable rip_db_average_xp %null};#addkey rip_db_death_count @rip_mob %eval(%db(@rip_db_death_count,@rip_mob)+1);#addkey rip_db_total_xp @rip_mob %eval(%db(@rip_db_total_xp,@rip_mob)+%1);#addkey rip_db_average_xp @rip_mob %eval(%db(@rip_db_total_xp,@rip_mob)/%db(@rip_db_death_count,@rip_mob))}}}
#CLASS 0


Import:

1. save code to a file
2. open zMUD and type: #menu {Settings|Import|Script}
3. open code file

You can edit the script for another mud if the mud's output is similiar to this:

^A large demon is DEAD!!
^You are awarded 12345 experience points for the battle.

The death message above is " is DEAD!!".

If your mud has more than one death message, then add the messages to the rip_death_message list with the additem command in the trigger.

Vitae, good luck getting the script to work on Aardmud.


Last edited by Full Throttle on Thu Jun 30, 2005 3:13 pm; edited 1 time in total
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Jun 20, 2005 1:29 pm   
 
well, holy crap :-)
That's pretty much MY input on this :-)
_________________
http://www.Aardwolf.com
Reply with quote
Sindar
Newbie


Joined: 29 Mar 2008
Posts: 3

PostPosted: Sat Mar 29, 2008 2:20 pm   
 
This script is great, but i have problem.
My output from the mud looks a little bit different
Code:
You receive 10 experience points.
Your blood freezes as you hear the ant's guardian's death cry.
the ant's guardian is dead!  R.I.P.


How modify this Death List script, that works correct with my mud output?

Thanks.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sat Mar 29, 2008 5:44 pm   
 
According to Full Throttle's instructions above it seems you should
Find the Trigger with the pattern
Code:
^You are awarded (%d) experience points for the battle.

and change the pattern to
Code:
^You receive (%d) experience points.

And within that trigger change the command
Code:
#additem rip_death_message {" is DEAD!!"}

to
Code:
#additem rip_death_message {" is dead!  R.I.P."}


Anyways thats what a quick look suggested to me.
I didn't look too much at the internals of the code.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Sindar
Newbie


Joined: 29 Mar 2008
Posts: 3

PostPosted: Sun Mar 30, 2008 7:19 pm   
 
Dharkael wrote:
According to Full Throttle's instructions above it seems you should
Find the Trigger with the pattern
Code:
^You are awarded (%d) experience points for the battle.

and change the pattern to
Code:
^You receive (%d) experience points.

And within that trigger change the command
Code:
#additem rip_death_message {" is DEAD!!"}

to
Code:
#additem rip_death_message {" is dead!  R.I.P."}


Anyways thats what a quick look suggested to me.
I didn't look too much at the internals of the code.


I tried it, but this changes not work :(
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sun Mar 30, 2008 8:53 pm   
 
With a mud that has the death message AFTER the xp, you cannot use his trigger as it is setup. I've got an example for BuffyMud, that also includes mission experience which lists under the mob stuff :D I'll post it tomorrow, I'm still tweaking it and bugfixing all the changes I made to it. So, once I finish you can just replace patterns in my triggers.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Mar 31, 2008 11:27 pm   
 
Ok, here, as promised, is my setup for this for BuffyMUD. Which, like Sindar's MUD has the death message AFTER the XP message. I've also added a hook in for mission xp.

Please let me know of any problems.

Code:
#CLASS {RIP}
#ALIAS keysort {
  #variable sort_temp %null
  #variable %2 %null
  #loopdb @{%1} {#additem sort_temp {%key}}
  #variable sort_temp %sort( @sort_temp)
  #forall @sort_temp {#addkey %2 {%i} {%db( @{%1}, "%i")}}
  }
#ALIAS valuesort {
  #variable sort_temp %null
  #variable %2 %null
  #loopdb @{%1} {#variable sort_temp %concat( @sort_temp, %repeat( "0", 10-%len( %val)), %val, %char( 30), %key, "|")}
  #variable sort_temp %leftback( @sort_temp, 1)
  #variable sort_temp %sort( @sort_temp)
  #variable sort_temp %replace( @sort_temp, "|", %char( 29))
  #loopdb @sort_temp {#variable %2 %concat( @{%2}, %val, %char( 30), %eval( %key), %char( 29))}
  #variable %2 %leftback( @{%2}, 1)
  }
#ALIAS valuesum {#loopdb @{%1} {#add %2 %db( @{%1}, %key)}}
#ALIAS rip {
  #variable rip_sum_death_count 0
  #variable rip_sum_total_xp 0
  #variable rip_sum_average_xp 0
  #show {}
  #if (@rip_db_death_count = 0) {#show {Error: death list is empty}} {
    #show {%ansi( 06)"     Average Xp       Total Xp   #   Death List, R.I.P."}
    #show {%ansi( 07)%repeat( "-", 56)}
    valuesum rip_db_death_count rip_sum_death_count
    valuesum rip_db_total_xp rip_sum_total_xp
    valuesum rip_db_average_xp rip_sum_average_xp
    #variable sort_db @rip_db_death_count
    #if %begins( %1, "m") {keysort rip_db_death_count sort_db}
    #if %begins( %1, "c") {valuesort rip_db_death_count sort_db}
    #if %begins( %1, "t") {valuesort rip_db_total_xp sort_db}
    #if %begins( %1, "a") {valuesort rip_db_average_xp sort_db}
    #loopdb @sort_db {#show {%ansi( 02) %format( "&14.0n", %eval( %db( @rip_db_total_xp, %key)/%db( @rip_db_death_count, %key))) %format( "&14.0n", %db( @rip_db_total_xp, %key)) %format( "&3.0f", %db( @rip_db_death_count, %key)) %char( 32) %key}}
    #show {%ansi( 07)%repeat( "-", 30)}
    #show {%ansi( 02) %format( "&14.0n", @rip_sum_average_xp) %format( "&14.0n", @rip_sum_total_xp) %ansi( 06)"      Kill Count:" @rip_sum_death_count}
    #show {%ansi( 07)%repeat( "-", 30)}
    #show {%ansi( 06)"     Average Xp       Total Xp   #   Missions"}
    #show {%ansi( 02) %format( "&14.0n", %eval( %db( @mission_db_total_xp, "Mission")/%db( @mission_db_completion_count, "Mission"))) %format( "&14.0n", %db( @mission_db_total_xp, "Mission")) %format( "&3.0f", %db( @mission_db_completion_count, "Mission")) %char( 32) "Missions Completed"}
    }
  }
#ALIAS ripreset {
  #show {}
  #show {Death List Reset}
  #variable rip_mob 0
  #variable rip_death_message 0
  #variable rip_db_death_count 0
  #variable rip_db_total_xp 0
  #variable rip_db_average_xp 0
  #variable rip_sum_death_count 0
  #variable rip_sum_total_xp 0
  #variable rip_sum_average_xp 0
  #variable sort_db 0
  #variable sort_temp 0
  }
#ALIAS ripremove {
  #delkey rip_db_death_count {%-1}
  #delkey rip_db_total_xp {%-1}
  #delkey rip_db_average_xp {%-1}
  #if (@rip_db_death_count = %null) {#variable rip_db_death_count 0}
  #if (@rip_db_total_xp = %null) {#variable rip_db_total_xp 0}
  #if (@rip_db_average_xp = %null) {#variable rip_db_total_xp 0}
  }
#ALIAS ripsave {
  #show {}
  #show {Death List Save}
  #file 1 death.list.txt
  #erase 1
  #file 1 death.list.txt
  #write 1 {~#var rip_db_death_count ~"@rip_db_death_count~"}
  #write 1 {~#var rip_db_total_xp ~"@rip_db_total_xp~"}
  #write 1 {~#var rip_db_average_xp ~"@rip_db_average_xp~"}
  #close 1
  }
#ALIAS ripload {
  #show {}
  #show {Death List Load}
  #read death.list.txt
  }
#VAR rip_mob {0}
#VAR rip_death_message {0}
#VAR rip_db_average_xp {0}
#VAR rip_db_total_xp {0}
#VAR rip_db_death_count {0}
#VAR rip_sum_average_xp {0}
#VAR rip_sum_total_xp {0}
#VAR rip_sum_death_count {0}
#VAR sort_db {0} {0}
#VAR sort_temp {0} {0}
#VAR mob_xp {1009}
#VAR is_mission {0}
#VAR mission_db_average_xp {0}
#VAR mission_db_total_xp {0}
#VAR mission_db_completion_count {0}
#TRIGGER {(*) hits the ground dead.} {
  #variable rip_sum_death_count 0
  #variable rip_sum_total_xp 0
  #variable rip_sum_average_xp 0
  #variable rip_mob {%1}
  #if (%word( @rip_mob, 1) = "A") {#variable rip_mob %remove( "A ", @rip_mob)}
  #if (%word( @rip_mob, 1) = "An") {#variable rip_mob %remove( "An ", @rip_mob)}
  #if (%word( @rip_mob, 1) = "The") {#variable rip_mob %remove( "The ", @rip_mob)}
  #if (@rip_db_death_count = 0) {#variable rip_db_death_count %null}
  #if (@rip_db_total_xp = 0) {#variable rip_db_total_xp %null}
  #if (@rip_db_average_xp = 0) {#variable rip_db_average_xp %null}
  #addkey rip_db_death_count @rip_mob %eval( %db( @rip_db_death_count, @rip_mob)+1)
  #addkey rip_db_total_xp @rip_mob %eval( %db( @rip_db_total_xp, @rip_mob)+@mob_xp)
  #addkey rip_db_average_xp @rip_mob %eval( %db( @rip_db_total_xp, @rip_mob)/%db( @rip_db_death_count, @rip_mob))
  }
#TRIGGER {You {receive|recieve} (%d) experience.} {
  #variable mob_xp %1
  #IF (@is_mission = 1) {
    #variable rip_mob "Mission"
    #if (@mission_db_completion_count = 0) {#variable mission_db_completion_count %null}
    #if (@mission_db_total_xp = 0) {#variable mission_db_total_xp %null}
    #if (@mission_db_average_xp = 0) {#variable mission_db_average_xp %null}
    #addkey mission_db_completion_count @rip_mob %eval( %db( @mission_db_completion_count, @rip_mob)+1)
    #addkey mission_db_total_xp @rip_mob %eval( %db( @mission_db_total_xp, @rip_mob)+@mob_xp)
    #addkey mission_db_average_xp @rip_mob %eval( %db( @mission_db_total_xp, @rip_mob)/%db( @mission_db_completion_count, @rip_mob))
    #variable is_mission 0
    }
  }
#TRIGGER {You complete your mission.} {#variable is_mission 1}
#CLASS 0
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Sindar
Newbie


Joined: 29 Mar 2008
Posts: 3

PostPosted: Tue Apr 01, 2008 3:46 pm   
 
Yes,you are GREAT, ralgith!
Only remove "A,An,The" from the mob name dont works.
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Apr 09, 2008 12:54 pm   
 
Weird, it should :)
Seems to for me on BuffyMUD...
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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