Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

TravianZ - yi12345

Status
Not open for further replies.
Elite Diviner
Joined
Aug 26, 2011
Messages
495
Reaction score
109
i dowload and reupload but not populated oasis ... and watch in the github not change

maybe I didn't upload the last fix, or you have more that 10 from every unit in the oasis.
now I update my version.
 
Newbie Spellweaver
Joined
Aug 25, 2011
Messages
43
Reaction score
1
hi Yi12345
we need from You to add the gold Start From new Player
 
Newbie Spellweaver
Joined
Apr 8, 2012
Messages
21
Reaction score
0
Hi Y12345

Current bonus: 0 Percent
Bonus at level 4: 0 Percent

No bonus???
 
Junior Spellweaver
Joined
Apr 10, 2011
Messages
122
Reaction score
23
For me is works for populate oasis

here is the code



find in db_MYSQL this code

PHP:
function populateOasis() {
                $q = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
                $result = mysql_query($q, $this->connection);
                while($row = mysql_fetch_array($result)) {
                    $wid = $row['id'];

                    $this->addUnits($wid);

                }
            }

            function populateOasisUnitsLow() {
                $q2 = "SELECT * FROM " . TB_PREFIX . "odata where conqured = 0";
                $result2 = mysql_query($q2, $this->connection);
                while($row = mysql_fetch_array($result2)) {
                    $wid = $row['wref'];
                    $basearray = $this->getMInfo($wid);
                    //each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less
                    switch($basearray['oasistype']) {
                        case 1:
                        case 2:
                            //+25% lumber per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u36 <= '10' OR u37 <= '10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 3:
                            //+25% lumber and +25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u36 <= '10' OR u37 <= '10' OR u38 <='10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 4:
                        case 5:
                            //+25% clay per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u36 <= '10' OR u37 <= '10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 6:
                            //+25% clay and +25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u36 <= '10' OR u37 <= '10' OR u38 <='10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 7:
                        case 8:
                            //+25% iron per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u31 <= '10' OR u32 <= '10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 9:
                            //+25% iron and +25% crop
                            $q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,5)."', u32 = u32 + '".rand(0,5)."', u34 = u34 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u31 <= '10' OR u32 <= '10' OR u34 <='10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 10:
                        case 11:
                            //+25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u33 <= '10' OR u37 <= '10' OR u38 <='10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 12:
                            //+50% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,5)."', u37 = u37 + '".rand(0,5)."', u38 = u38 + '".rand(0,5)."', u39 = u39 + '".rand(0,5)."' WHERE vref = '" . $wid . "' AND (u33 <= '10' OR u37 <= '10' OR u38 <='10')";
                            $result = mysql_query($q, $this->connection);
                            break;
                    }
                }
            }
            
            function populateOasisUnitsHigh() {
                $q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
                $result2 = mysql_query($q2, $this->connection);
                while($row = mysql_fetch_array($result2)) {
                    $wid = $row['id'];
                    $basearray = $this->getMInfo($wid);
                    //each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less
                    switch($basearray['oasistype']) {
                        case 1:
                        case 2:
                            //+25% lumber per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '10' AND u37 <= '10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 3:
                            //+25% lumber and +25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."', u38 = u38 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '10' AND u37 <= '10' AND u38 <='10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 4:
                        case 5:
                            //+25% clay per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '10' AND u37 <= '10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 6:
                            //+25% clay and +25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."', u38 = u38 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '10' AND u37 <= '10' AND u38 <='10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 7:
                        case 8:
                            //+25% iron per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(15,40)."', u32 = u32 + '".rand(10,20)."', u34 = u34 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u31 <= '10' AND u32 <= '10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 9:
                            //+25% iron and +25% crop
                            $q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(15,40)."', u32 = u32 + '".rand(10,20)."', u34 = u34 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u31 <= '10' AND u32 <= '10' AND u34 <='10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 10:
                        case 11:
                            //+25% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '10' AND u37 <= '10' AND u38 <='10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                        case 12:
                            //+50% crop per hour
                            $q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."', u39 = u39 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '10' AND u37 <= '10' AND u38 <='10'AND u38 <='10'";
                            $result = mysql_query($q, $this->connection);
                            break;
                    }
                }
            }


