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 - version modified by Shadow and many others.

Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
You make me smile with dboor :)

Try last version (clean version) not my version modified.



clean...

lol for sql query again faudrais faith stop to 800 times the same queries for nothing ...

a simple example in the last edit file:
PHP:
 //check if banned/admin:
$villageOwner = $database->getVillageField($id,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
if($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
$form->addError("error","Player is Banned. You can't attack him");
//break;
}
//check if vacation mode:
$villageOwner = $database->getVillageField($id,'owner');
if($database->getvacmodexy($id)){
$form->addError("error","User is on vacation mode");
//break;
}

$villageOwner = $database->getVillageField($id,'owner'); 2 query identical and if the conditions are true we make other queries that could be avoided


build your queries based on overall need, add all the necessary information in order not to repeat the same thing 50 times for nothing


there are hundreds of similar error from around the script
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
Be my guest to start optimize.

Edited that fix :) thanks for info

Maybe you can fix double troops :)
 
Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
no thank you for the time I work an adapted version 4.2 / 4.4 or I recode almost all function.

version uses the latest technology php (php 5.5 at least), all queries are rewritten every class are reviewed and optimized over mysql_ * all through with PDO Prepared request.
there are more than $ _GET, $ _POST, etc in the pages one goes through verification c ++ php itself with "filter_input (INPUT_GET, 'map', FILTER_VALIDATE_BOOLEAN);" example.
using array_column () to treat table easily and without having to make heavy processing or redo the query for nothing

all templates are true templates (no inside php), such as the page title = "{HEAD.title}" similar to the sintaxe phpbb3

all pages are object oriented (similar dboor)

I was about 5-7 query on average per page, and I have not done the user session cache system, which will remove it 2 query page.

not yet public, but its come
 
Skilled Illusionist
Joined
Mar 9, 2011
Messages
391
Reaction score
120
And you will release that version ? :) Let me see the test server
 
Junior Spellweaver
Joined
Nov 16, 2011
Messages
176
Reaction score
59
yes I will share :), but it's not for now because there still have a lot of work.
for the manager and the nature of Natar village, I did not create all the necessary parameter for the moment it does make it restored if we do not attack them for two hours, but he / attack and plunder yet not taking new village inactive player (bot on the server as on the real travian)

I generates the map and too messy, I must revise my algorithm for calculating spacing mountain, forest, lake and other (4.4 currently on travian map)

I also have some concern about the attacks are often too similar, will go from rand () to mt_rand which has a better random choice.

and I'm going to see for how many times in the management of buildings, because I want to be able to add / remove buildings in games without re going through the code.

the same for the tribe management will be a different hair and what travian (X, Z) and I want to add another tribe if I want

short of the potential to create another game, but always with the same system
 
Newbie Spellweaver
Joined
Apr 21, 2015
Messages
6
Reaction score
0
Hi thank you for release, there is the possibility to give automatic a certain number of gold to player that subscribe? And set to 0:00:00 duration of production troops?
 
Newbie Spellweaver
Joined
Sep 22, 2011
Messages
21
Reaction score
2
Hello, i have very strong problem..

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /homepages/31/d573598747/htdocs/s1/GameEngine/Protection.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /homepages/31/d573598747/htdocs/s1/GameEngine/Protection.php:24) in /homepages/31/d573598747/htdocs/s1/install/include/multihunter.php on line 29

i can't build oasis, installation has been get to step on Multihunter and crash, please help!
(i have 1and1 host linux server)
 
Initiate Mage
Joined
Jun 23, 2015
Messages
3
Reaction score
0
Hi. Thanks for work. I have hosting resources. I can give you access to full hosting features permently to continue hard work to this project.
There will be included everything you need. With cpanel, ftp, mail servers.etc. host more then 1 domain.. hdd space 10gb or more.;)
Just text me private message and i will create it for you. I will support it who is doing this hard work. Ty.
 
Initiate Mage
Joined
Jul 4, 2015
Messages
2
Reaction score
0
Hello, good night to every one. I´m having some dificults with this version. My map doesn´t work and the mission chefe is always sending a pop up. Someone can help me please? Thanks a lot.

Best Regards.
 
Initiate Mage
Joined
Jul 4, 2015
Messages
2
Reaction score
0
Good Night

Some one can help please with this errors:

[07-Jul-2015 21:34:39 Europe/Lisbon] PHP Parse error: syntax error, unexpected ')' in /home/travmani/public_html/GameEngine/config.php on line 59
[07-Jul-2015 21:35:59 Europe/Lisbon] PHP Parse error: syntax error, unexpected ')' in /home/travmani/public_html/GameEngine/config.php on line 83
[07-Jul-2015 21:36:39 Europe/Lisbon] PHP Parse error: syntax error, unexpected ')' in /home/travmani/public_html/GameEngine/config.php on line 97

Thanks.
 
Newbie Spellweaver
Joined
Feb 5, 2014
Messages
7
Reaction score
0
Hello,

How can i change Duration of training troops? To fast training? for more then 1 unit per 1sec

