Xzempt

Untitled

Jan 24th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.98 KB | None | 0 0
  1. function arenatest()
  2.     arena = 1
  3.     while (arena <= 3) do
  4.         teamName, teamSize, teamRating, teamPlayed, teamWins, seasonTeamPlayed, seasonTeamWins, playerPlayed, seasonPlayerPlayed, teamRank, playerRating = GetArenaTeam(arena)
  5.         if (teamSize == 2) then print("2v2 team rating is " ..teamRating.. ". Your personal rating is " ..playerRating.. ".")
  6.                 rating = teamRating - playerRating
  7.             if (teamRating > 1500) and (rating < 100) then
  8.                 fivespoints = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  9.                 total = math.ceil(fivespoints*0.76)
  10.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  11.             elseif (teamRating > 1500) and (rating > 100) then
  12.                 fivespoints = math.floor(0.22*playerRating+14)
  13.                 total = math.floor(fivespoints*0.76)
  14.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  15.             elseif (teamRating < 1500) then
  16.                 fivespoints = math.floor(0.22*teamRating+14)
  17.                 total = math.ceil(fivespoints*0.76)
  18.                 print("You will receive " ..total.. " arena points for this week in the 5vs5 bracket.")
  19.             end
  20.             arena = arena + arena
  21.         end
  22.         if (teamSize == 3) then print("3v3 team rating is " ..teamRating.. ". Your personal rating is " ..playerRating.. ".")
  23.             rating = teamRating - playerRating
  24.             if (teamRating > 1500) and (rating < 100) then
  25.                 fivespoints = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  26.                 total = math.ceil(fivespoints*0.88)
  27.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  28.             elseif (teamRating > 1500) and (rating > 100) then
  29.                 fivespoints = math.floor(0.22*playerRating+14)
  30.                 total = math.floor(fivespoints*0.88)
  31.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  32.             elseif (teamRating < 1500) then
  33.                 fivespoints = math.floor(0.22*teamRating+14)
  34.                 total = math.ceil(fivespoints*0.88)
  35.                 print("You will receive " ..total.. " arena points for this week in the 5vs5 bracket.")
  36.             end
  37.             arena = arena + arena
  38.         end
  39.         if (teamSize == 5) then print("5v5 team rating is " ..teamRating.. ". Your personal rating is " ..playerRating.. ".")
  40.             rating = teamRating - playerRating
  41.             if (teamRating > 1500) and (rating < 100) then
  42.                 total = math.floor(1511.26/(1+1639.28*math.pow(2.71828, -0.00412*teamRating)))
  43.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  44.             elseif (teamRating > 1500) and (rating > 100) then
  45.                 total = math.floor(0.22*playerRating+14)
  46.                 print("You will receive " ..total.. " arena points for this week in the 3vs3 bracket.")
  47.             elseif (teamRating < 1500) then
  48.                 total = math.floor(0.22*teamRating+14)
  49.                 print("You will receive " ..total.. " arena points for this week in the 5vs5 bracket.")
  50.             end
  51.             arena = arena + arena
  52.         end
  53.         if (teamSize == 0) then
  54.             --print("Your " ..arena.. "vs" ..arena.. " team is non existent.")
  55.             arena = arena + arena
  56.         end
  57.            
  58.     end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment