Fixed - You can delete it

Fixed FixedFixed

Look into this system and change bank to points in any of the $.inidb

bankSystem.js (29.4 KB)

Ofcourse i edit the bank to points. I got 10, 25, 40 - but the multiplier is weirdo i get with gold 40*2 = 80.

Can you please post all JS files that were modified for review.

bankSystem.js (26.7 KB)

The problem is that i got so much points - with Gold i got like my points * 40 but i want points + 40 points :slight_smile:

I don’t follow. Are you referring to points or to the bank? The only item I see incrementing points is the withdraw command.

On the bank I see that you are offering a 1.5x interest, I’d kill for that in real life. Most interest rates are well below 150%. Perhaps the issue lies with the interest that you are applying. You are adding onto the bank the value of the bank times 1.5. In other words:

var interest = $.getSetIniDbFloat('bankSettings', 'interest', 1.5),

My bank has 1000 in it.
I earn interest of 1.5 which is 1500.
My bank has 1500 added to it; 1000 + 1500 = 2500.

I am going to guess that you have interest set to 40 and not 0.40, assuming you want to pay out a 40% interest rate.

This code may also cause problems though with values that are not whole numbers:

interest = parseInt($.inidb.get('bankSettings', 'interest'));
tax = parseInt((bankAccout * interest));

That might be then rounding up to 2 from 1.5 and resulting in adding 2x the bank amount back into the bank.

The interest is being converted to an integer after declaring it as a float, which doesn’t make a lot of sense.

If you wish interest to be a percentage then I might recommend:

var interest = $.getSetIniDbNumber('bankSettings', 'interest', 50), /* Assume this meant 50% */
if (bankAccout > 0) {
// Remove the call to get interest again later above tax, it was already queried.
    tax = parseInt((bankAccout * (interest / 100)));

Then interest can be set to 40 instead of 0.40 to represent a 40% interest rate.

im pretty sure he needs to disable that and use the 6 ranks bronze silver gold and what not?

there is a solid number for the 6 ranks that users can upgrade into which is what i think he means…

but he wants it to go to the normal point system and not the custom bank currency

Also IO thanks for spotting my bugs for me to fix :slight_smile:

1 Like

Ah, didn’t understand the full underlying requirement. Anyway, that does explain why currency can go a bit high at times, potentially.


I use only part of Rank System.

Each rank get more points.

Bronze = 15 Points (5 min) | Silver = 25 Points (5 min) | Gold = 40 Points (5 min)

I need to modify runRankBankPayout function.

But the problem is that points that i have are like this: 10000 points * 40 its really weird.

$.inidb.incr(‘points’, username, bankAccout);
uUsers.push(username + ‘(’ + bankAccout + ‘)’);

If the script I was provided there is only one multiplier, into the bank table, and it is related to interest. If there is a different version of the script, I would need to see that. The Interest Timer is active in that code. That will increase the bank amount like I said above.

I have Silver, that means that every 5 mins I will get 40+ points to the points that I have.

There is also interest. As I said before, there isn’t anywhere where the silver value is multiplied. What is the interest setting.

More interesting, those are “rankbank” when ‘bankRanks’ are used elsewhere in the code.

    function updateUserRankBank(username) {
        var pointsString;
        var points = $.getIniDbNumber('points', username.toLowerCase())
        if ($.inidb.get('bankRanks', username.toLowerCase()) == 'Silver') {
            if (points >= rankup_gold) {
                $.inidb.set('bankRanks', username.toLowerCase(), 'Gold');
                $.inidb.set('bankTimes', username.toLowerCase(), newDate());
                $.inidb.decr('points', username.toLowerCase(), rankup_silver);

You are showing me a table that is not remotely used in a calculation.

        $.getSetIniDbString('rankbank', 'Silver', '-1');
        $.getSetIniDbString('rankbankoffline', 'Silver', '-1');

I am not going to write the script for you, you are going to have to do some research into the calculations in the script and look over the code. There seems to be some issues with it.


ranklbank is the number of points for that rank and bankRanks is the list of users ranks i probly could of worded them better but eh also there is not “multiplyer” its just a soldid number it adds

there are 2 systems in this… one of them adds a solid number the other adds a percent to what they already have

Yeah, and I only see one multiplier in that entire script, so I am pretty sure the issue with multiplication lies in interest. Everything else is just an increment from a whole number :slight_smile: Short of testing the script (which I am not going to), that is all I can find reading the script.


Why are the title and the original thread edited to “fixed” and “delete it”. Every thread can possibly help another user in this forum.
Would be better to prevent such edits. :rage: