
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
exptable = {100,125,150,175,700,225,250,275,300,825,350,375,400,425,950,450,475,500,525,1050,575,600,625,650,1175,700,725,750,775,800,1325,850,875,900,925,1450,950,975,1000,1025,1550,1050,1075,1100,1125,1650,1175,1200,125,1250,1775,1275,1300,1325,1350,1875,1400,1425,1450,1475,2000,1525,1550,1575,1600,2125,1650,1675,1700,1725,2250,1750,1775,1800,1825,2350,1875,1900,1925,1950,2475,2000,2025,2050,2075,2600,2100,2125,2150,2175,2700,2225,2250,2275,2300,2825,2325,2350,2375,2400,7500} function kill_hook(id,victim,weapon,x,y) parse("setmoney "..id.." "..player(id,"money")+math.random(1,600)) Player[id].exp = Player[id].exp + 15 Player[id].credits = Player[id].credits + 15 _expstats(id) end function _expstats(id) local expmath = exptable[Player[id].level+1] if Player[id].exp >= expmath then Player[id].level = Player[id].level + 1 Player[id].exp = 0 msg(player(id,"name").. " Leveled up to "..Player[id].level) end parse('hudtxt2 '..id..' 12 "Level : "..Player[id].level.." " 320 320 0') parse('hudtxt2 '..id..' 13 "Exp: "..Player[id].exp.."/"..expmath.." " 320 335 0') end
I think that's all code concerning exp hud/calculation...