mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Incremental refactor Building and Ranking
Incremental refactor Building and Ranking
This commit is contained in:
+1941
-821
File diff suppressed because it is too large
Load Diff
+63
-63
@@ -74,12 +74,12 @@ define('ATAG_EMPTY', 'Tag empty');
|
||||
define('ANAME_EMPTY', 'Name empty');
|
||||
define('ATAG_EXIST', 'Tag taken');
|
||||
define('ANAME_EXIST', 'Name taken');
|
||||
define('ALREADY_ALLY_MEMBER', 'You're already in an alliance');
|
||||
define('ALREADY_ALLY_MEMBER', 'You`re already in an alliance');
|
||||
define('ALLY_TOO_LOW', 'You must have a level 3 or greater embassy');
|
||||
define('USER_NOT_IN_YOUR_ALLY', 'This user is not in your alliance!');
|
||||
define('CANT_EDIT_YOUR_PERMISSIONS', 'You can't edit your own permissions!');
|
||||
define('CANT_EDIT_LEADER_PERMISSIONS', 'Alliance leader's permissions can't be edited!');
|
||||
define('NO_PERMISSION', 'You don't have enough permissions!');
|
||||
define('CANT_EDIT_YOUR_PERMISSIONS', 'You can`t edit your own permissions!');
|
||||
define('CANT_EDIT_LEADER_PERMISSIONS', 'Alliance leader`s permissions can`t be edited!');
|
||||
define('NO_PERMISSION', 'You don`t have enough permissions!');
|
||||
define('NAME_OR_DIPL_EMPTY', 'Name or diplomacy empty');
|
||||
define('ALLY_DOESNT_EXISTS', 'Alliance does not exist');
|
||||
define('CANNOT_INVITE_SAME_ALLY', 'You cannot invite your own alliance');
|
||||
@@ -95,16 +95,16 @@ define('ALLY_FORUM_LINK_UPDATED', 'Forum link updated');
|
||||
define('NO_FORUMS_YET', 'There are no forums yet.');
|
||||
define('ALLY_USER_KICKED', ' has been kicked from the alliance');
|
||||
define('NOT_OPENED_YET', 'Server not started yet.');
|
||||
define('REGISTER_CLOSED', 'The register is closed. You can't register to this server.');
|
||||
define('REGISTER_CLOSED', 'The register is closed. You can`t register to this server.');
|
||||
define('NAME_EMPTY', 'Please insert name');
|
||||
define('NAME_NO_EXIST', 'There is no user with the name ');
|
||||
define('ID_NO_EXIST', 'There is no user with the id ');
|
||||
define('SAME_NAME', 'You can't invite yourself');
|
||||
define('SAME_NAME', 'You can`t invite yourself');
|
||||
define('ALREADY_INVITED', ' already invited');
|
||||
define('ALREADY_IN_ALLY', ' is already in this alliance');
|
||||
define('ALREADY_IN_AN_ALLY', ' is already in an alliance');
|
||||
define('NAME_OR_TAG_CHANGED', 'Name or Tag changed');
|
||||
define('VAC_MODE_WRONG_DAYS', 'You've inserted a wrong number of days');
|
||||
define('VAC_MODE_WRONG_DAYS', 'You`ve inserted a wrong number of days');
|
||||
|
||||
//COPYRIGHT
|
||||
define('TRAVIAN_COPYRIGHT', 'TravianZ 100% Open Source Travian Clone.');
|
||||
@@ -130,7 +130,7 @@ define('GO2MY_VILLAGE', 'Go to my village');
|
||||
define('VILLAGE_CENTER', 'Village centre');
|
||||
define('FINISH_GOLD', 'Finish all construction and research orders in this village immediately for 2 Gold?');
|
||||
define('WAITING_LOOP', '(waiting loop)');
|
||||
define('CROP_NEGATIVE', 'Your crop production is negative, you'll neaver reach the amount of requested resources.');
|
||||
define('CROP_NEGATIVE', 'Your crop production is negative, you`ll neaver reach the amount of requested resources.');
|
||||
define('HR', 'h.');
|
||||
define('HRS', '(hrs.)');
|
||||
define('DONE_AT', 'done at');
|
||||
@@ -181,7 +181,7 @@ define('ONLINE_S4', 'Last 7 days');
|
||||
define('ONLINE_S5', 'Inactive');
|
||||
define('WAIT_FOR_CONFIRM', 'Wait for confirm');
|
||||
define('CONFIRM', 'Confirm');
|
||||
define('WRITE_MESS_WARN', '<b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your message because it can cause problem with bbcode system');
|
||||
define('WRITE_MESS_WARN', '<b>Warning:</b> you can`t use the values <b>[message]</b> or <b>[/message]</b> in your message because it can cause problem with bbcode system');
|
||||
define('NO_REPORTS', 'There are no reports available');
|
||||
define('ATTACKER', 'Attacker');
|
||||
define('NATAR_COUNTERFORCE', 'Natar Counterforce');
|
||||
@@ -191,7 +191,7 @@ define('INFORMATION', 'Information');
|
||||
define('CARRY', 'carry');
|
||||
define('DEFENDER', 'Defender');
|
||||
define('VISITED', 'visited');
|
||||
define('HIS_TROOPS', ''s troops');
|
||||
define('HIS_TROOPS', '`s troops');
|
||||
define('WISHES_YOU', 'wishes you');
|
||||
define('X_MAS', 'Merry Christmas');
|
||||
define('NEW_YEAR', 'Happy New Year');
|
||||
@@ -218,21 +218,21 @@ define('Q1_RESP', 'Yes, that way you gain more lumber.I helped a bit and complet
|
||||
define('Q1_REWARD', 'Woodcutter instantly completed.');
|
||||
|
||||
define('Q2', 'Task 2: Crop');
|
||||
define('Q2_DESC', 'Now your subjects are hungry from working all day. Extend a cropland to improve your subjects' supply. Come back here once the building is complete.');
|
||||
define('Q2_DESC', 'Now your subjects are hungry from working all day. Extend a cropland to improve your subjects supply. Come back here once the building is complete.');
|
||||
define('Q2_ORDER', 'Order:</p>Extend one cropland.');
|
||||
define('Q2_RESP', 'Very good. Now your subjects have enough to eat again...');
|
||||
define('Q2_REWARD', 'Your reward:</p>1 day Travian');
|
||||
|
||||
define('Q3', 'Task 3: Your Village's Name');
|
||||
define('Q3_DESC', 'Creative as you are you can grant your village the ultimate name.<br><br>Click on 'profile' in the left hand menu and then select 'change profile'...');
|
||||
define('Q3_ORDER', 'Order:</p>Change your village's name to something nice.');
|
||||
define('Q3', 'Task 3: Your Village`s Name');
|
||||
define('Q3_DESC', 'Creative as you are you can grant your village the ultimate name.<br><br>Click on `profile` in the left hand menu and then select `change profile`...');
|
||||
define('Q3_ORDER', 'Order:</p>Change your village`s name to something nice.');
|
||||
define('Q3_RESP', 'Wow, a great name for their village. It could have been the name of my village!...');
|
||||
|
||||
define('Q4', 'Task 4: Other Players');
|
||||
define('Q4_DESC', 'In '.SERVER_NAME.' you play along with billions of other players. Click 'statistics' in the top menu to look up your rank and enter it here.');
|
||||
define('Q4_DESC', 'In '.SERVER_NAME.' you play along with billions of other players. Click `statistics` in the top menu to look up your rank and enter it here.');
|
||||
define('Q4_ORDER', 'Order:</p>Look for your rank in the statistics and enter it here.');
|
||||
define('Q4_BUTN', 'complete task');
|
||||
define('Q4_RESP', 'Exactly! That's your rank.');
|
||||
define('Q4_RESP', 'Exactly! That`s your rank.');
|
||||
|
||||
define('Q5', 'Task 5: Two Building Orders');
|
||||
define('Q5_DESC', 'Build an iron mine and a clay pit. Of iron and clay one can never have enough.');
|
||||
@@ -240,7 +240,7 @@ define('Q5_ORDER', 'Order:</p><ul><li>Extend one iron mine.</li><li>Extend one c
|
||||
define('Q5_RESP', 'As you noticed, building orders take rather long. The world of '.SERVER_NAME.' will continue to spin even if you are offline. Even in a few months there will be many new things for you to discover.<br><br>The best thing to do is occasionally checking your village and giving you subjects new tasks to do.');
|
||||
|
||||
define('Q6', 'Task 6: Messages');
|
||||
define('Q6_DESC', 'You can talk to other players using the messaging system. I sent a message to you. Read it and come back here.<br><br>P.S. Don't forget: on the left the reports, on the right the messages.');
|
||||
define('Q6_DESC', 'You can talk to other players using the messaging system. I sent a message to you. Read it and come back here.<br><br>P.S. Don`t forget: on the left the reports, on the right the messages.');
|
||||
define('Q6_ORDER', 'Order:</p>Read your new message.');
|
||||
define('Q6_RESP', 'You received it? Very good.<br><br>Here is some Gold. With Gold you can do several things, e.g. extend your in the left hand menu.');
|
||||
define('Q6_RESP1', '-Account or increase your resource production.To do so click ');
|
||||
@@ -254,7 +254,7 @@ define('Q7_ORDER', 'Order:</p>Extend one more of each resource tile to level 1.'
|
||||
define('Q7_RESP', 'Very good, great develop of resources production.');
|
||||
|
||||
define('Q8', 'Task 8: Huge Army!');
|
||||
define('Q8_DESC', 'Now I've got a very special quest for you. I am hungry. Give me 200 crop!<br><br>In return I will try to organize a huge army to protect your village.');
|
||||
define('Q8_DESC', 'Now I`ve got a very special quest for you. I am hungry. Give me 200 crop!<br><br>In return I will try to organize a huge army to protect your village.');
|
||||
define('Q8_ORDER', 'Order:</p>Send 200 crop to the taskmaster.');
|
||||
define('Q8_BUTN', 'Send crop');
|
||||
define('Q8_NOCROP', 'No Enough Crop!');
|
||||
@@ -272,7 +272,7 @@ define('Q10_REWARD', 'Your reward:</p>2 day Travian');
|
||||
|
||||
define('Q11', 'Task 11: Neighbours!');
|
||||
define('Q11_DESC', 'Around you, there are many different villages. One of them is named. ');
|
||||
define('Q11_DESC1', ' Click on 'map' in the header menu and look for that village. The name of your neighbours' villages can be seen when hovering your mouse over any of them.');
|
||||
define('Q11_DESC1', ' Click on `map` in the header menu and look for that village. The name of your neighbours` villages can be seen when hovering your mouse over any of them.');
|
||||
define('Q11_ORDER', 'Order:</p>Look for the coordinates of ');
|
||||
define('Q11_ORDER1', 'and enter them here.');
|
||||
define('Q11_RESP', 'Exactly, there ');
|
||||
@@ -280,9 +280,9 @@ define('Q11_RESP1', ' Village! As many resources as you reach this village. Well
|
||||
define('Q11_BUTN', 'complete task');
|
||||
|
||||
define('Q12', 'Task 12: Cranny');
|
||||
define('Q12_DESC', 'It's getting time to erect a cranny. The world of '.SERVER_NAME.' is dangerous.<br><br>Many players live by stealing other players' resources. Build a cranny to hide some of your resources from enemies.');
|
||||
define('Q12_DESC', 'It`s getting time to erect a cranny. The world of '.SERVER_NAME.' is dangerous.<br><br>Many players live by stealing other players resources. Build a cranny to hide some of your resources from enemies.');
|
||||
define('Q12_ORDER', 'Order:</p>Construct a Cranny.');
|
||||
define('Q12_RESP', 'Well done, now it's way harder for your mean fellow players to plunder your village.<br><br>If under attack, your villagers will hide the resources in the Cranny all on their own.');
|
||||
define('Q12_RESP', 'Well done, now it`s way harder for your mean fellow players to plunder your village.<br><br>If under attack, your villagers will hide the resources in the Cranny all on their own.');
|
||||
|
||||
define('Q13', 'Task 13: To Two.');
|
||||
define('Q13_DESC', 'In '.SERVER_NAME.' there is always something to do! Extend one woodcutter, one clay pit, one iron mine and one cropland to level 2 each.');
|
||||
@@ -290,7 +290,7 @@ define('Q13_ORDER', 'Order:</p>Extend one of each resource tile to level 2.');
|
||||
define('Q13_RESP', 'Very good, your village grows and thrives!');
|
||||
|
||||
define('Q14', 'Task 14: Instructions');
|
||||
define('Q14_DESC', 'In the ingame instructions you can find short information texts about different buildings and types of units.<br><br>Click on 'instructions' at the left to find out how much lumber is required for the barracks.');
|
||||
define('Q14_DESC', 'In the ingame instructions you can find short information texts about different buildings and types of units.<br><br>Click on `instructions` at the left to find out how much lumber is required for the barracks.');
|
||||
define('Q14_ORDER', 'Order:</p>Enter how much lumber barracks cost');
|
||||
define('Q14_BUTN', 'complete task');
|
||||
define('Q14_RESP', 'Exactly! Barracks cost 210 lumber.');
|
||||
@@ -303,7 +303,7 @@ define('Q15_RESP', 'Well done. The main building level 3 has been completed.<br>
|
||||
define('Q16', 'Task 16: Advanced!');
|
||||
define('Q16_DESC', 'Look up your rank in the player statistics again and enjoy your progress.');
|
||||
define('Q16_ORDER', 'Order:</p>Look for your rank in the statistics and enter it here.');
|
||||
define('Q16_RESP', 'Well done! That's your current rank.');
|
||||
define('Q16_RESP', 'Well done! That`s your current rank.');
|
||||
|
||||
define('Q17', 'Task 17: Weapons or Dough');
|
||||
define('Q17_DESC', 'Now you have to make a decision: Either trade peacefully or become a dreaded warrior.<br><br>For the marketplace you need a granary, for the barracks you need a rally point.');
|
||||
@@ -352,8 +352,8 @@ define('Q24_RESP', 'Congratulations! Your village grows and thrives...');
|
||||
define('Q28', 'Task 22: Alliance.');
|
||||
define('Q28_DESC', 'Teamwork is important in Travian. Players who work together organise themselves in alliances. Get an invitation from an alliance in your region and join this alliance. Alternatively, you can found your own alliance. To do this, you need a level 3 embassy.');
|
||||
define('Q28_ORDER', 'Order:</p>Join an alliance or found one on your own.');
|
||||
define('Q28_RESP', 'Is good! Now you're in a union called');
|
||||
define('Q28_RESP1', ', and you're a member of their alliance with the faster you'll progress...');
|
||||
define('Q28_RESP', 'Is good! Now you`re in a union called');
|
||||
define('Q28_RESP1', ', and you`re a member of their alliance with the faster you`ll progress...');
|
||||
|
||||
define('Q29', 'Task 23: Main Building to Level 5');
|
||||
define('Q29_DESC', 'To be able to build a palace or residence, you will need a main building at level 5.');
|
||||
@@ -366,7 +366,7 @@ define('Q30_ORDER', 'Order:</p>Upgrade your granary to level 3.');
|
||||
define('Q30_RESP', 'Granary is level 3 now...');
|
||||
|
||||
define('Q31', 'Task 25: Warehouse to Level 7');
|
||||
define('Q31_DESC', ' To make sure your resources won't overflow, you should upgrade your warehouse.');
|
||||
define('Q31_DESC', ' To make sure your resources won`t overflow, you should upgrade your warehouse.');
|
||||
define('Q31_ORDER', 'Order:</p>Upgrade your warehouse to level 7.');
|
||||
define('Q31_RESP', 'Warehouse has upgraded to level 7...');
|
||||
|
||||
@@ -395,7 +395,7 @@ define('Q36', ' Task 30: Build a ');
|
||||
define('Q36_DESC', 'Now that you have trained some soldiers, you should build a ');
|
||||
define('Q36_DESC1', ' too. It increases the base defence and your soldiers will receive a defensive bonus.');
|
||||
define('Q36_ORDER', 'Order:</p>Build a ');
|
||||
define('Q36_RESP', 'That's what I'm talking about. A ');
|
||||
define('Q36_RESP', 'That`s what I`m talking about. A ');
|
||||
define('Q36_RESP1', ' Very useful. It increases the defence of the troops in the village.');
|
||||
|
||||
define('Q37', 'Tasks');
|
||||
@@ -415,14 +415,14 @@ define('TWO_DAYS_OF_TRAVIAN', '2 days Travian ');
|
||||
//Quest 25
|
||||
define('Q25_7', 'Task 7: Neighbours!');
|
||||
define('Q25_7_DESC', 'Around you, there are many different villages. One of them is named. ');
|
||||
define('Q25_7_DESC1', 'Click 'Map' in the head menu and look for that village. The name of your neighbours' villages can be seen once you hover your mouse over any of them.');
|
||||
define('Q25_7_DESC1', 'Click `Map` in the head menu and look for that village. The name of your neighbours villages can be seen once you hover your mouse over any of them.');
|
||||
define('Q25_7_ORDER', '</p><b>Order:</b><br>Look for the coordinates of ');
|
||||
define('Q25_7_ORDER1', 'and enter them here.');
|
||||
define('Q25_7_RESP', 'Exactly, there ');
|
||||
define('Q25_7_RESP1', ' Village! As many resources as you reach this village. Well, almost as much ...');
|
||||
|
||||
define('Q25_8', 'Task 8: Huge Army!');
|
||||
define('Q25_8_DESC', 'Now I've got a very special Quest for you. I am hungry. Give me 200 crop!<br><br>In return I will try to organize a huge army to protect your village.');
|
||||
define('Q25_8_DESC', 'Now I`ve got a very special Quest for you. I am hungry. Give me 200 crop!<br><br>In return I will try to organize a huge army to protect your village.');
|
||||
define('Q25_8_ORDER', 'Order:</p>Send 200 crop to the taskmaster.');
|
||||
define('Q25_8_BUTN', 'Send crop');
|
||||
define('Q25_8_NOCROP', 'No Enough Crop!');
|
||||
@@ -434,7 +434,7 @@ define('Q25_9_RESP', 'Very good, great development of resource production.');
|
||||
|
||||
define('Q25_10', 'Task 10: Comming Soon!');
|
||||
define('Q25_10_DESC', 'Now there is time for a small break until the gigantic army I sent you arrives.<br><br>Until then you can explore the map or extend a few resource tiles.');
|
||||
define('Q25_10_ORDER', 'Order:</p>Wait for the taskmaster's army to arrive');
|
||||
define('Q25_10_ORDER', 'Order:</p>Wait for the taskmaster`s army to arrive');
|
||||
define('Q25_10_RESP', 'Now a huge army from taskmaster has arrive to protect your village');
|
||||
define('Q25_10_REWARD', 'Your reward:</p>2 days more of Travian');
|
||||
|
||||
@@ -454,9 +454,9 @@ define('Q25_13_ORDER', 'Order:</p>Write the code <b>[#0]</b> into your profile b
|
||||
define('Q25_13_RESP', 'Well done! Now everyone can see what a great warrior the world is approached by.');
|
||||
|
||||
define('Q25_14', 'Task 14: Cranny');
|
||||
define('Q25_14_DESC', 'It's getting time to erect a cranny. The world of <b>'.SERVER_NAME.'</b> is dangerous.<br><br>Many players live by stealing other players' resources. Build a cranny to hide some of your resources from enemies.');
|
||||
define('Q25_14_DESC', 'It`s getting time to erect a cranny. The world of <b>'.SERVER_NAME.'</b> is dangerous.<br><br>Many players live by stealing other player`s resources. Build a cranny to hide some of your resources from enemies.');
|
||||
define('Q25_14_ORDER', 'Order:</p>Construct a Cranny.');
|
||||
define('Q25_14_RESP', 'Well done, now it's way harder for your mean fellow players to plunder your village.<br><br>If under attack, your villagers will hide the resources in the Cranny all on their own.');
|
||||
define('Q25_14_RESP', 'Well done, now it`s way harder for your mean fellow players to plunder your village.<br><br>If under attack, your villagers will hide the resources in the Cranny all on their own.');
|
||||
|
||||
define('Q25_15', 'Task 15: To Two.');
|
||||
define('Q25_15_DESC', 'In <b>'.SERVER_NAME.'</b> there is always something to do! Extend one woodcutter, one clay pit, one iron mine and one cropland to level 2 each.');
|
||||
@@ -464,7 +464,7 @@ define('Q25_15_ORDER', 'Order:</p>Extend one of each resource tile to level 2.')
|
||||
define('Q25_15_RESP', 'Very good, your village grows and thrives!');
|
||||
|
||||
define('Q25_16', 'Task 16: Instructions');
|
||||
define('Q25_16_DESC', 'In the ingame instructions you can find short information texts about different buildings and types of units.<br><br>Click on 'instructions' at the left to find out how much lumber is required for the barracks.');
|
||||
define('Q25_16_DESC', 'In the ingame instructions you can find short information texts about different buildings and types of units.<br><br>Click on `instructions` at the left to find out how much lumber is required for the barracks.');
|
||||
define('Q25_16_ORDER', 'Order:</p>Enter how much lumber barracks cost');
|
||||
define('Q25_16_BUTN', 'complete task');
|
||||
define('Q25_16_RESP', 'Exactly! Barracks cost 210 lumber.');
|
||||
@@ -477,7 +477,7 @@ define('Q25_17_RESP', 'Well done. The main building level 3 has been completed.<
|
||||
define('Q25_18', 'Task 18: Advanced!');
|
||||
define('Q25_18_DESC', 'Look up your rank in the player statistics again and enjoy your progress.');
|
||||
define('Q25_18_ORDER', 'Order:</p>Look for your rank in the statistics and enter it here.');
|
||||
define('Q25_18_RESP', 'Well done! That's your current rank.');
|
||||
define('Q25_18_RESP', 'Well done! That`s your current rank.');
|
||||
|
||||
define('Q25_19', 'Task 19: Weapons or Dough');
|
||||
define('Q25_19_DESC', 'Now you have to make a decision: Either trade peacefully or become a dreaded warrior.<br><br>For the marketplace you need a granary, for the barracks you need a rally point.');
|
||||
@@ -519,7 +519,7 @@ define('Q25_25_RESP1', 'Combat Simulator');
|
||||
define('Q25_25_RESP2', 'to see how many troops you need to successfully fight one rat without losses.');
|
||||
|
||||
define('Q25_26', 'Task 22: Everything to 2.');
|
||||
define('Q25_26_DESC', 'Now it's time again to extend the cornerstones of might and wealth! This time level 1 is not enough... it will take a while but in the end it will be worth it. Extend all your resource tiles to level 2!');
|
||||
define('Q25_26_DESC', 'Now it`s time again to extend the cornerstones of might and wealth! This time level 1 is not enough... it will take a while but in the end it will be worth it. Extend all your resource tiles to level 2!');
|
||||
define('Q25_26_ORDER', 'Order:</p>Extend all resource tiles to level 2.');
|
||||
define('Q25_26_RESP', 'Congratulations! Your village grows and thrives...');
|
||||
|
||||
@@ -536,8 +536,8 @@ define('Q25_28_RESP', 'Yes! You can wait invitation from an alliance or create y
|
||||
define('Q25_29', 'Task 25: Alliance.');
|
||||
define('Q25_29_DESC', 'Teamwork is important in Travian. Players who work together organise themselves in alliances. Get an invitation from an alliance in your region and join this alliance. Alternatively, you can found your own alliance. To do this, you need a level 3 embassy.');
|
||||
define('Q25_29_ORDER', 'Order:</p>Join an alliance or found your own alliance.');
|
||||
define('Q25_29_RESP', 'Well done! Now you're in a union called');
|
||||
define('Q25_29_RESP1', ', and you're a member of their alliance.<br>Working together you will all progress faster...');
|
||||
define('Q25_29_RESP', 'Well done! Now you`re in a union called');
|
||||
define('Q25_29_RESP1', ', and you`re a member of their alliance.<br>Working together you will all progress faster...');
|
||||
|
||||
define('Q25_30', 'Tasks');
|
||||
define('Q25_30_DESC', 'All tasks achieved!');
|
||||
@@ -654,7 +654,7 @@ define('LEARN1', 'Upgrade your fields and mines to increase your resource produc
|
||||
define('LEARN2', 'Construct and expand the buildings in your village. Buildings improve your overall infrastructure, increase your resource production and allow you to research, train and upgrade your troops.');
|
||||
define('LEARN3', 'View and interact with your surroundings. You can make new friends or new enemies, make use of the nearby oases and observe as your empire grows and becomes stronger.');
|
||||
define('LEARN4', 'Follow your improvement and success and compare yourself to other players. Look at the Top 10 rankings and fight to win a weekly medal.');
|
||||
define('LEARN5', 'Receive detailed reports about your adventures, trades and battles. Don't forget to check the brand new reports about the happenings taking place in your surroundings.');
|
||||
define('LEARN5', 'Receive detailed reports about your adventures, trades and battles. Don`t forget to check the brand new reports about the happenings taking place in your surroundings.');
|
||||
define('LEARN6', 'Exchange information and conduct diplomacy with other players. Always remember that communication is the key to winning new friends and solving old conflicts.');
|
||||
define('LOGIN_TO', 'Log in to '.SERVER_NAME);
|
||||
define('REGIN_TO', 'Register in '.SERVER_NAME);
|
||||
@@ -789,7 +789,7 @@ define('START_NOW', 'START NOW');
|
||||
|
||||
//404.php
|
||||
define('NOTHING_HERE', 'Nothing here!');
|
||||
define('WE_LOOKED', 'We looked 404 times already but can't find anything');
|
||||
define('WE_LOOKED', 'We looked 404 times already but can`t find anything');
|
||||
|
||||
//MASSMESSAGE.php
|
||||
define('MASS', 'Message Content');
|
||||
@@ -798,7 +798,7 @@ define('MASS_COLOR', 'Message color:');
|
||||
define('MASS_REQUIRED', 'All fields required');
|
||||
define('MASS_UNITS', 'Images (units):');
|
||||
define('MASS_SHOWHIDE', 'Show/Hide');
|
||||
define('MASS_READ', 'Read this: after adding smilie, you have to add left or right after number otherwise image will won't work');
|
||||
define('MASS_READ', 'Read this: after adding smilie, you have to add left or right after number otherwise image will won`t work');
|
||||
define('MASS_CONFIRM', 'Confirmation');
|
||||
define('MASS_REALLY', 'Do you really want to send MassIGM?');
|
||||
define('MASS_ABORT', 'Aborting right now');
|
||||
@@ -810,9 +810,9 @@ define('WOODCUTTER_DESC', 'The woodcutter cuts down trees in order to produce lu
|
||||
define('CLAYPIT', 'Clay Pit');
|
||||
define('CLAYPIT_DESC', 'Here, clay is produced. By increasing its level, you increase clay production.<br>By constructing a brickyard, you can further increase the production');
|
||||
define('IRONMINE', 'Iron Mine');
|
||||
define('IRONMINE_DESC', 'Here, miners gather the precious resource of iron. By increasing the mine's level, you increase its iron production.<br>By constructing an iron foundry, you can further increase the production');
|
||||
define('IRONMINE_DESC', 'Here, miners gather the precious resource of iron. By increasing the mine`s level, you increase its iron production.<br>By constructing an iron foundry, you can further increase the production');
|
||||
define('CROPLAND', 'Cropland');
|
||||
define('CROPLAND_DESC', 'Your population's food is produced here. By increasing the cropland's level, you increase crop production.<br>By constructing a grain mill and a bakery, you can further increase the production');
|
||||
define('CROPLAND_DESC', 'Your population`s food is produced here. By increasing the cropland`s level, you increase crop production.<br>By constructing a grain mill and a bakery, you can further increase the production');
|
||||
|
||||
define('SAWMILL', 'Sawmill');
|
||||
define('SAWMILL_DESC', 'Lumber cut by your woodcutters is processed here. The Sawmill boosts wood production in the village. At Level 1, it increases wood production by 5%, and every time you upgrade it, the production is increased by 5% more, for a total of 25% after 5 levels.<br>The bonus from the Sawmill and all buildings providing resource bonuses only apply to the village in which the building is built.<br>Note that the Sawmill bonus does not apply to other bonus effects such as Oasis income or the 10% PLUS bonus.<br>There are also villages consisting of 3 or 5 wood fields. The more fields in a village, more the Sawmill levels can be efficiently');
|
||||
@@ -843,11 +843,11 @@ define('WAREHOUSE', 'Warehouse');
|
||||
define('CURRENT_CAPACITY', 'Current capacity:');
|
||||
define('CAPACITY_LEVEL', 'Capacity at level');
|
||||
define('RESOURCE_UNITS', 'Resource units');
|
||||
define('WAREHOUSE_DESC', 'The resources lumber, clay and iron are stored in the warehouse. By increasing its level, you increase your warehouse's capacity. Can be built multiple times, once one is built to max level');
|
||||
define('WAREHOUSE_DESC', 'The resources lumber, clay and iron are stored in the warehouse. By increasing its level, you increase your warehouse`s capacity. Can be built multiple times, once one is built to max level');
|
||||
|
||||
define('GRANARY', 'Granary');
|
||||
define('CROP_UNITS', 'Crop units');
|
||||
define('GRANARY_DESC', 'The crop produced on your farms is stored in the granary. By increasing its level, you increase the granary's capacity. Can be built multiple times, once one is built to max level');
|
||||
define('GRANARY_DESC', 'The crop produced on your farms is stored in the granary. By increasing its level, you increase the granary`s capacity. Can be built multiple times, once one is built to max level');
|
||||
|
||||
define('BLACKSMITH', 'Blacksmith');
|
||||
define('ACTION', 'Action');
|
||||
@@ -864,12 +864,12 @@ define('TOO_FEW_RESOURCES', 'Too few<br>resources');
|
||||
define('UPGRADING', 'Upgrading');
|
||||
define('DURATION', 'Duration');
|
||||
define('COMPLETE', 'Complete');
|
||||
define('BLACKSMITH_DESC', 'The weapons of your warriors are enhanced in the blacksmith's melting furnaces. By increasing its level, you can order the fabrication of even better weapons');
|
||||
define('BLACKSMITH_DESC', 'The weapons of your warriors are enhanced in the blacksmith`s melting furnaces. By increasing its level, you can order the fabrication of even better weapons');
|
||||
|
||||
define('ARMOURY', 'Armoury');
|
||||
define('UPGRADE_ARMOURY', 'Upgrade<br>Armoury');
|
||||
define('UPGRADES_COMMENCE_ARMOURY', 'Upgrades can commence when armoury is completed.');
|
||||
define('ARMOURY_DESC', 'The armor of your warriors are enhanced in the armoury's melting furnaces. By increasing its level, you can order the fabrication of even better armor');
|
||||
define('ARMOURY_DESC', 'The armor of your warriors are enhanced in the armoury`s melting furnaces. By increasing its level, you can order the fabrication of even better armor');
|
||||
|
||||
define('TOURNAMENTSQUARE', 'Tournament Square');
|
||||
define('CURRENT_SPEED', 'Current speed bonus:');
|
||||
@@ -882,7 +882,7 @@ define('CONSTRUCTION_TIME_LEVEL', 'Construction time at level');
|
||||
define('DEMOLITION_BUILDING', 'Demolition of the building:</h2><p>If you no longer need a building, you can order the demolition of the building.</p>');
|
||||
define('DEMOLISH', 'Demolish');
|
||||
define('DEMOLITION_OF', 'Demolition of ');
|
||||
define('MAINBUILDING_DESC', 'The village's master builders live in the main building. The higher its level the faster your master builders complete the construction of new buildings.');
|
||||
define('MAINBUILDING_DESC', 'The village`s master builders live in the main building. The higher its level the faster your master builders complete the construction of new buildings.');
|
||||
|
||||
define('RALLYPOINT', 'Rally Point');
|
||||
define('RALLYPOINT_COMMENCE', 'Troops movement will be displayed when the '.RALLYPOINT.' is completed');
|
||||
@@ -892,7 +892,7 @@ define('EVASION_SETTINGS', 'evasion settings');
|
||||
define('SEND_TROOPS_AWAY_MAX', 'Send troops away a maximum of');
|
||||
define('TIMES', 'times');
|
||||
define('PER_EVASION', 'per evasion');
|
||||
define('RALLYPOINT_DESC', 'Your village's troops gather here. From here, you can send them out to conquer, raid or reinforce other villages.<br>If there are less attacking units than the level of the rally point, you can see the type of unit attacking.');
|
||||
define('RALLYPOINT_DESC', 'Your village`s troops gather here. From here, you can send them out to conquer, raid or reinforce other villages.<br>If there are less attacking units than the level of the rally point, you can see the type of unit attacking.');
|
||||
define('COMBAT_SIMULATOR', 'Combat Simulator');
|
||||
|
||||
define('MARKETPLACE', 'Marketplace');
|
||||
@@ -913,8 +913,8 @@ define('TOO_FEW_MERCHANTS', 'Too few merchants');
|
||||
define('OWN_MERCHANTS_ONWAY', 'Own merchants on the way');
|
||||
define('MERCHANTS_RETURNING', 'Merchants returning');
|
||||
define('TRANSPORT_TO', 'Transport to');
|
||||
define('I_AN_SEARCHING', 'I'm searching');
|
||||
define('I_AN_OFFERING', 'I'm offering');
|
||||
define('I_AN_SEARCHING', 'I`m searching');
|
||||
define('I_AN_OFFERING', 'I`m offering');
|
||||
define('OFFERS_MARKETPLACE', 'Offers at the marketplace');
|
||||
define('NO_AVAILABLE_OFFERS', 'No offers at the marketplace');
|
||||
define('OFFERED_TO_ME', 'Offered<br>to me');
|
||||
@@ -960,7 +960,7 @@ define('DISTRIBUTE_RESOURCES', 'Distribute resources at (step 1 of 2)');
|
||||
define('OF', 'of');
|
||||
define('NPC_COMPLETED', 'NPC completed');
|
||||
define('BACK_BUILDING', 'Back to building');
|
||||
define('YOU_CAN_NAT_NPC_WW', 'You can't use NPC trade in WW village.');
|
||||
define('YOU_CAN_NAT_NPC_WW', 'You can`t use NPC trade in WW village.');
|
||||
define('NPC_TRADING', 'NPC trading');
|
||||
define('SEND_RESOURCES', 'Send Resources');
|
||||
define('BUY', 'Buy');
|
||||
@@ -993,7 +993,7 @@ define('JOIN_ALLIANCE', 'join alliance');
|
||||
define('REFUSE', 'refuse');
|
||||
define('ACCEPT', 'accept');
|
||||
define('NO_INVITATIONS', 'There are no invitations available.');
|
||||
define('NO_CREATE_ALLIANCE', 'Banned player can't create an alliance.');
|
||||
define('NO_CREATE_ALLIANCE', 'Banned player can`t create an alliance.');
|
||||
define('FOUND_ALLIANCE', 'found alliance');
|
||||
define('EMBASSY_DESC', 'The embassy is a place for diplomats. At level 1 you can join an alliance, and after extending it to level 3 you may even found one yourself.<br>The maximum number of members in an alliance is 60');
|
||||
|
||||
@@ -1061,14 +1061,14 @@ define('DATE', 'Date');
|
||||
define('CONQUERED_BY_VILLAGE', 'Villages founded or conquered by this village');
|
||||
define('NONE_CONQUERED_BY_VILLAGE', 'No other village has been founded or conquered by this village yet.');
|
||||
define('RESIDENCE_CULTURE_DESC', 'In order to extend your empire you need culture points. These culture points increase in the course of time and do so faster as your building levels increase.');
|
||||
define('RESIDENCE_LOYALTY_DESC', 'By attacking with senators, chiefs or chieftains a village's loyalty can be brought down. If it reaches zero, the village joins the realm of the attacker. The loyalty of this village is currently at ');
|
||||
define('RESIDENCE_LOYALTY_DESC', 'By attacking with senators, chiefs or chieftains a village`s loyalty can be brought down. If it reaches zero, the village joins the realm of the attacker. The loyalty of this village is currently at ');
|
||||
define('RESIDENCE_DESC', 'The Residence protects the village against enemy conquests. You can build one residence per village. Units that can found a new village or conquer existing villages can be trained here.<br>Additionally, the residence provides an expansion slot at levels 10 and 20 each');
|
||||
|
||||
define('PALACE', 'Palace');
|
||||
define('PALACE_CONSTRUCTION', 'Palace under construction');
|
||||
define('PALACE_TRAIN_DESC', 'In order to found a new village you need a level 10, 15 or 20 palace and 3 settlers. In order to conquer a new village you need a level 10, 15 or 20 palace and a senator, chief or chieftain.');
|
||||
define('CHANGE_CAPITAL', 'change capital');
|
||||
define('SECURITY_CHANGE_CAPITAL', 'Are you sure, that you want to change your capital?<br><b>You can't undo this!</b><br>For security you must enter your password to confirm:<br>');
|
||||
define('SECURITY_CHANGE_CAPITAL', 'Are you sure, that you want to change your capital?<br><b>You can`t undo this!</b><br>For security you must enter your password to confirm:<br>');
|
||||
define('PALACE_DESC', 'The palace building is unique. You can only build one in your whole realm and you can proclaim that village as your capital. It also protects the village against enemy conquests. Units that can found a new village or conquer existing villages can be trained here.<br>Additionally, the palace provides an expansion slot at levels 10, 15 and 20 each');
|
||||
|
||||
define('TREASURY', 'Treasury');
|
||||
@@ -1115,7 +1115,7 @@ define('TREASURY_DESC', 'The riches of your empire are kept in the treasury. A t
|
||||
define('TRADEOFFICE', 'Trade Office');
|
||||
define('CURRENT_MERCHANT', 'Current merchant load:');
|
||||
define('MERCHANT_LEVEL', 'Merchant load at level');
|
||||
define('TRADEOFFICE_DESC', 'In the trade office, the merchants' carts get improved and equipped with more powerful horses. The higher its level, the more your merchants are able to carry');
|
||||
define('TRADEOFFICE_DESC', 'In the trade office, the merchants carts get improved and equipped with more powerful horses. The higher its level, the more your merchants are able to carry');
|
||||
|
||||
define('GREATBARRACKS', 'Great Barracks');
|
||||
define('TRAINING_COMMENCE_GREATBARRACKS', 'Training can commence when great barracks is completed.');
|
||||
@@ -1136,10 +1136,10 @@ define('EARTHWALL_DESC', 'Provides a defense bonus for your troops (((1.02 ^ lev
|
||||
define('PALISADE', 'Palisade');
|
||||
define('PALISADE_DESC', 'Provides a defense bonus for your troops (((1.025 ^ level) * 100)% + 8) defensive points per level to the basic defensive value for a village. A higher level Palisade will give your troops a higher defence bonus.<br>Tribe-specific: Gauls only');
|
||||
|
||||
define('STONEMASON', 'Stonemason's Lodge');
|
||||
define('STONEMASON', 'Stonemason`s Lodge');
|
||||
define('CURRENT_STABILITY', 'Current stability bonus:');
|
||||
define('STABILITY_LEVEL', 'Stability bonus at level');
|
||||
define('STONEMASON_DESC', 'The Stonemason is an expert it cutting stone. The higher the level of the Stonemason's Lodge, the greater the stability of your village's buildings. For each level this building will increase durability by 10% for a maximum of 200% durability for your buildings.<br>This building can only be built in an accounts Capital');
|
||||
define('STONEMASON_DESC', 'The Stonemason is an expert it cutting stone. The higher the level of the Stonemason`s Lodge, the greater the stability of your village`s buildings. For each level this building will increase durability by 10% for a maximum of 200% durability for your buildings.<br>This building can only be built in an accounts Capital');
|
||||
|
||||
define('BREWERY', 'Brewery');
|
||||
define('CURRENT_BONUS', 'Current bonus:');
|
||||
@@ -1154,7 +1154,7 @@ define('TRAP', 'Trap');
|
||||
define('CURRENT_HAVE', 'You currently have');
|
||||
define('WHICH_OCCUPIED', 'of which are occupied.');
|
||||
define('TRAINING_COMMENCE_TRAPPER', 'Training can commence when trapper is completed.');
|
||||
define('TRAPPER_DESC', 'The trapper protects your village with well hidden traps. This means that unwary enemies can be imprisoned and won't be able to harm your village any more.<br>Troops cannot be freed with a raid. If the owner of the traps release the captives all of the traps will be repaired automatically.<br>Tribe-specific: Gauls only');
|
||||
define('TRAPPER_DESC', 'The trapper protects your village with well hidden traps. This means that unwary enemies can be imprisoned and won`t be able to harm your village any more.<br>Troops cannot be freed with a raid. If the owner of the traps release the captives all of the traps will be repaired automatically.<br>Tribe-specific: Gauls only');
|
||||
|
||||
define("HEROSMANSION", "Hero's Mansion");
|
||||
define('HERO_READY', 'Hero will be ready in ');
|
||||
@@ -1180,7 +1180,7 @@ define('OR_LOWER', ' or lower!');
|
||||
define('YOUR_HERO_HAS', 'Your hero has ');
|
||||
define('OF_HIT_POINTS', 'of his life points');
|
||||
define('ERROR_NAME_SHORT', 'Error: name too short');
|
||||
define('HEROSMANSION_DESC', 'The hero's mansion is the home of your glorious hero.<br>At building levels 10, 15 and 20, you can use your hero to annex an unoccupied oasis to your village, one per each of these levels respectively. Depending on the oasis, you will get a production increase for a certain type of resource (or even two resources, from some oases)');
|
||||
define('HEROSMANSION_DESC', 'The hero`s mansion is the home of your glorious hero.<br>At building levels 10, 15 and 20, you can use your hero to annex an unoccupied oasis to your village, one per each of these levels respectively. Depending on the oasis, you will get a production increase for a certain type of resource (or even two resources, from some oases)');
|
||||
|
||||
define('GREATWAREHOUSE', 'Great Warehouse');
|
||||
define('GREATWAREHOUSE_DESC', 'The great warehouse has 3 times the capacity of a normal warehouse.<br>This building can only be built in wonder of the world villages or with a special Natarian artefact');
|
||||
@@ -1239,7 +1239,7 @@ define('TOO_LITTLE_GOLD', 'Too little gold');
|
||||
define('GOLD_ON', 'On'); // "attack on" and "gold feature on" can be not the same in different languages
|
||||
define('PLUS_END', 'Your PLUS advantage has ended');
|
||||
define('NPC', 'NPC');
|
||||
define('NO_GOLD', 'You currently don't own gold');
|
||||
define('NO_GOLD', 'You currently don`t own gold');
|
||||
define('GOLD_CLUB', 'Gold Club');
|
||||
define('NOW', 'now');
|
||||
define('NPC_TRADE_GOLD', 'Trade with the NPC merchant');
|
||||
@@ -1363,7 +1363,7 @@ define('VILLAGE_NAME', 'Village name');
|
||||
define('BDAY', 'Birthday');
|
||||
define('CONDITIONS', 'Conditions');
|
||||
define('TIME_PREF', 'Time preferences');
|
||||
define('TIME_ZONES_DESC', 'Here you can change Travian's displayed time to fit your time zone');
|
||||
define('TIME_ZONES_DESC', 'Here you can change Travian`s displayed time to fit your time zone');
|
||||
define('TIME_ZONE_L1', 'Europe');
|
||||
define('TIME_ZONE_L2', 'UK');
|
||||
define('TIME_ZONE_L3', 'Turkey');
|
||||
@@ -1498,7 +1498,7 @@ define('PLAN_DESC', 'With this ancient construction plan you will able to build
|
||||
define('PLAN_INFO', '<h1><b>World Wonder Construction Plans</b></h1>
|
||||
|
||||
|
||||
Many moons ago the tribes of Travian were surprised by the unforeseen return of the Natars. This tribe from immemorial times surpassing all in wisdom, might and glory was about to trouble the free ones again. Thus they put all their efforts in preparing a last war against the Natars and vanquishing them forever. Many thought about the so-called 'Wonders of the World', a construction of many legends, as the only solution. It was told that it would render anyone invincible once completed. Ultimately making the constructors the rulers and conquerors of all known Travian.
|
||||
Many moons ago the tribes of Travian were surprised by the unforeseen return of the Natars. This tribe from immemorial times surpassing all in wisdom, might and glory was about to trouble the free ones again. Thus they put all their efforts in preparing a last war against the Natars and vanquishing them forever. Many thought about the so-called "Wonders of the World", a construction of many legends, as the only solution. It was told that it would render anyone invincible once completed. Ultimately making the constructors the rulers and conquerors of all known Travian.
|
||||
|
||||
However, it was also told that one would need construction plans to construct such a building. Due to this fact, the architects devised cunning plans about how to store these safely. After a while, one could see temple-like buildings in many a city and metropolis - the Treasure Chambers (Treasuries).
|
||||
|
||||
@@ -1718,7 +1718,7 @@ $lang['index'][0][1] = 'Welcome to '.SERVER_NAME;
|
||||
$lang['index'][0][2] = 'Manual';
|
||||
$lang['index'][0][3] = 'Play now, for free!';
|
||||
$lang['index'][0][4] = 'What is '.SERVER_NAME;
|
||||
$lang['index'][0][5] = SERVER_NAME.' is a <b>browser game</b> featuring an engaging ancient world with thousands of other real players.</p><p>It's <strong>free to play</strong> and requires <strong>no downloads</strong>.';
|
||||
$lang['index'][0][5] = SERVER_NAME.' is a <b>browser game</b> featuring an engaging ancient world with thousands of other real players.</p><p>It`s <strong>free to play</strong> and requires <strong>no downloads</strong>.';
|
||||
$lang['index'][0][6] = 'Click here to play '.SERVER_NAME;
|
||||
$lang['index'][0][7] = 'Total players';
|
||||
$lang['index'][0][8] = 'Players active';
|
||||
|
||||
+210
-165
@@ -1,24 +1,61 @@
|
||||
<?php
|
||||
|
||||
/** --------------------------------------------------- **\
|
||||
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
|
||||
+---------------------------------------------------------+
|
||||
| Credits: All the developers including the leaders: |
|
||||
| Advocaite & Dzoki & Donnchadh |
|
||||
| |
|
||||
| Clean some bullshit : Shadow |
|
||||
| |
|
||||
| Copyright: TravianZ Project All rights reserved |
|
||||
\** --------------------------------------------------- **/
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 12.05.2026 ##
|
||||
## Filename: Ranking.php ##
|
||||
## Developed by: Dzoki & Dixie ##
|
||||
## Refactored by: Shadow ##
|
||||
## Fixed by: InCube - double troops ##
|
||||
## Reworked/Fix: ronix ##
|
||||
## Thanks to: Akakori, Elmar & Kirilloid ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
|
||||
## ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
class Ranking {
|
||||
|
||||
public $rankarray = [];
|
||||
private $rlastupdate;
|
||||
|
||||
/*****************************************
|
||||
Function to get rank
|
||||
*****************************************/
|
||||
|
||||
public function getRank() {
|
||||
return $this->rankarray;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to finalize rank array
|
||||
*****************************************/
|
||||
|
||||
private function finalizeRankArray(array $holder): void {
|
||||
$this->rankarray = array_merge(["pad"], $holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to start by rank
|
||||
*****************************************/
|
||||
|
||||
private function setStartByRank($value, $field, $fallback = 1): void {
|
||||
$rank = $this->searchRank($value, $field);
|
||||
if($rank != 0) {
|
||||
$this->getStart($rank);
|
||||
} else {
|
||||
$this->getStart($fallback);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to get user rank
|
||||
*****************************************/
|
||||
|
||||
public function getUserRank($id) {
|
||||
$ranking = $this->getRank();
|
||||
@@ -31,90 +68,88 @@
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to Process Ranking Request
|
||||
*****************************************/
|
||||
|
||||
public function procRankReq($get) {
|
||||
global $village, $session;
|
||||
if(isset($get['id'])) {
|
||||
switch($get['id']) {
|
||||
case 1:
|
||||
$this->procRankArray();
|
||||
break;
|
||||
case 8:
|
||||
$this->procHeroRankArray();
|
||||
if($get['hero'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->getStart($this->searchRank($session->uid, "uid"));
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
$this->procRankRaceArray(1);
|
||||
if($this->searchRank($session->uid, "userid") != 0){
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
}else{
|
||||
$this->getStart(1);
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
$this->procRankRaceArray(2);
|
||||
if($this->searchRank($session->uid, "userid") != 0){
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
}else{
|
||||
$this->getStart(1);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
$this->procRankRaceArray(3);
|
||||
if($this->searchRank($session->uid, "userid") != 0){
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
}else{
|
||||
$this->getStart(1);
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
$this->procAttRankArray();
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
break;
|
||||
case 32:
|
||||
$this->procDefRankArray();
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
break;
|
||||
case 2:
|
||||
$this->procVRankArray();
|
||||
$this->getStart($this->searchRank($village->wid, "wref"));
|
||||
break;
|
||||
case 4:
|
||||
$this->procARankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->getStart($this->searchRank($get['aid'], "id"));
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
$this->procAAttRankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->getStart($this->searchRank($get['aid'], "id"));
|
||||
}
|
||||
break;
|
||||
case 42:
|
||||
$this->procADefRankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->getStart($this->searchRank($get['aid'], "id"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$this->procRankArray();
|
||||
$this->getStart($this->searchRank($session->uid, "userid"));
|
||||
}
|
||||
}
|
||||
public function procRankReq($get) {
|
||||
global $village, $session;
|
||||
if(isset($get['id'])) {
|
||||
switch($get['id']) {
|
||||
case 1:
|
||||
$this->procRankArray();
|
||||
break;
|
||||
case 8:
|
||||
$this->procHeroRankArray();
|
||||
if($get['hero'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->setStartByRank($session->uid, "uid");
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
$this->procRankRaceArray(1);
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
break;
|
||||
case 12:
|
||||
$this->procRankRaceArray(2);
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
break;
|
||||
case 13:
|
||||
|
||||
public function procRank($post) {
|
||||
$this->procRankRaceArray(3);
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
break;
|
||||
case 31:
|
||||
$this->procAttRankArray();
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
break;
|
||||
case 32:
|
||||
|
||||
$this->procDefRankArray();
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
break;
|
||||
case 2:
|
||||
$this->procVRankArray();
|
||||
$this->setStartByRank($village->wid, "wref");
|
||||
break;
|
||||
case 4:
|
||||
$this->procARankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->setStartByRank($get['aid'], "id");
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
$this->procAAttRankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->setStartByRank($get['aid'], "id");
|
||||
}
|
||||
break;
|
||||
case 42:
|
||||
$this->procADefRankArray();
|
||||
if($get['aid'] == 0) {
|
||||
$this->getStart(1);
|
||||
} else {
|
||||
$this->setStartByRank($get['aid'], "id");
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$this->procRankArray();
|
||||
$this->setStartByRank($session->uid, "userid");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to Process Ranking
|
||||
*****************************************/
|
||||
|
||||
public function procRank($post) {
|
||||
if(isset($post['ft'])) {
|
||||
switch($post['ft']) {
|
||||
case "r1":
|
||||
@@ -152,8 +187,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to get start point
|
||||
*****************************************/
|
||||
|
||||
private function getStart($search) {
|
||||
private function getStart($search) {
|
||||
$multiplier = 1;
|
||||
if(!is_numeric($search)) {
|
||||
$_SESSION['search'] = htmlspecialchars($search);
|
||||
@@ -169,28 +208,32 @@
|
||||
$_SESSION['start'] = htmlspecialchars($start);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to get alliance rank
|
||||
*****************************************/
|
||||
|
||||
public function getAllianceRank($id) {
|
||||
$this->procARankArray();
|
||||
while(true) {
|
||||
if(count($this->rankarray) > 1) {
|
||||
$key = key($this->rankarray);
|
||||
if(isset ($this->rankarray[$key]["id"]) && $this->rankarray[$key]["id"] === $id) {
|
||||
return $key;
|
||||
break;
|
||||
} else {
|
||||
if(!next($this->rankarray)) {
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
public function getAllianceRank($id) {
|
||||
$this->procARankArray();
|
||||
if(count($this->rankarray) <= 1) {
|
||||
return 1;
|
||||
}
|
||||
foreach($this->rankarray as $key => $row) {
|
||||
if($row === "pad") {
|
||||
continue;
|
||||
}
|
||||
if(isset($row['id']) && $row['id'] == $id) {
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to search in rank
|
||||
*****************************************/
|
||||
|
||||
public function searchRank($name, $field) {
|
||||
public function searchRank($name, $field) {
|
||||
$count = count($this->rankarray);
|
||||
for ($key = 1; $key < $count; $key++) {
|
||||
if (!isset($this->rankarray[$key]) || $this->rankarray[$key] === "pad") {
|
||||
@@ -206,8 +249,12 @@
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process rank array
|
||||
*****************************************/
|
||||
|
||||
public function procRankArray() {
|
||||
public function procRankArray() {
|
||||
global $multisort, $database;
|
||||
|
||||
if($GLOBALS['db']->countUser() > 0){
|
||||
@@ -252,13 +299,15 @@
|
||||
$holder[] = $value;
|
||||
}
|
||||
}
|
||||
$newholder = ["pad"];
|
||||
foreach($holder as $key) array_push($newholder, $key);
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process rank race array
|
||||
*****************************************/
|
||||
|
||||
public function procRankRaceArray($race) {
|
||||
public function procRankRaceArray($race) {
|
||||
global $multisort, $database;
|
||||
$race = $database->escape((int) $race);
|
||||
$holder = array();
|
||||
@@ -290,14 +339,14 @@
|
||||
$value['totalvillage'] = "";
|
||||
$holder[] = $value;
|
||||
}
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process attack rank by array
|
||||
*****************************************/
|
||||
|
||||
public function procAttRankArray() {
|
||||
public function procAttRankArray() {
|
||||
global $multisort, $database;
|
||||
$holder = array();
|
||||
$q = "SELECT u.id AS userid, u.username, u.apall, COUNT(CASE WHEN v.type != 99 THEN v.wref END) AS totalvillages, COALESCE(SUM(v.pop),0) AS pop
|
||||
@@ -318,14 +367,14 @@
|
||||
$value['apall'] = $row['apall'];
|
||||
$holder[] = $value;
|
||||
}
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process deffence rank by array
|
||||
*****************************************/
|
||||
|
||||
public function procDefRankArray() {
|
||||
public function procDefRankArray() {
|
||||
global $database;
|
||||
$holder = array();
|
||||
$q = "SELECT u.id AS userid, u.username, u.dpall, COUNT(CASE WHEN v.type != 99 THEN v.wref END) AS totalvillages, COALESCE(SUM(v.pop),0) AS pop
|
||||
@@ -346,14 +395,14 @@
|
||||
$value['dpall'] = $row['dpall'];
|
||||
$holder[] = $value;
|
||||
}
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process V rank array
|
||||
*****************************************/
|
||||
|
||||
public function procVRankArray() {
|
||||
public function procVRankArray() {
|
||||
global $multisort;
|
||||
$array = $GLOBALS['db']->getVRanking();
|
||||
$holder = array();
|
||||
@@ -365,14 +414,14 @@
|
||||
$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;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process A rank array
|
||||
*****************************************/
|
||||
|
||||
public function procARankArray() {
|
||||
public function procARankArray() {
|
||||
global $multisort, $database;
|
||||
$array = $GLOBALS['db']->getARanking();
|
||||
$holder = array();
|
||||
@@ -399,14 +448,14 @@
|
||||
$holder[] = $value;
|
||||
}
|
||||
$holder = $multisort->sorte($holder, "totalpop", false, 2);
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process hero array
|
||||
*****************************************/
|
||||
|
||||
public function procHeroRankArray() {
|
||||
public function procHeroRankArray() {
|
||||
global $multisort;
|
||||
$array = $GLOBALS['db']->getHeroRanking();
|
||||
$holder = array();
|
||||
@@ -418,14 +467,14 @@
|
||||
$holder[] = $value;
|
||||
}
|
||||
$holder = $multisort->sorte($holder, "experience", false, 2);
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process ATT array
|
||||
*****************************************/
|
||||
|
||||
public function procAAttRankArray() {
|
||||
public function procAAttRankArray() {
|
||||
global $multisort;
|
||||
$array = $GLOBALS['db']->getARanking();
|
||||
$holder = array();
|
||||
@@ -445,14 +494,14 @@
|
||||
$holder[] = $value;
|
||||
}
|
||||
$holder = $multisort->sorte($holder, "Aap", false, 2);
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to process DEFF array
|
||||
*****************************************/
|
||||
|
||||
public function procADefRankArray() {
|
||||
public function procADefRankArray() {
|
||||
global $multisort;
|
||||
$array = $GLOBALS['db']->getARanking();
|
||||
$holder = array();
|
||||
@@ -472,11 +521,7 @@
|
||||
$holder[] = $value;
|
||||
}
|
||||
$holder = $multisort->sorte($holder, "Adp", false, 2);
|
||||
$newholder = array("pad");
|
||||
foreach($holder as $key) {
|
||||
array_push($newholder, $key);
|
||||
}
|
||||
$this->rankarray = $newholder;
|
||||
$this->finalizeRankArray($holder);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user