| Blockland Forums > Modification Help |
| Simple ass RPG Level system |
| (1/3) > >> |
| Obibital:
//plevel.cs if(%client.pexp == %client.pmexp) {%client.level ++; %client.pexp = 0; %client.pmexp = 100 * %client.level;} This is the Server.cs, and it loaded in game. But it didnt work, which i wasnt surprised at. That is in fact the entire code XD Whats missing? |
| otto-san:
--- Code: ---function obibitalRPGLevelUp(%client) { if(%client.pexp == %client.pmexp) {%client.level++; %client.pexp = 0; %client.pmexp = 100 * %client.level;} } --- End code --- --- Code: ---function somethingThatGiveloveP(%client) { stuff obibitalRPGLevelUp(%client); } --- End code --- That should do it. |
| Obibital:
--- Quote from: otto-san on July 19, 2010, 04:17:30 PM --- --- Code: ---function obibitalRPGLevelUp(%client) { if(%client.pexp == %client.pmexp) {%client.level++; %client.pexp = 0; %client.pmexp = 100 * %client.level;} } --- End code --- --- Code: ---function somethingThatGiveloveP(%client) { stuff obibitalRPGLevelUp(%client); } --- End code --- That should do it. --- End quote --- So what your saying is that When you do something that gets exp, it runs the function that checks for the exp requirement? If so, what would the Stuff be replaced with? |
| otto-san:
--- Quote from: Obibital on July 19, 2010, 04:27:44 PM ---So what your saying is that When you do something that gets exp, it runs the function that checks for the exp requirement? If so, what would the Stuff be replaced with? --- End quote --- whatever crap happens when you do the thing |
| Obibital:
--- Quote from: otto-san on July 19, 2010, 04:17:30 PM --- --- Code: ---function obibitalRPGLevelUp(%client) { if(%client.pexp == %client.pmexp) {%client.level++; %client.pexp = 0; %client.pmexp = 100 * %client.level;} } --- End code --- --- Code: ---function somethingThatGiveloveP(EXP.KillRat)(%client) { stuff (add Exp, chance of weapons ect?) obibitalRPGLevelUp(%client); } --- End code --- --- End quote --- Thats what u mean? :3 |
| Navigation |
| Message Index |
| Next page |