Advertisement
zuhir__

MegaCrates - Spanish translation

Dec 26th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.69 KB | None | 0 0
  1. options:
  2.  
  3. #=========================================================#
  4. # __ __ _____ _ #
  5. # | \/ | / ____| | | #
  6. # | \ / | ___ __ _ __ _| | _ __ __ _| |_ ___ ___ #
  7. # | |\/| |/ _ \/ _` |/ _` | | | '__/ _` | __/ _ \/ __| #
  8. # | | | | __/ (_| | (_| | |____| | | (_| | || __/\__ \ #
  9. # |_| |_|\___|\__, |\__,_|\_____|_| \__,_|\__\___||___/ #
  10. # __/ | #
  11. # |___/ #
  12. # #
  13. # Creado por PiskotPiskotovic #
  14. #=========================================================#
  15.  
  16. #============================================================================================#
  17.  
  18. # Configuracion general #
  19.  
  20. #============================================================================================#
  21.  
  22. prefix: &b&lMegaCrates ⏐&e
  23. key-item: tripwire hook
  24. key-name-color: &c&l
  25. crate-block: ender chest
  26. animation: true
  27. animation-length: 5
  28. # animation-length: especifica el largo de la animacion EN SEGUNDOS.
  29. no-key-explosion: false
  30. # no-key-explosion: si esta opcion esta en false y el jugador no tiene una llave le dara un pequeño empujon. Si esta en true lo empujara mucho mas.
  31. open-messages: true
  32. # Aqui puedes cambiar los items que salen en la animacion al abrir una caja.
  33. animation-item1: red stained glass pane
  34. animation-item2: yellow stained glass pane
  35. animation-item3: green stained glass pane
  36. autoclose: 2
  37. # Aqui puedes definir cuanto tarda en auto cerrarse el menu luego de dar la recompensa. EN SEGUNDOS.
  38. doautoclose: true
  39. # La caja no se cierra sola si esto esta en false.
  40. virtual-key: false
  41. # Los jugador no necesitan un item como llave. En lugar de ellos, sera una variable y la caja solo se abrira si tiene 1 o mas.
  42. website: example.com
  43. # Aqui puedes cambiar el enlace a la tienda de tu servidor, que se mostrara en las llaves.
  44. hover-message: &a¿Quieres mas llaves?||&a¡Visita nuestra tienda||&ao vota en nuestro sitio web!
  45. # Aqui puedes cambiar la informacion de las llaves virtuales.
  46. # || = nueva linea
  47. giveonwincommand: false
  48. # No se ejecutara un comando si esta establecido y esto esta en false.
  49.  
  50. # Ayuda para comandos al ganar:
  51. # PLAYER = nombre del jugador
  52.  
  53. #============================================================================================#
  54.  
  55. # Configuracion de las cajas al minar (tambien conocidasc omo PrisionCrates) #
  56.  
  57. #============================================================================================#
  58.  
  59. appear-chance: 2
  60. # Este debe ser un numero entre 0.01 y 100. Escribalo sin el signo de porcentaje.
  61. # Si quieres desactivarlo completamente pon 0.
  62. block: chest
  63. # Este es el tipo de bloque de la caja.
  64. open-crate: prison
  65. # Escribe aqui el nombre que quieres usar para la PrisionCrate, o simplemente dejale el nombre 'prison'.
  66. staytime: 10
  67. # Tiempo (en segundos) que la caja estara ahi. Luego de X segundos desaparecera.
  68. appear-title: &a&l¡Acaba de aparecer un cofre!
  69. appear-subtitle: &7¡Abrelo antes de que desaparezca!
  70. # Aqui puedes cambiar el titulo y el subtitulo que aparece al jugador cuando encuentra una caja.
  71. find-broadcast: true
  72. # Manda un mensaje a todos los jugador cuando alguien encuentra una caja si esto esta en true.
  73. find-message: ¡%player% ha encontrado una caja minando!
  74. # Este es el mensaje que sera enviado a todos.
  75. openable-only-by-player: true
  76. # Solo el jugador que encontro la caja la puede abrir si esto esta en true.
  77.  
  78. # Si te estas preguntando como hacer que la PrisionCrate aparezca la respuesta es simple.
  79. # Necesitas agregar la region de WorldGuard a una lista especial con /crate addregion <region>
  80. # pára hacer que los cofres aparescan en ella.
  81.  
  82. # ¡ADVERTENCIA! Las PrisonCrates no soportan chances para items, pero soportan comandos al ganar.
  83. # Se necesita WorldGuard para las PrisonCrates. Si no las quieres usar, no necesitaras WorldGuard.
  84.  
  85. #============================================================================================#
  86.  
  87. command /megacrates [<text>] [<text>] [<text>] [<text>] [<text>]:
  88. trigger:
  89. if arg 1 isn't set:
  90. make player execute command "crate"
  91. else if arg 1 is set:
  92. if arg 2 isn't set:
  93. make player execute command "crate %arg 1%"
  94. else if arg 2 is set:
  95. if arg 3 isn't set:
  96. make player execute command "crate %arg 1% %arg 2%"
  97. else if arg 3 is set:
  98. if arg 4 isn't set:
  99. make player execute command "crate %arg 1% %arg 2% %arg 3%"
  100. else if arg 4 is set:
  101. if arg 5 isn't set:
  102. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4%"
  103. else if arg 5 is set:
  104. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4% %arg 5%"
  105.  
  106. command /megacrate [<text>] [<text>] [<text>] [<text>] [<text>]:
  107. trigger:
  108. if arg 1 isn't set:
  109. make player execute command "crate"
  110. else if arg 1 is set:
  111. if arg 2 isn't set:
  112. make player execute command "crate %arg 1%"
  113. else if arg 2 is set:
  114. if arg 3 isn't set:
  115. make player execute command "crate %arg 1% %arg 2%"
  116. else if arg 3 is set:
  117. if arg 4 isn't set:
  118. make player execute command "crate %arg 1% %arg 2% %arg 3%"
  119. else if arg 4 is set:
  120. if arg 5 isn't set:
  121. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4%"
  122. else if arg 5 is set:
  123. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4% %arg 5%"
  124.  
  125. command /crates [<text>] [<text>] [<text>] [<text>] [<text>]:
  126. trigger:
  127. if arg 1 isn't set:
  128. make player execute command "crate"
  129. else if arg 1 is set:
  130. if arg 2 isn't set:
  131. make player execute command "crate %arg 1%"
  132. else if arg 2 is set:
  133. if arg 3 isn't set:
  134. make player execute command "crate %arg 1% %arg 2%"
  135. else if arg 3 is set:
  136. if arg 4 isn't set:
  137. make player execute command "crate %arg 1% %arg 2% %arg 3%"
  138. else if arg 4 is set:
  139. if arg 5 isn't set:
  140. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4%"
  141. else if arg 5 is set:
  142. make player execute command "crate %arg 1% %arg 2% %arg 3% %arg 4% %arg 5%"
  143.  
  144. command /consolegive [<text>] [<text>]:
  145. Executable by: console
  146. trigger:
  147. if {@virtual-key} is false:
  148. set {giveto} to "%arg 2%" parsed as player
  149. message " {@prefix} &e¡Le has dado una &cLlave &l%arg 2%&e a &a%{giveto}%&e!"
  150. give 1 {@key-item} named "{@key-name-color}Llave %arg 1%" to {giveto}
  151. else if {@virtual-key} is true:
  152. add 1 to {key.%arg 1%.%arg 2%}
  153. message " {@prefix} &e¡Has agregado una &cllave &l%arg 1%&e a la cuenta de &a%arg 2%&e!"
  154.  
  155. on load:
  156. if {CrateList::*} isn't set:
  157. set {CrateList::*} to "&c&l¡No has creado ninguna caja!"
  158.  
  159. command /crate [<text>] [<text>] [<text>] [<text>] [<text>]:
  160. Executable by: players and console
  161. trigger:
  162. if arg 1 isn't set:
  163. message " &2>> {@prefix} &a&lv1.8.2.3"
  164. message " "
  165. message "&b/crate give <nombre> <jugador> &eDa una llave a un jugador especifico."
  166. message "&b/crate create <nombre> &eCrea una nueva caja con un nombre especifico."
  167. message "&b/crate additem <nombre> <chance> <nombre custom=yes/no> <comando de consola opcional> &eAgregar el item que tienes en la mano a una caja."
  168. message "&b/crate removeitem <nombre> &eEliminar el ultimo item agregado a una caja especifica."
  169. message "&b/crate place <nombre> &ePoner una caja a donde mires."
  170. message "&b/crate delete <nombre> &eEliminar una caja especifica."
  171. message "&b/crate addregion <nombre> &eAgrega una region para que en ella aparezcan cajas. (WorldGuard requerido)"
  172. message "&b/crate delregion <nombre> &eElimina una region para que no aparezcan mas cajas en ella. (WorldGuard requerido)"
  173. message "&b/crate fixname &ePrepara el item que tienes para agregarlo a una caja."
  174. message "&b/crate list &eEnvia una lista de todas las cajas disponibles."
  175. message "&b/crate reload &eRecargar MegaCrates."
  176. message " "
  177. message " &cCreado por PiskotPiskotovic"
  178. else if arg 1 is "give":
  179. if player has permission "megacrates.give":
  180. if arg 2 is set:
  181. if {Crate.%arg 2%} is set:
  182. if arg 3 is set:
  183. if {@virtual-key} is false:
  184. set {giveto} to "%arg 3%" parsed as player
  185. message " {@prefix} &e¡Le has dado una Llave &c&l%arg 2%&e a &a%{giveto}%&e!"
  186. give 1 {@key-item} named "{@key-name-color}Llave %arg 2%" to {giveto}
  187. else if {@virtual-key} is true:
  188. add 1 to {key.%arg 2%.%arg 3%}
  189. message " {@prefix} &e¡Has agregado una &cLlave &l%arg 2%&e a la cuenta de &a%arg 3%&e!"
  190. else:
  191. message " {@prefix} &c¡No has especificado el jugador!"
  192. else:
  193. message " {@prefix} &cEsa caja no existe."
  194. else:
  195. message "{@prefix} &c¡No has especificado una caja!"
  196. else if arg 1 is "fixname":
  197. if player's tool isn't air:
  198. set player's tool's name to "%player's tool%"
  199. message " {@prefix} &a&lCompletado. Ahora puedes agregarlo a una caja."
  200. else:
  201. message " {@prefix} &cNo puedes renombrar el aire..."
  202. else if arg 1 is "addregion":
  203. if player has permission "megacrates.admin":
  204. if arg 2 is set:
  205. set {region} to "%arg 2%"
  206. loop all blocks in the region {region}:
  207. set {PrisonCrate.%loop-block's location%} to true
  208. add "%{region}% in world %player's world%" to {Regions::*}
  209. message " {@prefix} &a¡Agregada correctamente!"
  210. message "&4&l¡ADVERTENCIA! &bSi la region esta en un mundo diferente al que estas no funcionara. ¡Debes ir al mismo mundo!"
  211. message "&d&lNOMBRE: &b%{region}%"
  212. delete {region}
  213. else:
  214. message " {@prefix} &c¡No has especificado ninguna region de WorldGuard!"
  215. else:
  216. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  217. else if arg 1 is "delregion":
  218. if player has permission "megacrates.admin":
  219. if arg 2 is set:
  220. set {region} to "%arg 2%"
  221. loop all blocks in the region {region}:
  222. delete {PrisonCrate.%loop-block's location%}
  223. remove "%{region}% in world %player's world%" from {Regions::*}
  224. message " {@prefix} &a¡Eliminada correctamente!"
  225. message "&4&l¡ADVERTENCIA! &bSi la region esta en un mundo diferente al que estas no funcionara. ¡Debes ir al mismo mundo!"
  226. message "&d&lNOMBRE: &b%{region}%"
  227. delete {region}
  228. else:
  229. message " {@prefix} &c¡No has especificado ninguna region de WorldGuard!"
  230. else:
  231. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  232. else if arg 1 is "create":
  233. if player has permission "megacrates.admin":
  234. if arg 2 is set:
  235. if {Crate.%arg 2%} isn't set:
  236. message " {@prefix} &e¡Se ha creado una caja llamada &a%arg 2%&e!"
  237. set {Crate.%arg 2%} to true
  238. set {chancetotal.%arg 2%} to 100
  239. if {CrateList::*} is "&c&l¡No hay ninguna caja!":
  240. delete {CrateList::*}
  241. add "%arg 2%" to {CrateList::*}
  242. else:
  243. message " {@prefix} &c¡Ya existe una caja con ese nombre!"
  244. else:
  245. message " {@prefix} &c¡No has especificado el nombre de la caja!"
  246. else:
  247. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  248. else if arg 1 is "additem":
  249. if player has permission "megacrates.admin":
  250. if arg 2 is set:
  251. if {Crate.%arg 2%} is set:
  252. if player's tool isn't air:
  253. if arg 3 is set:
  254. if arg 4 is set:
  255. add 1 to {CrateItemsTotal.%arg 2%}
  256. if arg 5 is set:
  257. set {CrateItemCommand.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%arg 5%"
  258. if arg 4 is "yes":
  259. set {chance} to "%arg 3%" parsed as integer
  260. if {chancetotal.%arg 2%} is higher or equal to {chance}:
  261. message " {@prefix} &e¡Has agregado un nuevo item a la caja &a%arg 2%&e!"
  262. message " {@prefix} &eChance: &a&l%{chance}% %%"
  263. if player's tool's name isn't set:
  264. set {name} to "%player's tool%"
  265. if player's tool's name is set:
  266. set {name} to "%player's tool's name%"
  267. set {lore} to "%player's tool's lore%"
  268. set {CrateItemChance.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{chance}%" parsed as integer
  269. set {lore} to "%player's tool's lore%"
  270. set {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%" parsed as item
  271. set name of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{name}%"
  272. set lore of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{lore}%"
  273. remove {chance} from {chancetotal.%arg 2%}
  274. if {CrateItemsTotal.%arg 2%} is 0 or 1:
  275. add 1 to {CrateItemsTotal.%arg 2%}
  276. if player's tool's name isn't set:
  277. set {name} to "%player's tool%"
  278. if player's tool's name is set:
  279. set {name} to "%player's tool's name%"
  280. set {lore} to "%player's tool's lore%"
  281. set {CrateItemChance.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{chance}%" parsed as integer
  282. set {lore} to "%player's tool's lore%"
  283. set {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%" parsed as item
  284. set name of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{name}%"
  285. set lore of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{lore}%"
  286. else:
  287. message " {@prefix} &cLa chance que hsa puesto es muy alta. MAX: %{chancetotal.%arg 2%}%"
  288. else if arg 4 is "no":
  289. set {chance} to "%arg 3%" parsed as integer
  290. message " {@prefix} &e¡Has agregado un nuevo item a la caja &a%arg 2%&e!"
  291. message " {@prefix} &eChance: &a&l%{chance}% %%"
  292. set {CrateItemChance.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{chance}%" parsed as integer
  293. set {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%" parsed as item
  294. set name of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%"
  295. remove {chance} from {chancetotal.%arg 2%}
  296. if {CrateItemsTotal.%arg 2%} is 0 or 1:
  297. add 1 to {CrateItemsTotal.%arg 2%}
  298. set {CrateItemChance.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%{chance}%" parsed as integer
  299. set {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%" parsed as item
  300. set name of {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to "%player's tool%"
  301. else:
  302. message " {@prefix} &cRespuesta esperada yes/no, pero pusiste %arg 4%."
  303. else:
  304. message " {@prefix} &cRespuesta esperada yes/no, pero no pusiste nada."
  305. else:
  306. message " {@prefix} &c¡No especificaste la chance de tu item! MAX: %{chancetotal.%arg 2%}%"
  307. else:
  308. message " {@prefix} &cNo puedes agregar aire a las recompensas..."
  309. else:
  310. message " {@prefix} &c¡Esa caja no existe!"
  311. else:
  312. message " {@prefix} &c¡No has especificado el nombre de la caja!"
  313. else:
  314. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  315. else if arg 1 is "place":
  316. if player has permission "megacrates.admin":
  317. if arg 2 is set:
  318. if {Crate.%arg 2%} is set:
  319. set player's target block to {@crate-block}
  320. message " {@prefix} &e¡Caja colocada correctamente!"
  321. message "&d&lTIP &aPara rotar la caja, seleccionala con WorldEdit y escribe //set enderchest:1, enderchest:2 etc."
  322. set {CrateLocation.%player's target block's location%} to "%arg 2%"
  323. else:
  324. message " {@prefix} &c¡Esa caja no existe!"
  325. else:
  326. message " {@prefix} &c¡No has especificado el nombre de la caja!"
  327. else:
  328. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  329. else if arg 1 is "delete":
  330. if player has permission "megacrates.admin":
  331. if arg 2 is set:
  332. if {Crate.%arg 2%} is set:
  333. delete {CrateItem.%arg 2%}
  334. delete {Crate.%arg 2%}
  335. delete {CrateItemsTotal.%arg 2%}
  336. message " {@prefix} &e¡La caja &a%arg 2% &eha sido eliminada!"
  337. delete {chancetotal.%arg 2%}
  338. remove "%arg 2%" from {CrateList::*}
  339. if {CrateList::*} isn't set:
  340. set {CrateList::*} to "&c&l¡No hay ninguna caja!"
  341. else:
  342. message " {@prefix} &c¡Esa caja no existe!"
  343. else:
  344. message " {@prefix} &c¡No has especificado el nombre de la caja!"
  345. else:
  346. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  347. else if arg 1 is "list":
  348. if player has permission "megacrates.admin":
  349. message " {@prefix} &d&lTodas las cajas:"
  350. message " &a&l• %{CrateList::*}%"
  351. else:
  352. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  353. else if arg 1 is "removeitem":
  354. if player has permission "megacrates.admin":
  355. if arg 2 is set:
  356. if {Crate.%arg 2%} is set:
  357. if {CrateItemsTotal.%arg 2%} isn't 0:
  358. message " {@prefix} &e¡Has eliminado correctamente %{CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%}% de la caja %arg 2%!"
  359. add {CrateItemChance.%arg 2%::%{CrateItemsTotal.%arg 2%}%} to {chancetotal.%arg 2%}
  360. message " {@prefix} &eAhora la chance disponible para usar es: &a&l%{chancetotal.%arg 2%}% %%"
  361. remove {CrateItem.%arg 2%::%{CrateItemsTotal.%arg 2%}%} from {CrateItem.%arg 2%::*}
  362. remove 1 from {CrateItemsTotal.%arg 2%}
  363. else:
  364. message " {@prefix} &cNo hay nada que quitar de la caja."
  365. else:
  366. message " {@prefix} &c¡Esa caja no existe!"
  367. else:
  368. message " {@prefix} &c¡No has especificado el nombre de la caja!"
  369. else:
  370. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  371. else if arg 1 is "reload":
  372. if player has permission "megacrates.admin":
  373. execute console command "sk reload %script%"
  374. message " {@prefix} &eLa configuracion ha sido recargada."
  375. else:
  376. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  377. else:
  378. message " {@prefix} &cComando no encontrado. Usa /crate."
  379.  
  380. on load:
  381. set {update} to text from url "http://www.piskotuj.8u.cz/megacrates.txt"
  382. if {update} isn't "1.8.2.3":
  383. message " {@prefix} &e¡Hay una nueva version disponible!" to console
  384. message " &aDescarga: &ehttp://bit.ly/1r3ykw2" to console
  385.  
  386. on join:
  387. if player has permission "megacrates.admin":
  388. set {update} to text from url "http://www.piskotuj.8u.cz/megacrates.txt"
  389. if {update} isn't "1.8.2.3":
  390. message " {@prefix} &e¡Hay una nueva version disponible!"
  391. message " &aDescarga: &ehttp://bit.ly/1r3ykw2"
  392.  
  393. on inventory close:
  394. set {opening.%player%} to false
  395. wait 0.1 second
  396. set {virtual.%player%} to false
  397.  
  398. # Esto es seguro, porque mira si el jugador ha abierto el menu para la llave virtual. #
  399.  
  400. command /open:
  401. trigger:
  402. wait 3 ticks
  403. close player's inventory
  404. if {virtual.%player%} is true:
  405. if {key.%{CrateLocation.%{virtualcrate.%player%}%}%.%player%} is higher or equal to 1:
  406. remove 1 from {key.%{CrateLocation.%{virtualcrate.%player%}%}%.%player%}
  407. set {opening.%player%} to true
  408. if {@animation} is false:
  409. loop 5 times:
  410. wait 0.1 second
  411. play mob spawner flames at target block
  412. play raw sound "note.bass" at player with pitch 5 volume 10
  413. wait 0.1 second
  414. play raw sound "note.bassattack" at player with pitch 5 volume 10
  415. wait 0.1 second
  416. play raw sound "note.harp" at player with pitch 5 volume 10
  417. wait 0.1 second
  418. play raw sound "note.pling" at player with pitch 5 volume 10
  419. wait 0.1 second
  420. play raw sound "note.snare" at player with pitch 5 volume 10
  421. make player execute "randomtry"
  422. play raw sound "random.successful_hit" at player with pitch 1 volume 10
  423. delete {random}
  424. set {opening.%player%} to false
  425. else if {@animation} is true:
  426. open chest with 3 rows named "&d&l%{CrateLocation.%{virtualcrate.%player%}%}%" to player
  427. wait 3 ticks
  428. if inventory name of player's current inventory is "&d&l%{CrateLocation.%{virtualcrate.%player%}%}%":
  429. loop {@animation-length} times:
  430. play raw sound "note.pling" at player with pitch 1 volume 10
  431. format slot 0 of player with black stained glass pane to be unstealable
  432. format slot 1 of player with {@animation-item1} to be unstealable
  433. format slot 2 of player with {@animation-item1} to be unstealable
  434. format slot 3 of player with {@animation-item1} to be unstealable
  435. format slot 4 of player with torch to be unstealable
  436. format slot 5 of player with {@animation-item1} to be unstealable
  437. format slot 6 of player with {@animation-item1} to be unstealable
  438. format slot 7 of player with {@animation-item1} to be unstealable
  439. format slot 8 of player with black stained glass pane to be unstealable
  440. format slot 9 of player with black stained glass pane to be unstealable
  441. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  442. format slot 10 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize1.%player%}%} to be unstealable
  443. set {_randomprize2.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  444. format slot 11 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize2.%player%}%} to be unstealable
  445. set {_randomprize3.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  446. format slot 12 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize3.%player%}%} to be unstealable
  447. set {_randomprize4.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  448. format slot 13 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize4.%player%}%} to be unstealable
  449. set {_randomprize5.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  450. format slot 14 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize5.%player%}%} to be unstealable
  451. set {_randomprize6.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  452. format slot 15 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize6.%player%}%} to be unstealable
  453. set {_randomprize7.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  454. format slot 16 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize7.%player%}%} to be unstealable
  455. format slot 17 of player with black stained glass pane to be unstealable
  456. format slot 18 of player with black stained glass pane to be unstealable
  457. format slot 19 of player with {@animation-item1} to be unstealable
  458. format slot 20 of player with {@animation-item1} to be unstealable
  459. format slot 21 of player with {@animation-item1} to be unstealable
  460. format slot 22 of player with torch to be unstealable
  461. format slot 23 of player with {@animation-item1} to be unstealable
  462. format slot 24 of player with {@animation-item1} to be unstealable
  463. format slot 25 of player with {@animation-item1} to be unstealable
  464. format slot 26 of player with black stained glass pane to be unstealable
  465. play raw sound "note.harp" at player with pitch 1 volume 10
  466. wait 0.3 seconds
  467. format slot 0 of player with black stained glass pane to be unstealable
  468. format slot 1 of player with {@animation-item1} to be unstealable
  469. format slot 2 of player with {@animation-item1} to be unstealable
  470. format slot 3 of player with {@animation-item1} to be unstealable
  471. format slot 4 of player with torch to be unstealable
  472. format slot 5 of player with {@animation-item1} to be unstealable
  473. format slot 6 of player with {@animation-item1} to be unstealable
  474. format slot 7 of player with {@animation-item1} to be unstealable
  475. format slot 8 of player with black stained glass pane to be unstealable
  476. format slot 9 of player with black stained glass pane to be unstealable
  477. set {_randomprize8.%player%} to {_randomprize1.%player%}
  478. format slot 11 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize8.%player%}%} to be unstealable
  479. set {_randomprize9.%player%} to {_randomprize2.%player%}
  480. format slot 12 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize9.%player%}%} to be unstealable
  481. set {_randomprize10.%player%} to {_randomprize3.%player%}
  482. format slot 13 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize10.%player%}%} to be unstealable
  483. set {_randomprize11.%player%} to {_randomprize4.%player%}
  484. format slot 14 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize11.%player%}%} to be unstealable
  485. set {_randomprize12.%player%} to {_randomprize5.%player%}
  486. format slot 15 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize12.%player%}%} to be unstealable
  487. set {_randomprize13.%player%} to {_randomprize6.%player%}
  488. format slot 16 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize13.%player%}%} to be unstealable
  489. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  490. format slot 10 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize1.%player%}%} to be unstealable
  491. format slot 17 of player with black stained glass pane to be unstealable
  492. format slot 18 of player with black stained glass pane to be unstealable
  493. format slot 19 of player with {@animation-item1} to be unstealable
  494. format slot 20 of player with {@animation-item1} to be unstealable
  495. format slot 21 of player with {@animation-item1} to be unstealable
  496. format slot 22 of player with torch to be unstealable
  497. format slot 23 of player with {@animation-item1} to be unstealable
  498. format slot 24 of player with {@animation-item1} to be unstealable
  499. format slot 25 of player with {@animation-item1} to be unstealable
  500. format slot 26 of player with black stained glass pane to be unstealable
  501. play raw sound "note.pling" at player with pitch 1 volume 10
  502. wait 0.3 second
  503. format slot 0 of player with black stained glass pane to be unstealable
  504. format slot 1 of player with {@animation-item3} to be unstealable
  505. format slot 2 of player with {@animation-item3} to be unstealable
  506. format slot 3 of player with {@animation-item3} to be unstealable
  507. format slot 4 of player with torch to be unstealable
  508. format slot 5 of player with {@animation-item3} to be unstealable
  509. format slot 6 of player with {@animation-item3} to be unstealable
  510. format slot 7 of player with {@animation-item3} to be unstealable
  511. format slot 8 of player with black stained glass pane to be unstealable
  512. format slot 9 of player with black stained glass pane to be unstealable
  513. set {_randomprize14.%player%} to {_randomprize3.%player%}
  514. format slot 12 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize14.%player%}%} to be unstealable
  515. set {randomprize15.%player%} to {_randomprize4.%player%}
  516. format slot 13 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{randomprize15.%player%}%} to be unstealable
  517. set {_randomprize16.%player%} to {_randomprize5.%player%}
  518. format slot 14 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize16.%player%}%} to be unstealable
  519. set {_randomprize17.%player%} to {_randomprize6.%player%}
  520. format slot 15 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize17.%player%}%} to be unstealable
  521. set {_randomprize18.%player%} to {_randomprize7.%player%}
  522. format slot 16 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize18.%player%}%} to be unstealable
  523. set {_randomprize2.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  524. format slot 11 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize1.%player%}%} to be unstealable
  525. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  526. format slot 10 of player with {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{_randomprize1.%player%}%} to be unstealable
  527. format slot 17 of player with black stained glass pane to be unstealable
  528. format slot 18 of player with black stained glass pane to be unstealable
  529. format slot 19 of player with {@animation-item3} to be unstealable
  530. format slot 20 of player with {@animation-item3} to be unstealable
  531. format slot 21 of player with {@animation-item3} to be unstealable
  532. format slot 22 of player with torch to be unstealable
  533. format slot 23 of player with {@animation-item3} to be unstealable
  534. format slot 24 of player with {@animation-item3} to be unstealable
  535. format slot 25 of player with {@animation-item3} to be unstealable
  536. format slot 26 of player with black stained glass pane to be unstealable
  537. play raw sound "note.harp" at player with pitch 1 volume 10
  538. wait 0.2 second
  539. set {random} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%{virtualcrate.%player%}%}%}
  540. if {@animation} is false:
  541. give {CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{random}%} to player
  542. else:
  543. make player execute "guirandomtry"
  544. if {@open-messages} is true:
  545. if {@animation} is false:
  546. broadcast " {@prefix} &a¡%player% &eha ganado &a%{CrateItem.%{CrateLocation.%{virtualcrate.%player%}%}%::%{random}%}'s name%&e!"
  547. else:
  548. stop
  549. play raw sound "random.successful_hit" at player with pitch 1 volume 10
  550. delete {random}
  551. loop 2 times:
  552. format slot 10 of player with {@animation-item1} to be unstealable
  553. format slot 16 of player with {@animation-item1} to be unstealable
  554. wait 0.2 second
  555. format slot 11 of player with {@animation-item2} to be unstealable
  556. format slot 15 of player with {@animation-item2} to be unstealable
  557. wait 0.2 second
  558. format slot 12 of player with {@animation-item1} to be unstealable
  559. format slot 14 of player with {@animation-item1} to be unstealable
  560. wait 0.2 second
  561. format slot 10 of player with {@animation-item3} to be unstealable
  562. format slot 16 of player with {@animation-item3} to be unstealable
  563. wait 0.2 second
  564. format slot 11 of player with {@animation-item3} to be unstealable
  565. format slot 15 of player with {@animation-item3} to be unstealable
  566. wait 0.2 second
  567. format slot 12 of player with {@animation-item3} to be unstealable
  568. format slot 14 of player with {@animation-item3} to be unstealable
  569. if {@doautoclose} is true:
  570. wait {@autoclose} seconds
  571. set {opening.%player%} to false
  572. close player's inventory
  573. set {opening.%player%} to false
  574. else:
  575. send player title "&bNo tienens ninguna llave" with subtitle "&bpara la caja &e&l%{CrateLocation.%{virtualcrate.%player%}%}%&b." for 2 seconds
  576.  
  577. on break:
  578. set {curregion} to "%region at event-block's location%" parsed as text
  579. if "%{Regions::*}%" contains "%{curregion}%":
  580. chance of {@appear-chance}%:
  581. if {@openable-only-by-player} is true:
  582. set {playeropen.%block's location%} to "%player%"
  583. wait 1 tick
  584. set block to {@block}
  585. if {@find-broadcast} is true:
  586. broadcast " {@prefix} {@find-message}"
  587. send player title "{@appear-title}" with subtitle "{@appear-subtitle}" for 3 seconds
  588. set {Openable.%block's location%} to true
  589. wait {@staytime} seconds
  590. set block to air
  591. delete {Openable.%block's location%}
  592. delete {playeropen.%block's location%}
  593.  
  594. on break of {@block}:
  595. if {Openable.%block's location%} is true:
  596. cancel event
  597. message " {@prefix} &d&l¡Eso no puede ser destruido! ¡Clic derecho en el!" to event-player
  598.  
  599. on rightclick on {@block}:
  600. if player's gamemode isn't creative:
  601. if {Openable.%block's location%} is true:
  602. if {@openable-only-by-player} is true:
  603. if {playeropen.%block's location%} isn't "%player%":
  604. message " {@prefix} &c&l¡Lo sentimos! Esta caja no es tuya."
  605. stop
  606. set player's target block to air
  607. wait 2 ticks
  608. open chest with 3 rows named "&e&lAbriendo: &6&l{@open-crate}" to player
  609. loop 30 times:
  610. format slot 0 of player with yellow stained glass pane named " " to be unstealable
  611. format slot 1 of player with yellow stained glass pane named " " to be unstealable
  612. format slot 2 of player with yellow stained glass pane named " " to be unstealable
  613. format slot 3 of player with yellow stained glass pane named " " to be unstealable
  614. format slot 4 of player with yellow stained glass pane named " " to be unstealable
  615. format slot 5 of player with yellow stained glass pane named " " to be unstealable
  616. format slot 6 of player with yellow stained glass pane named " " to be unstealable
  617. format slot 7 of player with yellow stained glass pane named " " to be unstealable
  618. format slot 8 of player with yellow stained glass pane named " " to be unstealable
  619. format slot 9 of player with yellow stained glass pane named " " to be unstealable
  620. format slot 10 of player with yellow stained glass pane named " " to be unstealable
  621. format slot 11 of player with yellow stained glass pane named " " to be unstealable
  622. format slot 12 of player with yellow stained glass pane named " " to be unstealable
  623. set {_random} to random integer between 1 and {CrateItemsTotal.{@open-crate}}
  624. format slot 13 of player with {CrateItem.{@open-crate}::%{_random}%} to be unstealable
  625. format slot 14 of player with yellow stained glass pane named " " to be unstealable
  626. format slot 15 of player with yellow stained glass pane named " " to be unstealable
  627. format slot 16 of player with yellow stained glass pane named " " to be unstealable
  628. format slot 17 of player with yellow stained glass pane named " " to be unstealable
  629. format slot 18 of player with yellow stained glass pane named " " to be unstealable
  630. format slot 19 of player with yellow stained glass pane named " " to be unstealable
  631. format slot 20 of player with yellow stained glass pane named " " to be unstealable
  632. format slot 21 of player with yellow stained glass pane named " " to be unstealable
  633. format slot 22 of player with yellow stained glass pane named " " to be unstealable
  634. format slot 23 of player with yellow stained glass pane named " " to be unstealable
  635. format slot 24 of player with yellow stained glass pane named " " to be unstealable
  636. format slot 25 of player with yellow stained glass pane named " " to be unstealable
  637. format slot 26 of player with yellow stained glass pane named " " to be unstealable
  638. wait 0.1 second
  639. set {_random} to random integer between 1 and {CrateItemsTotal.{@open-crate}}
  640. format slot 13 of player with {CrateItem.{@open-crate}::%{_random}%} to be unstealable
  641. if {CrateItemCommand.{@open-crate}::%{_random}%} is set:
  642. if {@giveonwincommand} is true:
  643. give {CrateItem.{@open-crate}::%{_random}%} to player
  644. set {CrateCommand.%player%} to "%{CrateItemCommand.{@open-crate}::%{_random}%}%"
  645. replace "PLAYER" in {CrateCommand.%player%} with "%player's name%"
  646. execute console command "%{CrateCommand.%player%}%"
  647. else:
  648. give {CrateItem.{@open-crate}::%{_random}%} to player
  649. if {@open-messages} is true:
  650. message " {@prefix} &e¡Has ganado &a%{CrateItem.{@open-crate}::%{_random}%}'s name%&e!"
  651. if {@doautoclose} is true:
  652. wait {@autoclose} seconds
  653. close player's inventory
  654. else:
  655. message " {@prefix} &c¡No puedes abrir cajas en modo creativo!"
  656.  
  657. on rightclick on {@crate-block}:
  658. if {chancetotal.%block's location%} isn't set:
  659. set {chancetotal.%block's location%} to 100
  660. if {CrateLocation.%block's location%} is set:
  661. cancel event
  662. if {key.%{CrateLocation.%block's location%}%.%player%} isn't set:
  663. set {key.%{CrateLocation.%block's location%}%.%player%} to 0
  664. if player's gamemode isn't creative:
  665. if {@virtual-key} is true:
  666. open chest with 1 row named "&b&l¿Abrir caja?" to player
  667. wait 1 tick
  668. set {virtual.%player%} to true
  669. set {virtualcrate.%player%} to block's location
  670. format slot 4 of player with {@key-item} named "&b&lLlaves %{CrateLocation.%block's location%}%: &e&l%{key.%{CrateLocation.%block's location%}%.%player%}%" with lore "{@hover-message}||&e{@website}" to be unstealable
  671. format slot 2 of player with green stained glass pane named "&a&lAbrir" to run [make player execute "open"]
  672. format slot 0 of player with green stained glass pane named "&a&lAbrir" to run [make player execute "open"]
  673. format slot 1 of player with green stained glass pane named "&a&lAbrir" to run [make player execute "open"]
  674. format slot 3 of player with green stained glass pane named "&a&lAbrir" to run [make player execute "open"]
  675. format slot 6 of player with red stained glass pane named "&c&lCancelar" to close
  676. format slot 5 of player with red stained glass pane named "&c&lCancelar" to close
  677. format slot 7 of player with red stained glass pane named "&c&lCancelar" to close
  678. format slot 8 of player with red stained glass pane named "&c&lCancelar" to close
  679. else if {@virtual-key} is false:
  680. if player's tool is {@key-item} named "{@key-name-color}Llave %{CrateLocation.%block's location%}%":
  681. remove {@key-item} named "{@key-name-color}Llave %{CrateLocation.%block's location%}%" from player's inventory
  682. set {opening.%player%} to true
  683. if {@animation} is false:
  684. loop 5 times:
  685. wait 0.1 second
  686. play mob spawner flames at target block
  687. play raw sound "note.bass" at player with pitch 5 volume 10
  688. wait 0.1 second
  689. play raw sound "note.bassattack" at player with pitch 5 volume 10
  690. wait 0.1 second
  691. play raw sound "note.harp" at player with pitch 5 volume 10
  692. wait 0.1 second
  693. play raw sound "note.pling" at player with pitch 5 volume 10
  694. wait 0.1 second
  695. play raw sound "note.snare" at player with pitch 5 volume 10
  696. make player execute "randomtry"
  697. play raw sound "random.successful_hit" at player with pitch 1 volume 10
  698. delete {random}
  699. set {opening.%player%} to false
  700. else if {@animation} is true:
  701. open chest with 3 rows named "&d&l%{CrateLocation.%block's location%}%" to player
  702. wait 3 ticks
  703. if inventory name of player's current inventory is "&d&l%{CrateLocation.%block's location%}%":
  704. loop {@animation-length} times:
  705. play raw sound "note.pling" at player with pitch 1 volume 10
  706. format slot 0 of player with black stained glass pane to be unstealable
  707. format slot 1 of player with {@animation-item1} to be unstealable
  708. format slot 2 of player with {@animation-item1} to be unstealable
  709. format slot 3 of player with {@animation-item1} to be unstealable
  710. format slot 4 of player with torch to be unstealable
  711. format slot 5 of player with {@animation-item1} to be unstealable
  712. format slot 6 of player with {@animation-item1} to be unstealable
  713. format slot 7 of player with {@animation-item1} to be unstealable
  714. format slot 8 of player with black stained glass pane to be unstealable
  715. format slot 9 of player with black stained glass pane to be unstealable
  716. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  717. format slot 10 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize1.%player%}%} to be unstealable
  718. set {_randomprize2.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  719. format slot 11 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize2.%player%}%} to be unstealable
  720. set {_randomprize3.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  721. format slot 12 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize3.%player%}%} to be unstealable
  722. set {_randomprize4.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  723. format slot 13 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize4.%player%}%} to be unstealable
  724. set {_randomprize5.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  725. format slot 14 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize5.%player%}%} to be unstealable
  726. set {_randomprize6.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  727. format slot 15 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize6.%player%}%} to be unstealable
  728. set {_randomprize7.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  729. format slot 16 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize7.%player%}%} to be unstealable
  730. format slot 17 of player with black stained glass pane to be unstealable
  731. format slot 18 of player with black stained glass pane to be unstealable
  732. format slot 19 of player with {@animation-item1} to be unstealable
  733. format slot 20 of player with {@animation-item1} to be unstealable
  734. format slot 21 of player with {@animation-item1} to be unstealable
  735. format slot 22 of player with torch to be unstealable
  736. format slot 23 of player with {@animation-item1} to be unstealable
  737. format slot 24 of player with {@animation-item1} to be unstealable
  738. format slot 25 of player with {@animation-item1} to be unstealable
  739. format slot 26 of player with black stained glass pane to be unstealable
  740. play raw sound "note.harp" at player with pitch 1 volume 10
  741. wait 0.3 seconds
  742. format slot 0 of player with black stained glass pane to be unstealable
  743. format slot 1 of player with {@animation-item1} to be unstealable
  744. format slot 2 of player with {@animation-item1} to be unstealable
  745. format slot 3 of player with {@animation-item1} to be unstealable
  746. format slot 4 of player with torch to be unstealable
  747. format slot 5 of player with {@animation-item1} to be unstealable
  748. format slot 6 of player with {@animation-item1} to be unstealable
  749. format slot 7 of player with {@animation-item1} to be unstealable
  750. format slot 8 of player with black stained glass pane to be unstealable
  751. format slot 9 of player with black stained glass pane to be unstealable
  752. set {_randomprize8.%player%} to {_randomprize1.%player%}
  753. format slot 11 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize8.%player%}%} to be unstealable
  754. set {_randomprize9.%player%} to {_randomprize2.%player%}
  755. format slot 12 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize9.%player%}%} to be unstealable
  756. set {_randomprize10.%player%} to {_randomprize3.%player%}
  757. format slot 13 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize10.%player%}%} to be unstealable
  758. set {_randomprize11.%player%} to {_randomprize4.%player%}
  759. format slot 14 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize11.%player%}%} to be unstealable
  760. set {_randomprize12.%player%} to {_randomprize5.%player%}
  761. format slot 15 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize12.%player%}%} to be unstealable
  762. set {_randomprize13.%player%} to {_randomprize6.%player%}
  763. format slot 16 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize13.%player%}%} to be unstealable
  764. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  765. format slot 10 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize1.%player%}%} to be unstealable
  766. format slot 17 of player with black stained glass pane to be unstealable
  767. format slot 18 of player with black stained glass pane to be unstealable
  768. format slot 19 of player with {@animation-item1} to be unstealable
  769. format slot 20 of player with {@animation-item1} to be unstealable
  770. format slot 21 of player with {@animation-item1} to be unstealable
  771. format slot 22 of player with torch to be unstealable
  772. format slot 23 of player with {@animation-item1} to be unstealable
  773. format slot 24 of player with {@animation-item1} to be unstealable
  774. format slot 25 of player with {@animation-item1} to be unstealable
  775. format slot 26 of player with black stained glass pane to be unstealable
  776. play raw sound "note.pling" at player with pitch 1 volume 10
  777. wait 0.3 second
  778. format slot 0 of player with black stained glass pane to be unstealable
  779. format slot 1 of player with {@animation-item3} to be unstealable
  780. format slot 2 of player with {@animation-item3} to be unstealable
  781. format slot 3 of player with {@animation-item3} to be unstealable
  782. format slot 4 of player with torch to be unstealable
  783. format slot 5 of player with {@animation-item3} to be unstealable
  784. format slot 6 of player with {@animation-item3} to be unstealable
  785. format slot 7 of player with {@animation-item3} to be unstealable
  786. format slot 8 of player with black stained glass pane to be unstealable
  787. format slot 9 of player with black stained glass pane to be unstealable
  788. set {_randomprize14.%player%} to {_randomprize3.%player%}
  789. format slot 12 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize14.%player%}%} to be unstealable
  790. set {randomprize15.%player%} to {_randomprize4.%player%}
  791. format slot 13 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{randomprize15.%player%}%} to be unstealable
  792. set {_randomprize16.%player%} to {_randomprize5.%player%}
  793. format slot 14 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize16.%player%}%} to be unstealable
  794. set {_randomprize17.%player%} to {_randomprize6.%player%}
  795. format slot 15 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize17.%player%}%} to be unstealable
  796. set {_randomprize18.%player%} to {_randomprize7.%player%}
  797. format slot 16 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize18.%player%}%} to be unstealable
  798. set {_randomprize2.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  799. format slot 11 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize1.%player%}%} to be unstealable
  800. set {_randomprize1.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  801. format slot 10 of player with {CrateItem.%{CrateLocation.%block's location%}%::%{_randomprize1.%player%}%} to be unstealable
  802. format slot 17 of player with black stained glass pane to be unstealable
  803. format slot 18 of player with black stained glass pane to be unstealable
  804. format slot 19 of player with {@animation-item3} to be unstealable
  805. format slot 20 of player with {@animation-item3} to be unstealable
  806. format slot 21 of player with {@animation-item3} to be unstealable
  807. format slot 22 of player with torch to be unstealable
  808. format slot 23 of player with {@animation-item3} to be unstealable
  809. format slot 24 of player with {@animation-item3} to be unstealable
  810. format slot 25 of player with {@animation-item3} to be unstealable
  811. format slot 26 of player with black stained glass pane to be unstealable
  812. play raw sound "note.harp" at player with pitch 1 volume 10
  813. wait 0.2 second
  814. set {random} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%block's location%}%}
  815. if {@animation} is false:
  816. give {CrateItem.%{CrateLocation.%block's location%}%::%{random}%} to player
  817. else:
  818. make player execute "guirandomtry"
  819. if {@open-messages} is true:
  820. if {@animation} is false:
  821. broadcast " {@prefix} &a¡%player% &eha ganado &a%{CrateItem.%{CrateLocation.%block's location%}%::%{random}%}'s name%&e!"
  822. else:
  823. stop
  824. play raw sound "random.successful_hit" at player with pitch 1 volume 10
  825. delete {random}
  826. loop 2 times:
  827. format slot 10 of player with {@animation-item1} to be unstealable
  828. format slot 16 of player with {@animation-item1} to be unstealable
  829. wait 0.2 second
  830. format slot 11 of player with {@animation-item2} to be unstealable
  831. format slot 15 of player with {@animation-item2} to be unstealable
  832. wait 0.2 second
  833. format slot 12 of player with {@animation-item1} to be unstealable
  834. format slot 14 of player with {@animation-item1} to be unstealable
  835. wait 0.2 second
  836. format slot 10 of player with {@animation-item3} to be unstealable
  837. format slot 16 of player with {@animation-item3} to be unstealable
  838. wait 0.2 second
  839. format slot 11 of player with {@animation-item3} to be unstealable
  840. format slot 15 of player with {@animation-item3} to be unstealable
  841. wait 0.2 second
  842. format slot 12 of player with {@animation-item3} to be unstealable
  843. format slot 14 of player with {@animation-item3} to be unstealable
  844. if {@doautoclose} is true:
  845. wait {@autoclose} seconds
  846. set {opening.%player%} to false
  847. close player's inventory
  848. set {opening.%player%} to false
  849. else:
  850. message " {@prefix} &c¡No tienes la llave correcta!"
  851. if {@no-key-explosion} is true:
  852. push player backwards at speed 2
  853. play raw sound "random.explode" at player with pitch 5 volume 6
  854. else if {@no-key-explosion} is false:
  855. push player backwards at speed 0.9
  856. play raw sound "random.explode" at player with pitch 2 volume 3
  857. else:
  858. message " {@prefix} &c¡No puedes abrir cajas en modo creativo!"
  859.  
  860. on break of {@crate-block}:
  861. if {CrateLocation.%block's location%} is set:
  862. if event-player has permission "megacrates.admin":
  863. if event-player is sneaking:
  864. set block to air
  865. message " {@prefix} &d&l¡Esa caja ha sido destruida!" to event-player
  866. wait 2 ticks
  867. close player's inventory
  868. stop
  869. else:
  870. message " {@prefix} &d&l¡Debes estar agachado (shift) para romper esa caja!"
  871. cancel event
  872. else:
  873. message " {@prefix} &cParece que no tienes permiso para hacer eso."
  874.  
  875. # NOTA! Este comando es seguro, ya que solo se puede usar si el jugador esta abriendo una caja. Este es usado para escoger un item aleatorio de los que se han agregado. #
  876. # Este detecta si el nombre del inventario del jugador es igual al de la caja. #
  877.  
  878. command /guirandomtry:
  879. trigger:
  880. if {opening.%player%} is true:
  881. if {CrateItemChance.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} is set:
  882. set {randomprize15.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%player's target block's location%}%}
  883. set {randomchance.%player%} to random integer between 0 and 100
  884. if {randomchance.%player%} is less or equal to {CrateItemChance.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%}:
  885. format slot 13 of player with {CrateItem.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} to be unstealable
  886. set {winplayer} to "%player%"
  887. if {@open-messages} is true:
  888. broadcast " {@prefix} &e¡&a%player% &egano &a%{CrateItem.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%}'s name%&e!"
  889. if {CrateItemCommand.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} is set:
  890. if {@giveonwincommand} is true:
  891. give {CrateItem.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} to player
  892. set {CrateCommand.%player%} to "%{CrateItemCommand.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%}%"
  893. replace "PLAYER" in {CrateCommand.%player%} with "%player's name%"
  894. execute console command "%{CrateCommand.%player%}%"
  895. else:
  896. give {CrateItem.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} to player
  897. else:
  898. make player execute "guirandomtry"
  899. else:
  900. format slot 13 of player with {CrateItem.%{CrateLocation.%player's target block's location%}%::%{randomprize15.%player%}%} to be unstealable
  901.  
  902. # NOTA! Este comando es seguro, ya que solo se puede usar si el jugador esta abriendo una caja. Este es usado para escoger un item aleatorio de los que se han agregado. #
  903. # Este detecta si el nombre del inventario del jugador es igual al de la caja. #
  904.  
  905. command /randomtry:
  906. trigger:
  907. if {opening.%player%} is true:
  908. format slot 13 of player with {CrateItem.%{CrateLocation.%player's target block's location%}%::%{random}%} to be unstealable
  909. set {random.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%player's target block's location%}%}
  910. if {CrateItemChance.%{CrateLocation.%player's target block's location%}%::%{random.%player%}%} is set:
  911. set {random.%player%} to random integer between 1 and {CrateItemsTotal.%{CrateLocation.%player's target block's location%}%}
  912. set {randomchance.%player%} to random integer between 0 and 100
  913. if {randomchance.%player%} is less or equal to {CrateItemChance.%{CrateLocation.%player's target block's location%}%::%{random.%player%}%}:
  914. set {winitem.%player%} to "%{CrateItem.%{CrateLocation.%player's target block's location%}%::%{random.%player%}%}%"
  915. set {winplayer} to player's name
  916. if {@open-messages} is true:
  917. broadcast " {@prefix} &a¡%player% &egano &a%{winitem.%player%}'s name%&e!"
  918. if {CrateItemCommand.%{CrateLocation.%player's target block's location%}%::%{random.%player%}%} is set:
  919. if {@giveonwincommand} is true:
  920. give player {winitem.%player%}
  921. set {CrateCommand.%player%} to "%{CrateItemCommand.%{CrateLocation.%player's target block's location%}%::%{random.%player%}%}%"
  922. replace "PLAYER" in {CrateCommand.%player%} with "%player's name%"
  923. execute console command "%{CrateCommand.%player%}%"
  924. else:
  925. give player {winitem.%player%}
  926. else:
  927. make player execute "randomtry"
  928. else:
  929. set {winitem.%player%} to {CrateItem.%{CrateLocation.%player's target block's location%}%::%{random}%}
  930.  
  931. on leftclick on {@crate-block}:
  932. if {CrateLocation.%block's location%} is set:
  933. open chest with 3 rows named "{@prefix} &eRecompensas" to player
  934. set {item} to 0
  935. set {times} to 0
  936. loop {CrateItemsTotal.%{CrateLocation.%block's location%}%} times:
  937. add 1 to {item}
  938. if {CrateItemChance.%{CrateLocation.%block's location%}%::%{item}%} isn't set:
  939. set {nochance} to 100/{CrateItemsTotal.%{CrateLocation.%block's location%}%}
  940. format slot {times} of player with {CrateItem.%{CrateLocation.%block's location%}%::%{item}%} named "&c%{CrateItem.%{CrateLocation.%block's location%}%::%{item}%}'s name%" with lore "%{CrateItem.%{CrateLocation.%block's location%}%::%{item}%}'s lore%||&eChance: &a%{nochance}% %%" to close
  941. else:
  942. format slot {times} of player with {CrateItem.%{CrateLocation.%block's location%}%::%{item}%} named "&c%{CrateItem.%{CrateLocation.%block's location%}%::%{item}%}'s name%" with lore "%{CrateItem.%{CrateLocation.%block's location%}%::%{item}%}'s lore%||&eChance: &a%{CrateItemChance.%{CrateLocation.%block's location%}%::%{item}%}% %%" to close
  943. add 1 to {times}
  944. if {CrateItemsTotal.%{CrateLocation.%block's location%}%} isn't set:
  945. set {slot} to 0
  946. loop 27 times:
  947. format slot {slot} of player with red stained glass pane named "&c&l¡No hay items!" with lore "&8• &bPor favor avisa a los administradores." to be unstealable
  948. add 1 to {slot}
  949. if {CrateItemsTotal.%{CrateLocation.%block's location%}%} is 0 or 1:
  950. set {slot} to 0
  951. loop 27 times:
  952. format slot {slot} of player with red stained glass pane named "&c&l¡No hay items!" with lore "&8• &bPor favor avisa a los administradores." to be unstealable
  953. add 1 to {slot}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement