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 more plus features

Newbie Spellweaver
Joined
Nov 10, 2013
Messages
53
Reaction score
18
Hi!
I added to Travianz some new plus features:
1. Buy 1Mio Wood, Clay, Iron, Crop forany Village = 50 gold
2. Buy 500k Wood, Clay, Iron, Crop for any Village = 30 gold
3. Buy 100k Wood, Clay, Iron, Crop for any Village = 20 gold
4. Buy 50k Wood, Clay, Iron, Crop forany Village = 10 gold
5. Buy Culture Points (2500CP) = 20 gold (2500 CP)
6. Complete queueing troops in anyVillage = 50 gold

Almost all credits go to allycol93 and Eyas95

Instructions:
Add all files except 3.tpl to root folder (GameEngine or login.php in it) and replace 3.tpl in Templates/Plus


View attachment plusfeatures.zip

Hope it works and ENJOY
:drool:
 

Attachments

You must be registered for see attachments list
Last edited:
Initiate Mage
Joined
Jan 11, 2014
Messages
3
Reaction score
0
any1 know bout referral system fail???
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/travianZ/public_html/server2/Templates/Plus/5.tpl on line 53

cant get referral after some1 signup under ur link referral/email invite
 
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
any1 know bout referral system fail???
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/travianZ/public_html/server2/Templates/Plus/5.tpl on line 53

cant get referral after some1 signup under ur link referral/email invite

find and change this line code:
PHP:
		<?php
		$invite = $database->getInvitedUser($session->uid);
		if(count($invite) > 0){
		foreach($invite as $invited) {
		$varray = $database->getProfileVillages($invited['id']);
		$totalpop = 0;
		foreach($varray as $vil) {
		$totalpop += $vil['pop'];
		}
		?>
 
Newbie Spellweaver
Joined
Jun 9, 2011
Messages
5
Reaction score
0
Ive got some problem with multihunter this keeps showing any help?
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/u698435309/public_html/GameEngine/Database/db_MYSQL.php on line 751
 
Initiate Mage
Joined
Jun 9, 2014
Messages
3
Reaction score
0
Thank you!!! Works perfect!!!

Please, is it possible to make buy troops in plus? I can not find any script for this..
 
Last edited:
Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
lol must not abuse, query level is not very hard, and when I see the code writing this scares me.

4 request to add resources on the same line ...
this is done in a single query ...

then check that verifies check WTF lol

the same check gold is used only 2 times etc while one already possesses information in a previous request ....


vary bad script enjoy lol


exemple : buyressources5.php
go delete
PHP:
sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());
	while($row = mysql_fetch_array($sql)){};

PHP:
	// checks it against the database
	$check = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());
	//Gives error if user dosen't exist
	$check2 = mysql_num_rows($check);
	if ($check2 == 0) {die('Username id or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}
	//Gives error if user dosen't exist
	$check2 = mysql_num_rows($check);
	if ($check2 == 0) {die('Username uid or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}

go edit
PHP:
			$uid = '$session->uid';
			$vref = '$village->wid';
			mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 50  WHERE id =".$session->uid."")or die(mysql_error());            
			mysql_query("UPDATE ".TB_PREFIX."vdata SET `wood` = `wood` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
			mysql_query("UPDATE ".TB_PREFIX."vdata SET `clay` = `clay` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
			mysql_query("UPDATE ".TB_PREFIX."vdata SET `iron` = `iron` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
			mysql_query("UPDATE ".TB_PREFIX."vdata SET `crop` = `crop` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());

replace with

PHP:
			$uid = $session->uid;
			$vref = $village->wid;
			mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 50  WHERE id =".$session->uid)or die(mysql_error());            
			mysql_query("UPDATE ".TB_PREFIX."vdata SET 
				`crop` = `crop` + 1000000.00,
				`iron` = `iron` + 1000000.00,
				`clay` = `clay` + 1000000.00,
				`wood` = `wood` + 1000000.00
				WHERE wref =".$village->wid)or die(mysql_error());

(pas très beau mais 1 requete contre 4 sans deconé les gars réfléchissez un poil quand même)
 
Last edited:
Newbie Spellweaver
Joined
Mar 15, 2015
Messages
6
Reaction score
0
lol must not abuse, query level is not very hard, and when I see the code writing this scares me.

4 request to add resources on the same line ...
this is done in a single query ...

then check that verifies check WTF lol

the same check gold is used only 2 times etc while one already possesses information in a previous request ....


vary bad script enjoy lol


exemple : buyressources5.php
go delete
PHP:
sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());
    while($row = mysql_fetch_array($sql)){};

PHP:
    // checks it against the database
    $check = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());
    //Gives error if user dosen't exist
    $check2 = mysql_num_rows($check);
    if ($check2 == 0) {die('Username id or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}
    //Gives error if user dosen't exist
    $check2 = mysql_num_rows($check);
    if ($check2 == 0) {die('Username uid or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}

go edit
PHP:
            $uid = '$session->uid';
            $vref = '$village->wid';
            mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 50  WHERE id =".$session->uid."")or die(mysql_error());            
            mysql_query("UPDATE ".TB_PREFIX."vdata SET `wood` = `wood` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
            mysql_query("UPDATE ".TB_PREFIX."vdata SET `clay` = `clay` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
            mysql_query("UPDATE ".TB_PREFIX."vdata SET `iron` = `iron` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());
            mysql_query("UPDATE ".TB_PREFIX."vdata SET `crop` = `crop` + 1000000.00 WHERE wref =".$village->wid."")or die(mysql_error());

replace with

PHP:
            $uid = $session->uid;
            $vref = $village->wid;
            mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 50  WHERE id =".$session->uid)or die(mysql_error());            
            mysql_query("UPDATE ".TB_PREFIX."vdata SET 
                `crop` = `crop` + 1000000.00,
                `iron` = `iron` + 1000000.00,
                `clay` = `clay` + 1000000.00,
                `wood` = `wood` + 1000000.00
                WHERE wref =".$village->wid)or die(mysql_error());

(pas très beau mais 1 requete contre 4 sans deconé les gars réfléchissez un poil quand même)

and this i need to do on every this one?
thanks a lot btw!! :D

and do you know how to make payment? so if someone want's to buy golds and he send money to my pay pal account or something like this...
 
Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
paypal offers fairly simple API to implement, and i have implemented in my version 4.2/4.4 paypal
that's what version of travian?

in dev not link now, attack bug actually, map 4.4 not finish (i'm rewrite full system generate map), stop mysql for pdo, optimise database, optimise all query (stop multiquery on one line...)

change structure file to object ( exemple dboor similar)
using templating ( no php in tpl file)

and I also thought was the creation of a bot (Natar / nature) that randomly attack the players, pillage, destruction of the wall / defense, and re automatically populated oasis and town Natar attack if no more than x hours.
although no online play will play himself, of course with cron / crontab / screen ...

and other ......
 
Last edited by a moderator:
Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
continue in private message, because I would need more information
 
Newbie Spellweaver
Joined
Apr 21, 2015
Messages
6
Reaction score
0
thank you very much for your job, :thumbup: nice featured that working 100%, a question: is possible to add production per hour (i think much better that buy materials) and to buy warehause + granary upgrades (not for level but for capacity? I think is a good idea, let me know, please
 
Back
Top