5491
Help Me / Re: Bustouts Awarded Based On Knockout Place
« on: May 01, 2007, 10:20:33 AM »Code: [Select]
assign("v", n + nr)
assign("percent", switch(r, 1, .3, 2, .2, 3, .12, 4, .1, 5, .08, 6, .06, 7, .04, 8, .03, 9, .025, 10, .02, 11, .015, 12, .01, 0))
assign("hits", switch(nh, 1, 20, 2, 50, 3, 90, 4, 125, 5, 160, 6, 200, 7, 250, 0))
assign("points", 0)
if((v >= 10) && (v <= 12), assign("points", (v * 100 * percent) + if(r < 4, v, 0)))
points + hits
Note that if you don't knockout 1, 2, 3, 4, 5, 6, or 7 players, you get 0 points (for your hits). So, you probably want to change the 3rd line above to:
Code: [Select]
assign("hits", switch(nh, 0, 0, 1, 20, 2, 50, 3, 90, 4, 125, 5, 160, 6, 200, 250))
That gives nothing for 0 hits, 20 for 1, 50 for 2, etc, all the way to 250 for any number of hits greater than 6.