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

Account Manager Wrong Position

Go to the database and manually change the Account Manager position to a valid one, it probably got saved with an invalid one and will not be changed updating the town id
 
Go to the database and manually change the Account Manager position to a valid one, it probably got saved with an invalid one and will not be changed updating the town id

U wut. It absolutely should be.

iologin
C++:
    player->town = result->getDataInt("town_id");
    if(Town* town = Towns::getInstance()->getTown(player->town))
        player->setMasterPosition(town->getPosition());

    //snipped//

    player->loginPosition = Position(result->getDataInt("posx"), result->getDataInt("posy"), result->getDataInt("posz"));
    if(!player->loginPosition.x || !player->loginPosition.y)
        player->loginPosition = player->getMasterPosition();

gameprotocol
C++:
        if(!g_game.placeCreature(player, player->getLoginPosition()) && !g_game.placeCreature(player, player->getMasterPosition(), false, true))
        {
            disconnectClient(0x14, "Temple position is wrong. Contact with the administration.");
            return false;
        }

if last login position simply doesn't exist in player loader, it uses temple position

game will try to use last-login position first, and if that is invalid, it will use the temple position of the set town.

This is for example, why when players login after the map has been changed and they logged out on a tile that now no longer exist, they can still login successfully. If this system is broken, then you will have bigger problems than the account manager not working.

The SQL query above is all he should need. If it still doesn't work then he needs to edit his map file and make sure the town temple positions are set correctly.
 
Last edited:
U wut. It absolutely should be.

iologin
C++:
    player->town = result->getDataInt("town_id");
    if(Town* town = Towns::getInstance()->getTown(player->town))
        player->setMasterPosition(town->getPosition());

    //snipped//

    player->loginPosition = Position(result->getDataInt("posx"), result->getDataInt("posy"), result->getDataInt("posz"));
    if(!player->loginPosition.x || !player->loginPosition.y)
        player->loginPosition = player->getMasterPosition();

gameprotocol
C++:
        if(!g_game.placeCreature(player, player->getLoginPosition()) && !g_game.placeCreature(player, player->getMasterPosition(), false, true))
        {
            disconnectClient(0x14, "Temple position is wrong. Contact with the administration.");
            return false;
        }

if last login position simply doesn't exist in player loader, it uses temple position

game will try to use last-login position first, and if that is invalid, it will use the temple position of the set town.

This is for example, why when players login after the map has been changed and they logged out on a tile that now no longer exist, they can still login successfully. If this system is broken, then you will have bigger problems than the account manager not working.

The SQL query above is all he should need. If it still doesn't work then he needs to edit his map file and make sure the town temple positions are set correctly.
Interesting, I remember running into the same problem years ago and the only solution was to manually change the position in the database
 
Back
Top