• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Znote premium points problem

Tubeshop

Member
Joined
Nov 23, 2023
Messages
173
Reaction score
19
Hi. I have a problem with displaying premium points in the znote store. I read that the store uses a table. Znote_Accounts but I don't have such a table and I would like to download premium points from the standard accounts table. I also have a store built into otclient and I want to keep this option without changing the database. How to make znote display and work with premium points from the accounts table? is this a different problem?
 
Hi. I have a problem with displaying premium points in the znote store. I read that the store uses a table. Znote_Accounts but I don't have such a table and I would like to download premium points from the standard accounts table. I also have a store built into otclient and I want to keep this option without changing the database. How to make znote display and work with premium points from the accounts table? is this a different problem?
did u upload schema from engine/database ?
 
Yes, I sent the schemat from the engine to database. otherwise it wouldn't work
well I done fix for someone else very simple just look for query that adds points to add points to the account database and dont add items in znote store but only use client ones.
 
I mean how to change znote to use the premium_points column in account
PHP:
// Give points to character
    if (empty($_POST['points_char']) === false && empty($_POST['points_value']) === false) {
        $char = sanitize($_POST['points_char']);
        $points = (int)$_POST['points_value'];
        data_dump($_POST, false, "post data");
        $account = mysql_select_single("SELECT `account_id` FROM `players` WHERE `name`='$char' LIMIT 1;");
        data_dump($account, false, "fetching account id from players table");
        $znote_account = mysql_select_single("SELECT `id`, `points` FROM `znote_accounts` WHERE `account_id`='". $account['account_id'] ."';");
        data_dump($znote_account, false, "Fetching existing points from znote_accounts");

        data_dump(
            array(
                'Old:' => $znote_account['points'],
                'New:' => $points,
                'Total:' => ($znote_account['points'] + $points)
                ),
            false,
            "Points calculation:");
        $points += $znote_account['points'];
        mysql_update("UPDATE `znote_accounts` SET `points`='$points' WHERE `account_id`='". $account['account_id'] ."';");
    }

seems like someone have not got search function in their notepad:)
 
thanks for m help. Can you tell me why the points are read from the znote_accounts table and the accounts are read from the account table?
 
Back
Top