Advertisement
Tw100

coluna upagem edificios mod classico

Jan 16th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.84 KB | None | 0 0
  1. <td valign="top" id="leftcolumn">
  2.             <div id="show_summary" class="vis moveable widget ">
  3.     <h4 class="head">
  4.         <img class="widget-button" onclick="return VillageOverview.toggleWidget( 'show_summary', this );" src="graphic/minus.png">      Tw 100 (219 Punkte)
  5.     </h4>
  6.     <div class="widget_content" style="display: block;"><script type="text/javascript">
  7. //<![CDATA[
  8.     confirm_queue = false;
  9.    
  10.  
  11.     $(document).ready(function(){
  12.         UI.ToolTip($('.upgrade_level'));
  13.     });
  14.     function upgrade_building(building) {
  15.  
  16.         var url = '/game.php?village=12592&screen=main&ajaxaction=upgrade_building&type=class&h=93d4fb82';
  17.         var handleUpgradeBuilding = function() {
  18.             $.ajax({
  19.                 async: false, // prevent fast clicking issues
  20.                 dataType: 'json',
  21.                 url: url,
  22.                 data: {id: building, force: 1, source: game_data.village.id},
  23.                 success: function(build_ret){
  24.  
  25.                 if (build_ret.error) {
  26.                     UI.ErrorMessage(build_ret.error);
  27.                 } else if (build_ret.success) {
  28.  
  29.                     //update resources
  30.                     setRes('wood', build_ret.resources[0]);
  31.                     setRes('stone', build_ret.resources[1]);
  32.                     setRes('iron', build_ret.resources[2]);
  33.                     $('#pop_current').html(build_ret.population);
  34.  
  35.                     //increase upgrade level
  36.                     var upgrade_level_span = $('#order_level_' + building);
  37.                     var old_upgrade_level = parseInt(upgrade_level_span.text(), 10) || 0;
  38.                     upgrade_level_span.text("+" + (old_upgrade_level+1));
  39.  
  40.                     //update links
  41.                     $.getJSON('/game.php?village=12592&screen=main&ajax=get_possible_building_upgrades', {}, function(ret) {
  42.                         var new_buildings = ret.buildings, new_title;
  43.                         $('.upgrade_level').hide();
  44.                         $.each(new_buildings, function(building_id, needed_resources) {
  45.                             new_title = generateResourcesLabel(needed_resources);
  46.                             $("#upgrade_level_"+building_id).show().attr('title', new_title);
  47.                         });
  48.                         UI.ToolTip($('.upgrade_level'));
  49.                     });
  50.  
  51.                     confirm_queue = build_ret.confirm_queue;
  52.                 }
  53.             }});
  54.         }
  55.  
  56.         if (!confirm_queue) {
  57.             handleUpgradeBuilding();
  58.             return false;
  59.         }
  60.  
  61.         var msg = "Aufträge in der Bauschleife kosten extra. Dennoch bauen?";
  62.         var buttons = [{text : "Bestätigen", callback : handleUpgradeBuilding, confirm : true}];
  63.         UI.ConfirmationBox(msg, buttons);
  64.     }
  65.  
  66.     function generateResourcesLabel(needed_resources) {
  67.         return s("Holz: %1, Lehm: %2, Eisen: %3  <br /> Bevölkerung: %4", needed_resources.wood, needed_resources.stone, needed_resources.iron, needed_resources.population);
  68.     }
  69. //]]>
  70. </script>
  71.  
  72. <table class="vis" width="100%">
  73.         <tbody><tr id="l_main">
  74.                     <td style="width: 20px">
  75.                             </td>
  76.                 <td width="240">
  77.             <a href="/game.php?village=12592&amp;screen=main"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/main.png" title="" alt="" class=""> Hauptgebäude</a>
  78.             (Stufe 7<small id="order_level_main"></small>)
  79.         </td>
  80.                 <td class="building_extra">
  81.             <strong>heute um 04:03:13</strong> <img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/wood.png" title="1" alt="" class="">
  82.         </td>
  83.             </tr>
  84.         <tr id="l_barracks">
  85.                     <td style="width: 20px">
  86.                             </td>
  87.                 <td width="240">
  88.             <a href="/game.php?village=12592&amp;screen=barracks"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/barracks.png" title="" alt="" class=""> Kaserne</a>
  89.             (Stufe 5<small id="order_level_barracks"></small>)
  90.         </td>
  91.                 <td class="building_extra">
  92.             <strong>heute um 03:59:56</strong> <img src="https://dsde.innogamescdn.com/8.112/35869/graphic/unit/unit_sword.png" title="1" alt="" class="">
  93.         </td>
  94.             </tr>
  95.         <tr id="l_smith">
  96.                     <td style="width: 20px">
  97.                             </td>
  98.                 <td width="240">
  99.             <a href="/game.php?village=12592&amp;screen=smith"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/smith.png" title="" alt="" class=""> Schmiede</a>
  100.             (Stufe 1<small id="order_level_smith"></small>)
  101.         </td>
  102.                 <td class="building_extra">
  103.            
  104.         </td>
  105.             </tr>
  106.         <tr id="l_place">
  107.                     <td style="width: 20px">
  108.                             </td>
  109.                 <td width="240">
  110.             <a href="/game.php?village=12592&amp;screen=place"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/place.png" title="" alt="" class=""> Versammlungsplatz</a>
  111.             (Stufe 1<small id="order_level_place"></small>)
  112.         </td>
  113.                 <td class="building_extra">
  114.            
  115.         </td>
  116.             </tr>
  117.         <tr id="l_market">
  118.                     <td style="width: 20px">
  119.                             </td>
  120.                 <td width="240">
  121.             <a href="/game.php?village=12592&amp;screen=market"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/market.png" title="" alt="" class=""> Marktplatz</a>
  122.             (Stufe 1<small id="order_level_market"></small>)
  123.         </td>
  124.                 <td class="building_extra">
  125.             <strong>Händler: 1/1</strong>
  126.         </td>
  127.             </tr>
  128.         <tr id="l_wood">
  129.                     <td style="width: 20px">
  130.                             </td>
  131.                 <td width="240">
  132.             <a href="/game.php?village=12592&amp;screen=wood"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/wood.png" title="" alt="" class=""> Holzfällerlager</a>
  133.             (Stufe 9<small id="order_level_wood">&nbsp;+2</small>)
  134.         </td>
  135.                 <td class="building_extra">
  136.            
  137.         </td>
  138.             </tr>
  139.         <tr id="l_stone">
  140.                     <td style="width: 20px">
  141.                             </td>
  142.                 <td width="240">
  143.             <a href="/game.php?village=12592&amp;screen=stone"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/stone.png" title="" alt="" class=""> Lehmgrube</a>
  144.             (Stufe 10<small id="order_level_stone">&nbsp;+1</small>)
  145.         </td>
  146.                 <td class="building_extra">
  147.            
  148.         </td>
  149.             </tr>
  150.         <tr id="l_iron">
  151.                     <td style="width: 20px">
  152.                             </td>
  153.                 <td width="240">
  154.             <a href="/game.php?village=12592&amp;screen=iron"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/iron.png" title="" alt="" class=""> Eisenmine</a>
  155.             (Stufe 7<small id="order_level_iron">&nbsp;+2</small>)
  156.         </td>
  157.                 <td class="building_extra">
  158.            
  159.         </td>
  160.             </tr>
  161.         <tr id="l_farm">
  162.                     <td style="width: 20px">
  163.                             </td>
  164.                 <td width="240">
  165.             <a href="/game.php?village=12592&amp;screen=farm"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/farm.png" title="" alt="" class=""> Bauernhof</a>
  166.             (Stufe 3<small id="order_level_farm"></small>)
  167.         </td>
  168.                 <td class="building_extra">
  169.            
  170.         </td>
  171.             </tr>
  172.         <tr id="l_storage">
  173.                     <td style="width: 20px">
  174.                             </td>
  175.                 <td width="240">
  176.             <a href="/game.php?village=12592&amp;screen=storage"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/storage.png" title="" alt="" class=""> Speicher</a>
  177.             (Stufe 8<small id="order_level_storage"></small>)
  178.         </td>
  179.                 <td class="building_extra">
  180.             <strong>heute um 11:40:49</strong>
  181.         </td>
  182.             </tr>
  183.         <tr id="l_hide">
  184.                     <td style="width: 20px">
  185.                             </td>
  186.                 <td width="240">
  187.             <a href="/game.php?village=12592&amp;screen=hide"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/hide.png" title="" alt="" class=""> Versteck</a>
  188.             (Stufe 3<small id="order_level_hide"></small>)
  189.         </td>
  190.                 <td class="building_extra">
  191.            
  192.         </td>
  193.             </tr>
  194.         <tr id="l_wall">
  195.                     <td style="width: 20px">
  196.                             </td>
  197.                 <td width="240">
  198.             <a href="/game.php?village=12592&amp;screen=wall"><img src="https://dsde.innogamescdn.com/8.112/35869/graphic/buildings/wall.png" title="" alt="" class=""> Wall</a>
  199.             (Stufe 5<small id="order_level_wall"></small>)
  200.         </td>
  201.                 <td class="building_extra">
  202.            
  203.         </td>
  204.             </tr>
  205.     </tbody></table></div>
  206. </div><div id="show_event" class="vis moveable hidden_widget" style="display: none;">
  207.     <h4>Ereignis</h4>
  208. </div><div id="show_incoming_units" class="vis moveable hidden_widget" style="display: none;">
  209.     <h4>Ankommende Truppen</h4>
  210. </div><div id="show_outgoing_units" class="vis moveable hidden_widget" style="display: none;">
  211.     <h4>Deine Truppen</h4>
  212. </div>
  213.         </td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement