Author Topic: formula help  (Read 580 times)

Sjelm

  • Newbie
  • *
  • Posts: 15
    • View Profile
formula help
« on: September 06, 2012, 09:30:35 AM »
hello guys
i am rather new using TD.
now i started a competition with averga 60 players
i would like to use a formula granting the following points:
rank               points
1                   200
2                   150
3                   100
4                   75
5                   50
6                   40
7                  30
8                  20
9                  15
10-15           10
16-20             5
21-30             3
30-up             1

What should be the formula?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: formula help
« Reply #1 on: September 06, 2012, 04:56:03 PM »
Quick and dirty but it should work:

switch(r, 1, 200, 2, 150, 3, 100, 4, 75, 5, 50, 6, 40, 7, 30, 8, 20, 9, 15) + if((r >= 10) and (r <= 15), 10) + if((r >= 16) and (r <= 20), 5) + if((r >= 21) and (r <= 30), 3) + if(r > 30, 1)

Sjelm

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: formula help
« Reply #2 on: September 07, 2012, 01:16:52 AM »
thanks a lot!
I will try it