ID:160634
 
Well, what I've done is create an entire list. Instead of using the normal EXP == MEXP. :U
So, how would I do this? :/
Stereo wrote:
Well, what I've done is create an entire list. Instead of using the normal EXP == MEXP. :U
So, how would I do this? :/

In response to Mobius Evalon
Here is the exp table used in ragnarok Written in DM

mob
var
list
Exptable = list(9,16,25,36,77,112,153,200,253,320,385,490,585,700,830,970,1120,1260,\
1420,1620,1860,1990,2240,2504,2950,3426,3934,4474,6889,7995,9174,10425,11748,13967,15775,\
17678,19677,21773,30543,34212,38065,42102,46323,53026,58419,64041,69892,75973,102468,115254,\
128692,142784,157528,178184,196300,215198,234879,255341,330188,365914,403224,442116,482590,536948,\
585191,635278,687211,740988,925400,1473746,1594058,1718928,1848355,1982340,2230113,2386162,2547417,\
2713878,3206160,3681024,4022472,4377024,4744680,5125440,5767272,6204000,6655464,7121664,7602600,8109652,\
8643822,9206127,9797599,10419283,11072238,11757533,12476249,13229476,14018313,14843866,15707247,16609574,\
17551968,18535552,19561452,20630792,21744696,22904284,24110674,25364977,26668297,28021732,29426368,30883282,\
32393539,33958189,35578269,37254799,38988782,40781202,42633023,44545189,46518620,48554214,50652844,52815357,55042573,\
57335285,59694256,62120220,64613880,67175907,69806941,72507587,75278418,78119970,81032746,84017211,87073795,90202891,\
93404853,96680000,100028610,103450924,106947144,110517434,114161918,117880680,121673767,125541185,129482901,133498844,\
137588903,141752928,145990732,150302088,154686733,159144364,163674642,168277191,172951600,177697420,182514167,187401324,\
192358338,197384623,202479560,207642499,212872757,218169621,223532347,228960163,234452268,240007834,245626005,251305900,\
257046613,262847212,268706744,274624232,280598679,286629065,292714352,298853483,305045382,311288957,317583099,323926685,\
330318577,336757623,343242660,349772512,356345994,362961909,369619053,376316214,383052171,389825698,396635564,403480532,\
410359362,417270811,424213634,431186584,438188413,445217874,452273720,459354706,466459588,473587127,480736086,\
487905232,495093338,502299181,509521545,516759221,524011006,531275705,538552132,545839109,553135467,560440047,\
567751700,575069288,582391684,589717771,597046446,604376616,611707202,619037136,626365365,633690848,641012559,648329484,\
655640625,662944998,670241632,677529573,684807881,692075631,699331913,706575834,713806514,721023091,728224718,\
735410563,742579811,749731663,756865335,763980061,771075089,778149684,785203127,792234715,799243761,806229595,\
813191563,820129025,827041359,833927958,840788232,847621604,854427516,861205423,867954796,874675123,881365905,888026659,\
894656917,901256227,907824150,914360262,920864154,927335431,933773713,940178632,946549836,952886985,959189754,\
965457830,971690914,977888720,984050975,990177418,996267800,1002321886,1008339452,1014320285,1020264186,1026170966,\
1032040448,1037872466,1043666865,1049423500,1055142238,1060822955,1066465539,1072069886,1077635904,1083163509,1088652627,\
1094103193,1099515152,1104888457,1110223070,1115518962,1120776112,1125994507,1131174143,1136315022,1141417155,1146480560,\
1151505263,1156491296,1161438699,1166347518,1171217806,1176049622,1180843032,1185598108,1190314928,1194993575,\
1199634138,1204236712,1208801396,1213328296,1217817522,1222269189,1226683417,1231060330,1235400057,1239702732,\
1243968491,1248197476,1252389832,1256545708,1260665257,1264748635,1268796001,1272807518,1276783353,1280723674,\
1284628654,1288498467,1292333290,1296133304,1299898691,1303629636,1307326326,1310988950,1314617700,1318212769,\
1321774352,1325302646,1328797850,1332260164,1335689790,1339086931,1342451791,1345784576,1349085494,1352354752,\
1355592559,1358799125,1361974661,1365119379,1368233491,1371317210,1374370750,1377394325,1380388150,1383352439,\
1386287408,1389193273,1392070249,1394918553,1397738400,1400530007,1403293591,1406029367,1408737552,1411418361,\
1414072010,1416698715,1419298692,1421872155,1424419319,1426940398,1429435606,1431905157,1434349263,1436768137,\
1439161990,1441531034,1443875479,1446195535,1448491412,1450763318,1453011460,1455236046,1457437282,1459615373,\
1461770523,1463902937,1466012816,1468100363,1470165779,1472209264,1474231016,1476231234,1478210114,1480167853,\
1482104645,1484020685,1485916165,1487791277,1489646211,1491481157,1493296304,1495091838,1496867946,1498624813,\
1500362623,1502081558,1503781800,1505463529,1507126924,1508772163,1510399423,1512008880,1513600707,1515175078,\
1516732165,1518272138,1519795167,1521301420,1522791064,1524264265,1525721187,1527161994,1528586847,1529995908,\
1531389336,1532767289,1534129924,1535477397,1536809863,1538127475,1539430385,1540718744,1541992701,1543252405,\
1544498003,1545729641,1546947464,1548151616,1549342238,1550519472,1551683458,1552834334,1553972238,1555097306,\
1556209673,1557309473,1558396839,1559471902,1560534793,1561585640,1562624572,1563651716,1564667197,1565671140,\
1566663668,1567644904,1568614969,1569573982,1570522063,1571459329,1572385897,1573301883,1574207401,1575102565,\
1575987487,1576862278,1577727048,1578581907,1579426962,1580262321,1581088090,1581904373,1582711275,1583508898,\
1584297344,1585076715,1585847110,1586608628,1587361366,1588105422,1588840892,1589567871,1590286453,1590996731,\
1591698797,1592392743,1593078658,1593756633,1594426755,1595089112,1595743791,1596390878,1597030458,1597662614,\
1598287430,1598904988,1599515370,1600118656,1600714926,1601304259,1601886733,1602462426,1603031414,1603593772,\
1604149576,1604698899,1605241815,1605778396,1606308715,1606832842,1607350847,1607862800,1608368770,1608868825,\
1609363032,1609851457,1610334167,1610811226,1611282699,1611748650,1612209142,1612664237,1613113997,1613558483,\
1613997756,1614431875,1614860899,1615284887,1615703896,1616117984,1616527207,1616931621,1617331282,1617726244,\
1618116561,1618502287,1618883474,1619260175,1619632442,1620000326,1620363877,1620723146,1621078182,1621429033,\
1621775749,1622118377,1622456965,1622791559,1623122206,1623448951,1623771840,1624090917,1624406227,1624717813,\
1625025719,1625329987,1625630660,1625927779,1626221386,1626511522,1626798227,1627081541,1627361504,1627638155,\
1627911532,1628181674,1628448618,1628712402,1628973062,1629230635,1629485157,1629736664,1629985191,1630230773,\
1630473445,1630713240,1630950192,1631184334,1631415700,1631644322,1631870232,1632093461,1632314042,1632532005,\
1632747381,1632960200,1633170493,1633378289,1633583617,1633786507,1633986987,1634185085,1634380829,1634574248,\
1634765368,1634954216,1635140820,1635325205,1635507398,1635687425,1635865311,1636041081,1636214761,1636386375,\
1636555947,1636723501,1636889061,1637052651,1637214294,1637374013,1637531831,1637687770,1637841852,1637994099,\
1638144533,1638293176,1638440048,1638585171,1638728565,1638870250,1639010247,1639148576,1639285256,1639420307,\
1639553749,1639685600,1639815879,1639944605,1640071796,1640197471,1640321647,1640444342,1640565574,1640685360,\
1640803717,1640920662,1641036212,1641150383,1641263192,1641374655,1641484788,1641593607,1641701127,1641807363,\
1641912331,1642016046,1642118523,1642219777,1642319822,1642418672,1642516342,1642612846,1642708197,1642802409,\
1642895496,1642987471,1643078348,1643168139,1643256857,1643344515,1643431126,1643516702,1643601256,1643684799,\
1643767344,1643848902,1643929486,1644009107,1644087776,1644165505,1644242304,1644318185,1644393159,1644467237,\
1644540429,1644612746,1644684198,1644754796,1644824550,1644893470,1644961565,1645028846,1645095322,1645161003,\
1645225899,1645290018,1645353370,1645415965,1645477811,1645538917,1645599292,1645658945,1645717884,1645776118,\
1645833655,1645890503,1645946671,1646002167,1646056999,1646111175,1646164702,1646217589,1646269843,1646321471,\
1646372481,1646422881,1646472677,1646521877,1646570488,1646618517,1646665972,1646712858,1646759183,1646804953,\
1646850175,1646894856,1646939002,1646982619,1647025714,1647068293,1647110362,1647151927,1647192995,1647233571,\
1647273661,1647313271,1647352406,1647391073,1647429277,1647467023,1647504317,1647541164,1647577570,1647613540,\
1647649079,1647684192,1647718884,1647753161,1647787027,1647820488,1647853548,1647886212,1647918484,1647950370,\
1647981874,1648013000,1648043753,1648074138,1648104159,1648133820,1648163126,1648192080,1648220687,1648248952,\
1648276878,1648304469,1648331730,1648358664,1648385275,1648411567,1648437544,1648463210,1648488568,1648513622,\
1648538376,1648562833,1648586997,1648610872,1648634460,1648657766,1648680792,1648703542,1648726020,1648748228,\
1648770170,1648791849,1648813268,1648834430,1648855339,1648875997,1648896407,1648916573,1648936497,1648956182,\
1648975631,1648994847,1649013832,1649032590,1649051123,1649069434,1649087525,1649105399,1649123059,1649140507,\
1649157746,1649174778,1649191606,1649208232,1649224659,1649240889,1649256924,1649272767,1649288420,1649303885,\
1649319165,1649334262,1649349178,1649363915,1649378475,1649392861,1649407074,1649421117,1649434991,1649448699,\
1649462242,1649475623,1649488844,1649501906,1649514811,1649527562,1649540160,1649552607,1649564904,1649577054,\
1649589058,1649600918,1649612636,1649624213,1649635652,1649646953,1649658119,1649669151,1649680051,1649690820,\
1649701460,1649711972,1649722358,1649732619,1649742757,1649752774,1649762671,1649772449,1649782110,1649791655,\
1649801085,1649810402,1649819607,1649828702,1649837688,1649846566,1649855338,1649864004,1649872566,1649881026,\
1649889384,1649897642,1649905801,1649913862,1649921826,1649929695,1649937469,1649945150,1649952739,1649960237,\
1649967645,1649974964,1649982195,1649989340,1649996399,1650003373,1650010263,1650017071,1650023797,1650030442,\
1650037008,1650043495,1650049904,1650056236,1650062492,1650068673,1650074780,1650080814,1650086775,1650092665,\
1650098484,1650104233,1650109913,1650115525,1650121070,1650126548,1650131961,1650137309,1650142593,1650147813,\
1650152971,1650158067,1650163102,1650168076,1650172990,1650177845,1650182642,1650187382,1650192065,1650196692,\
1650201263,1650205779,1650210241,1650214650,1650219006,1650223309,1650227561,1650231762,1650235912,1650240012,\
1650244063,1650248066,1650252021,1650255928,1650259788,1650263602,1650267370,1650271093,1650274771,1650278405,\
1650281996,1650285544,1650289049,1650292512,1650295933,1650299313,1650302653,1650305953,1650309213,1650312434,\
1650315616,1650318760,1650321866,1650324935,1650327967,1650330963,1650333923,1650336847,1650339736,1650342591,\
1650345411,1650348198,1650350951,1650353671,1650356358,1650359013,1650361636,1650364228,1650366789,1650369319,\
1650371819,1650374289,1650376729,1650379140,1650381522,1650383875,1650386200,1650388497,1650390766,1650393008,\
1650395223,1650397412,1650399574,1650401711,1650403822,1650405908,1650407969,1650410005,1650412016,1650414003,\
1650415966,1650417906,1650419823,1650421717,1650423588,1650425436,1650427262,1650429066)