Test server with this script is here:
Thanks :D
 
Last edited:
Newbie Spellweaver
Joined
Oct 29, 2015
Messages
22
Reaction score
0
Hello, i need help please.
In the aliance chat, there goes no ä,ö,ü, Ä, Ö, Ü,ß
In German, the umlauts are used very often. When using chatting an umlaut (ä, ö, ü), then only a completely blank line is displayed.
Is it possible to modify chat.php to keep it going?
I would be very grateful for the help.
 
Custom Title Activated
Loyal Member
Joined
Jan 10, 2009
Messages
1,688
Reaction score
395
Exactly. If there is one, the standard is UTF-8. Germans usually use ISO/IEC 8859-15 or ISO 8859-1, however the UTF-8 should be able to handle it.

PHP code:
Code:
[COLOR=#000000]<?[/COLOR][COLOR=#000000]php header[/COLOR][COLOR=#000000]([/COLOR][COLOR=#800000]'Content-Type: text/html; charset=utf-8'[/COLOR][COLOR=#000000]);[/COLOR][COLOR=#000000]?>[/COLOR]
HTML code:
Code:
[COLOR=#800000]<META [/COLOR][COLOR=#FF0000]HTTP-EQUIV[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"content-type" [/COLOR][COLOR=#FF0000]CONTENT[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"text/html; charset=utf-8"[/COLOR][COLOR=#800000]>[/COLOR]

Hope it helps.



If the UTF-8 encoding does not work (which I highly doubt) use this one

Code:
[COLOR=#800000]<meta[/COLOR][COLOR=#FF0000] http-equiv[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"Content-Type"[/COLOR][COLOR=#FF0000] content[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"text/html; charset=ISO-8859-1"[/COLOR][COLOR=#800000]/>[/COLOR]
 
Last edited:
Divine Celestial
Joined
Feb 25, 2013
Messages
808
Reaction score
343
Exactly. If there is one, the standard is UTF-8. Germans usually use ISO/IEC 8859-15 or ISO 8859-1, however the UTF-8 should be able to handle it.

PHP code:
Code:
[COLOR=#000000]<?[/COLOR][COLOR=#000000]php header[/COLOR][COLOR=#000000]([/COLOR][COLOR=#800000]'Content-Type: text/html; charset=utf-8'[/COLOR][COLOR=#000000]);[/COLOR][COLOR=#000000]?>[/COLOR]
HTML code:
Code:
[COLOR=#800000]<META [/COLOR][COLOR=#FF0000]HTTP-EQUIV[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"content-type" [/COLOR][COLOR=#FF0000]CONTENT[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"text/html; charset=utf-8"[/COLOR][COLOR=#800000]>[/COLOR]

Hope it helps.



If the UTF-8 encoding does not work (which I highly doubt) use this one

Code:
[COLOR=#800000]<meta[/COLOR][COLOR=#FF0000] http-equiv[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"Content-Type"[/COLOR][COLOR=#FF0000] content[/COLOR][COLOR=#000000]=[/COLOR][COLOR=#0000FF]"text/html; charset=ISO-8859-1"[/COLOR][COLOR=#800000]/>[/COLOR]
Nothing to do with this code.

It's because the database is NOT in UTF-8.
 
Newbie Spellweaver
Joined
Oct 29, 2015
Messages
22
Reaction score
0
I have made the following changes:

/GameEngine/chat.php

........
#################################################################################

header('Content-Type: text/html; charset=utf-8');

if (!isset($SAJAX_INCLUDED)) {

$GLOBALS['sajax_version'] = '0.12';
$GLOBALS['sajax_debug_mode'] = 0;
$GLOBALS['sajax_export_list'] = array();
$GLOBALS['sajax_request_type'] = 'GET';
$GLOBALS['sajax_remote_uri'] = '';
$GLOBALS['sajax_failure_redirect'] = '';


function sajax_init() {
}

function sajax_get_my_uri() {
return $_SERVER["REQUEST_URI"];
}
$sajax_remote_uri = sajax_get_my_uri();


function sajax_get_js_repr($value) {
$type = gettype($value); .........

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


/Templates/Alliance/chat.tpl

.....
document.form1.msg.value="";
}

</script>
<?php header('Content-Type: text/html; charset=utf-8');?>

<body onload="start_it()">
<form name="form1" onSubmit="send_data()">
<div id="TitleName" class="chatHeader">Ally-Chat</div>
<div id="chatContainer" style="position:relative; top:0; right:0; height: 220px; width: 500px; overflow: hidden; background-color: #FFF ; border: 1px solid #C0C0C0 ;">....

My Database for chat is now utf8_bin


But unfortunately it does not.
When I look in the database, then the complete line is where an umlaut in it was empty. If an umlaut (ä, ö, ü) was present at the entry in the line, duck is only a blank line in the database.
Has please anyone a tip for me?
Thank you
 
Divine Celestial
Joined
Feb 25, 2013
Messages
808
Reaction score
343
You can't set headers after header.
 
Back
Top