generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Phantom Forces Credits Calculator

Previous Thread :: Next Thread 
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
03 May 2017 07:43 PM
thisIsYourLevel = 100
previousLvlCreds = {}
totalVal = 0

function getTotalCredits(lvl)
if lvl ~= 0 then
table.insert(previousLvlCreds, (200+5*lvl))
getTotalCredits(lvl-1)
else
for i, v in ipairs(previousLvlCreds) do
totalVal = totalVal + v
end
end
return totalVal
end

print(getTotalCredits(thisIsYourLevel))

--[[ you can use this script to feel bad about how much credits you lost for not waiting until the price of the guns went down, and i'm ashamed that this took me 2 hours to make]]


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
03 May 2017 08:19 PM
Or:

local function getTotalCredits(level)
return level * (405 + level * 5) / 2
end

print(getTotalCredits(100))


Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 09:31 PM
OMG ITS A WIZARD




Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 09:40 PM
i can understand how my script works, even though it's 5 times longer

but i can't understand how your script works, even though it's only 4 lines

:(


Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 09:44 PM
i need to know how this wizard did his math


Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 09:46 PM
I CANNOT COMPREHEND THE WAYS OF HIS MAGIC




Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 09:59 PM
ok what exactly am i looking at here? is it a summation series? what is it??? what category does this fall in? ok so the credits for a specific level are calculated like this: it's ####### # ############################### X reaches 0 -->> where X is the level for example a table of credits/level values would look like this: ### #### ### #### ### #### ### #### how exactly would this function be expressed in arithmetic/geometric terms? i mean without ROBLOX lua.
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 May 2017 10:00 PM
THE FILTER STRIKES AGAIN


i'm done with this


Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
05 May 2017 10:07 PM
wat
Report Abuse
FlamingPiano is not online. FlamingPiano
Joined: 09 Jan 2011
Total Posts: 418
05 May 2017 10:34 PM
How did you manage to put that on a forum post without it bunching up???
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
05 May 2017 10:38 PM
Press preview and edit accordingly ^
Report Abuse
FlamingPiano is not online. FlamingPiano
Joined: 09 Jan 2011
Total Posts: 418
05 May 2017 10:41 PM
Doesn't really help much if the code takes up a line.
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
05 May 2017 11:54 PM
Oh and,

[200+5*level] + [200+5*(level-1)] + ... + [200+5*1] =

We have 200 lots of level

200*level + 5[level + (level - 1) + ... + 1] =

(Via sum of numbers 1 to n formula)

200*level + 5*[level(level + 1) / 2] =

Factorise out level

level*[200 + 5*(level + 1) / 2] =

Factorise out 1/2

level*[400 + 5*(level + 1)] / 2 = level*[405 + 5*level] / 2
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image