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: making xp level system

Previous Thread :: Next Thread 
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
16 Jul 2017 07:30 PM
formula to get the percentage till next level?
Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
16 Jul 2017 07:31 PM
the xp u need to level up is 1000
Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:32 PM
Si(T) = Si(t) exp{Xi(t, T)} (8)
Xi(t, T) = (
r + bim −
σ
2
i
2
− αˆi +
∑n
j=1
biajαˆj
b
)
(T − t)
+
bi(m − z(t))
b
(1 − e
b(T −t)
) −
∑n
j=1
biajδj (t)
b(b + κj )
(e
b(T −t) − e
−κj (T −t)
)
−
∑n
j=1
biajαˆj
b
2
(e
b(T −t) − 1) +∑n
j=1
biajαˆj
b(b + κi)
(e
b(T −t) − e
−κj (T −t)
)
+
(ˆαi − δi(t))
κi
(1 − e
−κi(T −t)
) −
∑n
j=1
biaj (ˆαj − δj (t))
bκj
(1 − e
−κi(T −t)
)
+σSi
(WSi
(T) − WSi
(t)) −
1
κi
σδi
(Wδi
(T) − Wδi
(t))
−
∑n
j=1
biaj
b
σSj
(WSj
(T) − WSj
(t)) +∑n
j=1
biaj
bκj
σδj
(WSi
(T) − WSi
(t))
+
∑n
j=1
biaj
b
∫ T
t
e
b(T −s)σSj dWSj
(s)
+
∫ T
t
e
−κi(T −s)
κi
σδidWδi
(s) −
∑n
j=1
∫ T
t
biaje
−κj (T −s)
bκj
σδj dWδj
(s)
−
∑n
j=1
∫ T
t
biaj
b(b + κj )
(e
b(T −s) − e
−κj (T −s)
)σδj dWδj
(s)


Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:36 PM
local experienceRequired = 1000; --Per level
local currentExperience = 0;
local currentLevel = 1;

print(((currentLevel/1000) * currentExperience) * 1000)


Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:38 PM
Oops ^ a typo

local experienceRequired = 1000; --Per level
local currentExperience = 0;
local currentLevel = 1;

print(((currentLevel/1000) * currentExperience) * 100)


Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
16 Jul 2017 07:39 PM
that didnt work
i entered 1 xp and said its 1% of the xp whilst 1% of 1000 is 10 not 1
Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:40 PM
Try the new code and you're wrong it's 0.1


Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
16 Jul 2017 07:41 PM
how would you find the percentage that you got on your test? like you got a 44/65... 44 / 65 * 100 >> ##########
Report Abuse
NovaPrimus is not online. NovaPrimus
Joined: 21 Apr 2013
Total Posts: 455
16 Jul 2017 07:41 PM
first formula works
legit 101%
Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
16 Jul 2017 07:42 PM
didnt work
Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:43 PM
it does work


Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
16 Jul 2017 07:44 PM
why is current level even in the equation
Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:45 PM
local experienceRequired = 100; --Per level
local currentExperience = 10;
local currentLevel = 1;

print(((currentLevel/experienceRequired) * currentExperience) * 100)

--^above is optional but just in case you changed experienceRequired


Report Abuse
6l8 is not online. 6l8
Joined: 17 Jun 2014
Total Posts: 4055
16 Jul 2017 07:45 PM
The reason why I named the variables so is because he can understand how to use this formula later on.


Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
16 Jul 2017 07:46 PM
print(xp/xpNeeded)
Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
16 Jul 2017 07:47 PM
Yes, but why is the level of the player being divided?

Is 10 not 1% of 1000?

10/1000 * 100 = 1

(1/1000) * 100 = .1??
Report Abuse
ghulty is not online. ghulty
Joined: 21 Mar 2011
Total Posts: 42
16 Jul 2017 07:48 PM
-_- Its not that hard... if experience is cumulative then function percentUntilNext(xp) return (xp % 1000) / 1000 end or if you want an actual percent 0-100 then multiply by #### e.g. function percentUntilNext(xp) return (xp # ##### # ## end
Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
16 Jul 2017 07:54 PM
wait() local plr = game.Players.LocalPlayer local xp = plr.XP local level = plr.Level xp.Changed:connect(function() if level.Value == 0 then local th = ############# ################## = xp.Value.." / ".."1000 - "..th.."%" end end)
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