Advertisement
PabloEduardo

Juugo_by_ed

Mar 6th, 2023 (edited)
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on join:
  2.     CargaJugo(player, "%player's uuid%")
  3.     wait 5 seconds
  4.     set action bar of player to ""
  5.     if {Juugo::Nivel::%player%} is set:
  6.         if {Juugo::Status::%player%} is true:
  7.             make console execute command "/cast forcecast %player% CleanJuugo%{Juugo::Nivel::%player%}%"
  8.             make console execute command "/cast forcecast %player% CleanJuugo50"
  9.             set {Juugo::Status::%player%} to false
  10.         if {Juugo::Status::%player%} is false:
  11.             make console execute command "/cast forcecast %player% CleanJuugo%{Juugo::Nivel::%player%}%"
  12.             make console execute command "/cast forcecast %player% CleanJuugo50"
  13.             #Carga Automatica.
  14.             while player is online:
  15.                 if {Juugo::Status::%player%} is true:
  16.                     wait 31 seconds
  17.                 else:
  18.                     wait 2 seconds
  19.                     if {Juugo::Chakra::%player%} >= 50:
  20.                         set {Juugo::Chakra::%player%} to 50
  21.                         if player has permission "*":
  22.                             send "&aChakra Maximo Juugo" to player
  23.                         wait 32 seconds
  24.                     else:
  25.                         if {Juugo::Nivel::%player%} is 25:
  26.                             wait 118 seconds
  27.                             add 1 to {Juugo::Chakra::%player%}
  28.                         if {Juugo::Nivel::%player%} is 50:
  29.                             wait 98 seconds
  30.                             add 1 to {Juugo::Chakra::%player%}
  31.                            
  32.                         if {Juugo::Nivel::%player%} is 100:
  33.                             wait 58 seconds
  34.                             add 1 to {Juugo::Chakra::%player%}
  35.                     #send "&7&o+1 de Chakra Natural" to player
  36. function CargaJugo(p: player, x: text):
  37.     set {_query} to "SELECT * FROM Juugo WHERE uuid = ""%{_x}%"""
  38.     execute unsafe {_query} in {-sql} and store the result in {_Juugo::*}
  39.     if {_x} is equal to {_Juugo::Uuid::1}:
  40.  
  41.         set {Juugo::Chakra::%{_p}%} to "%{_Juugo::Chakra::1}%" parsed as integer
  42.         set {Juugo::Nivel::%{_p}%} to "%{_Juugo::Nivel::1}%" parsed as integer
  43.         set {Juugo::Status::%{_p}%} to false
  44.         send "&a¡Datos Cargados con Exito! &2&l✔ &76." to {_p}
  45. on quit:
  46.     wait 1 tick
  47.     set {_query} to "UPDATE Juugo SET Chakra = ""%{Juugo::Chakra::%player%}%"" WHERE uuid = ""%player's uuid%"""
  48.     execute unsafe {_query} in {-sql}
  49.     delete {Juugo::Pre-Status::%{_p}%}
  50. command /jgmobs [<player>]:
  51.     permission: Staff
  52.     trigger:
  53.         if {Juugo::Status::%arg-1%} is true:
  54.             stop
  55.         else:
  56.  
  57.             if {Juugo::Chakra::%arg-1%} >= 50:
  58.                 set {Juugo::Chakra::%arg-1%} to 50
  59.                 stop
  60.             add 1 to {Juugo::Chakra::%arg-1%}
  61. command /juugo [<text>] [<text>] [<player>]:
  62.     trigger:
  63.         if arg-1 isn't set:
  64.             if {Juugo::Nivel::%player%} is set:
  65.                 send "&fReservas de &aChakra Natural&f: &6%{Juugo::Chakra::%player%}%&7/&c50 &8&o(Juugo &8&o%{Juugo::Nivel::%player%}%&8&o%%)"
  66.             else:
  67.                 send "&4¡No Puedes Realizar Esta Consulta!"
  68.         if arg-1 is "Activar":
  69.             if {Juugo::Nivel::%player%} is 50 or 100:
  70.                 if arg-2 is "100":
  71.                     if {Juugo::Nivel::%player%} is 100:
  72.                         Juugo(player, "100")
  73.                 if arg-2 is "50":
  74.                     if {Juugo::Nivel::%player%} is 50 or 100:
  75.                         Juugo(player, "manual")
  76.             else:
  77.                 send "&4¡No Puedes Realizar Esta Accion!"
  78.         if arg-1 is "Desactivar":
  79.             if {Juugo::Status::%player%} is true:
  80.                 set {Juugo::Pre-Status::%player%} to false
  81.                 send "&dEl juugo se desactivara en breve!"
  82.         if arg-1 is "Deshabilitar":
  83.             if player has permission "StaffLvL3":
  84.                 if arg-2 is set:
  85.                     if arg-3 is set:
  86.                         set {_query} to "DELETE From Juugo WHERE uuid = ""%arg-3's uuid%"""
  87.                         execute unsafe {_query} in {-sql}
  88.                         send "&fSe Elimino el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player
  89.                         delete {Juugo::Nivel::%arg-3%} and {Juugo::Chakra::%arg-3%} and {Juugo::Status::%arg-3%}
  90.                         send "&cSe te Elimino el &5Juugo" to arg-3
  91.         if arg-1 is "Habilitar":
  92.             if player has permission "Staff":
  93.                 if arg-2 is "25" or "50" or "100":
  94.                     if arg-3 is set:
  95.                         if {Juugo::Status::%arg-3%} isn't set:
  96.                             set {_query} to "INSERT INTO Juugo (`Nombre`, `uuid`, `Nivel`) VALUES ('%arg-3%', '%arg-3's uuid%', '%arg-2%');"
  97.                             execute unsafe {_query} in {-sql}
  98.                             send "&fSe le &aHabilito&f el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player
  99.                             send "&aObtuviste el &5Juugo %arg-2%%% &cReinicia para poder Aplicar los Cambios." to arg-3
  100.                         else:
  101.                             set {Juugo::Nivel::%arg-3%} to arg-2
  102.                             set {_query} to "UPDATE Juugo SET Nivel = ""%{Juugo::Nivel::%arg-3%}%"" WHERE uuid = ""%arg-3's uuid%"""
  103.                             execute unsafe {_query} in {-sql}
  104.                             send "&fSe le &aHabilito&f el &5Juugo &2%arg-2% &fal jugador &d%arg-3%" to player
  105.                             send "&aObtuviste el &5Juugo %arg-2%%%" to arg-3
  106.                 else:
  107.                     send "&cFavor de colocar un %% correcto siendo 25/50/100" to player
  108.             else:
  109.                 send "&4¡No Puedes Realizar Esta Accion!"
  110.            
  111. on damage:
  112.     if victim is a player:
  113.         if {Juugo::Status::%victim%} is false:
  114.             set {_salud} to {vidabase::%victim%} * 0.3
  115.             #send "%{_salud}%" to victim
  116.             if {Juugo::Chakra::%victim%} is greater than 0:
  117.                 #send "&a%{_salud}%" to victim
  118.                 if health of victim is less or equal to {_salud}:
  119.                     send "&fEl &achakra natural&f se desprende de tu cuerpo. &6¡Juugo Activo!" to victim
  120.                     Juugo(victim, "auto")
  121.                     stop
  122.                     #Se activa
  123.                 else:
  124.                     stop
  125.         else:
  126.             #El juugo esta activado de forma manual.
  127.             stop
  128. on death:
  129.     if victim is a player:
  130.         if {Juugo::Status::%victim%} is true:
  131.             delete {Juugo::Pre-Status::%victim%}
  132.             set action bar of victim to ""
  133.             make console execute command "/cast forcecast %victim% CleanJuugo%{Juugo::Nivel::%victim%}%"
  134.             make console execute command "/cast forcecast %victim% CleanJuugo50"
  135. function Juugo(p: player, type: string):
  136.     if {Juugo::Chakra::%{_p}%} is greater than 0:
  137.         if {Juugo::Status::%{_p}%} is false:
  138.             set {Juugo::Status::%{_p}%} to true
  139.             while {Juugo::Chakra::%{_p}%} is greater than 0:
  140.                 subtract 1 from {Juugo::Chakra::%{_p}%}
  141.                 if {_type} is "auto":
  142.                     if {Juugo::Nivel::%{_p}%} is 25:
  143.                         make console execute command "/cast forcecast %{_p}% Juugo25F"
  144.                     if {Juugo::Nivel::%{_p}%} is 50 or 100:
  145.                         make console execute command "/cast forcecast %{_p}% Juugo50F"
  146.                 else:
  147.                     if {_type} is "manual":
  148.                         make console execute command "/cast forcecast %{_p}% Juugo50F"
  149.                     if {Juugo::Nivel::%{_p}%} is 100:
  150.                         subtract 1 from {Juugo::Chakra::%{_p}%}
  151.                         make console execute command "/cast forcecast %{_p}% Juugo100F"
  152.                 set {_timer} to 30
  153.                 loop 30 times:
  154.                     subtract 1 from {_timer}
  155.                     if {_type} is "auto" or "manual":
  156.                         if {Juugo::Nivel::%{_p}%} is 50 or 100:
  157.                             set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(50%%)"
  158.                         else:
  159.                             set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(25%%)"
  160.                     else:
  161.                         set action bar of {_p} to "&5&lJUUGO&f: &a%{_timer}%s &7&o(100%%)"
  162.                     wait 1 second
  163.                 if {_p} is online:
  164.                     if {Juugo::Pre-Status::%{_p}%} is false:
  165.                         send "&fVuelves a la Normalidad... &7&o(Juugo Desactivado)" to {_p}
  166.                         set action bar of {_p} to ""
  167.                         delete {Juugo::Pre-Status::%{_p}%}
  168.                         exit loop
  169.                 else:
  170.                     set {Juugo::Status::%{_p}%} to false
  171.                     set action bar of {_p} to ""
  172.                     exit loop
  173.             set {Juugo::Status::%{_p}%} to false
  174.             delete {Juugo::Pre-Status::%{_p}%}
  175.             set action bar of {_p} to ""
  176.             if {_type} is "auto" or "manual":
  177.                 if {Juugo::Nivel::%{_p}%} is 50 or 100:
  178.                     make console execute command "/cast forcecast %{_p}% CleanJuugo50"
  179.                 else:
  180.                     make console execute command "/cast forcecast %{_p}% CleanJuugo25"
  181.             else:
  182.                 make console execute command "/cast forcecast %{_p}% CleanJuugo100"
  183.  
  184.  
  185.         else:
  186.             send "&c¡Debes esperar a que se pase tu Transformacion actual!" to {_p}
  187.     else:
  188.         send "&cNo tienes suficiente Chakra Natural para Transformarte!" to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement