skip navigation

Welcome, Guest [log in · register]
Cwn Annwn
Search
Page 1 of 1 1
Nethran (NOTE: Also works on cMUD)

Hi, I’m kinda newbish at scripts and scripting, but I made this for my sister-in-law(Cleopatra), to assist with her counting how many times she used her weapon or a defense. I kinda went nuts with it, though, and Delicious helped me with a lot of it. :)

Instructions:
Copy the script and paste it into your command line with parsing enabled.
Hit enter.
Enter ‘combat info’ and press enter, it won’t look like it’s doing anything.
Enter ‘comclear’ and press enter, then click ‘Yes’.


After that’s done, just type ‘cinfo’ to display your stats. The more you kill things, the more will accumulate.

Here’s the old screenshot of it:


Here’s the new look:


The only thing that is sort of annoying sometimes is that any damage string will go into you being hit or you hitting your opponent. Including spells cast and fireshield, since the damage string looks exactly the same as melee.

Anything not pierce/slash/bash will go into exotic.

Either way, it’s fun to play.

And the script:

#CLASS {Scripts|Combat Info}
#ALIAS comclear {#IF (%yesno("Do you want to reset your combat information?")) {weaphits = 0;weapmisses = 0;kills = 0;backstabs = 0;backstabmiss = 0;hitstaken = 0;dodges = 0;parries = 0;acros = 0;sblocks = 0;mfades = 0;evades = 0;totaldefs = 0;bashes = 0;slashes = 0;pierces = 0;exotics = 0;bashhit = 0;bashmiss = 0;kickhit = 0;kickmiss = 0;perskills = 0;headhit = 0;torsohit = 0;armhit = 0;leghit = 0;tailhit = 0;winghit = 0;comtime = %time()}}
#ALIAS cinfo {combat info;#echo {%repeat(" ",2)};#echo {%ansi(bright,blue)Combat Information for all sessions starting: %ansi(white)@comtime};#echo {%ansi(bright,blue)Defensive Statistics:};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Dodge:")%repeat(" ",2)%ansi(white)%format("&10.0n", @dodges)%ansi(bright,blue)%format("&24s", "Acro:")%repeat(" ",3)%ansi(white)%format("&10.0n", @acros)};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "SBlock:")%repeat(" ",1)%ansi(white)%format("&10.0n", @sblocks)%ansi(bright,blue)%format("&24s", "Parry:")%repeat(" ",3)%ansi(white)%format("&10.0n", @parries)};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "MFade:")%repeat(" ",2)%ansi(white)%format("&10.0n", @mfades)};#echo {%ansi(yellow)* %ansi(bright,blue)You are currently using %ansi(white)@comdefense %ansi(bright,blue)to defend yourself.};#echo {%ansi(yellow)* %ansi(bright,blue)You have used a proficiency-based defense %ansi(white)@totaldefs %ansi(bright,blue)times and have been hit %ansi(white)@hitstaken %ansi(bright,blue)times, with a defense rate of %ansi(white)%format("&.0n",%eval(@totaldefs*100/(@totaldefs+@hitstaken)).%mod(%eval(%totaldefs*1000/(@totaldefs+@hitstaken)),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have evaded %ansi(white)@evades %ansi(bright,blue)attacks.};#echo {%ansi(bright,blue)Offensive Statistics:};#echo {%repeat(" ",2)%ansi(bright,blue)Damage Types Dealt:};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Pierce:")%repeat(" ",1)%ansi(white)%format("&10.0n", @pierces)%ansi(bright,blue)%format("&24s", "Bash:")%repeat(" ",3)%ansi(white)%format("&10.0n", @bashes)};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Slash:")%repeat(" ",2)%ansi(white)%format("&10.0n", @slashes)%ansi(bright,blue)%format("&24s", "Exotic:")%repeat(" ",3)%ansi(white)%format("&10.0n", @exotics)};#echo {%repeat(" ",2)%ansi(bright,blue)Location Accuracy:};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Head:")%repeat(" ",3)%ansi(white)%format("&10.0n",@headhit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@headhit*100/@weaphits),"%",%ansi(bright,blue),")"))%ansi(bright,blue)%format("&18s", "Torso:")%repeat(" ",3)%ansi(white)%format("&10.0n",@torsohit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@torsohit*100/@weaphits),"%",%ansi(bright,blue),")"))};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Arms:")%repeat(" ",3)%ansi(white)%format("&10.0n",@armhit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@armhit*100/@weaphits),"%",%ansi(bright,blue),")"))%ansi(bright,blue)%format("&18s", "Legs:")%repeat(" ",3)%ansi(white)%format("&10.0n",@leghit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@leghit*100/@weaphits),"%",%ansi(bright,blue),")"))};#echo {%repeat(" ",2)%ansi(bright,blue)%format("&5s", "Tail:")%repeat(" ",3)%ansi(white)%format("&10.0n",@tailhit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@tailhit*100/@weaphits),"%",%ansi(bright,blue),")"))%ansi(bright,blue)%format("&18s", "Wings:")%repeat(" ",3)%ansi(white)%format("&10.0n",@winghit)%format("&36s",%concat(%ansi(bright,blue),"(",%ansi(white),%eval(@winghit*100/@weaphits),"%",%ansi(bright,blue),")"))};#echo {%ansi(yellow)* %ansi(bright,blue)You are currently aiming for your opponents' %ansi(white)@comaim%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have killed %ansi(white)@perskills %ansi(bright,blue)creatures have been involved in %ansi(white)@kills %ansi(bright,blue)total kills with a last-hit rate of %ansi(white)%format("&.0n",%eval(@perskills*100/@kills).%mod(%eval(%perskills*1000/@kills),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have landed %ansi(white)@weaphits %ansi(bright,blue)total attacks and missed a total of %ansi(white)@weapmisses %ansi(bright,blue)times with an overall accuracy of %ansi(white)%format("&.0n",%eval(@weaphits*100/(@weaphits+@weapmisses)).%mod(%eval(%weaphits*1000/(@weaphits+@weapmisses)),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have landed %ansi(white)@backstabs %ansi(bright,blue)backstabs and missed with %ansi(white)@backstabmiss %ansi(bright,blue)backstabs, with a success rate of %ansi(white)%format("&.0n",%eval(@backstabs*100/(@backstabs+@backstabmiss)).%mod(%eval(%backstabs*1000/(@backstabs+@backstabmiss)),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have landed %ansi(white)@bashhit %ansi(bright,blue)bashes and missed with %ansi(white)@bashmiss %ansi(bright,blue)bashes, with a success rate of %ansi(white)%format("&.0n",%eval(@bashhit*100/(@bashhit+@bashmiss)).%mod(%eval(%bashhit*1000/(@bashhit+@bashmiss)),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You have landed %ansi(white)@kickhit %ansi(bright,blue)kicks and missed with %ansi(white)@kickmiss %ansi(bright,blue)kicks, with a success rate of %ansi(white)%format("&.0n",%eval(@kickhit*100/(@kickhit+@kickmiss)).%mod(%eval(%kickhit*1000/(@kickhit+@kickmiss)),10))~%%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)Your combat mode is set to %ansi(white)@commode%ansi(bright,blue).};#echo {%ansi(yellow)* %ansi(bright,blue)You are %ansi(white)@handed%ansi(bright,blue)-handed.};#echo {%ansi(yellow)* %ansi(bright,red)To reset these statistics, type '%ansi(white)comclear%ansi(bright,red)' and click '%ansi(white)Yes%ansi(bright,red)'.}}
#VAR kills {0}
#VAR bashhit {0}
#VAR bashmiss {0}
#VAR kickhit {0}
#VAR kickmiss {0}
#VAR evades {0}
#VAR totaldefs {0}
#VAR armhit {0}
#VAR leghit {0}
#VAR headhit {0}
#VAR torsohit {0}
#VAR tailhit {0}
#VAR winghit {0}
#VAR perskills {0}
#VAR parries {0}
#VAR sblocks {0}
#VAR mfades {0}
#VAR acros {0}
#VAR pierces {0}
#VAR bashes {0}
#VAR slashes {0}
#VAR exotics {0}
#VAR hitstaken {0}
#VAR backstabmiss {0}
#VAR backstabs {0}
#VAR weaphits {0}
#VAR weapmisses {0}
#VAR dodges {0}
#TRIGGER {^You are currently aiming for your victims' &{comaim}.} {#GAG}
#TRIGGER {^You will now use &{comdefense} as your defensive maneuver.} {}
#TRIGGER {^You are &{handed}-handed.} {#GAG}
#TRIGGER {^Your combat output mode is set to &{commode}.} {#GAG}
#TRIGGER {^You are defending yourself through the use of &{comdefense}.} {#VAR comdefense {%1};#GAG}
#TRIGGER {^Combat mode is &{commode}.} {#VAR commode {%1}}
#TRIGGER {You will now use automatic defensive maneuvers whenever possible.} {comdefense = whatever is available}
#TRIGGER {You attempt to stab*in the back with *, but miss.} {#ADD backstabmiss 1}
#TRIGGER {You stab * in the back with *.} {#ADD backstabs 1}
#TRIGGER {You fail to hit * with your*attack.} {#ADD weapmisses 1}
#TRIGGER {You deliver a roundhouse kick to *, connecting solidly.} {#ADD kickhit 1}
#TRIGGER {You attempt to kick * but miss.} {#ADD kickmiss 1}
#TRIGGER {You bash a * over the head with *.} {#ADD bashhit 1}
#TRIGGER {You attempt to bash * over the head with *, but miss.} {#ADD bashmiss 1}
#TRIGGER {*lunges towards you, but you dodge out of the way.} {#ADD evades 1}
#TRIGGER {You are * on the * by a * causing * damage.} {#ADD hitstaken 1}
#TRIGGER {*is*on the %1 with your %2 causing %3 damage.} {#ADD weaphits 1;#IF (%1=arm) {#ADD armhit 1};#IF (%1=leg) {#ADD leghit 1};#IF (%1=tail) {#ADD tailhit 1};#IF (%1=head) {#ADD headhit 1};#IF (%1=wing) {#ADD winghit 1};#IF (%1=torso) {#ADD torsohit 1};#IF (%2=bash) {#ADD bashes 1};#IF (%2=slash) {#ADD slashes 1};#IF (%2=pierce) {#ADD pierces 1};#IF ((%2 != bash) & (%2 != slash) & (%2 != pierce)) {#ADD exotics 1};#IF (%3=lethal) {#ADD perskills 1}}
#TRIGGER {*causing lethal damage.} {#ADD kills 1}
#TRIGGER {You nimbly backflip out of the way*attack.} {#ADD acros 1;#ADD totaldefs 1}
#TRIGGER {You catch*on*.} {#ADD sblocks 1;#ADD totaldefs 1}
#TRIGGER {You skillfully parry*attack.} {#ADD parries 1;#ADD totaldefs 1}
#TRIGGER {You dodge out of the way of*attack.} {#ADD dodges 1;#ADD totaldefs 1}
#TRIGGER {You slip between planes for a moment, evading*attack.} {#ADD mfades 1;#ADD totaldefs 1}
#CLASS 0


Edited by Nethran on Fri, 27 May 2011 15:35:18 +0000.
Nethran There’s an error with percentages on Location Accurcy right now. Fixing it asap.
Nethran Percentages fixed. The script is now in full working order.
Saitok
Avatar
hey, if you’re monitoring this post, I wanted to let you know that your magical fade and exotic counters don’t seem to tick.
Page 1 of 1 1