Supports up to level 1000
to check if your exp is equal to whatever is on the list just do

if(src.exp >= src.Exptable[src.level])


change src.level to whatever the variable you use to store levels

Basically, just make a list with a bunch of values.

Hope this helps

Ragnarok online uses this method, But i wouldnt see the reason why you would use this method, When you can write a formula or something
In response to Max Omega
mexp = mexp ** 2
In response to Max Omega
Wow, what a facetious use of ten kilobytes.

I agree with Max, a formula is a far better method of handling this.

Max Omega wrote:
Here is the exp table used in ragnarok Written in DM

> mob
> var
> list
> Exptable = list({gigantic list of integers goes here})

Supports up to level 1000

Ragnarok online uses this method, But i wouldnt see the reason why you would use this method, When you can write a formula or something
In response to Max Omega
after looking at the list again. I think it only goes up to level 255. Even tho eathena said it was 1000. Anyways. This isn't a smart idea and i would advise using a formula or some sort.
In response to Axerob
Axerob wrote:
mexp = mexp ** 2


The way you suggested it makes it a lot easier on his part :P
In response to Yash 69
Yeah, I was thinking of going with that, Rob, but I don't want to make my game a GRIND-HARD OMFG CAN'T LEVEL game.
I'm just trying to make a casual game. :/

