Travian[X, Z] - Noob Central

Results 1 to 8 of 8
  1. #1
    Ultimate Member allycol93 is offline
    MemberRank
    Jan 2012 Join Date
    ScotlandLocation
    152Posts

    Travian[X, Z] - Noob Central

    FAQ's and Help for n00bs

    Ok, so basically the Travian section is generally noobs asking for help, usually stuff that has been written 10's of times on the forum, so to help the noobs and give them PROPER answers I thought it would be a good idea to make a central area for the most common problems and how to fix them.


    Important!

    This is for TravianX, TravianZ, (Maybe TrafianT4 (I think that is mainy based on TravianX)), NOT Dboor, Tatar etc.
    You have to realise these versions have BUGS and limitations!!
    Do not read this if you expect me to tell you how to fix battle or automation bugs.
    Travian[X, Z] is the best!!
    If you say these are "shit" then I wait for you to release something better.

    Most important bugs:
    1) Battle, sometimes troops vanish, double or do some crazy stuff, this is complicated stuff.
    2) Troop starvation, this does not exist.
    3) Alliance chat doesn't work.
    4) Some minor issues, e.g. Alliance and Market




    Downloads:

    TravianX: https://github.com/advocaite/Travianx
    TravianZ: https://github.com/yi12345/TravianZ




    Problem: How do I populate oases?
    Fix: Create a file in the root folder, the one with GameEngine and Templates in, call it "populateOasis.php" or something:

    PHP Code:
    <?php
    include("GameEngine/Account.php");

    $connection mysql_connect(SQL_SERVERSQL_USERSQL_PASS);
    $selectdata mysql_select_db(SQL_DB$connection);

    if(
    $session->access == ADMIN)
    {
        
    $database->populateOasis();
        
    $database->populateOasisUnitsLow();
        
    $database->populateOasisUnitsHigh();
        echo 
    "<p>Oases populated</p>";
    }
    else
    {
        die(
    "You are not admin");
    }

    mysql_close();
    ?>

    ======================================================


    Problem: I want to edit the news boxes on the side.
    Fix: There is the option to display or hide the news boxes, if you want to show more, or hide a news box:
    In "GameEngine/config.php" you will find (lines 131-138):

    PHP Code:
    //////////////////////////////////
    // ****  NEWSBOX SETTINGS  **** //
    //////////////////////////////////
    //true = enabled
    //false = disabled
    define("NEWSBOX1"true);
    define("NEWSBOX2"true);
    define("NEWSBOX3"false); 
    You can hide them by choosing false.

    To edit the content of the newsboxes: "Templates/News/newsbox[1,2,3].tpl"


    ======================================================


    Problem: I want to give players [x] gold when they sign up, how?
    Fix: 1) Go to PHPMyAdmin
    2) Go to users table
    3) Go to Structure
    4) Find "gold" and click change (next to the pencil)
    5) Find default, change the drop down box to "As Defined:" (I think it is by default)
    6) Change the textbox to the amount of gold everyone starts with
    7) Click Save
    8) All done, Every player that registers will start with this amount of gold.


    ======================================================


    Problem: I want to chang the speed of my server, troops and warehouse capacity, how?
    Fix: Look around "GameEngine/config.php", you can change all the settings here.


    ======================================================


    Problem: [I]How do I edit the initial message sent by Support?[I]
    Fix: You can edit this message in "Admin/welcome.tpl":

    PHP Code:
    Hello %USER%,

    Thank you for registering on our server.
    Since the %STARTat %TIMERomansGauls and Teutons attack each other on this game worldRight now, %PLAYERSplayers in %ALLIAlliances are fighting for supremacy

    TravianX Team 
    You can edit this (and add HTML I think) as you wish.


    ======================================================


    Problem: I have the server setup to email players with activation code, how di I edit the email?
    Fix: This is a little more involved, You can edit the class Mailer in "GameEngine/Mailer.php":

    Here is a file I edited (I fixed the bug that doesn't include the server address, the wrong variable was used)

    PHP Code:
    <?php
    #################################################################################
    ##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
    ## --------------------------------------------------------------------------- ##
    ##  Filename       Mailer.php                                                  ##
    ##  Developed by:  Dixie                                                       ##
    ##  License:       TravianX Project                                            ##
    ##  Copyright:     TravianX (c) 2010-2011. All rights reserved.                ##
    ##  Improved:      aggenkeech                                                  ##
    #################################################################################

    class Mailer
    {
        function 
    sendActivate($email$username$pass$act)
        {
            
    $time date('h:i:s'time());
            
    $date date('d-m-Y'time());
            
    $subject "Welcome to ".SERVER_NAME;
            
    $message "Hello ".$username."

    Thank you for your registration at "
    .$time." on ".$date."

    <table>
        <tr>
            <td>Usermame:</td>
            <td>"
    .$username."</td>
        </tr>
        <tr>
            <td>Password:</td>
            <td>"
    .$pass."</td>
        </tr>
        <tr>
            <td>Activation code:</td>
            <td>"
    .$act."</td>
        </tr>
    </table>


    When you would like to join the game click <a target=\"_blank\" href=\""
    .HOMEPAGE."activate.php?code=".$act."\">activate account</a>

    Greetings,
    "
    .SERVER_NAME."";
                    
            
    $headers "From: Mailer@".SERVER_NAME."\n";
            
    $headers .= 'MIME-Version: 1.0' "\r\n";
            
    $headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";
            
    mail($email$subject$message$headers);
        }
    };
    $mailer = new Mailer;
    ?>

    ======================================================


    Problem: I want to automate medals, how do I do this?
    Fix: This is a little more advanced too, and won't work for everyone, we will use somthing called a cronjob.

    The file you want to download is I UPLOADED WRONG FILE, WILL UPLOAD SOON
    This file is exactly the same as "medals.php" except it is automated, e.g. no protection (doesn't check if user is admin because it is a cronjob we can't do this) and no prevention (anyone can run this).


    I reccomend 2 things:
    1) Rename this file to something obscure, only you know.
    2) Create a .htaccess file and add "Options -Indexes" to it, so no one can see the structure of your site.


    To add a cronjob (in cPanel):

    Go to cronjobs,
    ON the common settings dropdown box, choose once a day, or how often you wan to give medals.
    Command:

    PHP Code:
    php-/home/user/path/to/trav/server/yourrenamedcronjobfile.php 
    Add an email if you wish to get a report.

    and Add new cronjob.




    ======================================================


    More coming soon.
    Last edited by allycol93; 05-06-12 at 11:43 PM.


  2. #2
    Account Upgraded | Title Enabled! yi12345 is offline
    True MemberRank
    Aug 2011 Join Date
    519Posts

    Re: Travian[X, Z] - Noob Central

    Quote Originally Posted by allycol93 View Post
    FAQ's and Help for n00bs

    Ok, so basically the Travian section is generally noobs asking for help, usually stuff that has been written 10's of times on the forum, so to help the noobs and give them PROPER answers I thought it would be a good idea to make a central area for the most common problems and how to fix them.


    Important!

    This is for TravianX, TravianZ, (Maybe TrafianT4 (I think that is mainy based on TravianX)), NOT Dboor, Tatar etc.
    You have to realise these versions have BUGS and limitations!!
    Do not read this if you expect me to tell you how to fix battle or automation bugs.
    Travian[X, Z] is the best!!
    If you say these are "shit" then I wait for you to release something better.

    Most important bugs:
    1) Battle, sometimes troops vanish, double or do some crazy stuff, this is complicated stuff.
    2) Troop starvation, this does not exist.
    3) Alliance chat doesn't work.
    4) Some minor issues, e.g. Alliance and Market




    Downloads:

    TravianX: https://github.com/advocaite/Travianx
    TravianZ: https://github.com/yi12345/TravianZ




    Problem: How do I populate oases?
    Fix: Create a file in the root folder, the one with GameEngine and Templates in, call it "populateOasis.php" or something:

    PHP Code:
    <?php
    include("GameEngine/Account.php");

    $connection mysql_connect(SQL_SERVERSQL_USERSQL_PASS);
    $selectdata mysql_select_db(SQL_DB$connection);

    if(
    $session->access == ADMIN)
    {
        
    $database->populateOasis();
        
    $database->populateOasisUnitsLow();
        
    $database->populateOasisUnitsHigh();
        echo 
    "<p>Oases populated</p>";
    }
    else
    {
        die(
    "You are not admin");
    }

    mysql_close();
    ?>

    ======================================================


    Problem: I want to edit the news boxes on the side.
    Fix: There is the option to display or hide the news boxes, if you want to show more, or hide a news box:
    In "GameEngine/config.php" you will find (lines 131-138):

    PHP Code:
    //////////////////////////////////
    // ****  NEWSBOX SETTINGS  **** //
    //////////////////////////////////
    //true = enabled
    //false = disabled
    define("NEWSBOX1"true);
    define("NEWSBOX2"true);
    define("NEWSBOX3"false); 
    You can hide them by choosing false.

    To edit the content of the newsboxes: "Templates/News/newsbox[1,2,3].tpl"


    ======================================================


    Problem: I want to give players [x] gold when they sign up, how?
    Fix: 1) Go to PHPMyAdmin
    2) Go to users table
    3) Go to Structure
    4) Find "gold" and click change (next to the pencil)
    5) Find default, change the drop down box to "As Defined:" (I think it is by default)
    6) Change the textbox to the amount of gold everyone starts with
    7) Click Save
    8) All done, Every player that registers will start with this amount of gold.


    ======================================================


    Problem: I want to chang the speed of my server, troops and warehouse capacity, how?
    Fix: Look around "GameEngine/config.php", you can change all the settings here.


    ======================================================


    Problem: [I]How do I edit the initial message sent by Support?[I]
    Fix: You can edit this message in "Admin/welcome.tpl":

    PHP Code:
    Hello %USER%,

    Thank you for registering on our server.
    Since the %STARTat %TIMERomansGauls and Teutons attack each other on this game worldRight now, %PLAYERSplayers in %ALLIAlliances are fighting for supremacy

    TravianX Team 
    You can edit this (and add HTML I think) as you wish.


    ======================================================


    Problem: I have the server setup to email players with activation code, how di I edit the email?
    Fix: This is a little more involved, You can edit the class Mailer in "GameEngine/Mailer.php":

    Here is a file I edited (I fixed the bug that doesn't include the server address, the wrong variable was used)

    PHP Code:
    <?php
    #################################################################################
    ##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
    ## --------------------------------------------------------------------------- ##
    ##  Filename       Mailer.php                                                  ##
    ##  Developed by:  Dixie                                                       ##
    ##  License:       TravianX Project                                            ##
    ##  Copyright:     TravianX (c) 2010-2011. All rights reserved.                ##
    ##  Improved:      aggenkeech                                                  ##
    #################################################################################

    class Mailer
    {
        function 
    sendActivate($email$username$pass$act)
        {
            
    $time date('h:i:s'time());
            
    $date date('d-m-Y'time());
            
    $subject "Welcome to ".SERVER_NAME;
            
    $message "Hello ".$username."

    Thank you for your registration at "
    .$time." on ".$date."

    <table>
        <tr>
            <td>Usermame:</td>
            <td>"
    .$username."</td>
        </tr>
        <tr>
            <td>Password:</td>
            <td>"
    .$pass."</td>
        </tr>
        <tr>
            <td>Activation code:</td>
            <td>"
    .$act."</td>
        </tr>
    </table>


    When you would like to join the game click <a target=\"_blank\" href=\""
    .HOMEPAGE."activate.php?code=".$act."\">activate account</a>

    Greetings,
    "
    .SERVER_NAME."";
                    
            
    $headers "From: Mailer@".SERVER_NAME."\n";
            
    $headers .= 'MIME-Version: 1.0' "\r\n";
            
    $headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";
            
    mail($email$subject$message$headers);
        }
    };
    $mailer = new Mailer;
    ?>

    ======================================================


    Problem: I want to automate medals, how do I do this?
    Fix: This is a little more advanced too, and won't work for everyone, we will use somthing called a cronjob.

    The file you want to download is here.
    This file is exactly the same as "medals.php" except it is automated, e.g. no protection (doesn't check if user is admin because it is a cronjob we can't do this) and no prevention (anyone can run this).


    I reccomend 2 things:
    1) Rename this file to something obscure, only you know.
    2) Create a .htaccess file and add "Options -Indexes" to it, so no one can see the structure of your site.


    To add a cronjob (in cPanel):

    Go to cronjobs,
    ON the common settings dropdown box, choose once a day, or how often you wan to give medals.
    Command:

    PHP Code:
    php-/home/user/path/to/trav/server/yourrenamedcronjobfile.php 
    Add an email if you wish to get a report.

    and Add new cronjob.




    ======================================================


    More coming soon.
    i fixed activation, alliance chat and market work almost 100% on my version (except trade routes for goldclub)

  3. #3
    Ultimate Member allycol93 is offline
    MemberRank
    Jan 2012 Join Date
    ScotlandLocation
    152Posts

    Re: Travian[X, Z] - Noob Central

    Quote Originally Posted by yi12345 View Post
    i fixed activation, alliance chat and market work almost 100% on my version (except trade routes for goldclub)
    Nice, shows how up to date I am

  4. #4
    Account Inactive FuzijaCZ is offline
    InactiveRank
    May 2012 Join Date
    39Posts

    Re: Travian[X, Z] - Noob Central

    Awesome, helped me with welcome message :-)

    Maybe next to come would be how to change server time displayed on header of the game? :-)

    I was searching but nothing viable came up, and it would mean a lot to me :-)

    Keep up the good work :-)

  5. #5
    Account Upgraded | Title Enabled! nmilchev is offline
    True MemberRank
    Sep 2011 Join Date
    BulgariaLocation
    725Posts

    Re: Travian[X, Z] - Noob Central

    Quote Originally Posted by FuzijaCZ View Post
    Awesome, helped me with welcome message :-)

    Maybe next to come would be how to change server time displayed on header of the game? :-)

    I was searching but nothing viable came up, and it would mean a lot to me :-)

    Keep up the good work :-)

    Try with this method

    Go to GameEngine/Config.php
    add this on the top

    date_default_timezone_set('Europe/London');

    Choose your timezone from here >>>PHP: List of Supported Timezones - Manual
    Flaming users is against the forum rules.

    Press F13 to understand how smart you are

  6. #6
    Hardcore Member yosif is offline
    MemberRank
    Oct 2008 Join Date
    123Posts

    Re: Travian[X, Z] - Noob Central

    how to fix map bug and attack bug and i have Coordinates do not exist

  7. #7
    Account Inactive serhatt is offline
    InactiveRank
    Apr 2013 Join Date
    6Posts

    Re: Travian[X, Z] - Noob Central

    Travian Z is have a bug, in barrack and stable when who training 1000 or 5000 soldier after time its going 4242451242 soldier...

  8. #8
    I can't believe it! something nice is offline
    True MemberRank
    Jul 2011 Join Date
    347Posts

    Re: Travian[X, Z] - Noob Central

    Quote Originally Posted by serhatt View Post
    Travian Z is have a bug, in barrack and stable when who training 1000 or 5000 soldier after time its going 4242451242 soldier...
    Yes that's a known bug, but the fix is not public yet.
    Best Regards
    something nice



    If this posting was helpful, then please give a like =)
    If you got trolled, think about it ;)



Advertisement