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

C++ (otx) 1/1 In-game Account Manager

Solution
Try if works... Taken from this post


You need to put the blocked accounts here
Code:
array(1,2,123)

Iam fix from Sourc Salt
1 problem how block 1/1 from website

If that didnt work for you, then u can try this

go to classes/visitors.php
look for setAccount and setPassword functions and replace them with

PHP:
public static function setAccount($value)
{
    $_SESSION['account'] = ($value != (1)) ? $value : null;
}

public static function setPassword($value)
{
    $_SESSION['password'] = ($value != (1)) ? $value : null;
}
 
I`m use otx NO`t TFS
all Code no work
OTX is based on TFS 0.3.7, depeding on what version you use, but all OTX are result from TFS
Comming back to the topic, just open config.lua in a Notepad++ and change to
Code:
accountManager = true

No matter if you're using mysql or sqlite, the account manager will work. How it works on Mysql? The account manager will create a copy of itself based on the characteristics on your players table

accmanager.png

You don't have an account manager on your players table? Well, exequte the query that @Niloahs mentioned on SQL and thats all
query.png

Remember that the query
Code:
INSERT INTO `accounts`(`id`, `name`, `password`, `type`, `premdays`, `lastday`, `email`, `creation`) VALUES (1,1,1,5,100,0,'',0)
Will create the "account" 1/1, and
Code:
INSERT INTO `players`(`id`, `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`, `onlinetime`, `deletion`, `balance`, `offlinetraining_time`, `offlinetraining_skill`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`) VALUES (1,'GOD',3,1,2,1,1000,1000,100,114,0,116,114,140,3,20,1000,1000,100,100,1,95,117,7,'',1000,0,0,0,1,0,0,0,0,0,0,0,43200,-1,2520,10,0,10,0,10,0,10,0,10,0,10,0,10,0)
Will create the player "account manager"

Regards!
 
Last edited:
Thanks for all code I fix
but still 2 problem> When i create account From Game Get That Code in Database To can Enter website u need Change password and back website Work/ Can use 1/1 in Website Can any one Change password 1/1 From website
Can any one help?
 

Attachments

For the second trouble, you need to go to your database, to accounts table, and then generate SHA1 to encrypt your account manager password. That step is mentioned here in minute 14:50:

I don't know much about the first one, anyways, hope I helped
Regards!
 
Last edited:
I recommend you first, to use the account management system that comes in mysql (register/managment via website) and disable account manager in config.lua, after disabling, delete the 1/1 account from mysql database. For that just follow this videotutorial.

If you have some specific reason to don't use register account system from website, I don't know how to disable the access to account managment to that specific account (1/1), try this if works:

1) You can try to disable access by changing 'blocked' table on 'accounts' and see if that works (change value from 0 to 1).
solution1.png

Another solution, totally different is to:
2) Disable access to account management for all accounts by removing the .php files from the website.

For that, go to sub.php and delete the following:
Code:
    'myaccount' => array(
        'file' => 'myaccount.php',
        'override' => true
    ),
    'createcharacter' => array(
        'file' => 'createcharacter.php',
        'override' => true
    ),
    'changepassword' => array(
        'file' => 'changepassword.php',
        'override' => true
    ),

Then go to www/layout/sub and delete (or move to another folder to backup) the following files:
Code:
myaccount.php
createcharacter.php
changepassword.php

About the salt thing, I dont really know what it is but I have it on my database too, apparently it is not harmful so dont take that in mind.

Tell me how it goes,
regards.
 
Last edited:
Try if works... Taken from this post
index.php , line ~47:
PHP:
    $account_logged = $ots->createObject('Account');
    $account_logged->find($login_account);
    if($account_logged->isLoaded())
    {
        if($login_password == $account_logged->getPassword())
change:
PHP:
if($account_logged->isLoaded())
with:
PHP:
if($account_logged->isLoaded() && !in_array($account_logged->getId(), array(1,2,123))
in array put your list of blocked accounts

You need to put the blocked accounts here
Code:
array(1,2,123)
 
About salt issue, if you really want to use account manager and website then you must disable/remove code from sources

As far i know,
salt is for security reasons mostly to prevent ots owners hack people on others server using their data since salt is like a second encryption.
 
Back
Top