18 Jan 13, 02:18AM
(This post was last modified: 18 Jan 13, 02:25AM by Roflcopter.)
This is provided because I want the game to be played the same by all players. I know I was one of the first to make this script, and it's been used by only good teams for way too long.
Features:
I am not familiar with Cube scripting so the code might be bad or buggy. Take this as a warning! But also feel free to post improvements below. It tries to group the bullets together into fights but sometimes it may report a fight as a few sets of damage.
Features:
- Press J to activate it for the remainder of the game
- Tells you the damage you do after each fight (including grenades)
- Displays this to your teammates
- Friendly fire counts as normal hits
I am not familiar with Cube scripting so the code might be bad or buggy. Take this as a warning! But also feel free to post improvements below. It tries to group the bullets together into fights but sometimes it may report a fight as a few sets of damage.
[SELECT ALL] Code:
bind j [
last_dmg = 0;
bulls_1 = 0;
check_dmg;
]
alias check_dmg [
stat_obj = (pstat_weap (findcn $curname));
new_dmg = 0;
bulls_0 = 0;
loop i 10 [
new_dmg = (+ (at $stat_obj (+ (* $i 2) 1)) $new_dmg)
bulls_0 = (+ (at $stat_obj (* $i 2)) $bulls_0)
]
diff = (- $new_dmg $last_dmg);
if (&& (> $diff 0) (= $bulls_0 $bulls_1)) [
say (concat "%Damage:" $diff);
last_dmg = $new_dmg;
] []
bulls_1 = $bulls_0;
sleep 800 [check_dmg]
]