Damage Done Script
Posted: Sun Feb 18, 2007 7:46 pm
Up front I'll say I found creating this more fun than the product will be useful.
No one seems to have posted many scripts for a while so I thought I would.
This is a little bit of scripting that I've created and works nicely to whine the actual and exact damage you do in each round of combat
It will accurately calculate the damage done by any anything you do that you get xp for
This includes weapon damage, spell damage, proc damage, chop damage, kicks, bashes, broadsides, flails, deathblows etc.
This does not include damage done by pets
This is inaccurate in last round of battle when mob may not have all the hp to lose that you damage does.
The basis of this script is that xp gained from damage done = mob level * actual damage done
Therefore you need to know mob level, this script works out this calc for all levels and sees which levels show damage as a whole number.
if a decimal is found on the damage done, this level is deemed wrong and discarded for the calcs in the next round, thereby it will iteratively work out the mobs level during combat.
Note: If a mob is level 40 then all whole divisors of 40 (20 10 8 5 4 2 1) could also be right to this method, for this reason I limit the script to looking at mob levels 20+
I've used it sucessfully in my client (AL Client) the bare bones are below and should be enough for you to reconstruct, they rely on you having your current xp in your prompt.
The effect is a whine somthing like:
Damage Report: [20]: 14 [30] 21
where the 20 and 30 are the possible levels the mob could be, this normally starts in round one at 3-5 levels after 3 rounds is reduced down to one, the mobs actual level. (the 14 and 21 are the damage done)
Let me know if you find useful or any additions I could make to it.
Thraxas
alias (triggered at start of fight) _fightstart:
#if (autodam = 1) {_gainreset}
Note: I have a load of other stuff in _fightstart this is only pertinent bit, autodam is a toggle variable to switch whole process on and off.
alias _gainreset:
#set gd[20] = 1;
#set gd[21] = 1;
... etc ...
#set gd[44] = 1;
#set gd[45] = 1
Note: I'd love to use a for loop here but my client dosen't support them
alias (triggered at prompt) _gainprom:
#set myxpprom = (myxp - myxplast)/1;
Note: myxpprom is xp gain between this and last prompt, myxp is xp shown in prompt this round, myxplast is xp from prompt in previous round
#if (autodam = 1)
{#set gdrep Damage Report: ;
#if (myxp > myxplast)
{#if (gd[20] = 1) {_gaindam myxplast myxp 20};
#if (gd[21] = 1) {_gaindam myxplast myxp 21};
... etc ...
#if (gd[44] = 1) {_gaindam myxplast myxp 44};
#if (gd[45] = 1) {_gaindam myxplast myxp 45};
};
#print $gdrep$
}
alias _gaindam:
#set num1 = %1;
#set num2 = %2;
#set lvl1 = %3;
#set dnum = num2 - num1;
#set dnumdiv = dnum / lvl1;
#set dnummul = dnumdiv * lvl1;
#set ddnum = dnum - dnummul;
#if (ddnum > 0) {#set gd[%3] = 0};
#else {
#set ddam = dnumdiv;
#strcat(gdrep," [");
#strcat(gdrep,lvl1);
#strcat(gdrep,"]: ");
#strcat(gdrep,ddam)
}
Additional Notes:
1. #strcat is a string concatenation function to build a string up with text variables
2. #print sends a string to my client as though its come from the mud
3. #set and #unset are to set variable values
4. #if #else well if you don't know I ain't going to teach you in this post
all other stuff here is standard stuff I think
No one seems to have posted many scripts for a while so I thought I would.
This is a little bit of scripting that I've created and works nicely to whine the actual and exact damage you do in each round of combat
It will accurately calculate the damage done by any anything you do that you get xp for
This includes weapon damage, spell damage, proc damage, chop damage, kicks, bashes, broadsides, flails, deathblows etc.
This does not include damage done by pets
This is inaccurate in last round of battle when mob may not have all the hp to lose that you damage does.
The basis of this script is that xp gained from damage done = mob level * actual damage done
Therefore you need to know mob level, this script works out this calc for all levels and sees which levels show damage as a whole number.
if a decimal is found on the damage done, this level is deemed wrong and discarded for the calcs in the next round, thereby it will iteratively work out the mobs level during combat.
Note: If a mob is level 40 then all whole divisors of 40 (20 10 8 5 4 2 1) could also be right to this method, for this reason I limit the script to looking at mob levels 20+
I've used it sucessfully in my client (AL Client) the bare bones are below and should be enough for you to reconstruct, they rely on you having your current xp in your prompt.
The effect is a whine somthing like:
Damage Report: [20]: 14 [30] 21
where the 20 and 30 are the possible levels the mob could be, this normally starts in round one at 3-5 levels after 3 rounds is reduced down to one, the mobs actual level. (the 14 and 21 are the damage done)
Let me know if you find useful or any additions I could make to it.
Thraxas
alias (triggered at start of fight) _fightstart:
#if (autodam = 1) {_gainreset}
Note: I have a load of other stuff in _fightstart this is only pertinent bit, autodam is a toggle variable to switch whole process on and off.
alias _gainreset:
#set gd[20] = 1;
#set gd[21] = 1;
... etc ...
#set gd[44] = 1;
#set gd[45] = 1
Note: I'd love to use a for loop here but my client dosen't support them
alias (triggered at prompt) _gainprom:
#set myxpprom = (myxp - myxplast)/1;
Note: myxpprom is xp gain between this and last prompt, myxp is xp shown in prompt this round, myxplast is xp from prompt in previous round
#if (autodam = 1)
{#set gdrep Damage Report: ;
#if (myxp > myxplast)
{#if (gd[20] = 1) {_gaindam myxplast myxp 20};
#if (gd[21] = 1) {_gaindam myxplast myxp 21};
... etc ...
#if (gd[44] = 1) {_gaindam myxplast myxp 44};
#if (gd[45] = 1) {_gaindam myxplast myxp 45};
};
#print $gdrep$
}
alias _gaindam:
#set num1 = %1;
#set num2 = %2;
#set lvl1 = %3;
#set dnum = num2 - num1;
#set dnumdiv = dnum / lvl1;
#set dnummul = dnumdiv * lvl1;
#set ddnum = dnum - dnummul;
#if (ddnum > 0) {#set gd[%3] = 0};
#else {
#set ddam = dnumdiv;
#strcat(gdrep," [");
#strcat(gdrep,lvl1);
#strcat(gdrep,"]: ");
#strcat(gdrep,ddam)
}
Additional Notes:
1. #strcat is a string concatenation function to build a string up with text variables
2. #print sends a string to my client as though its come from the mud
3. #set and #unset are to set variable values
4. #if #else well if you don't know I ain't going to teach you in this post
all other stuff here is standard stuff I think