• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved New players get wrong town id.

gerard95

Keep cool :)
Joined
Dec 31, 2011
Messages
276
Reaction score
16
At config.lua, new players have assigned this line: newPlayerTownId = 2.
And they can only choose Thais. Which has TownID= 2, I made it via ZnoteAcc at config.php.

PHP:
$config['towns'] = array(
        2 => 'Thais',
Though, when they make the character, they get TownId = 0 at the database, thought they get teleported to thais. If I do not do anything, once they die, they get Temple position wrong. If I edit the DB adding TownId=2, the temple position thing won't appear.

Any ideas of how to make new characters with TownID=2 ?
Thank you:)
 
At config.lua, new players have assigned this line: newPlayerTownId = 2.
And they can only choose Thais. Which has TownID= 2, I made it via ZnoteAcc at config.php.

PHP:
$config['towns'] = array(
        2 => 'Thais',
Though, when they make the character, they get TownId = 0 at the database, thought they get teleported to thais. If I do not do anything, once they die, they get Temple position wrong. If I edit the DB adding TownId=2, the temple position thing won't appear.

Any ideas of how to make new characters with TownID=2 ?
Thank you:)


Find this:

Code:
    // Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
    $config['available_towns'] = array(1);
 
There you go!
PHP:
// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
    $config['available_towns'] = array(1);
 
Im not sure if this will help you at all, but this is how mine looks. (Using znoteAAC 1.4) So when you make a new char on my website, you can only choose town 2, which is Thais.

Code:
// Town ids and names: (In RME map editor, open map, click CTRL + T to view towns, their names and their IDs.
    // townID => 'townName' etc: ['3'=>'Thais']
    $config['towns'] = array(
        0 => 'Town 0',
        1 => 'Town 1',
        2 => 'Town 2',
        3 => 'Town 3',
        4 => 'Town 4',
        5 => 'Town 5',
        6 => 'Town 6',
        7 => 'Town 7',
        8 => 'Town 8',
        9 => 'Town 9',
    );

Code:
// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
    $config['available_towns'] = array(2);

So I think you will have to find the last code and change something there.
 
Hmm sounds wierd, this is what I had to change to make it work for me. Hopefully some1 a little bit more experienced than me will take a look at it. Good luck pal!
 
Last edited:
Ninja offered to help me out. Thank you anyway. Cheers :)

- - - Updated - - -

Missed this in createcharacter.php

'vocation' => $_POST['selected_vocation'],
'town_id' => $_POST['selected_town'],
'sex' => $_POST['selected_gender'],
 
Back
Top