and replace with this code

PHP:
function populateOasis() {
        		$q = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
        		$result = mysql_query($q, $this->connection);
        		while($row = mysql_fetch_array($result)) {
        			$wid = $row['id'];

        			$this->addUnits($wid);

        		}
        	}

        	function populateOasisUnitsLow() {
        		$q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
        		$result2 = mysql_query($q2, $this->connection);
        		while($row = mysql_fetch_array($result2)) {
        			$wid = $row['id'];
        			$basearray = $this->getMInfo($wid);
        			//each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less
        			switch($basearray['oasistype']) {
        				case 1:
        				case 2:
        					//+25% lumber per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 3:
        					//+25% lumber and +25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 4:
        				case 5:
        					//+25% clay per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 6:
        					//+25% clay and +25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 7:
        				case 8:
        					//+25% iron per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,20)."', u32 = u32 + '".rand(0,10)."', u34 = u34 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u31 <= '2' AND u32 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 9:
        					//+25% iron and +25% crop
        					$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(0,20)."', u32 = u32 + '".rand(0,10)."', u34 = u34 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u31 <= '2' AND u32 <= '2' AND u34 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 10:
        				case 11:
        					//+25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 12:
        					//+50% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."', u39 = u39 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '2' AND u37 <= '2' AND u38 <='2'AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        			}
        		}
        	}
            
            function populateOasisUnitsHigh() {
        		$q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
        		$result2 = mysql_query($q2, $this->connection);
        		while($row = mysql_fetch_array($result2)) {
        			$wid = $row['id'];
        			$basearray = $this->getMInfo($wid);
        			//each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less
        			switch($basearray['oasistype']) {
        				case 1:
        				case 2:
        					//+25% lumber per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 3:
        					//+25% lumber and +25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."', u38 = u38 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 4:
        				case 5:
        					//+25% clay per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 6:
        					//+25% clay and +25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u36 = u36 + '".rand(15,40)."', u37 = u37 + '".rand(10,20)."', u38 = u38 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u36 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 7:
        				case 8:
        					//+25% iron per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(15,40)."', u32 = u32 + '".rand(10,20)."', u34 = u34 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u31 <= '2' AND u32 <= '2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 9:
        					//+25% iron and +25% crop
        					$q = "UPDATE " . TB_PREFIX . "units SET u31 = u31 + '".rand(15,40)."', u32 = u32 + '".rand(10,20)."', u34 = u34 + '".rand(10,20)."' WHERE vref = '" . $wid . "' AND u31 <= '2' AND u32 <= '2' AND u34 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 10:
        				case 11:
        					//+25% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '2' AND u37 <= '2' AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        				case 12:
        					//+50% crop per hour
        					$q = "UPDATE " . TB_PREFIX . "units SET u33 = u33 + '".rand(0,20)."', u37 = u37 + '".rand(0,10)."', u38 = u38 + '".rand(0,10)."', u39 = u39 + '".rand(0,10)."' WHERE vref = '" . $wid . "' AND u33 <= '2' AND u37 <= '2' AND u38 <='2'AND u38 <='2'";
        					$result = mysql_query($q, $this->connection);
        					break;
        			}
        		}
        	}

now

find file oasis_populate.php
and replace all code with this code

PHP:
<?php


        include ("GameEngine/Database.php");
        include ("GameEngine/Admin/database.php");
        include ("GameEngine/config.php");
        

        mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
        mysql_select_db(SQL_DB);

        $database->populateOasisdata();  
        $database->populateOasis();
        $database->populateOasisUnitsHigh();


header("Location: dorf1.php");

?>


this code is for high units

If you want to have low units in oasis put this code

PHP:
<?php


        include ("GameEngine/Database.php");
        include ("GameEngine/Admin/database.php");
        include ("GameEngine/config.php");
        

        mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
        mysql_select_db(SQL_DB);

        $database->populateOasisdata();  
        $database->populateOasis();
        $database->populateOasisUnitsLow();


header("Location: dorf1.php");

?>

file oasis_populate must open as administrator

I hope this will help you :)
 
