Author Topic: Cash onKill?  (Read 3526 times)

Ya that was an old one that my friend wanted me to release...Not shure why but I made a new one that is about 30 lines of code It has 100 levels Every 10 levels you have a chance to get 1-2 more wood Level 10 1-2 level 20 2-3 and so on too 100. And it only checks when you gain exp or gain a level now.

Ya that was an old one that my friend wanted me to release...Not shure why but I made a new one that is about 30 lines of code It has 100 levels Every 10 levels you have a chance to get 1-2 more wood Level 10 1-2 level 20 2-3 and so on too 100. And it only checks when you gain exp or gain a level now.

Glad you improved it.

One file for one line of text in the cash mod saving system?! Come on guys, I know you can do better then this!

I may release a saving system. It'd work better then alot of the crap save systems out there. One file for one line of text?!

Edit: Tidied up the post and removed a part of it.
« Last Edit: August 03, 2008, 01:16:05 AM by Dyed Brownie »

Quote
function dmlvl()
{
   for(%c = 0; %c < ClientGroup.getcount(); %c++)
   {
     %client = ClientGroup.getobject(%c);
     %lvlxp = 20;
     if(%client.exp >= %lvlexp)
     {
     %client.lvl += 1;
     %lvlxp *= 1.5;
     }
   }
}

Still nothing, asdf.

Bolt explain what your trying to do I might be able to help I'm not at my scripting computer so whatever I say might now work though.

What I'm trying to do is set up a leveling system.

The idea is that once the clients exp is more then the required exp to level (%lvlexp), it will put them up one level, and increase the amount of exp to lvl (%lvlxp *= 1.5;)

The script that gives the exp is on the first page.

You are setting %lvlxp to 20 and comparing with %lvlexp.
I think you should try a whole new idea for this script.
You should have them level up in the function that grants exp, not run a loop for all clients, increasing if they are over 20 even if they are already lv 50.

I fixed the typo in the script, and its working now (Though the xp thing wasn't the only problem.) 
I think you should try a whole new idea for this script.
You should have them level up in the function that grants exp, not run a loop for all clients, increasing if they are over 20 even if they are already lv 50.
I'm not too sure what you mean by that.

Well, the thing about your script, everytime the function runs, anyone with over 20 exp will gain a level.
This is because %lvlexp is set back to 20 whenever it reaches the client.
Where it says %lvlexp = 20; change it to %lvlexp = 20 + 15*(%client.lvl-1));

Thanks for pointing that out to me :)
I think I'll just make the exp reset each level, as that would fix a problem I'll have later in the script.