Advertisement
Xzempt

Untitled

Jan 24th, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.53 KB | None | 0 0
  1. function arenatest(twos, threes, fives)
  2.     arena = 1
  3.     while (arena <= 3) do
  4.         teamName, teamSize, teamRating, teamPlayed, teamWins, seasonTeamPlayed, seasonTeamWins, playerPlayed, seasonPlayerPlayed, teamRank, playerRating = GetArenaTeam(arena)
  5.         print(teamName, teamSize, arena)
  6.         if (teamSize == 2) then
  7.                 rating = teamRating - playerRating
  8.             if (teamRating > 1500) and (rating < 150) then
  9.                 fivespoints = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  10.                 total = math.ceil(fivespoints*0.76)
  11.                 twos = teamRating
  12.                 table.insert(arenapoints, total)
  13.             elseif (teamRating > 1500) and (rating > 150) then
  14.                 fivespoints = math.floor(0.22*playerRating+14)
  15.                 total = math.floor(fivespoints*0.76)
  16.                 twos = playerRating
  17.                 table.insert(arenapoints, total)
  18.             elseif (teamRating < 1500) then
  19.                 fivespoints = math.floor(0.22*teamRating+14)
  20.                 total = math.ceil(fivespoints*0.76)
  21.                 twos = teamRating
  22.                 table.insert(arenapoints, total)
  23.             end
  24.             arena = arena + arena
  25.         end
  26.         if (teamSize == 3) then
  27.             rating = teamRating - playerRating
  28.             if (teamRating > 1500) and (rating < 150) then
  29.                 fivespoints = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  30.                 total = math.ceil(fivespoints*0.88)
  31.                 threes = teamRating
  32.                 table.insert(arenapoints, total)
  33.             elseif (teamRating > 1500) and (rating > 150) then
  34.                 fivespoints = math.floor(0.22*playerRating+14)
  35.                 total = math.floor(fivespoints*0.88)
  36.                 threes = playerRating
  37.                 table.insert(arenapoints, total)
  38.             elseif (teamRating < 1500) then
  39.                 fivespoints = math.floor(0.22*teamRating+14)
  40.                 total = math.ceil(fivespoints*0.88)
  41.                 threes = teamRating
  42.                 table.insert(arenapoints, total)
  43.             end
  44.             arena = arena + arena
  45.         end
  46.         if (teamSize == 5) then
  47.        
  48.             rating = teamRating - playerRating
  49.             if (teamRating > 1500) and (rating < 150) then
  50.                 total = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  51.                 fives = teamRating
  52.                 print(fives.. " > 1500")
  53.                 table.insert(arenapoints, total)
  54.             elseif (teamRating > 1500) and (rating > 150) then
  55.                 total = math.floor(0.22*playerRating+14)
  56.                 fives = playerRating
  57.                 print(fives.. " < 1500")
  58.                 table.insert(arenapoints, total)
  59.             elseif (teamRating < 1500) then
  60.                 total = math.floor(0.22*teamRating+14)
  61.                 fives = teamRating
  62.                 print(fives)
  63.                 table.insert(arenapoints, total)
  64.             end
  65.             arena = arena + arena
  66.         end
  67.         if (teamSize == 0) then
  68.             arena = arena + arena
  69.         end
  70.     end
  71.     Totalpoints(twos, threes, fives)
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement