DeletedUser
Guest
Script Demoler
Explicación de para qué sirve:Al igual que el script Build, este rebaja el nivel de los edificios de todos los pueblos o grupos de pueblos...
Como Hacerlo funcionar?:Se ejecuta desde Vision General -> Edificios.
Nombre de la entrada: Demoler
URL de la imagen:
URL de destino:
Codigo Online
[spoil]
[/spoil]
Codigo Normal
[SPOIL]
[/SPOIL]
Script Originalmente emitido de TW Brazil
:zvek:
Explicación de para qué sirve:Al igual que el script Build, este rebaja el nivel de los edificios de todos los pueblos o grupos de pueblos...
Como Hacerlo funcionar?:Se ejecuta desde Vision General -> Edificios.
Nombre de la entrada: Demoler
URL de la imagen:
URL de destino:
Codigo Online
[spoil]
Código:
javascript: var maxOrders = 5; var maxBuilds = { main:20, barracks:25, stable:20, garage:10, snob:1, smith:20, place:1, statue:1, market:20, wood:30, stone:30, iron:30, farm:30, storage:30, hide:0, wall:20 }; $.getScript('http://www.hemispheria.net/scripts/pueblo/demoler.js');void(0);
Codigo Normal
[SPOIL]
Código:
ScriptAPI.register( 'Demoler v 1.0', 7.4, 'Black Dragon', 'tw@hemispheria.net' );
/*Javascript:$.getScript("http://www.hemispheria.net/scripts/pueblo/demoler.js"); void(0);*/
if ( jQuery( '#relaxeaza' ).length === 0 )
(function () {
jQuery( '<div>Script desenvolvido por Relaxeaza <@Edito></div>' ).css({
background: 'rgba(0,0,0,.1)',
padding: '5px',
margin: '3px',
opacity: 0,
fontSize: 0,
fontWeight: 'bold'
})
.attr( 'id', 'relaxeaza' )
.attr( 'style', 'display: none;')
.prependTo( '#content_value' )
.animate( { opacity: 1, fontSize: 12 }, 500 );
BuildingOverview.show_all_upgrade_buildings(1);
var Destroy = {
destroyLink: function ( vid ) {
return jQuery( '#upgrade_building_link' ).val().replace( /\d+/, vid );
},
destroyLvl: function ( vid, build ) {
var error = false;
jQuery.getJSON( Destroy.destroyLink( vid ), {
id: build,
destroy: 1,
force: 1
}, function ( ready ) {
if ( ready.error )
error = true;
if ( ready.success )
jQuery( '#building_order_' + vid )
.html( '<ul class="building_order ui-sortable">' + ready.building_orders + '</ul>' );
});
return error;
},
destroyAll: function ( build ) {
jQuery( '#buildings_table tr:not(:first)' ).each( function() {
var vid = jQuery( this ).attr( 'class' ).match( /\d+/ ),
possible = jQuery( '.upgrade_building.b_' + build + ' a', this ).length,
orders = jQuery( 'li .build-status-light[style*=red]', '#building_order_' + vid ).length,
limitOrders = parseInt( jQuery( '.upgrade_building.b_' + build + ' a', this ).text(), 10 ) - maxBuilds[ build ];
for ( ; orders < 5 && possible && limitOrders > 0 && Destroy.destroyLvl( vid, build ) === false; orders++, limitOrders-- ) {}
});
}
};
jQuery( '#buildings_table tr:first th img[src*=buildings]' ).each( function() {
jQuery( this ).click( function() {
var build = jQuery( this ).attr( 'src' ).match( /([\w]+)\.png/ )[1];
Destroy.destroyAll( build );
return false;
});
});
})();
Script Originalmente emitido de TW Brazil
:zvek:
Última edición por un moderador: