on join: CargaJugo(player, "%player's uuid%") wait 5 seconds set action bar of player to "" if {Juugo::Nivel::%player%} is set: if {Juugo::Status::%player%} is true: make console execute command "/cast forcecast %player% CleanJuugo%{Juugo::Nivel::%player%}%" make console execute command "/cast forcecast %player% CleanJuugo50" set {Juugo::Status::%player%} to false if {Juugo::Status::%player%} is false: make console execute command "/cast forcecast %player% CleanJuugo%{Juugo::Nivel::%player%}%" make console execute command "/cast forcecast %player% CleanJuugo50" #Carga Automatica. while player is online: if {Juugo::Status::%player%} is true: wait 31 seconds else: wait 2 seconds if {Juugo::Chakra::%player%} >= 50: set {Juugo::Chakra::%player%} to 50 if player has permission "*": send "&aChakra Maximo Juugo" to player wait 32 seconds else: if {Juugo::Nivel::%player%} is 25: wait 118 seconds add 1 to {Juugo::Chakra::%player%} if {Juugo::Nivel::%player%} is 50: wait 98 seconds add 1 to {Juugo::Chakra::%player%} if {Juugo::Nivel::%player%} is 100: wait 58 seconds add 1 to {Juugo::Chakra::%player%} #send "&7&o+1 de Chakra Natural" to player function CargaJugo(p: player, x: text): set {_query} to "SELECT * FROM Juugo WHERE uuid = ""%{_x}%""" execute unsafe {_query} in {-sql} and store the result in {_Juugo::*} if {_x} is equal to {_Juugo::Uuid::1}: set {Juugo::Chakra::%{_p}%} to "%{_Juugo::Chakra::1}%" parsed as integer set {Juugo::Nivel::%{_p}%} to "%{_Juugo::Nivel::1}%" parsed as integer set {Juugo::Status::%{_p}%} to false send "&a¡Datos Cargados con Exito! &2&l✔ &76." to {_p} on quit: wait 1 tick set {_query} to "UPDATE Juugo SET Chakra = ""%{Juugo::Chakra::%player%}%"" WHERE uuid = ""%player's uuid%""" execute unsafe {_query} in {-sql} delete {Juugo::Pre-Status::%{_p}%} command /jgmobs []: permission: Staff trigger: if {Juugo::Status::%arg-1%} is true: stop else: if {Juugo::Chakra::%arg-1%} >= 50: set {Juugo::Chakra::%arg-1%} to 50 stop add 1 to {Juugo::Chakra::%arg-1%} command /juugo [] [] []: trigger: if arg-1 isn't set: if {Juugo::Nivel::%player%} is set: send "&fReservas de &aChakra Natural&f: &6%{Juugo::Chakra::%player%}%&7/&c50 &8&o(Juugo &8&o%{Juugo::Nivel::%player%}%&8&o%%)" else: send "&4¡No Puedes Realizar Esta Consulta!" if arg-1 is "Activar": if {Juugo::Nivel::%player%} is 50 or 100: if arg-2 is "100": if {Juugo::Nivel::%player%} is 100: Juugo(player, "100") if arg-2 is "50": if {Juugo::Nivel::%player%} is 50 or 100: Juugo(player, "manual") else: send "&4¡No Puedes Realizar Esta Accion!" if arg-1 is "Desactivar": if {Juugo::Status::%player%} is true: set {Juugo::Pre-Status::%player%} to false send "&dEl juugo se desactivara en breve!" if arg-1 is "Deshabilitar": if player has permission "StaffLvL3": if arg-2 is set: if arg-3 is set: set {_query} to "DELETE From Juugo WHERE uuid = ""%arg-3's uuid%""" execute unsafe {_query} in {-sql} send "&fSe Elimino el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player delete {Juugo::Nivel::%arg-3%} and {Juugo::Chakra::%arg-3%} and {Juugo::Status::%arg-3%} send "&cSe te Elimino el &5Juugo" to arg-3 if arg-1 is "Habilitar": if player has permission "Staff": if arg-2 is "25" or "50" or "100": if arg-3 is set: if {Juugo::Status::%arg-3%} isn't set: set {_query} to "INSERT INTO Juugo (`Nombre`, `uuid`, `Nivel`) VALUES ('%arg-3%', '%arg-3's uuid%', '%arg-2%');" execute unsafe {_query} in {-sql} send "&fSe le &aHabilito&f el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player send "&aObtuviste el &5Juugo %arg-2%%% &cReinicia para poder Aplicar los Cambios." to arg-3 else: set {Juugo::Nivel::%arg-3%} to arg-2 set {_query} to "UPDATE Juugo SET Nivel = ""%{Juugo::Nivel::%arg-3%}%"" WHERE uuid = ""%arg-3's uuid%""" execute unsafe {_query} in {-sql} send "&fSe le &aHabilito&f el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player send "&aObtuviste el &5Juugo %arg-2%%%" to arg-3 else: send "&cFavor de colocar un %% correcto siendo 25/50/100" to player else: send "&4¡No Puedes Realizar Esta Accion!" on damage: if victim is a player: if {Juugo::Status::%victim%} is false: set {_salud} to {vidabase::%victim%} * 0.3 #send "%{_salud}%" to victim if {Juugo::Chakra::%victim%} is greater than 0: #send "&a%{_salud}%" to victim if health of victim is less or equal to {_salud}: send "&fEl &achakra natural&f se desprende de tu cuerpo. &6¡Juugo Activo!" to victim Juugo(victim, "auto") stop #Se activa else: stop else: #El juugo esta activado de forma manual. stop on death: if victim is a player: if {Juugo::Status::%victim%} is true: delete {Juugo::Pre-Status::%victim%} set action bar of victim to "" make console execute command "/cast forcecast %victim% CleanJuugo%{Juugo::Nivel::%victim%}%" make console execute command "/cast forcecast %victim% CleanJuugo50" function Juugo(p: player, type: string): if {Juugo::Chakra::%{_p}%} is greater than 0: if {Juugo::Status::%{_p}%} is false: set {Juugo::Status::%{_p}%} to true while {Juugo::Chakra::%{_p}%} is greater than 0: subtract 1 from {Juugo::Chakra::%{_p}%} if {_type} is "auto": if {Juugo::Nivel::%{_p}%} is 25: make console execute command "/cast forcecast %{_p}% Juugo25F" if {Juugo::Nivel::%{_p}%} is 50 or 100: make console execute command "/cast forcecast %{_p}% Juugo50F" else: if {_type} is "manual": make console execute command "/cast forcecast %{_p}% Juugo50F" if {Juugo::Nivel::%{_p}%} is 100: subtract 1 from {Juugo::Chakra::%{_p}%} make console execute command "/cast forcecast %{_p}% Juugo100F" set {_timer} to 30 loop 30 times: subtract 1 from {_timer} if {_type} is "auto" or "manual": if {Juugo::Nivel::%{_p}%} is 50 or 100: set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(50%%)" else: set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(25%%)" else: set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(100%%)" wait 1 second if {_p} is online: if {Juugo::Pre-Status::%{_p}%} is false: send "&fVuelves a la Normalidad... &7&o(Juugo Desactivado)" to {_p} set action bar of {_p} to "" delete {Juugo::Pre-Status::%{_p}%} exit loop else: set {Juugo::Status::%{_p}%} to false set action bar of {_p} to "" exit loop set {Juugo::Status::%{_p}%} to false delete {Juugo::Pre-Status::%{_p}%} set action bar of {_p} to "" if {_type} is "auto" or "manual": if {Juugo::Nivel::%{_p}%} is 50 or 100: make console execute command "/cast forcecast %{_p}% CleanJuugo50" else: make console execute command "/cast forcecast %{_p}% CleanJuugo25" else: make console execute command "/cast forcecast %{_p}% CleanJuugo100" else: send "&c¡Debes esperar a que se pase tu Transformacion actual!" to {_p} else: send "&cNo tienes suficiente Chakra Natural para Transformarte!" to {_p}