options: # preço para reparar Preço: 30 # Tempo para cada atualização de progresso na barra de status TempoProgresso: 5 script options: $ init com.mysql.jdbc.Driver $ db url jdbc:mysql://localhost:3306/sailorspvp $ db username root $ db password senha variables: {danielsk} = 0 {danielsk.enviado} = false on script load: set {_x} to "%{danielsk}%" parsed as integer set {danielsk} to {_x} + 1 on script load: set {danielsk.enviado} to false on script disable: set {danielsk} to 0 on join: set {danielsk.enviado} to false on join: wait 1 second if {danielsk.enviado} is false: send "&aEsse servidor utiliza &6%{danielsk}%&a tecnologia(s) &6DanielSK" set {danielsk.enviado} to true on load: update "CREATE TABLE IF NOT EXISTS `reparadores` (`id` int(11) NOT NULL AUTO_INCREMENT, `propietario` varchar(25) NOT NULL DEFAULT '0', `coordenadas` varchar(255) NOT NULL, `ligado` int(2) DEFAULT '0', PRIMARY KEY (`id`))" on place a end portal frame: if player's tool is a end portal frame: if "%name of player's tool%" contains "&eAmolador - Reparador": send "&aReparador colocado com sucesso. clique com um item nele para reparar." to player update "INSERT INTO reparadores VALUES(DEFAULT, '%player%', '%location of event-block%', DEFAULT)" on break: if event-block is ender portal frame: set {_result1::*} to objects in column "coordenadas" from result of query "SELECT coordenadas FROM reparadores WHERE coordenadas = '%location of event-block%'" set {_result2::*} to objects in column "ligado" from result of query "SELECT ligado FROM reparadores WHERE coordenadas = '%location of event-block%'" if "%{_result1::*}%" is "%location of event-block%": if {_result2::*} is 0: update "DELETE FROM reparadores WHERE coordenadas = '%location of event-block%'" send "&aAmoladora removida com sucesso." cancel event set event-block to air drop 1 ender portal frame named "&eAmolador - Reparador" else: send "&cVocê só pode tirar a amoladora quando ela estiver desligada" cancel event on join: update "UPDATE reparadores SET ligado = '0'" on rightclick on ender portal frame: set {_x} to "%location of event-block%" set {_result1::*} to objects in column "coordenadas" from result of query "SELECT coordenadas FROM reparadores WHERE coordenadas = '%{_x}%'" if "%{_result1::*}%" is "%{_x}%": if player's tool is not air: if durability of held item is 0: send "&cEsse item já está reparado ou não pode ser reparado." else: set {_result1::*} to objects in column "ligado" from result of query "SELECT ligado FROM reparadores WHERE coordenadas = '%location of event-block%'" if {_result1::*} is 0: if player's balance is more than or equal to {@Preço}: update "UPDATE reparadores SET ligado = '1' WHERE coordenadas = '%location of event-block%'" update "UPDATE login SET energia = '%{_result2::*}%' - '1500' WHERE usuario = '%player%'" repair player's tool set {_x} to player's tool remove player's tool from player's inventory delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒▒]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓▓]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete holo object "%event-block's location%" create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓▓▓]" with id "%event-block's location%" at block above event-block wait {@TempoProgresso} seconds delete {item::%event-block's location%} delete holo object "%event-block's location%" give {_x} to player create a fake explosion at player's location update "UPDATE reparadores SET ligado = '0' WHERE coordenadas = '%location of event-block%'" else: send "&cVocê precisa de R${@Preço}&c para reparar itens" else: send "&cA amoladora está sendo usada... espere..." else: send "&cÃn? você está tentando reparar o vento ou é impressão minha?"