• 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!

TFS 1.X+ Issue creating player on tfs 1.3 path 7.72 WITH ZNOTE ACC

Diarreamental

Well-Known Member
Joined
Jul 6, 2015
Messages
453
Solutions
1
Reaction score
80
Hello guys.
I have been struggling into this, since im not an advanced user. Im using tfs 1.3 downgraded by nekiro, i have issues to create my char using latest ZnoteACC.
I know this has been asked before many times. I searched through google and forum ofc, but i cant find where i have to make the editions
in order to fix it.

Also i found out that i will have issue to log into my account after the fix too and other issues related to this.
so can someone point me out which specific files i have to edit?

Observation: with the distribution otx3 based on tfs 1.2 im not facing this issue//these issues at all

the error is the following:

Code:
string(51) "SELECT `id` FROM `accounts` WHERE `name`='878965';"
(query - SQL error)
Type: select_single (select single row from database)

Unknown column 'name' in 'where clause'
Thanks
Post automatically merged:

Code:
string(50) "SELECT `id` FROM `accounts` WHERE `name`='895623';"
(query - SQL error)
Type: select_single (select single row from database)

Unknown column 'name' in 'where clause'
i have been struggling into register.php without success
Code:
        }

        //Register
        if ($config['ServerEngine'] !== 'OTHIRE') {
            $register_data = array(
                'name'        =>    $_POST['username'],
                'password'    =>    $_POST['password'],
                'email'        =>    $_POST['email'],
                'created'    =>    time(),
                'ip'        =>    getIPLong(),
                'flag'        =>     $_POST['flag']
            );
        } else {
            $register_data = array(
                'id' tried changing id to num er no name no succes        =>    $_POST['username'],
                'password'    =>    $_POST['password'],
                'email'        =>    $_POST['email'],
                'created'    =>    time(),
                'ip'        =>    getIPLong(),
                'flag'        =>     $_POST['flag']
            );

any clues ? @im using tfs 1.3 protocol 7.72 by nekiro @Znote please help
 
Last edited:
Hello guys.
I have been struggling into this, since im not an advanced user. Im using tfs 1.3 downgraded by nekiro, i have issues to create my char using latest ZnoteACC.
I know this has been asked before many times. I searched through google and forum ofc, but i cant find where i have to make the editions
in order to fix it.

Also i found out that i will have issue to log into my account after the fix too and other issues related to this.
so can someone point me out which specific files i have to edit?

Observation: with the distribution otx3 based on tfs 1.2 im not facing this issue//these issues at all

the error is the following:

Code:
string(51) "SELECT `id` FROM `accounts` WHERE `name`='878965';"
(query - SQL error)
Type: select_single (select single row from database)

Unknown column 'name' in 'where clause'
Thanks
Post automatically merged:

Code:
string(50) "SELECT `id` FROM `accounts` WHERE `name`='895623';"
(query - SQL error)
Type: select_single (select single row from database)

Unknown column 'name' in 'where clause'
i have been struggling into register.php without success
Code:
        }

        //Register
        if ($config['ServerEngine'] !== 'OTHIRE') {
            $register_data = array(
                'name'        =>    $_POST['username'],
                'password'    =>    $_POST['password'],
                'email'        =>    $_POST['email'],
                'created'    =>    time(),
                'ip'        =>    getIPLong(),
                'flag'        =>     $_POST['flag']
            );
        } else {
            $register_data = array(
                'id' tried changing id to num er no name no succes        =>    $_POST['username'],
                'password'    =>    $_POST['password'],
                'email'        =>    $_POST['email'],
                'created'    =>    time(),
                'ip'        =>    getIPLong(),
                'flag'        =>     $_POST['flag']
            );

any clues ? @im using tfs 1.3 protocol 7.72 by nekiro @Znote please help
In the config.php instead of TFS use OTHire
Code:
$config['ServerEngine'] = 'TFS_10';
I dont know if it works but try it
 
This (Nekiro downport to 7.72) is a brand new branch (7 days ago) that actually seems like a sane and good backport: nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/commits/7.72-downgrade)

But I wish @Nekiro didnt rename account.name with account.number. Znote AAC might have worked out of the box if he just didnt change that column name and worked with account.name as an alias in his code. (beside perhaps removing secret and addons with a client version check).

I'm gonna have to add a patch for this, where I update tons of queries to accomodate the change. Might have some time to do it this weekend.
What you need to change is not the id, but name to number. There will be lots of queries to update in engine/function/users.php