Newbie Spellweaver
Joined
Mar 20, 2011
Messages
88
Reaction score
1
So, we must populate oasis manually? Why don't we try with curl to populate automatically after x hours?
 
Skilled Illusionist
Joined
Feb 22, 2010
Messages
367
Reaction score
46
I have been running this version for DelviewTravian for 2 days and I have not come across any major bugs yet.

As of right now, this will be the version I suggest to everyone.

Great Job.
--Brandon
 
Junior Spellweaver
Joined
Feb 25, 2012
Messages
172
Reaction score
21
Hor can we get the marketplace walking three times, instead of one time ?
 
Junior Spellweaver
Joined
Apr 10, 2011
Messages
122
Reaction score
23
Fix Culture points" Every new player start with 1 points Not as before 15462 etc..

open file Automation.php

Find code

PHP:
 private function culturePoints() {
        global $database,$session;
        $time = time()-600;
        $array = array();
        $q = "SELECT id, lastupdate FROM ".TB_PREFIX."users WHERE lastupdate < $time";
        $array = $database->query_return($q);
        
        foreach($array as $indi) {
            if($indi['lastupdate'] <= $time){
                $cp = $database->getVSumField($indi['id'], 'cp') * (time()-$indi['lastupdate'])/86400;

                $newupdate = time();
                $q = "UPDATE ".TB_PREFIX."users set cp = cp + $cp, lastupdate = $newupdate where id = '".$indi['id']."'";
                $database->query($q);
            }
        }
		if(file_exists("GameEngine/Prevention/culturepoints.txt")) {
            @unlink("GameEngine/Prevention/culturepoints.txt");
        }
}

and replace with this code

PHP:
private function culturePoints() {
global $database;
$time = time()-3600;
$array = array();
$q = "SELECT id, lastupdate FROM ".TB_PREFIX."users where lastupdate < $time";
$array = $database->query_return($q);

foreach($array as $indi) {	
    if($indi['lastupdate'] < $time){
        $cp = $database->getVSumField($indi['id'], 'cp');
          $cp = ($cp)/24;
		  
$newupdate = time();
$q = "UPDATE ".TB_PREFIX."users set cp = cp + $cp, lastupdate = $newupdate where id = '".$indi['id']."'";	
$database->query($q);
            }
        }

check if it works like I hope this will help you ;)
 
Junior Spellweaver
Joined
Feb 25, 2012
Messages
172
Reaction score
21
There is a bug if there is a WW on 100.
It cannot find the page winner.php.

Here is to fix it.

Go to GameEngine/Automation.php
PHP:
		{ 
        header('Location: /winner.php'); 
		}else{ 
        ## there is no winner 
		}

And delete the "/" before winnner.php, like this

PHP:
		{ 
        header('Location: winner.php'); 
		}else{ 
        ## there is no winner 
		}

Now its okay :w00t:

And you will see the end page.

Greets
 
Junior Spellweaver
Joined
Apr 10, 2011
Messages
122
Reaction score
23
I found one bug when add Regeneration points even once after the battle of the hero his hit points not reduced
 
Initiate Mage
Joined
Feb 9, 2012
Messages
4
Reaction score
0
i find another bug,, i'm set 'pre register mode' and duration is working fine, but if the time come it's change to START NOW, and if i refresh the page, it's not work to the login page. please fix this bug.. thankyou :D
 
Junior Spellweaver
Joined
Feb 25, 2012
Messages
172
Reaction score
21
I don't have that problem.
The register and start is working fine.
 
Status
Not open for further replies.
Back
Top