http://peyvandha.ir/http://1.pandora...a3c5544feb.jpg
problem fixed!
if anybody had this problem too,
go to GameEngine/Building.php and GameEngine/Market.php,delete space in end of both files.:love:
Printable View
http://peyvandha.ir/http://1.pandora...a3c5544feb.jpg
problem fixed!
if anybody had this problem too,
go to GameEngine/Building.php and GameEngine/Market.php,delete space in end of both files.:love:
Small bug, when I send my settlers to found a new village along the way do not appear in the rally point, but perfectly vile village was founded.
CENTER]Fix?[
Little fix:[/CENTER]
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/multiserv/users/677943/projects/1651442/www/GameEngine/Automation.php:116) in /data/multiserv/users/677943/projects/1651442/www/GameEngine/Session.php on line 53
I have the bug fixed
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename Automation.php ##
## Developed by: Dzoki & Dixie Reworked buy Advocaite ##
## Thanks to: Akakori & Elmar & G3n3s!s & TopErwin & TTMMTT ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
ob_start(); <----- Add this...
class Automation {
private $bountyresarray = array();
private $bountyinfoarray = array();
private $bountyproduction = array();
private $bountyocounter = array();
private $bountyunitall = array();
private $bountypop;
sorry for my bad english.
What does ob_start(); do for it? The only place that has ever been used before is in Chat.php in some kind of javascript/ajax stuff.
Does the problem come back if you take that little fix back out?
I ask because it seems very possible, even likely, that the real problem was one of the whitespace glitches, that maybe you accidentally happened to fix along the way while looking for the problem?
How did ob_start() ever even enter your mind? What is it? What is it meant to do? How does it work? What does it have to do with whether the queue processing will notice you have settlers on the move? Etc...
(Why are settlers the only moving things that need this? Everything else has been moving just fine without that...)
-MarkM-
http://1.pandora.host22.com/images/8087d90fe008.jpg
what`s it?!!!
----------------
I reset my quessts counter to check the quests system. They do not pop up at me like they did way back when. I am pretty sure that the first few times the taskmaster even used the other image of him, with an aura kind of thing around him, momentarily, as well as the expanding wirefram animation, to really draw your attention and try to make you really catch on that he is where the quest magically popped up at you from.
Now though he just stands there dumbly, hoping someday your mouse cursor might happen to pass over him at the right speed or slowness to cause a tool tip to appear and that you might even actually read such a tool tip and wonder what task means.
That seems an awful lot to ask of a raw recruit/newbie. The popping up with the glow thing to draw attention specifically to the image of the taskmsater on the first few quests seemed very important user-interface aspect of actually getting people to wonder whether the image might turn out to be clickable.
-MarkM-
---------- Post added at 09:30 AM ---------- Previous post was at 09:25 AM ----------
One of those lines is the end of a forum topic mysql call, so seems totally random glitch, maybe more whitespace somewhere or something? Or your line numbers in that file are out of synch with mine. Look at those lines see what lines just before hat line were up to when they hit that line and complained...
Or look for more weird whitespace...
-MarkM-
Advocaite i need old yours release: RageZone REV Travian
Version: 5.0.5 RageZone REV
AGE ZONE, TravianX, Dzoki & Dixie & Donnchadh & Advocaite.
Plase send mee link
knotwork ufff you sure post a lot of text man, ok, I start from page 31 fixing all you posted that I can fix, I'am learning PHP so It may take some time. Bout the quest texts, I'am doing the localization of all the text in the game, sorry bout the mess you saw, I started moving all the quest text to the lang files but had to stop because of RL and then advo released the repo and I had to start all over again, that's why you see the quest not completed, the quests texts go to template/ajax/quest_core.tpl so no problem localising this, although I haven't replaced quest_core.tpl yet in the repo, I intent to move all text to lang, and then replace quest_core.tpl. Bout the licence, I dont know how to licence software, but I think we need firth to get rid of any copyrighted image left in the repo, I think advo posted something like that a while ago, If anyone can make images to substitute the ones in our repo, please do post them somewhere in the forum. Maybe we can use another's game images, I saw yesterday a game named 0AD (cero AD), they have licenced their images and sound as CC-BY-SA so I think there is no problem in using them. Afther that if you or anyone know how to license software to a GNU project I think it wouldn't be a bad think, right?
What do you think bout this advo, donn?
i deleted all whitespace,but still i have thi problem. any body can help?!
http://1.pandora.host22.com/images/8087d90fe008.jpg
My old version of Templates/Ranking/overview.tpl worked when I clicked on the shown alliance-name, this new-fangled one though tries to pass the name instead of the id so dies a horrible death.
In my old working one there was an if:
the new, broken version botches the job, basing the if conditional on name instead of id might well be fine for all I know, but passing the name instead of the id in the URL is doomed to failure. SO this is the if that needs fixing:Code:if($ranking[$i]['alliance'] != 0) {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['alliance']."\">".$ranking[$i]['aname']."</a>";
}
-MarkM-Code:if($ranking[$i]['aname'] != "") {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['aname']."\">".$ranking[$i]['aname'].</a>";
}
---------------
It turns out that is also points us toward file that used to let anyone not in a real guild spy on who (also not in any real guild) is online simply by visiting allianz.php?aid=0
That happens near then bottom of the Templates/Alliance/overview.tpl , due to this:
Interestingly it looks like someone did, like me, try to make clearer what the coloured dots actually signify, but, they did not fix the privacy problem of leaving the online status of all users not in a real guild viewable by any random user not a member of any real guild by directing their browser to the url with aid=0 in it.Code:if($aid == $session->alliance){
if ((time()-600) < $member['timestamp']){ // 0 Min - 10 Min
echo " <td class=on><img class=online1 src=img/x.gif title='Now online' alt='Now online' /></td>";
}elseif ((time()-86400) < $member['timestamp'] && (time()-600) > $member['timestamp']){ // 10 Min - 1 Days
echo " <td class=on><img class=online2 src=img/x.gif title='Offline' alt='Offline' /></td>";
}elseif ((time()-259200) < $member['timestamp'] && (time()-86400) > $member['timestamp']){ // 1-3 Days
echo " <td class=on><img class=online3 src=img/x.gif title='Last 3 days' alt='Last 3 days' /></td>";
}elseif ((time()-604800) < $member['timestamp'] && (time()-259200) > $member['timestamp']){
echo " <td class=on><img class=online4 src=img/x.gif title='Last 7 days' alt='Last 7 days' /></td>";
}else{
echo " <td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
}
}
I am guessing they went in to find out what the colours meant and didn't notice the privacy breach. I on the other hand had gone in to fix the privacy breach and stayed around to figure out what the colours signified.
My fix had looked like this:
Code:if(($aid == $session->alliance) && (($session->alliance != 0)||($session->access >= MODERATOR))){
if ((time()-600) < $member['timestamp']){ // 0 Min - 10 Min
echo " <td class=on><img class=online1 src=img/x.gif title=\"now online\" alt=\"now online\" /></td>";
}elseif ((time()-86400) < $member['timestamp'] && (time()-600) > $member['timestamp']){ // 10 Min - 1 Days
echo " <td class=on><img class=online2 src=img/x.gif title=\"not online\" alt=\"not online\" /></td>";
}elseif ((time()-259200) < $member['timestamp'] && (time()-86400) > $member['timestamp']){ // 1-3 Days
echo " <td class=on><img class=online3 src=img/x.gif title=\"1-2 days off\" alt=\"1-2 days off\" /></td>";
}elseif ((time()-604800) < $member['timestamp'] && (time()-259200) > $member['timestamp']){
echo " <td class=on><img class=online4 src=img/x.gif title=\"3-6 days off\" alt=\"3-6 days off\" /></td>";
}else{
echo " <td class=on><img class=online5 src=img/x.gif title=\"Week+ off\" alt=\"Week+ off\" /></td>";
}
}
-MarkM-
parniaznet are you using the last version in the repo? those white-spaces you posted in post no. 501 was fixed in the repo a while ago. Also I don't have that problem when clicking oasis in the repo.
knotwork I tested the quest and it worked fine. I had that problem a while ago and it was a white space somewhere don't remember where.
Donn already fixed the time zone problem. :)
Ok, I think the problem with the quest was due to uncryp.js, pls update your repo and try again.
oases don´t work.
-.- pls read the posts before. There is a missing table in the databease. But oasis don´t work bugfree even so.
So just wait for oases and hero to be programmed.
and pls don´t spam here. Most of your bugs were allready fixxed or discussed even in this thread.
It turns out that my Templates/Alliance/overview.tpl privacy-fix doesn't actually work, I wonder if it ever really did or if the changes around MODERATOR versus MULTIHUNTER are somehow confounding it...
-MarkM-
EDIT: My bad, I didn''t notice all it removes is the colpoured dot, you still get to see the list of who is not in a real guild. I fixed only the main privacy concern not the whole lets see who is still not in a guild aspect.
-MarkM-
---------- Post added at 12:08 PM ---------- Previous post was at 11:43 AM ----------
So... to go along with pre-populating the users table, what say we also pre-populate the alliances table?
Notice this default alliancce can have more members than other alliances so we increase the range of values of the 'max' field to accomodate it.
So in install/data/sql.sql we could change the alidata table section to something like this:
Code:--
-- Table structure for table `%PREFIX%alidata`
--
CREATE TABLE IF NOT EXISTS `%PREFIX%alidata` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`tag` varchar(8) NOT NULL,
`leader` int(10) unsigned NOT NULL,
`coor` int(10) unsigned NOT NULL,
`advisor` int(10) unsigned NOT NULL,
`recruiter` int(10) unsigned NOT NULL,
`notice` text NOT NULL,
`desc` text NOT NULL,
`max` int(10) unsigned NOT NULL,
`ap` bigint(255) unsigned NOT NULL DEFAULT '0',
`dp` bigint(255) unsigned NOT NULL DEFAULT '0',
`Rc` bigint(255) unsigned NOT NULL DEFAULT '0',
`RR` bigint(255) unsigned NOT NULL DEFAULT '0',
`Aap` bigint(255) unsigned NOT NULL DEFAULT '0',
`Adp` bigint(255) unsigned NOT NULL DEFAULT '0',
`clp` bigint(255) unsigned NOT NULL DEFAULT '0',
`oldrank` bigint(255) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `%PREFIX%alidata`
--
INSERT INTO `%PREFIX%alidata` (`id`, `name`, `tag`, `leader`, `coor`, `advisor`, `recruiter`, `notice`, `desc`, `max`)
VALUES (0, 'Support', 'Support', 0, 0, 0, 0, 'Welcome to the Support Alliance :)',
'Everyone who has not joined some other alliance is a member of this one by default.',9999999999);
-- --------------------------------------------------------
Which reminds me, do we really need to auto increment anything by some integer larger than one? I saw something being incremented in a larger increment but didn't follow suit myself as I sawe no purpose to it. It wasn't even the users table, which I can understand a marketer desiring to illusionarily inflate...
-MarkM-
---------- Post added at 12:35 PM ---------- Previous post was at 12:08 PM ----------
The subject/title of the notices you receive when you send or receive reinforcements are poor grammar. This should be a language string for translating really anyway but to make my inbox not seem so ungrammatical I favour changing a couple of lines of GameEngine/Automation.php, the two that start like
The $ at end of line is what nano (my editor) does when I try to grab into mouse buffer something that is off the right edge of the screen. You only need to see the first part anyway, see I put in "reinforces" instead of "reinforcement".Code:$database->addNotice($from['owner'],8,''.addslashes($from['name']).' reinforces '.addslashes($to['name']).'',$data_fail,$AttackArriv$
$database->addNotice($to['owner'],8,''.addslashes($from['name']).' reinforces '.addslashes($to['name']).'',$data_fail,$AttackArrival$
That lets me receive emails titled "Otherguysvillage reiforces Yourvillage" instead of "Otherguysvillage reinforcement Yourvillage" and "Yourvillage reinforces Othervillage" instead of "Yourvillage reinforcement Otherguysvillage".
"reinforced" would work instead of "reinforces" if you insist on viewing your inbox as past-tense instead of a timeless archive of knowledge. :)
-MarkM-
Small bug, when I send my settlers to found a new village along the way do not appear in the rally point, but perfectly vile village was founded.
Fix?
Little fix:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/multiserv/users/677943/projects/1651442/www/GameEngine/Automation.php:116) in /data/multiserv/users/677943/projects/1651442/www/GameEngine/Session.php on line 53
I have the bug fixed
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename Automation.php ##
## Developed by: Dzoki & Dixie Reworked buy Advocaite ##
## Thanks to: Akakori & Elmar & G3n3s!s & TopErwin & TTMMTT ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
ob_start(); <----- Add this...
class Automation {
private $bountyresarray = array();
private $bountyinfoarray = array();
private $bountyproduction = array();
private $bountyocounter = array();
private $bountyunitall = array();
private $bountypop;
sorry for my bad english.
function headers (): does not allow to be present prior to his call any type of output, if this happens the function headers () to be an error.
Using the ob_start () can create a buffer memory and all output will be diverted to the buffer and sent to the client only after the execution of the script.
this is a way to solve a problem like so many faster, without having to manage all of the code. :)
for my little bug:
When I send the settlers to found a new village, do not appear in the rally point while they are in motion. Do not see the movement and arrival time.
Is there a way to solve the problem?
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/web/virtuals/11115/virtual/www/s1/GameEngine/Automation.php:1) in /data/web/virtuals/11115/virtual/www/s1/GameEngine/Session.php on line 53
Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/11115/virtual/www/s1/GameEngine/Automation.php:1) in /data/web/virtuals/11115/virtual/www/s1/GameEngine/Session.php on line 195
Ahh, interesting. So there is indeed method in your apparent madness. :)
Could trailing whitespace betwen pieces of php included from files end up making the server think some output is called for, thus blowing up the eventual call to the headers routine that is used to send the browser someplace else after all the computing of where else to send it has been done?
Maybe putting ob_start(); in all the toplevel files that include the lower level files would get rid of the whitespace problems. But at what cost? It might be overkill compared to "simply" (oh if only it was) not pouring out whitespace between chuncks of php. ?
Pretty much everything that ever eventually managed to get set into movement from the rallying point or even the market went through a period of development in which although it was moving the displays about it doing so were not picking up on it. Settlers are a recent innovation, they might just be in periond where we have them moving but have not yet started reporting the movement.
You give us a very interesting clue though, as it sounds like we are maybe trying to report the movement but are trying to output the display of it before the headers stuff has been done instead of putting the display into wherever the headers thing will actually end up deciding to send the browser to next.
Presumably it is one of the _walking or movement type includes in Templates/a2b that ought to be doing the displaying of hings in motion, I believe that is where the troops of each tibe get their in motion displays for the rallying point. Maybe the in motion template for settlers isn't there yet or isn't quite up to scratch.
Very interesting little thing though that ob_start, interesting idea but maybe a bandaid except in problems that truly requirement. Like a goto. Sure one can use a goto, but some approaches to programming prefer to deprecate using them. And they maybe don't even cost as much system resources as this ob_start thing might, they are deprecated as too easy a solution too likely to lure people intpo making mess-of-spaghetti code.
(think about it from a debugging perspective. "What, we aren't actually outputting? Oh great, what file where decided to do that to us? ;))
(The frickin code is bad enough already if it has you thinking of using ob_start() to avoid unravelling it, maybe? ;))
I expect it is just like all the other units that once upon a time weren't shown but were in the movement table waiting for procThattypeofthing() to process their arrival at destination time.''Been through it will all the other units and didn't need ob_start() to eventually get them visible-in-motion.
----------------------------------------------
Now let me see if I recall what brought me back here to post. Hmmm...
Oh yes, Templates/Plus/7.tpl
Seeing every type of building gone through one by one each with a separate call to MySQL is scary, not only for the rapid(er) reaching of number of requests per span of time limits of hosting companies but also because enumerating eery type of thing other than the two you don't want to mention is fraught with maintenance issues. You forgot to mention the new things that will exist next year! Not to mention the ones that won't exist until the year after that!
If you mean "all buildings except the residence and the palace" it is a crying shame that the idiots who developed MySQL never thought allow you to say "and field != blah" instead of enumerating all possible "field == blah" that every might be.
Maybe even a more recent version of MySQL than the one whoever wrote that file was stuck with might have added such a functionality? I dunno, I don't actually "know" MySQL but some day I will spend some time googling it or just actually trying usng not qual to instead of equal to and see if MySQL chokes on it.
But that is just sheer shock at what I saw in the file.
What brought me there to see it again / be reminded of it was, hmm... Oh yea, it only enumerates all buildingss it knows of other than the palace and residence, yet the help pages / ads about what you are paying for claim your researches too, not just your buildings, will be completed.
Anyone want to ennumerate all possible researches or can we just tell MySQL all research where village is that village, no excections to cause us to have to learn enough MySQl to discover whether not qual to would actually work for any exceptions we might find necessary or desireable?
Anyone even know offhand what "all reasearch" would include? I am guessing maybe the rdata table, for example? Any others that come to mind?
-MarkM- (They cheated me! I paid for my scouts dammnit! ;))
My GameEngine:
Attachment 92476
please see
I suggest you to play on private travian servers, not to host them, i see no reason, why people like you should have their own server you suck in every possible way to debug and support your players. No offense.
Hey I am not even convinced the enumerator of all buildings actually did leave out palace and residence, I don't see two missing numbers amidst the "type"s enumerated. But maybe palace and residence are ouside the range of numbers 1 through 70, not sure offhand.
-MarkM- (I am almost positive MySQL can do less than and greater than though...)
download it from here:
http://www.nayabprojects.com/GameEngine.zip
also you will have problem with Oasis
Building 27 (Treasury) is missing from GameEngine/Data/buidata.php
-MarkM-
aaaah
a big buge:
http://up1.iranblog.com/images/6jys9mivr9x05i9acjt4.jpg
player War & bsilent never didn`t attack to other player,unlike they was under attack from player Theodore!!!
and other buge:
http://up1.iranblog.com/images/2xh354yspj7dmsr0wies.jpg
please save me!:(:
Yeah about those (unread) messages, i hope its going to be done soon.:thumb:
other problem when i click on Alliance name:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/nayabpro/domains/nayabprojects.com/public_html/travianx1/GameEngine/Database/db_MYSQL.php on line 749
Warning: Invalid argument supplied for foreach() in /home/nayabpro/domains/nayabprojects.com/public_html/travianx1/Templates/Alliance/overview.tpl on line 12
Warning: Invalid argument supplied for foreach() in /home/nayabpro/domains/nayabprojects.com/public_html/travianx1/Templates/Alliance/overview.tpl on line 61
Warning: Invalid argument supplied for foreach() in /home/nayabpro/domains/nayabprojects.com/public_html/travianx1/Templates/Alliance/overview.tpl on line 112
Tanx All
http://up8.iranblog.com/images/0pk4aqm6r3pad4dvf774.jpg
:(::(::(::(::(:
i had it,its runing on my test server:
TravianX
I have a problem making units on my server.. Sometimes it takes ages to make 1 unit.. If i forexample want to make 1 Teutonic Knight, it takes 0:00:02 seconds to make 1. but when i try make it, it says : The next unit will be finished in 0:00:04, and when it reach 0:00:00 it just start over again, from 0:00:04. So it wont make the unit. How can i fix that? and else, how can i do, so it trains the units in 1 sec?
Please help. Thanks
other problem for Hero's Mansion :
/home/nayabpro/domains/nayabprojects.com/public_html/travianx1/Templates/Build/37.tpl on line 351
an other,attack is freeze at 00:00 (actually at land time like 3:12:27)
this erore engross my cpu server!! they Disabled my server!
http://1.pandora.net84.net/images/fd29ee0cb4b9.jpg
Are we married to insisting that scores such as the robbery score be unsigned (aka never a negative score)?
Think for example of two players both of whom are terrible robbers, and the player whose sock-puppet or fan or friend etc (collaborator?) they are.
Fans A and B don't mind staying close to zero points as long as star C, who they idolise, gains more points than they lose, because then by minimax and prisoner's dilemma type game-theories they as a community co-operating come out ahead in total compared to a similar sized, similarly closed community of "defaulters" (the usual prisoner's-dilemma term for non-cooperators).
No matter how many points C gains robbing A and B when A and B are at zero, A and B lose no points on the deal.
If points were a marketable commodity, the A+B+C team would thus be obtaining that commodity out of no-where (discounting actual resources stolen, which can afterall be shipped back to A and B by C ready to be "stolen" again.
*If* we were not married to insisting on unsigned, *then* maybe whatever is thinking for example that Theodore's victims negative gain of 38128, which though I haven't done the arithmetic might let us guess have resulted in a score of negative 38128 for the victim, might have been content to record negative 38128 as the victim's score instead of ignoring the sign-bit (or twos complementarity, or however bits represent integers on the platform used in the case) and pretending that sequence of bits represented a large positive integer not a much smaller negative integer.
I am Wild-Ass-Guessing that MySQL would convert a negative integer into a zero when storing it as an unsigned value *if* it actually *knew* what it was told to store *was* a sign-and-negative integer.
So... who lied to MySQL about the "type" of the integer to be stored OR who didn't take signed vs unsigned into account during arithmetic they did prior to handing MySQL a large positive unsigned integer to store instead of handing it a small negative signed integer to do do a min(0,inpout) on in its own defense of its database field type integrity?
Do we *want* players A,B and C to be able to pull points of score out of (ahem lets not speculate what orifice etc) ?
Or do we prefer to potentially "fill two orifices with one plug" by telling MySQL those scores are in fact *unsigned* values, which might well result in whatever is messing up the attempt to do arithmetic with a mix of signed and unsigned values doing its sums right and coming up with small negative score instead of a large positive one for the victims and, in case any accountants might be paying attention, incidentally also keep zero balance dual entry accounting from throwing up its hands at the miraculous way the robbers invent points out of nothing?
-MarkM-
---------- Post added at 01:36 AM ---------- Previous post was at 01:29 AM ----------
NOTE that zero balance dual entry accounting would let us check the integrity of the entire column "simply by checking it adds up to zero".
Without it, we cannot really have any more than some Wild Ass Guesses as to how many points the robber community potenially can pull out of ahem wherever they pull them out of so cannot check their integrity, which as robbers might be a lovely state of affairs permitting them to not even bother merely robbing if simply-or-otherwise exploiting bugs turns out to be more profitable than their... other sources of points.
-MarkM-
---------- Post added at 01:55 AM ---------- Previous post was at 01:36 AM ----------
The screenshot posted by parniaznet might be obscuring something by having had too much already happen; I have had three robbers rob three victims for three different amounts and the first time it happened, for 2400 points, I zeroed the victim's score because I perhaps stupidly / naively imagined someone might actually want database columns whose integrity cannot be simply checked.
So I have three robbers with positive scores and two victims with what look like some kind of integer-overflow or mis-interpretation of a negative value's bit-pattern as a bit-pattern intended to represent a positive value.
Thing is though, both victims have the same huge number of points despite being victims of robbers who gained from them two different numbers of points.
Specifically, the three robbers gained 2400 (with victcim's score zeroed manually by me afterward), 300 and 1900 points. The two victims whose points I have not messed with yet due to not being convinced the community will agree that allowing negative scores in the database is the way to go, each have 4294967295 points.
I tihnk we have two problems at once, of which solving the first (refusing to believe a score can be intended to be negative) might well fix the second (truncating a huge positive integer? How else but truncation, on positive or negative or even "cannot go below zero" side, can they end up both the same like this?).
Right now I am not too late to salvage the integrity of my data by correcting the scores of the three victims to -1900, -2400 and -3000.
Is anyone going to insist the data should not have integrity?
Bear in mind we might not know what hoops the corporation running the main commercial Travian type game jumps through to check its database by means other than the simple one that ought to suffice for us.
(If we really want naive observers to imagine scores cannot be negative we could make all displays that show points only show them if the are positive, displaying zero instead of the actual score in cases where the actual score is in the database actually negative.)
-MarkM-
I am not convinced that it calls for new code, unless someone wants to censor the values shown to players to try to fool the players into thinking scores cannot be negative.
I am fixing my own install of it by removing the "unsigned" characteristic from the score fields in the database (in this specific case that means the field RR in the %PREFIX%users table but in general all such or similar scores/points probably should not be unsigned since making them unsigned obscures corruption of the data by removing our ability to check that all such or similar columns each add up to zero. (Every point gained by someone is a point lost by someone else.)) and correcting the overflowed values to their correct negative value instead of (losing information and the ability to check integrity so simply by) zeroing them.
-MarkM-
---------- Post added at 03:20 AM ---------- Previous post was at 03:13 AM ----------
To clarify: the only new code my solution so far seems to call for would only be useful to people starting up a new server from scratch, and all it would consist of would be to have the install/data/sql.sql file not set such fields as being unsigned.
Since only qualified programmer/sysadmins should be attempting to run servers at the current stage of development anyone who already started one can correct the contents of their existing database as they see fit in accordance with the specifics of their own situation (number of users aka alpha-testers affected, how bad a restart would be in terms of driving away such alpha-testers (hopefully to developer-run servers so the developers can have the testing happen on their own servers instead of receiving secondhand reports from servers they have no direct access on or, worse, third-hand reports from users complaining about problems on servers run by non-developers and so on) using their own sysadmin and programmer talent / expertise / staff.
-MarkM-
Problem in new upadete.
Profile,. and massege ,.. http://nakokos.eu/problem.jpg
Dzoki before you said that you have already localised almost all the site, are you going to push that, cause I'am half way the buildings and if you have already done that I will turn my attention to code other things.
I have a problem , try the search but still the same : with the latest version , when I click on the submit attack button on the rally point my troops magically disappear.
I need your help.
Have you downloaded the latest version from git hub?
https://github.com/advocaite/Travianx
If I'm using the "old" version and make an "upgrade", I can use the same database or i loose all my players data ?.
:w00t:Parse error: syntax error, unexpected '}' in /data/multiserv/users/662913/projects/1655093/www/Templates/Alliance/overview.tpl on line 117
problem alliance off help me pls....
and problem-hero Unknown column 'vid' in 'where clause'
As I said before but advo didn't understand me, we must use a revision number in every commit so users can tell us what revision are there using and we can tell them in what revision it is fixed.
it should be like:
[r124] rearranged the table
[r123] Fixed grain consumition
[r122] whatever
it also gives a sense of growth of the project.
yeah i try sometime i forget anyways made a update so rally dont need ridiculus amount of files for everything now its better
ahh the good old index of t3 i like it:) just need to put the serverLogin and serverRegister thing. thanks.
if you want I can rebase the project and add the tags at the beginning of each commit.
Please are we going to start using arrays to store the languages? I had done some work towards unifying all text in the (lang).php in constants format.
If we are going to start using variables, then we need to change all text to this format and all the work I have done is useless.
BTW I have done much more that what is uploaded to the repo, I just wanted to finish firth to upload it complete and not half way like the way it is now.
nah its ok typhoon we will just keep soldiering on not need to rebase it
@parn no oases not added yet and we dont remove whitespace cause we dont test on live servers so dont need to
When i try to attack someone on my server, i get this message:
Fatal error: Call to a member function getUpkeep() on a non-object in /data/multiserv/users/681084/projects/1659152/www/GameEngine/Automation.php on line 1301
Please help me!
---------- Post added at 11:17 PM ---------- Previous post was at 10:56 PM ----------
Never mind. Fixed.
Daaayumm nice release man, thanks so much :D
Robbers of the week
No. Player Resources
1. PiallA NooB 4294967295
2. maestro 4294967295
3. admin 4294966140
4. Dino 4294962495
5. yKabkar 4294961921
6. pimytje 4294959375
How can i fix this bug?
---------- Post added 23-09-11 at 12:23 AM ---------- Previous post was 22-09-11 at 11:36 PM ----------
Please help me someone.
Make sure the database does not have those fields set as unsigned.
It seems possibly that MySQL is trying to interpret values as unsigned and thus when told someone's score went below zero it it figures obviously that cannot be correct, the value must be an unsigned not a signed, so it interprets as unsigned a normal arithmetic result (normally arithmetic in php is signed...)
If it still happens once MySQL is aware that the values can have signs, then we will know it must be the fault of something other than MySQL.
-MarkM-
Also there is a picture here if you want to see
Attachment 92520
yeah need to do exactly that its due to me adding the code to make sure points where taken when res stolen not just one sided and only gain
i will make change in sql file for install so future revs dont have this issue
i have already gits a fix for the above issue and robber fix
---------- Post added at 11:14 PM ---------- Previous post was at 11:13 PM ----------
you only need to download the gameengine/automation.php from git hub and replace and you wont get that error no more
Thanks!
Good evening, everyone can tell me I pulled this version https://github.com/advocaite/Travianx admin but when I no longer appears to put natares and ww can help it is already a confusion with so many versions
I await feedback required:?::?::?:
git hub index problem
Warning: include(GameEngine/lang/en.php) [function.include]: failed to open stream: No such file or directory in /data/multiserv/users/669004/projects/1659023/www/index.php on line 18
Warning: include() [function.include]: Failed opening 'GameEngine/lang/en.php' for inclusion (include_path='.:/usr/lib/php') in /data/multiserv/users/669004/projects/1659023/www/index.php on line 18
alliance medals not work
Hi, im just wondering, when is the diplomacy village reports and protection will be fixed?
Cheers.
More especific ? Im such a newbye with travian servers :DQuote:
change 'GameEngine/lang/en.php' --> 'GameEngine/Lang/en.php' in 'index.php'
Fixed , sory for the post i dont note the "L" :D thanks.
All the coders are doing a great job !!!
The whole "really pretty index file" thing has lost me more hours than I can count. At some point parts of it, like even almost all the contents of the index.php_files directory even, vanished. I had to find them in one of my backup directories and re-commit them.
Also the moregames.php and other templates for the popcon popups vanished. I had to go find them too and make a Templates/popcon directory for all popcon popups to live in.
Finally what I have done is made index.php be a decision-maker that tries to decide which fancy graphical look-and-feel from Templates/index the settings in GameEngine/config.php are trying to tell it to use.
I was about to go look up how to check whether the decider file is itself the file set as homepage in the config, to prevent a loop from happening when it sends the brower off to whatever URL the config file has set for use as homepage.
I think though there is a confusion between the idea of a landing page, where people who arrive at the site land, which usually decides what to show them based on which search engine or traffic sharing links system etc sent the visitor, and corporate/entity homepage which each server would have a link to so the players on each of the servers can all get to the central homepage that is the home of the entity running all the servers.
I thus have added config fields to help unravel all the possible looks and feels of the landing and home etc pages so that index.php can figure out which one to use.
For corporate home I have LOGO_LINKS_TO_URL which is where the game or company logo is a link to, for different styles of fancy animations etc on front page I have Templates/index from which they can be included based on the MILIEU, GAME_NAME or even SERVER_NAME so many different looks and feels can be accommodated.
As well as being about to head off looking whether __FILE__ might be what I need to prevent a loop I was also about to research how git pushes or pull-requests work as now some other things have started to break I am so many commits ahead of the upstream repository.
-MarkM-
git hub
testing statistics Alliance
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /data/multiserv/users/669004/projects/1659023/www/GameEngine/Database/db_MYSQL.php on line 749
Warning: Invalid argument supplied for foreach() in /data/multiserv/users/669004/projects/1659023/www/Templates/Alliance/overview.tpl on line 12
xxx.com/karte.php?d=1864&c=77
at oasis .............
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 496
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 218
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 218
Advocaite, private message only allows 3000 characters so I could not put code pastes into a reply to private message. Here is the reply I tried to send:
I am trying to merge the fork known as "TravianX" back into the original project it forked from, without losing all the credits of the earlier authors and so on.
Here are two specific fixes that will go a huge huge way to help everything.
First, a few new constants in the config file, which you can see in the following paste of my entire install/data/constant_format.tpl
Second, have index.php decide which actual content template to use based on the MILIEU, GAME_NAME, SERVER_NAME and so on. (I say and so on because if you turn on some new non-rpduction feature like oases or whatever to test, you might like the front page to change to show that you are now running a development milieu instead of a production milieu, stuff like that).Code:<?php
############################### S T A R T ################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename config.php ##
## Version 4.8.5 ##
## Developed by: Dzoki Edited by Advocaite & Digitalis Data Services ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
//////////////////////////////////
// ***** ERROR REPORTING *****//
//////////////////////////////////
// (E_ALL ^ E_NOTICE) = enabled
// (0) = disabled
%ERROR%
//////////////////////////////////
// ***** SERVER SETTINGS *****//
//////////////////////////////////
// ***** Game
// Used instead of the word "Travian" anywhere
// the word "Travian" used to be displayed.
// Warning, different game-masters / server-admins
// who contribute code might well use it to prevent
// their mods from being inadvertently used by
// people who did not in fact opt in to having
// those mods be inherited by their server(s).
define("GAME_NAME","TravianX");
// ***** Milieu
// If you do not want to use the default terms of service,
// rules of play, quest tasks, backstory, forwardstory,
// location within a galaxy if in a galaxy or where else
// if a rogue planet not part of any galaxy, etc etc etc;
// the name of the "Milieu" to use instead, if any of the
// contributed Milieus suit you. If none do, see the extra
// settings section for a way to force the use of a
// Milieu local to your server not part of the distribution.
define("MILIEU","Vanilla");
// ***** Name
define("SERVER_NAME","%SERVERNAME%");
// ***** Domain
define("SERVER_DOMAIN","%SERVERDOMAIN%");
// ***** Started
// Defines when has server started.
define("COMMENCE","%STARTTIME%");
// ***** Language
// Choose your server language.
define("LANG","%LANG%");
// ***** Speed
// Choose your server speed. NOTICE: Higher speed, more likely
// to have some bugs. Lower speed, most likely no major bugs.
// Values: 1 (normal), 3 (3x speed) etc...
define("SPEED", "%SPEED%");
// ***** World size
// Defines world size. NOTICE: DO NOT EDIT!!
define("WORLD_MAX", "%MAX%");
// ***** Graphic Pack
// True = enabled, false = disabled
if ("MILIEU" == 'Vanilla') {
define("GP_ENABLE",false)
// Graphic pack location (default: gpack/travian_default/)
define("GP_LOCATE", "%GP_LOCATE%");
}
else {
define("GP_ENABLE",true);
// Graphic pack location (default: gpack/travian_default/)
if ("MILIEU" == "Travian") {
define("GP_LOCATE", "gpack/travian/");
}
elseif ("MILIEU" == "Villages") {
define("GP_LOCATE", "gpack/villages/");
}
else {
define("GP_LOCATE", "%GP_LOCATE%");
}
}
// ***** Troop Speed
// Values: 1 (normal), 3 (3x speed) etc...
define("INCREASE_SPEED","%INCSPEED%");
// ***** Village Expand
// 1 = slow village expanding - more Cultural Points needed for every new village
// 0 = fast village expanding - less Cultural Points needed for every new village
define("CP", %VILLAGE_EXPAND%);
// ***** Demolish Level Required
// Defines which level of Main building is required to be able to
// demolish. Min value = 1, max value = 20
// Default: 10
define("DEMOLISH_LEVEL_REQ","%DEMOLISH%");
// ***** Quest
// Ingame quest enabled/disabled.
define("QUEST",%QUEST%);
// ***** Beginners Protection
// 3600 = 1 hour
// 3600*12 = 12 hours
// 3600*24 = 1 day
// 3600*24*3 = 3 days
// You can choose any value you want!
define("PROTECTION","%BEGINNER%");
// ***** Enable WW Statistics
define("WW",%WW%);
// ***** Activation Mail
// true = activation mail will be sent, users will have to finish registration
// by clicking on link recieved in mail.
// false = users can register with any mail. Not needed to be real one.
define("AUTH_EMAIL",%ACTIVATE%);
// ***** PLUS
//Plus account lenght
define("PLUS_TIME",%PLUS_TIME%);
//+25% production lenght
define("PLUS_PRODUCTION",%PLUS_PRODUCTION%);
// ***** Great Workshop
define("GREAT_WKS",%GREAT_WKS%);
// ***** Tourn threshold
define("TS_THRESHOLD",%TS_THRESHOLD%);
//////////////////////////////////
// **** LOG SETTINGS **** //
//////////////////////////////////
// LOG BUILDING/UPGRADING
define("LOG_BUILD",%LOGBUILD%);
// LOG RESEARCHES
define("LOG_TECH",%LOGTECH%);
// LOG USER LOGIN (IP's)
define("LOG_LOGIN",%LOGLOGIN%);
// LOG GOLD
define("LOG_GOLD_FIN",%LOGGOLDFIN%);
// LOG ADMIN
define("LOG_ADMIN",%LOGADMIN%);
// LOG ATTACK REPORTS
define("LOG_WAR",%LOGWAR%);
// LOG MARKET REPORTS
define("LOG_MARKET",%LOGMARKET%);
// LOG ILLEGAL ACTIONS
define("LOG_ILLEGAL",%LOGILLEGAL%);
//////////////////////////////////
// **** LOGO SETTINGS **** //
//////////////////////////////////
// Your main logo and where it links to
// Currently the logo itself is in the css stuff
// but at least you can control here what URL it links to:
define("LOGO_LINKS_TO_URL", "%LOGOLINKSTOURL%");
//////////////////////////////////
// **** FORUM URL SETTING **** //
//////////////////////////////////
//The URL of your forum.
//Default = "http://forum.".SERVER_DOMAIN."/"
define("FORUM_URL", "http://forum.".SERVER_DOMAIN."/")
//////////////////////////////////
// **** NEWSBOX SETTINGS **** //
//////////////////////////////////
//true = enabled
//false = disabled
define("NEWSBOX1",%BOX1%);
define("NEWSBOX2",%BOX2%);
define("NEWSBOX3",%BOX3%);
///////////////////////////////////////
// **** HOME NEWSBOX SETTINGS **** //
///////////////////////////////////////
//true = enabled
//false = disabled
define("HOME1",%HOME1%);
define("HOME2",%HOME2%);
define("HOME3",%HOME3%);
//////////////////////////////////
// **** SQL SETTINGS **** //
//////////////////////////////////
// ***** SQL Hostname
// example. sql106.000space.com / localhost
// If you host server on own PC than this value is: localhost
// If you use online hosting, value must be written in host cpanel
define("SQL_SERVER", "%SSERVER%");
// ***** Database Username
define("SQL_USER", "%SUSER%");
// ***** Database Password
define("SQL_PASS", "%SPASS%");
// ***** Database Name
define("SQL_DB", "%SDB%");
// ***** Database - Table Prefix
define("TB_PREFIX", "%PREFIX%");
// ***** Database type
// 0 = MYSQL
// 1 = MYSQLi
// default: 1
define("DB_TYPE", %CONNECTT%);
////////////////////////////////////
// **** EXTRA SETTINGS **** //
////////////////////////////////////
// ***** Censore words
//define("WORD_CENSOR", "%ACTCEN%");
// ***** Words (censore)
// Choose which words do you want to be censored
//define("CENSORED","%CENWORDS%");
// ***** Limit Mailbox
// Limits mailbox to defined number of mails. (IGM's)
define("LIMIT_MAILBOX",%LIMIT_MAILBOX%);
// If enabled, define number of maximum mails.
define("MAX_MAIL","%MAX_MAILS%");
// ***** Include administrator in statistics/rank?
define("INCLUDE_ADMIN", %ARANK%);
// ***** Use local rules,manuals,tutorials & quests?
// This lets upstream rules man-pages legends etc
// not walk over your carefully crafted local milieu
// info, terms of service, rules of play, culture
// mythos milieu type stuff. A good alternative though
// would be to contribute your milieu so others too
// can use it which would happen by setting a constant
// in this file controlling which contributed milieu
// to use. Values: true or false.
define("LOCAL_MILIEU", false);
////////////////////////////////////
// **** ADMIN SETTINGS **** //
////////////////////////////////////
// ***** Admin Email
define("ADMIN_EMAIL", "%AEMAIL%");
// ***** Admin Name
define("ADMIN_NAME", "%ANAME%");
//////////////////////////////////////////
// **** DO-NOT-EDIT SETTINGS **** //
//////////////////////////////////////////
define("TRACK_USR","%UTRACK%");
define("USER_TIMEOUT","%UTOUT%");
define("ALLOW_BURST",false);
define("BASIC_MAX",1);
define("INNER_MAX",1);
define("PLUS_MAX",1);
define("ALLOW_ALL_TRIBE",false);
define("CFM_ADMIN_ACT",true);
define("SERVER_WEB_ROOT",false);
define("USRNM_SPECIAL",true);
define("USRNM_MIN_LENGTH",3);
define("PW_MIN_LENGTH",4);
define("BANNED",0);
define("AUTH",1);
define("USER",2);
define("MODERATOR",8);
define("MULTIHUNTER",8);
define("ADMIN",9);
define("COOKIE_EXPIRE", 60*60*24*7);
define("COOKIE_PATH", "/");
define("SUBDOMAIN", %SUBDOM%);
############################### E N D ##################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename config.php ##
## Version 4.8.5 ##
## Developed by: Dzoki Edited by Advocaite & Digitalis Data Services ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
Here is my simplistic index.php that so far only attempts to distinguish your index page template, referred to as Templates/index/default.tpl, from mine, which currently is identical as I try to debug the problems surrounding loss of various templates such as the tutorial and the serverRegister and the serverLogin and so on that have gone missing somehow.
-MarkM-Code:<?php
error_reporting(E_ALL);
if (!file_exists('GameEngine/config.php')) {
header("Location: install/");
}
include_once("GameEngine/config.php");
include_once("GameEngine/Database.php");
include_once("GameEngine/Lang/".LANG.".php");
if (!defined("GAME_NAME")) define("GAME_NAME", 'Villages');
if (!defined("MILIEU")) define("MILIEU", 'Villages');
if (!defined("SERVER_NAME")) define("SERVER_NAME", 'Villages Online');
if (MILIEU === 'Vanilla') {
if (!file_exists('Templates/index/default.tpl')) {
header("Location: login.php");
}
} elseif (MILIEU === 'Villages') {
if (!file_exists('Templates/index/villages.tpl')) {
header("Location: login.php");
}
} else {
header("Location: login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title><?php echo SERVER_NAME; ?></title>
<link rel="stylesheet" type="text/css" href="index.php_files/compact.css"><meta name="content-language" content="au">
<meta http-equiv="imagetoolbar" content="no">
<script type="text/javascript" src="uncrypt.js"></script>
</head>
<?php
if (MILIEU === 'Vanilla') {
include_once('Templates/index/default.tpl');
} elseif (MILIEU === 'Villages') {
include_once('Templates/index/villages.tpl');
}
?>
</body>
</html>
I have a question , to all the coders , if there is a script for make the village X send an attack to the village Y automatically selecting troops.
I had been thinking sme kind of military planning building might be a good way to bring in something like that, but if it were you "automatically selecting" troops for someone to send, what exact series of steps involving what exact series of yes/no or arithmetical decisions would you invariable each and every time follow in order to attain the result that you would havw wanted had it been you who had involked this automation that we are currently assuming you yourself will maniually perform for now so that we can see and code exactly what steps are involved in doing it your way?
Personally I am not even sure the combat simulator is a great idea if it actually tells you exactly how many people will die on both sides, as even modern day armed forces backed up by supercomputers don't seem be quite get that right. (Who knew how many would die on 9/11, or how many would have died had both planes reach their targets?)
So I would favour making the simulator much more of a wild-ass-guesser before planning to use its results in non play character aka script decisionmaking... so I would prefer the series of steps and decisions you propose not involve using the simulator, or if you must use the simulator then involve randomly up to doubling or so (or more) and/or down to halving or so (or worse) the numbers of each type of troop before plugging the numbers into a simulator that actually does return the actual results that really will happen when the attack is done for real...
(After all it probably would not do for non plaer characters aka scripts to be better generals than the best of human players, would it?)
-MarkM-
Link isn't working for me o-0
knotwork , sory for my bad inglish , there are scripts ( like greasemonkey ) that let you input the troops and when they come back automaticaly send the atack again.
In oficial server this function is available with plus club im such a dumbass with php , but i will try to write some script and share with you for receive your avise.
I am not familiar with greasemonkey but have often written various kinds of scrapers to obtain specific info from websites such as poling the player statistics to see who gained or lost what in the last small span of time in order to figure out who attacked who and how well they did, thus figuring out good victims to attack.
The problem with "scraping" though is you have to try to figure out the page based on all kinds of clues that change without notice any time some webmaster decides they'd like to move things around a little.
Greasemonkey might work better because it is in the browser so knows all about .ccs and javascript so maybe can figure out even after all of those complictions exactly where on the page the data it wants ended up today.
If the server admins are supporting the script by mainining for paying members enough consistency to not break the scrip when they change the page, great.
Otherwise you end up constantly fiddiling aorund, each day you wake up wondering which scripts will have been broken overniht by some webmaster somewhere changing a page your scripts were relying on.
Thus my thought that a building might be a good way to go, because then it would live on the server and save bandwidth by going direct to the database and avoid breaking by being updated along with any changes that would affect its ability to operate.
I am not against scripting, in fact part of why I am motivated to run games is that most games other people run either deprecate non player characters aka scripts or do not allow players to buy and sell their virtual real estate, hire out as mercenaries, offer protection to nwbies in return for taxes (the classical governmental protection-racket) and so on.
So I definitely want players to be able to be active 24/7 by means of leaving clients or bots or scripts or whatever running at their end, offloading the strategy artificial-intelligence to the client machines could potentially mean less work for the server but only if it does not involve the client machines all polling once a second or once every X seconds where the viable numnber for X depends on the capacity of the server.
A proper balance of what computation to farm out to clients versus what to do on the server can be important for scale-ability. If we cnsider each avid player of games having at least one bot for each game they are involved in, we also ought to want to keep our sites light on browser-resources needed so pplayers don't have all kinds of flash and animated gifs and so on eating up their cpu for each bot they run for us creating thereby for us a non player character at their expense instead of ours.
-MarkM-
---------- Post added at 06:51 PM ---------- Previous post was at 06:46 PM ----------
IRC might be the best way to do bots, since IRC users are accustomed to being connected 24/7 anyway and IRC also tends to include flood control to protect against people trying to send too many commands/messages too fast.
-MarkM-
---------- Post added at 07:11 PM ---------- Previous post was at 06:51 PM ----------
We are starting to lose established players, the valuable core early-adopter players, from the rankings.
One place causing the problem is top ten ranming code, it has
The id > 3 is the problem. Even I myself, player number one, should be free to create a new account to use for my admin functions and let my original account serve as a benchmark character to guage how hard other players must be playing by how close they come to keeping up with what a player spending a certain amount of gold and not doing any raids can do.Code:SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 3 AND tribe<=3
In other words I should not need to stay an admin, I should be free to sell this account, without admin privs of course, to a player who believes in protecting newbies and so would like an early-arriving colonist thus a well-developed village in order to stand a chance of successfully protecting newbies once the barbarian hordes start arriving hoping to "farm" the newbies.
This is already looking like a creeping problem. I saw one database dump where there were five or so accounts right off the bat, as if the person doing the dump forgot they did not have only the 0 record in it.
id is irrelevant, if player number one or two is not an admin (or multi, if config is set to not show multis too, or mod, if ocnfig is set to not show mods too) and is one of the races 1,2 or 3 they should qualify. Or maybe you could check if they are type 2
What happens when we reach hundreds or thousands of races (or more likely factions, stages etc like gunpowder-era Romans, Automatic weaposn era Romanssa, intergalactic Roman marines etc etc etc)? Do the first thousand users who stayed with us over years or decades to get that far get thrown out to make room for non player characters invented for the latest bunch of races/factions/etc ???
-MarkM-
---------- Post added at 08:13 PM ---------- Previous post was at 07:11 PM ----------
Here is another things that will keep getting brfoken unless it is done as a config file setting: whether to actually delete the village and the village's opening for a leader to lead it when a user self-deletes.
Because farmers might be tempted to try to cause as many idle accounts as possible, whether by advertising to attract more users than are lkely to actually stick around and play or by more direct means such as creating many accounts themselves, it is important to make sure that the cost of colonising a new world (aka server) is acocunted for. Accounting means accountants, and accountants will not like mysterius midnight dalek invasions (or whatever is used to annihilate resources buildigns and real-estate developments and exterminate populations).
When a player self-deletes, if the admin has chosen to not have the leadership position vanish but rather to have it seek to be filled, the method I have been using is to take an md5 hash of something and use that md5 hash as the new username for the record whose user has self-deleted. I reset the password so the admin can set it for whoever the villagers to elect (or are elected by heh heh) as their new leader. The email address can be set to an address on the server, or just left blank.
Possibly, though I have nt coded this yet, villages thusly in more than normal nead of a leader might be willing to overlook a lack of some certain number of culture points a less needy village might ask of any civilisation wanting it to become part of it...
This is very important in the private servers niche because people wanting to play on maps littered with idle villages can simply play Travian. Players looking for a mapo of more-motivated villages thus pretty much have to resort to private servers to find such worlds.
-MarkM-
---------- Post added at 08:29 PM ---------- Previous post was at 08:13 PM ----------
According to the config file there are already two different culture point requirement systems by setting 0 or 1. So a maybe too simplistic but quick way to make villages who lack a leader accept invitions from civilisations with less culture than would normally be required could be to take the slow growth rate as what normal villages who already have a leader require and the quick rate for villages lacking a leader so more eager to join a well led civilisation.
-MarkM-
---------- Post added at 08:56 PM ---------- Previous post was at 08:29 PM ----------
Here is another important option, although I do not think the ability to accomplish this purely by means of MILIEU or GAME_NAME or SERVER_NAME has been broken yet. (Though without sensitivity to the fact that some milieus might be using the option someday someone might somehow devise a way to prevent its being done as a derivative, forcing it to be directly in the actual config file.)
Login or register then choose server versus choose server then login or register.
Here is why:
It might needlessly annoy potential players to wait until they have made the possible very hard to make decision as to which server before checking whether they are even qualified to play that server.
Regardless of what system of qualification might be used (naiton of origin, languages literate in, number of colonists you have and how far your starships can carry them, whatever), it is probably better to first get the user registered or logged in and only then worry about which server persons logged into that account as owner or sitter are to have access to.
This is especially important for private servers, and one way of implementing privacy is to only allow players who have played a certain amount of time or to a certain point or level or whatever already on the public traffic/player funnel server(s) that random strangers on the web are permitted to play in order to be evaluated to see if they qualify for any of the private servers.
As a side-effect, players without any villages will probably be possible, for the case of players who initially register/login on a public server in order to even learn enough about enoguh private servers to reasonably decide which one they wish to establish or buy real estate on.
-MarkM-
next error git hub
Alliance
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /data/multiserv/users/669004/projects/1659023/www/GameEngine/Database/db_MYSQL.php on line 749
Warning: Invalid argument supplied for foreach() in /data/multiserv/users/669004/projects/1659023/www/Templates/Alliance/overview.tpl on line 12
hi, no update for attack time freeze?!
How long has it been since you last updated from github?
I just sent a new attack to check that it has not broken since it first got fixed which was quite some time ago now. It seems to be working fine for me. I am several commits ahead of github according to git but I do not recall any fixes I committed in my massive conflict resolution battle against having already existing functionality or documentation get trashed by stuff coming down from github.
---------
I think the entire Templates directory needs a neighboring LocalTemplates or Ltemplates or somesuch directory which is checked first for any templates before resorting to the default templates the distribution puts into the Templates directory.
Here is an example of why. I think many of you will clearly see that more than a few people will want to use their own versions of these Templates/popcon templates (I put the popcon stuff into templates thus I put them into Templates/popcon)). In any case, the whole point of using templates from their very invention back in the previous millenium is so mere webpage-editor types can customise how the data crunched by coders' code actually looks when presented to users so even if you think these example popcon templates are the cat's whisker you still should be free to have your server show your customised versions without your customised versions getting over-written by new default versions. (You could also copy the default ones you really like over into your local copy so they don't get written over by some later default ones you turn out not to like as much).
Templates/oopcon/moregames.tpl:
Code:<h3 class="pop popgreen bold">
<a href="Templates/popcon/devservers.tpl" class="popcon">Development Servers</a>
</h3>
<p>
These are
<a href="Templates/popcon/devservers.tpl" class="popcon">servers run by active developers</a>.
If a feature you are looking for is not working yet on any of
<a href="Templates/popcon/devservers.tpl" class="popcon">these servers</a>
it is probably because it has not been developed yet. Thus these are the servers to be playing
on if you wish to keep yourself aware of new features and of course if you wish to actually
try the feature out to see whether you think it is sufficiently well developed to be ready
to be included in a release.
</p>
<br/>
<h3 class="pop popgreen bold">
<a href="Templates/popcon/prdservers.tpl" class="popcon">Production Servers</a>
</h3>
<p>
These are servers running old, but stable, releases. That means they don't have most of the
features you are probably looking for. Has there ever even been a stable release ever? If so
it was probably back when there was hardly anything that actually worked. Help us get production-ready
code ready for a production release aka stable release by playing on the
<a href="devservers.tpl" class="popcon">development servers</a>.
</p>
<br/>
<h3 class="pop popgreen bold">
<a href="forums.tpl" class="popcon">Forums</a>
</h3>
<p>
Mostly for development so far, as the code is not yet ready for a production / stable release.
If you cannot keep up with the current progress of development
by playing on the development servers,
<a href="prdservers.tpl" class="popcon">forums</a>
might work for you as a way of keeping up with the pace of events.
</p>
Templates/popcon/devservers.tpl
Code:<h3 class="pop popgreen bold">Development Servers</h3>
<p>
These are servers run by active developers. If a feature you are looking for is not working yet
on any of these servers it is probably because it has not been developed yet. Thus these are the
servers to be playing on if you wish to keep yourself aware of new features and to familiarise
yourself with new features. Help us make sure the next release is truly ready to be released
by trying out all aspects of play on the development servers and giving us feedback about
what things you think need more work before being released.
</p>
<br/>
<p><span class="green"><a target="blank" href="http://villages.mygamesonline.org/" class="more">Villages Online</a></span>
Templates/popcon/prdservers.tpl
Code:<h3 class="pop popgreen bold">Production Servers</h3>
<p>
These are servers running old, but stable, releases. That means they don't have most of the
features you are probably looking for. Has there ever even been a stable release ever? If so
it was probably back when there was hardly anything that actually worked.</p>
<p>
Help us get production-ready code ready for a production release aka stable release by playing on the
<a href="Templates/popcon/devservers.tpl" class="popcon">Development Servers</a>
and giving us feedback on the features we are developing as we develop them so that people who
wait for a release will not be disappointed by the release when it actually does get released.
</p>
<br/>
<p>
Oops, there are no Production Servers yet, unless you consider any of the
<a href="Templates/popcon/devservers.tpl" class="popcon">Development Servers</a>
to be close enough to a production-release state of development to count as
a production server itself.
Templates/popcon/forums.tpl
In the course of developing these templates, I discovered that the version of the popcon functionality that I was working with at the time did not handle links from popcon page to popcon page, unless maybe I just hadn't discovered the correct syntax for such links.Code:<h3 class="pop popgreen bold">Forums</h3>
<p>
Basically this currently means Development Forums, because the project is
currently being actively developed. Help us reach readiness for a production
release by participating in Development Forums if you are unable to help
by actually playing on Development Servers. (Or even if you are playing on
development servers!)
</p>
<br/>
<p><span class="green"><a target="blank" href="http://forum.ragezone.com/f583/" class="more">.Rage Zone</a></span>
(Consider the manual pages popup, those pages refer back and forth among each other all the time, and being templates too they too will be protected nicely by the proposed local copies of templates directory approach of looking for local copy before using upstream copy. Having spent many hours working on the manual-pages about how to pay for gold using various different currencies I was not pleased at all to have some stupid PayPal thing write over it. PayPal you won't really know until six months (180 days) later whether you really get paid, because on the 179th day they might say oh sorry the guy claims that was his underage kid or a hacker using his credit card, so sorry, no money for you. Bitcoins once you got them you got them, the shoes is on the other foot, you can say too bad no gold for you hahaha but they cannot pull your money back out of your account up to six months later.)
LocalTemplates might sound good conceptually but its a lot of keystrokes for anyone who doesn't habitually use aliases or variables when typing filepaths. Ltmp though short smiht be mistaken for something temporary. So I am open to any reasonable name for the thing just as long as it exists and is honoured.
I expect language files are much the same way. In fact Ogame clones such as Xnova Redesigned put the language files in with the graphics, they are part of the "skin" because different "skins" can have entirely different things needing to be verbally expressed.
(I guess gpack means "sorry, not a skin, this is just a gpack. To create a skin, please add the verbiage stuff.)
-MarkM-
[QUOTE=knotwork;6562771]How long has it been since you last updated from github?
/QUOTE]
2days
it`t ok in begin,but after 2or 3 hrs from start server,attack time is freeze!
i will hope that your code be fine!
I confess that to me as I wrote the above, two days would have seemed like "quite some time ago now" as I was awake through most of that two days.Quote:
I just sent a new attack to check that it has not broken since it first got fixed which was quite some time ago now.
Quite possibly you updated just before the fix went into the github.
But my sense of time gets even more unreliable when I have been awake a long time so if you don't want to do a full pull of all changes since your last pull (or if not using pull, a full download) you could browse through the last few days of paches to find out when last the troop movement was patched.
I saw code long ago that seemed to be intended to remove old troop movements left in limbo by older code so I am not really taking seriously the idea that maybe your events queue is stuck waiting for some event that should "arrive" before your troops thus that your troops are basically backed up "waiting for" so they don't perform their action out of squence relative to some never going to actually happen action that should (have) happen(ed) before they get to execute their mission.
(So correct me if in fact that code didn't get in or since got broken and the queues can now jam again without auto-unjamming, and remove the offending lockfiles aka prevention file(s) from the live server's Prevention directory.)
-MarkM-
if i download again from https://github.com/advocaite/Travianx ,this problem is gone?!
also i haven`t Templates/popcon/ in my script!!!
Depending on which of "?" or "!" is to be taken as authoritative in your "?!":
If "?": I don't know, you tell me. I think git might be protecting me still from some of what tried to come down to me from github because I had to go through a horrendous heroic conflict-resolution process with git to keep working stuff and existing documentation from being trashed by stuff from the github. (Even so, I have still ended up with the credits not being shown due to anleitung.php getting broken so badly that most of the documentation provided through its mechanism simply does not display at all.)
If "!": Awesome, great, good. Remember that as long there are developers awake any number of hours greater than maybe one or two is quite a long time. :thumbup:
You haven't a Templates/popcon directory because if you have the content that goes in the popcon popups at all you might have it as .php files in the ./ directory or they might be vanished into encrypted javascript or gosh knows what, I searched everywhere using grep trying to find the words I saw in them and they were not anywhere, that is why I had to go back to one of my backup directories and grab them, at which point I figured I had better turn them into templates so they don't get mysteriously vanished again - plus I changed the content of them anyway once I found them so that made me even more determined to prevent them from getting trashed by the upstream.
I posted them here as suggestions for Advocaite indicating one possible way to go toward not trashing everyone's existing milieus timelines chosen methods of payment they will accept, how much they will sell gold for in what quantity and to who ("if you want less than the wholesale customers buy, please buy retail from them" for example) and all that kind of stuff that importantly differentiates one server from another (and thus justifies releasing at all since if that is going to be the same on all servers we might as well just run however many servers are needed to handle the number of players who actually want to play and releases would not be needed at all since we would not need a plethora of sysadmins to admin a plethora of totally different worlds with different backstories and different idea of what that world will do next once it has completed the world peace wonder and on and on and on like that...
-MarkM-
Hey guys, is it just me or we are missing the add WW in admin panel, and login log futures ?
and umm.. why this karte2 in github is not working? - http://forum.ragezone.com/f583/large-map-files-778474/
Hi!
I have One problem.
I have last reales form github.
I just click on player and send unit
I write units I clisk ok and theh tropss and attack lost.
Why?
I just found that someone has started puttijng links to Travian corporate servers into files such as Templates/Anleitung/0.tpl, which now constains lines such as:
Has someone just gone out and stolen a bunch of that corporation's HTML and then not even bothered to pretend it is not stolen?Code:<a href="#" onClick="return Popup(1,5,'http://s5.travian.com/');"><img src="img/un/u/5.gif" width="16" height="16" border="0" alt=""></a>
This is the kind of crap that will get us all banned by our ISPs/webhosts if we let it infect our actual servers, isn't it?
It is sad to keep putting in endless sleepless days and nights trying to make a game people can legitimately use then find someone is somehow slipping freshly stolen material past our release-gatekeepers right into the release git repository.
They didn't even remove the Travian Games logo and copyright declaration
If Travian Games corporation really has given permission to us, great, but the permission should be clearly documented in the release somewhere, preferably with a link to the specific URL on some official Travian Games server/forum where they (it clearly being they not someone making up a pretend "license from them" doc to sneak into our release) give us that permission.
I had heard rumours that sounded like they were so surely not going to give such permission that even asking them for it would probably be pointless.
NOTE PROBABLY IT IS AGAINST GITHUB's TERMS AND CONDITIONS OF USE ALSO, thus threatening the entire ability to use github for the project at all if such slips are not promptly remedied by the gatekeeper(s) ?
-MarkM- (Someone seems to be trying very hard to get us all in trouble it seems?)
If you search in forum instead of spaming you would find a solution. Admins should ban you from this forum seriously, you are only spaming the forum.
I get this in statics
and in admin panel:Quote:
Fatal error: Call to undefined method MYSQL_DB::removeclimberrankpop() in /home/a7951509/public_html/GameEngine/Ranking.php on line 101
PLEASE. help me :ehh:Quote:
Fatal error: Call to a member function CheckLogin() on a non-object in /home/a7951509/public_html/Admin/admin.php on line 1
It was not just the player top ten that was leaving out the most senior / earliest adopter players, I tracked it down further and found the GAMEENGINE/Ranking.php has the same problem over and over and over all through the file.
SO here is the file after all those many occurences of the problem have been removed:
If there is some special capability, even if it is only that of being left off rankings, we already have a demonstration in the config file of how to accomplish it: set up a config option where that kind of use is set whether to be left off or not.Code:<?php
/** --------------------------------------------------- **\
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
+---------------------------------------------------------+
| Credits: All the developers including the leaders: |
| Advocaite & Dzoki & Donnchadh |
| |
| Copyright: TravianX Project All rights reserved |
\** --------------------------------------------------- **/
class Ranking {
private $rankarray = array();
private $rlastupdate;
public function getRank() {
return $this->rankarray;
}
public function procRankReq($get) {
global $village, $session, $database;
if(isset($get['id'])) {
switch($get['id']) {
case 1:
$this->procRankArray();
break;
case 8:
$this->procHeroRankArray();
break;
case 11:
$this->procRankRaceArray(1);
break;
case 12:
$this->procRankRaceArray(2);
break;
case 13:
$this->procRankRaceArray(3);
break;
case 31:
$this->procAttRankArray();
break;
case 32:
$this->procDefRankArray();
break;
case 2:
$this->procVRankArray();
$this->getStart($this->searchRank($village->wid, "wref"));
break;
case 4:
$this->procARankArray();
if($session->alliance == 0) {
$this->getStart(1);
} else {
$this->getStart($this->searchRank($session->alliance, "id"));
$oldrank = $this->searchRank($session->alliance, "id");
$ally = $database->getAlliance($session->alliance);
if($ally['oldrank'] > $oldrank) {
$totalpoints = $ally['oldrank'] - $oldrank;
$database->addclimberrankpopAlly($ally['id'], $totalpoints);
$database->updateoldrankAlly($ally['id'], $oldrank);
} else
if($ally['oldrank'] < $oldrank) {
$totalpoints = $oldrank - $ally['oldrank'];
$database->removeclimberrankpopAlly($ally['id'], $totalpoints);
$database->updateoldrankAlly($ally['id'], $oldrank);
}
$database->updateoldrankAlly($ally['id'], $oldrank);
}
break;
case 41:
$this->procAAttRankArray();
if($session->alliance == 0) {
$this->getStart(1);
} else {
$this->getStart($this->searchRank($session->alliance, "id"));
}
break;
case 42:
$this->procADefRankArray();
if($session->alliance == 0) {
$this->getStart(1);
} else {
$this->getStart($this->searchRank($session->alliance, "id"));
}
break;
}
} else {
$this->procRankArray();
$this->getStart($this->searchRank($session->username, "username"));
$oldrank = $this->searchRank($session->username, "username");
if($session->oldrank > $oldrank) {
$totalpoints = $session->oldrank - $oldrank;
$database->addclimberrankpop($session->uid, $totalpoints);
$database->updateoldrank($session->uid, $oldrank);
} else
if($session->oldrank < $oldrank) {
$totalpoints = $oldrank - $session->oldrank;
$database->removeclimberrankpop($session->uid, $session->oldrank);
$database->updateoldrank($session->uid, $oldrank);
}
$database->updateoldrank($session->uid, $oldrank);
}
}
public function procRank($post) {
if(isset($post['ft'])) {
switch($post['ft']) {
case "r1":
case "r31":
case "r32":
if(isset($post['rank']) && $post['rank'] != "") {
$this->getStart($post['rank']);
}
if(isset($post['name']) && $post['name'] != "") {
$this->getStart($this->searchRank($post['name'], "username"));
}
break;
case "r2":
case "r4":
case "r42":
case "r41":
if(isset($post['rank']) && $post['rank'] != "") {
$this->getStart($post['rank']);
}
if(isset($post['name']) && $post['name'] != "") {
$this->getStart($this->searchRank($post['name'], "name"));
}
break;
}
}
}
private function getStart($search) {
$multiplier = 1;
if(!is_numeric($search)) {
$_SESSION['search'] = $search;
} else {
if($search > count($this->rankarray)) {
$search = count($this->rankarray) - 1;
}
while($search > (20 * $multiplier)) {
$multiplier += 1;
}
$start = 20 * $multiplier - 19 - 1;
$_SESSION['search'] = $search;
$_SESSION['start'] = $start;
}
}
public function getAllianceRank($id) {
$this->procARankArray();
while(1) {
if(count($this->rankarray) > 1) {
$key = key($this->rankarray);
if($this->rankarray[$key]["id"] == $id) {
return $key;
break;
} else {
if(!next($this->rankarray)) {
return false;
break;
}
}
} else {
return 1;
}
}
}
public function searchRank($name, $field) {
while(1) {
$key = key($this->rankarray);
if($this->rankarray[$key][$field] == $name) {
return $key;
break;
} else {
if(!next($this->rankarray)) {
return $name;
break;
}
}
}
}
private function procRankArray() {
global $database, $multisort;
//$array = $database->getRanking();
$holder = array();
//$value['totalvillage'] = count($database->getVillagesID($value['id']));
//$value['totalvillage'] = count($database->getVillagesID($value['id']));
//$value['totalpop'] = $database->getVSumField($value['id'],"pop");
//$value['aname'] = $database->getAllianceName($value['alliance']);
$q = "SELECT " . TB_PREFIX . "users.id userid, " . TB_PREFIX . "users.username username," . TB_PREFIX . "users.alliance alliance, (
SELECT SUM( " . TB_PREFIX . "vdata.pop )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid
)totalpop, (
SELECT COUNT( " . TB_PREFIX . "vdata.wref )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid AND type != 99
)totalvillages, (
SELECT " . TB_PREFIX . "alidata.tag
FROM " . TB_PREFIX . "alidata, " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "alidata.id = " . TB_PREFIX . "users.alliance
AND " . TB_PREFIX . "users.id = userid
)allitag
FROM " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . "
ORDER BY totalpop DESC, totalvillages DESC, username ASC";
$result = (mysql_query($q));
while($row = mysql_fetch_assoc($result)) {
$datas[] = $row;
}
foreach($datas as $result) {
//$value = $array[$result['userid']];
$value['userid'] = $result['userid'];
$value['username'] = $result['username'];
$value['alliance'] = $result['alliance'];
$value['aname'] = $result['allitag'];
$value['totalpop'] = $result['totalpop'];
$value['totalvillage'] = $result['totalvillages'];
//SELECT (SELECT SUM(".TB_PREFIX."vdata.pop) FROM ".TB_PREFIX."vdata WHERE ".TB_PREFIX."vdata.owner = 2) totalpop, (SELECT COUNT(".TB_PREFIX."vdata.wref) FROM ".TB_PREFIX."vdata WHERE ".TB_PREFIX."vdata.owner = 2) totalvillages, (SELECT ".TB_PREFIX."alidata.tag FROM ".TB_PREFIX."alidata WHERE ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance AND ".TB_PREFIX."users.id = 2);
array_push($holder, $value);
}
//$holder = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procRankRaceArray($race) {
global $database, $multisort;
//$array = $database->getRanking();
$holder = array();
//$value['totalvillage'] = count($database->getVillagesID($value['id']));
//$value['totalvillage'] = count($database->getVillagesID($value['id']));
//$value['totalpop'] = $database->getVSumField($value['id'],"pop");
//$value['aname'] = $database->getAllianceName($value['alliance']);
$q = "SELECT " . TB_PREFIX . "users.id userid, " . TB_PREFIX . "users.tribe tribe, " . TB_PREFIX . "users.username username," . TB_PREFIX . "users.alliance alliance, (
SELECT SUM( " . TB_PREFIX . "vdata.pop )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid
)totalpop, (
SELECT COUNT( " . TB_PREFIX . "vdata.wref )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid AND type != 99
)totalvillages, (
SELECT " . TB_PREFIX . "alidata.tag
FROM " . TB_PREFIX . "alidata, " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "alidata.id = " . TB_PREFIX . "users.alliance
AND " . TB_PREFIX . "users.id = userid
)allitag
FROM " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "users.tribe = $race AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . "
ORDER BY totalpop DESC, totalvillages DESC, username ASC";
$result = (mysql_query($q));
while($row = mysql_fetch_assoc($result)) {
$datas[] = $row;
}
if(mysql_num_rows($result)) {
foreach($datas as $result) {
//$value = $array[$result['userid']];
$value['userid'] = $result['userid'];
$value['username'] = $result['username'];
$value['alliance'] = $result['alliance'];
$value['aname'] = $result['allitag'];
$value['totalpop'] = $result['totalpop'];
$value['totalvillage'] = $result['totalvillages'];
//SELECT (SELECT SUM(".TB_PREFIX."vdata.pop) FROM ".TB_PREFIX."vdata WHERE ".TB_PREFIX."vdata.owner = 2) totalpop, (SELECT COUNT(".TB_PREFIX."vdata.wref) FROM ".TB_PREFIX."vdata WHERE ".TB_PREFIX."vdata.owner = 2) totalvillages, (SELECT ".TB_PREFIX."alidata.tag FROM ".TB_PREFIX."alidata WHERE ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance AND ".TB_PREFIX."users.id = 2);
array_push($holder, $value);
}
} else {
$value['userid'] = 0;
$value['username'] = "No User";
$value['alliance'] = "";
$value['aname'] = "";
$value['totalpop'] = "";
$value['totalvillage'] = "";
array_push($holder, $value);
}
//$holder = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procAttRankArray() {
global $database, $multisort;
//$array = $database->getRanking();
$holder = array();
//$value['totalvillage'] = count($database->getVillagesID($value['id']));
//$value['totalpop'] = $database->getVSumField($value['id'],"pop");
$q = "SELECT " . TB_PREFIX . "users.id userid, " . TB_PREFIX . "users.username username, " . TB_PREFIX . "users.apall, (
SELECT COUNT( " . TB_PREFIX . "vdata.wref )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid AND type != 99
)totalvillages, (
SELECT SUM( " . TB_PREFIX . "vdata.pop )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid
)pop
FROM " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "users.apall >=0 AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND " . TB_PREFIX . "users.tribe <= 3
ORDER BY " . TB_PREFIX . "users.apall DESC, pop DESC, username ASC";
$result = mysql_query($q) or die(mysql_error());
while($row = mysql_Fetch_assoc($result)) {
$datas[] = $row;
}
foreach($datas as $key => $row) {
//$value = $array[$row['userid']];
$value['username'] = $row['username'];
$value['totalvillages'] = $row['totalvillages'];
//$value['totalvillage'] = $row['totalvillages'];
$value['id'] = $row['userid'];
$value['totalpop'] = $row['pop'];
$value['apall'] = $row['apall'];
array_push($holder, $value);
printf("\n<!-- %s %s %s %s -->\n", $value['username'], $value['totalvillages'], $value['totalpop'], $value['apall']);
}
//$holder = $multisort->sorte($holder, "'ap'", false, 2, "'totalvillages'", false, 2, "'ap'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procDefRankArray() {
//global $database, $multisort;
//$array = $database->getRanking();
$holder = array();
$q = "SELECT " . TB_PREFIX . "users.id userid, " . TB_PREFIX . "users.username username, " . TB_PREFIX . "users.dpall, (
SELECT COUNT( " . TB_PREFIX . "vdata.wref )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid AND type != 99
)totalvillages, (
SELECT SUM( " . TB_PREFIX . "vdata.pop )
FROM " . TB_PREFIX . "vdata
WHERE " . TB_PREFIX . "vdata.owner = userid
)pop
FROM " . TB_PREFIX . "users
WHERE " . TB_PREFIX . "users.dpall >=0 AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . "
ORDER BY " . TB_PREFIX . "users.dpall DESC, pop DESC, username ASC";
$result = mysql_query($q) or die(mysql_error());
while($row = mysql_Fetch_assoc($result)) {
$datas[] = $row;
}
foreach($datas as $key => $row) {
//$value = $array[$row['userid']];
$value['username'] = $row['username'];
$value['totalvillages'] = $row['totalvillages'];
//$value['totalvillage'] = $row['totalvillages'];
$value['id'] = $row['userid'];
$value['totalpop'] = $row['pop'];
$value['dpall'] = $row['dpall'];
array_push($holder, $value);
}
//$holder = $multisort->sorte($holder, "'dpall'", false, 2, "'totalvillage'", false, 2, "'dpall'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procVRankArray() {
global $database, $multisort;
$array = $database->getVRanking();
$holder = array();
foreach($array as $value) {
$coor = $database->getCoor($value['wref']);
$value['x'] = $coor['x'];
$value['y'] = $coor['y'];
$value['user'] = $database->getUserField($value['owner'], "username", 0);
array_push($holder, $value);
}
$holder = $multisort->sorte($holder, "'x'", true, 2, "'y'", true, 2, "'pop'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procARankArray() {
global $database, $multisort;
$array = $database->getARanking();
$holder = array();
foreach($array as $value) {
$memberlist = $database->getAllMember($value['id']);
$totalpop = 0;
foreach($memberlist as $member) {
$totalpop += $database->getVSumField($member['id'], "pop");
}
$value['players'] = count($memberlist);
$value['totalpop'] = $totalpop;
if(!isset($value['avg'])) {
$value['avg'] = @round($totalpop / count($memberlist));
} else {
$value['avg'] = 0;
}
array_push($holder, $value);
}
$holder = $multisort->sorte($holder, "'totalpop'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procHeroRankArray() {
global $database, $multisort;
$array = $database->getHeroRanking();
$holder = array();
foreach($array as $value) {
$value['owner'] = $database->getUserField($value['uid'], "username", 0);
$value['level'] = round(($value['attackpower'] + $value['defpower'] + $value['attackbonus'] + $value['defbonus'] + $value['regspeed']) / 5);
array_push($holder, $value);
}
$holder = $multisort->sorte($holder, "'pointused'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procAAttRankArray() {
global $database, $multisort;
$array = $database->getARanking();
$holder = array();
foreach($array as $value) {
$memberlist = $database->getAllMember($value['id']);
$totalap = 0;
foreach($memberlist as $member) {
$totalap += $member['ap'];
}
$value['players'] = count($memberlist);
$value['totalap'] = $totalap;
if($value['avg'] > 0) {
$value['avg'] = round($totalap / count($memberlist));
} else {
$value['avg'] = 0;
}
array_push($holder, $value);
}
$holder = $multisort->sorte($holder, "'totalap'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
private function procADefRankArray() {
global $database, $multisort;
$array = $database->getARanking();
$holder = array();
foreach($array as $value) {
$memberlist = $database->getAllMember($value['id']);
$totaldp = 0;
foreach($memberlist as $member) {
$totaldp += $member['dp'];
}
$value['players'] = count($memberlist);
$value['totaldp'] = $totaldp;
if($value['avg'] > 0) {
$value['avg'] = round($totalap / count($memberlist));
} else {
$value['avg'] = 0;
}
array_push($holder, $value);
}
$holder = $multisort->sorte($holder, "'totaldp'", false, 2);
$newholder = array("pad");
foreach($holder as $key) {
array_push($newholder, $key);
}
$this->rankarray = $newholder;
}
}
;
$ranking = new Ranking;
?>
This problem was in fact over-riding even the existing config file setting, as I am user number and am the admin. This problem looks like it would have left me off the listing even if I had turned back on the option of showing me in the listings.
What exactly are users 2 and 3 imagined to be?
Whatever that is, should probably be something we can set any user to be, even if it is something we would only need one of such as "dummy record containing totals of all of such and such a type of user" or whatever weird thing.
This creeping violating of more and more early adopters ultimately probably ewnds with no one willing to be an early adopter.
Our early users have invested huge amounts of time and even maybe quite a bit of money (their hourly wage times time spent, if nothing more than that, just in opportunity costs alone), screwing them around is not a good plan.
-MarkM-
---------- Post added at 12:06 PM ---------- Previous post was at 11:54 AM ----------
Setting Support's access level to MODERATOR or MULTIHUNTER would probably be helpful, and if you want Support off the list already without waiting for a config option for making MULTIHUNTER not appear on the list and another for making MODERATOR not appewar on the list, in addition to the already existing option for making ADMIN not appear on the list, you can set Support to ADMIN for now.
But it seems clear from the text you see when you view support's profile (or clock the support menu option) that multihuner and support are two different groupds, one that supports users another that hiunts down violators. So it seems reasonable to set support as MODERATOR instead of a MULTIHUNTER.
(Even though both MODERATOR and MULTIHUNTER were both defined to be the number 8 last time I checked. Presumably at some point they will be assigned different numbers so the code can in fact distinguish one from the other.)
-MarkM-
large map has just been pushed to git repo
atm im working on oases all i need to get it work working is a little fine tuning and some bonty adjustments in automation i thought i had it all sorted but atm i dont cause somethings not working but at least i can attack and kill nature, plus the new way im doing this is so much easyer on the server compared to my last raw attempt so stay tuned for that
---------- Post added at 05:01 PM ---------- Previous post was at 04:55 PM ----------
@knotwork i undertsand some of what you say and yes there should be no referances to travian but then again people should not be hosting servers unless they have changed what is travians to be not travians if someone wants to release conversions on that mass of scale then kool i know its the first thing ill be doing once i finish coding the core to work just like travian us developers are seeking no money for this and give it away freely we cant be held responsable for some of the people who have no brains and host travian wannabe servers. when time comes for it we will change all html and referances of travian but please keep listing any more links to offical server id like them gone to
Thank you for working on things that users might actually encounter early in the game before worrying about stuff they won't run into for months.
I had a player actually wanting to explore Oases already, in fact several days ago by now, whereas unless something they or their heroes encounter in Oases or in some kind of rumour or lore section of a Hero's Mansion they have absolutely no idea whether Travian's so called Natars have anything to do with them or not.
Even if they have heard of Travian itself, and maybe Googled it to find out what happened there in the past thus maybe get a clue as to what might happen in the future, all they will see is that it seems to be either a timeloop or an oversimplified generalisation of the Civ/Freeciv "once you find a way to another planet or become the only civilisation on the planet it is game over", and almost all my players know that that is the START of the real game, everything that happened up until gaining control of a planet or heading out to colonise a new planet was just a pre-game qualifying round to provide a backstory explaining how you happen to BE on a new world (with, possibly, one or more old worlds still under your control to potentially provide suport / supply lines etc...)
So even if they do think we might use a storyline somewhat reminiscent of Travian's, they still do not know whether the world they are in is Pre-Natar (they will be known as Natars themselves long after they have moved on to another world), Post-Natar (the Natars did happen, yes, in the past, but whether they will come back is unknown) or Cyclic (they will be the Natars by conquering the world, then they will be the return of the Natars after they have moved on some new players have figured they abandoned the world so start colonising it, but ha ha they come back and give the later generation of players a hard time for taking over their world while they were focussing elsewhere...)
I am pretty sure most of my players would far prefer not to have some previous generation of occupants of their world come back to give them a hard time, some of them are worried enough just about whether they can effectively protect newbies.
(My news blurb warns them that just because the software could protect newbies is not a good reason to have it do so. Why should some inexplicable magic do their job for them? If they want to protect newbies they are welcome to do (or even, Yoda aside, to try).
If players want a civilised world it is up to them to civilise it.
I propose that the two dimensions of the map could be used as an "alignment chart", label North Lawful, West Good, South Chaotic and East Evil, then let players choose for themselves. Or have four entire worlds to choose from.
"Do you want total anarchy, might makes right; or total law, might of others makes right over you but sorry no might for you you are a puny newbie hahaha; or a safe zone, where if anyone ever does attack anyone everyone else will all chip in to punish them for disturbing the peace; etc."
Most of my Xnova Redesigned players LOVE the fact that combat does not work there yet, because they DO like newbie protection and knowing no-one has fixed combat yet they know the months of such protection they have enjoyed so far could stretch on any unknown number of months, maybe even until someone sells enough resources for Devcoin (DVC) to actually offer developers Devcoin-bounty for developing a working combat system for it...
-MarkM-
i have made a push to the git rep allowing oases to be raided atm will work on conquering and stuff futhur down track for now you can raid them they produce there own res all oases data is in odata now no need to pretend its a village and make 10s of thousands row x how ever many tables get populated one table means less load on server and that should be good thing
i will make a few minor changes real soon more to make so only can raid oases or rein if conquered
Thanks! My player who has actually played Travian before and thus suggested such things should be possible - and even tried to do a raid - will like that. I am not sure he ever read the power Travian player guide that claims attacking nature is not cost-efficient.
(But I am pretty sure such power players don't play on worlds that lack literally hundreds or thousands of farms begging to be farmed, too...)
We should also give some thought, at least on back-burner, to peaceful options, maybe for example allow that a hero can be sent to "legendary locations" in a scouting mode even if not officially/militarily a scout, so as for example to make peaceful contact with the elves (aka Natar or Nature?) in a woody oasis, dwarfs (aka Natar technicians?) in a mountainous oasis, etc. Not formulaic in the sense all oases would have this, but at least a way "roleplayers" can "check the place really does offer no non-militarry solution before attacking" and hope some day to get lucky and find an oasis with an artifact or a friendly tribe etc (Civ/Freeciv might call that a "hut"...)
Just because some wargamers and.or videogamers hate "simmers" and/or "roleplayers" is no reason not to aggravate them by supporting such folk/goals. ;)
-MarkM-
---------- Post added at 04:05 PM ---------- Previous post was at 03:51 PM ----------
Oh! Forgot to ask... do the Oases invent their occupants when they are scouted/raided/attacked, or is some kind of mass pre-populating of them still necessary before they will have anyone there to raid?
-MarkM-
there is two functions too run once game is installed (install has the db updates pre made )
$database->populateOasis();
and
$database->poulateOasisUnitsLow();
once those two things are done you can happily raid oasis on map
---------- Post added at 08:10 PM ---------- Previous post was at 07:12 PM ----------
i missed a couple functions on push but know have them all there so should be good now :)
error reporting in
git hub
error in profile when pressing profile it send you to support ;)
also large map error karte.php it must be karte2.php.
also index.php line 18 must be, include ("GameEngine/Lang/".LANG.".php");
but still you ppl are doing a good job,thx for your help
what's worng in abc.com/karte.php?d=1864&c=77
at oasis .............
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 496
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 218
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \GameEngine\Database\db_MYSQL.php on line 218
Hi all, i need some help please. i downloaded ragezone.exe
i installed it nd it works fine but when i select and input troop number and press ok all troops dissapear except for the hero. plus the oasiss have no troops and are ownd by the multihunter.
please some one help me, than you
Eyas
for one eyas your using wrong release use git hub ;please
for he others you need to mae sure you run the two functions you can put them anywhere in any file run them once and delete them
---------- Post added at 06:37 AM ---------- Previous post was at 06:25 AM ----------
i will try make them happen durring install instead
hero doesnt work there thou
---------- Post added at 06:39 AM ---------- Previous post was at 06:38 AM ----------
btw, when i attack an oasis my troops disappear :(
do u know how to fix it
ok i have just made a push to git hub
now as long as your odata has been altered ie from new install it be auto previous ones need to open install/data/sql.sql and look at what has changed in odata table and make changes to there server
i just fixed a bug when populating oasis should now get no errors and population should accour to happen with ease
make a file called oasis.php
make sure file has above code and run it oncePHP Code:<?php
include("GameEngine/Village.php");
$database->poulateOasisdata();
$database->populateOasis();
$database->poulateOasisUnitsLow();
?>
this will have to do untill i can make it happen on install