It might be easier to change Nekiros branch than Znote AAC, there appears to be 3 relevant lines:

iologindata.cpp

Line 34:
Change:
C++:
query << "SELECT `id`, `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `id` = " << accno;

to:
C++:
query << "SELECT `id`, `name` AS `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `id` = " << accno;

Line 89:

Change:
C++:
query << "SELECT `id`, `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `number` = " << accountNumber;

to:
C++:
query << "SELECT `id`, `name` AS `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `name` = " << accountNumber;

Line 124:

Change:
C++:
query << "SELECT `id`, `password` FROM `accounts` WHERE `number` = " << accountNumber;

to:
C++:
query << "SELECT `id`, `password` FROM `accounts` WHERE `name` = " << accountNumber;

And change the database:
SQL:
ALTER TABLE `accounts` DROP INDEX `number`;
ALTER TABLE `accounts` RENAME COLUMN `number` TO `name`;
ALTER TABLE `accounts` ADD UNIQUE (`name`);
 
Gonna test, thanks @Znote
Post automatically merged:

Code:
ALTER TABLE `accounts` DROP INDEX `number`;
ALTER TABLE `accounts` RENAME COLUMN `number` TO `name`;  // this seems to be wrong or something
ALTER TABLE `accounts` ADD UNIQUE (`name`);
after using the sql codes i got this error :
Code:
consulta SQL:


ALTER TABLE `accounts` DROP INDEX `number`
MySQL ha dicho: Documentación

#1091 - No puedo ELIMINAR 'number'. compuebe que el campo/clave existe

it says that i can't delete 'number' i have to check if the field exists, but its there o.o it exists
sql.png

as you can see i have the field number @Znote
sql1.png
 
Last edited:
Solved account creation, log in to new account to
but i got this error at character creation and i don't have lookaddons field in players column
@Znote

Code:
string(761) "INSERT INTO `players`(`name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `balance`, `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing`) VALUES ('Pasturry', '1', '4111557', '8', '5', '185', '185', '4200', '68', '76', '78', '58', '128', '0', '40', '40', '40', '0', '100', '1', '5', '5', '2', '', '470', '1', '0', '2130706433', '1', '0', '0', '0', '0', '0', '10', '10', '10', '10', '10', '40', '10');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Unknown column 'lookaddons' in 'field list'


i don't want to break the database, so how should i make this? maybe something like:
voidQuery 'lookaddons' delete ?
@Znote


i tried to make something similar as before but i don't have that field in my database
Untitled.png
 
Last edited:
Don't touch anything more from the DB.

Remove this line from Znote AAC:

engine/function/users.php

Line 1319:
PHP:
'lookaddons' => 0,
 
This (Nekiro downport to 7.72) is a brand new branch (7 days ago) that actually seems like a sane and good backport: nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/commits/7.72-downgrade)

But I wish @Nekiro didnt rename account.name with account.number. Znote AAC might have worked out of the box if he just didnt change that column name and worked with account.name as an alias in his code. (beside perhaps removing secret and addons with a client version check).

I'm gonna have to add a patch for this, where I update tons of queries to accomodate the change. Might have some time to do it this weekend.
What you need to change is not the id, but name to number. There will be lots of queries to update in engine/function/users.php

It might be easier to change Nekiros branch than Znote AAC, there appears to be 3 relevant lines:

iologindata.cpp

Line 34:
Change:
C++:
query << "SELECT `id`, `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `id` = " << accno;

to:
C++:
query << "SELECT `id`, `name` AS `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `id` = " << accno;

Line 89:

Change:
C++:
query << "SELECT `id`, `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `number` = " << accountNumber;

to:
C++:
query << "SELECT `id`, `name` AS `number`, `password`, `type`, `premdays`, `lastday` FROM `accounts` WHERE `name` = " << accountNumber;

Line 124:

Change:
C++:
query << "SELECT `id`, `password` FROM `accounts` WHERE `number` = " << accountNumber;

to:
C++:
query << "SELECT `id`, `password` FROM `accounts` WHERE `name` = " << accountNumber;

And change the database:
SQL:
ALTER TABLE `accounts` DROP INDEX `number`;
ALTER TABLE `accounts` RENAME COLUMN `number` TO `name`;
ALTER TABLE `accounts` ADD UNIQUE (`name`);
I just made it simplier. Last commit introduces parsing two values name or number, it will look for number, if not exists gonna parse the name, so to make it compatible with AAC just change the schema account.number to account.name.
 
Last edited:
Back
Top