(If you saw my EXP List, you'd see why. I just don't feel like getting on my laptop right now.)

*Edit*
Couldn't I do something like:
mob/proc
mexpadd()
if(src.lv == 2)
src.mexp = 36
if(src.lv == 3)
src.mexp = 57
if(src.lv == 4
src.mexp = 82

... And so on.
Just add it after the LevelUp proc?
In response to Stereo
Thats just dumb >_> just multiply or give random exp each level and save some time, or if you want to go advanced go add factors and math equations to determine max exp
In response to Yash 69
That's just it.
I have no idea how to get the MEXP I want.
I'm willing to put as much time into this as possible.
Even if it calls for me making mexp for every single level. (will go upto 99. :I)
In response to Stereo
mob
proc
level()
if(exp>maxexp)
exp-=maxexp
maxexp+=src.maxhealth/10 or w/e >_>
..()
In response to Stereo
As i said before. Make a list with 99 values.

Example

var/list/Exptable = list(put 99 values here)


To access what value that coresponds to what level you are

Do

if(exp >= Exptable[usr.level])


If your level 9, then it will look for the ninth value in the list to check.

Its easier than what your doing.
In response to Max Omega
Max Omega wrote:
As i said before. Make a list with 99 values.

This is the worst way to do that. Making a simple formula will work faster (development wise) and be easier to change, not to mention the memory savings.

George Gough
In response to KodeNerd
I know its the worst what to do it. Thats why i Advised him using a formula in my first post. But Stereo wants it this way. So i explained to him how to do it.
In response to Stereo
Do you know math?
In response to Stereo
If you really NEED complete control over ever level's maximum experience (aka, "experience to next level"), you would be best off using a list containing X entries (maxmimum level), unless you can figure the formula for what you want that is.

But you most likely don't really NEED it.

mob
var
level = 1
experience = 0
mexp = 10

proc
get_experience(gain)
experience += gain // "gain" the experience
while(experience >= mexp) // we might have gotten more than the required amount... continue leveling up until it's lower
level++
experience -= mexp
src << "You level up. You are now level [level]."
mexp += round(mexp/7)+15 // simple formula, gets a percentage of the value of mexp AND modifies it naturally.

/*
mexp results for first 60 levels: 10, 26, 44, 65, 89, 116,
147, 183, 224, 271, 324, 385, 455, 535, 626, 730, 849, 985,
1140, 1317, 1520, 1752, 2017, 2320, 2666, 3061, 3513,
4029, 4619, 5293, 6064, 6945, 7952, 9103, 10418, 11921,
13639, 15602, 17845, 20409, 23339, 26688, 30515, 34889,
39888, 45601, 52130, 59592, 68120, 77866, 89004, 101733,
116281, 132907, 151908, 173624, 198442, 226805, 259220,
296266
*/


You can mess around with those two numbers (7, 15) until you get what you want.
That one was pretty close to the Ragnarok level system though, although it's pretty early so I don't really feel like thinking about it.