calculate

From Crys, 10 Years ago, written in Lua, viewed 889 times. This paste will give up the ghost in 1 Second.
URL https://paste.godclan.hu/view/Vf5gS55x Embed
Download Paste or View Raw
  1. function calculatePoints(rank, pc, mode)
  2.     if not pc then pc = g_playerCount end
  3.     if not mode then mode = g_mode end
  4.     local points
  5.     if mode == 1 then -- Race
  6.         points = math.floor(pc - rank)
  7.     elseif mode == 2 then -- DD
  8.         points = math.floor(pc - rank)
  9.     elseif mode == 3 then -- DM
  10.         points = math.floor(pc - rank)
  11.     end
  12.     return points
  13. end
  14.  
  15. function calculateMoney(rank, pc, mode)
  16.     if not pc then pc = g_playerCount end
  17.     if not mode then mode = g_mode end
  18.     local money
  19.     if mode == 1 then -- Race
  20.         money = (pc - rank) * 250
  21.     elseif mode == 2 then -- DD
  22.         money = (pc - rank) * 250
  23.     elseif mode == 3 then -- DM
  24.         money = (pc - rank) * 250
  25.     end
  26.     return money
  27. end

Replies to calculate rss

Title Name Language When
Re: calculate Sloppy Macaque lua 10 Years ago.
Re: calculate Voluminous Wolf lua 10 Years ago.

Reply to "calculate"

Here you can reply to the paste above