Guest User

Untitled

a guest
Aug 5th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. options:
  2. # preço para reparar
  3. Preço: 30
  4.  
  5. # Tempo para cada atualização de progresso na barra de status
  6. TempoProgresso: 5
  7.  
  8.  
  9.  
  10. script options:
  11. $ init com.mysql.jdbc.Driver
  12. $ db url jdbc:mysql://localhost:3306/sailorspvp
  13. $ db username root
  14. $ db password senha
  15. variables:
  16. {danielsk} = 0
  17. {danielsk.enviado} = false
  18. on script load:
  19. set {_x} to "%{danielsk}%" parsed as integer
  20. set {danielsk} to {_x} + 1
  21. on script load:
  22. set {danielsk.enviado} to false
  23. on script disable:
  24. set {danielsk} to 0
  25. on join:
  26. set {danielsk.enviado} to false
  27. on join:
  28. wait 1 second
  29. if {danielsk.enviado} is false:
  30. send "&aEsse servidor utiliza &6%{danielsk}%&a tecnologia(s) &6DanielSK"
  31. set {danielsk.enviado} to true
  32. on load:
  33. 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`))"
  34. on place a end portal frame:
  35. if player's tool is a end portal frame:
  36. if "%name of player's tool%" contains "&eAmolador - Reparador":
  37. send "&aReparador colocado com sucesso. clique com um item nele para reparar." to player
  38. update "INSERT INTO reparadores VALUES(DEFAULT, '%player%', '%location of event-block%', DEFAULT)"
  39. on break:
  40. if event-block is ender portal frame:
  41. set {_result1::*} to objects in column "coordenadas" from result of query "SELECT coordenadas FROM reparadores WHERE coordenadas = '%location of event-block%'"
  42. set {_result2::*} to objects in column "ligado" from result of query "SELECT ligado FROM reparadores WHERE coordenadas = '%location of event-block%'"
  43. if "%{_result1::*}%" is "%location of event-block%":
  44. if {_result2::*} is 0:
  45. update "DELETE FROM reparadores WHERE coordenadas = '%location of event-block%'"
  46. send "&aAmoladora removida com sucesso."
  47. cancel event
  48. set event-block to air
  49. drop 1 ender portal frame named "&eAmolador - Reparador"
  50. else:
  51. send "&cVocê só pode tirar a amoladora quando ela estiver desligada"
  52. cancel event
  53. on join:
  54. update "UPDATE reparadores SET ligado = '0'"
  55. on rightclick on ender portal frame:
  56. set {_x} to "%location of event-block%"
  57. set {_result1::*} to objects in column "coordenadas" from result of query "SELECT coordenadas FROM reparadores WHERE coordenadas = '%{_x}%'"
  58. if "%{_result1::*}%" is "%{_x}%":
  59. if player's tool is not air:
  60. if durability of held item is 0:
  61. send "&cEsse item já está reparado ou não pode ser reparado."
  62. else:
  63. set {_result1::*} to objects in column "ligado" from result of query "SELECT ligado FROM reparadores WHERE coordenadas = '%location of event-block%'"
  64. if {_result1::*} is 0:
  65. if player's balance is more than or equal to {@Preço}:
  66. update "UPDATE reparadores SET ligado = '1' WHERE coordenadas = '%location of event-block%'"
  67. update "UPDATE login SET energia = '%{_result2::*}%' - '1500' WHERE usuario = '%player%'"
  68. repair player's tool
  69. set {_x} to player's tool
  70. remove player's tool from player's inventory
  71. delete holo object "%event-block's location%"
  72. create holo object "&eAmolando...;&6Progresso: [░]" with id "%event-block's location%" at block above event-block
  73. wait {@TempoProgresso} seconds
  74. delete holo object "%event-block's location%"
  75. create holo object "&eAmolando...;&6Progresso: [░░]" with id "%event-block's location%" at block above event-block
  76. wait {@TempoProgresso} seconds
  77. delete holo object "%event-block's location%"
  78. create holo object "&eAmolando...;&6Progresso: [░░░]" with id "%event-block's location%" at block above event-block
  79. wait {@TempoProgresso} seconds
  80. delete holo object "%event-block's location%"
  81. create holo object "&eAmolando...;&6Progresso: [░░░▒]" with id "%event-block's location%" at block above event-block
  82. wait {@TempoProgresso} seconds
  83. delete holo object "%event-block's location%"
  84. create holo object "&eAmolando...;&6Progresso: [░░░▒▒]" with id "%event-block's location%" at block above event-block
  85. wait {@TempoProgresso} seconds
  86. delete holo object "%event-block's location%"
  87. create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒]" with id "%event-block's location%" at block above event-block
  88. wait {@TempoProgresso} seconds
  89. delete holo object "%event-block's location%"
  90. create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓]" with id "%event-block's location%" at block above event-block
  91. wait {@TempoProgresso} seconds
  92. delete holo object "%event-block's location%"
  93. create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓▓]" with id "%event-block's location%" at block above event-block
  94. wait {@TempoProgresso} seconds
  95. delete holo object "%event-block's location%"
  96. create holo object "&eAmolando...;&6Progresso: [░░░▒▒▒▓▓▓]" with id "%event-block's location%" at block above event-block
  97. wait {@TempoProgresso} seconds
  98. delete {item::%event-block's location%}
  99. delete holo object "%event-block's location%"
  100. give {_x} to player
  101. create a fake explosion at player's location
  102. update "UPDATE reparadores SET ligado = '0' WHERE coordenadas = '%location of event-block%'"
  103. else:
  104. send "&cVocê precisa de R${@Preço}&c para reparar itens"
  105. else:
  106. send "&cA amoladora está sendo usada... espere..."
  107. else:
  108. send "&cÃn? você está tentando reparar o vento ou é impressão minha?"
Advertisement
Add Comment
Please, Sign In to add comment