Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import:
- com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
- com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPostJoinEvent
- com.alessiodp.parties.api.events.bukkit.party.BukkitPartiesPartyPreCreateEvent
- com.alessiodp.parties.api.events.bukkit.party.BukkitPartiesPartyPostCreateEvent
- com.alessiodp.parties.api.events.bukkit.party.BukkitPartiesPartyPostDeleteEvent
- com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPostLeaveEvent
- on post create party:
- crear(event-commandsender, "%event-party%")
- on player pre join party:
- entrar(event-commandsender, "%event-party%")
- on player pre leave party:
- salir(event-commandsender, "%event-party%")
- function salir(p: player, par: text):
- remove {_p} from {Partys.Party2.%{_par}%.list::*}
- function crear(p: player, par: text):
- set {Partys.Party2.%{_par}%.list::1} to {_p}
- add 1 to {Array.%{_par}%}
- function entrar(p: player, par: text):
- add 1 to {Array.%{_par}%}
- set {Partys.Party2.%{_par}%.list::%{Array.%{_par}%}%} to {_p}
- on quit:
- if player is in party:
- salir(player, "%party of player%")
- on death:
- if victim is in world "kamuidefi":
- if victim is in party:
- wait 1 second
- make victim run command "/party leave" as op
- salir(victim, "%party of victim%")
- #command /vert:
- # trigger:
- # send "&bMiembros: &f%{Partys.Party2.%party of player%.list::*}%"
- #command /verM:
- # trigger:
- # send "%{Partys.Party2.%player%.list::*}%"
- # delete {Partys.Party2.%player%.list::*}
- # delete {Array.%player%}
- command /expmob [<number>] [<player>] [<text>]:
- executable by: console
- trigger:
- if arg-2 is in party:
- send "&aExp ganada de la Party:" to arg-2
- loop {Partys.Party2.%party of arg-2%.list::*}:
- if loop-variable is online:
- add loop-variable to {_Conectado::*}
- else:
- add loop-variable to {_desconectado::*}
- loop {_Conectado::*}:
- if distance between arg-2 and loop-variable is smaller than 60:
- add loop-variable to {_Distancia::*}
- loop {_Distancia::*}:
- if arg 3 is "M":
- add arg-1 to {xp::%loop-variable%}
- set {_c.%loop-variable%} to arg-1
- send "&a+ %{_c.%loop-variable%}% &7- &6%loop-variable%" to loop-variable
- else:
- add arg-1 * {lvlmultipler::%loop-variable%} to {xp::%loop-variable%}
- set {_c.%loop-variable%} to arg-1 * {lvlmultipler::%loop-variable%}
- send "&a+ %{_c.%loop-variable%}% &7- &6%loop-variable%" to loop-variable
- if {nivel::%loop-variable%} is 100:
- continue
- else:
- if {xp::%loop-variable%} is greater than {xpnext::%loop-variable%}:
- set {xp::%loop-variable%} to {xp::%loop-variable%} - {xpnext::%loop-variable%}
- add 1 to {nivel::%loop-variable%}
- add 1 to {Puntosm::%loop-variable%} #Editar
- send title "" with subtitle "&9&lSUBISTE AL NIVEL &a%{nivel::%loop-variable%}%" to loop-variable for 3 seconds
- if {nivel::%loop-variable%} is between 1 and 10:
- add 100 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 11 and 20:
- add 200 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 21 and 30:
- add 500 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 31 and 40:
- add 750 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 41 and 50:
- add 1000 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 51 and 60:
- add 1500 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 61 and 70:
- add 2000 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 71 and 80:
- add 2500 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 81 and 90:
- add 4000 to {xpnext::%loop-variable%}
- if {nivel::%loop-variable%} is between 91 and 100:
- add 6000 to {xpnext::%loop-variable%}
- set {_query} to "UPDATE usuarios SET puntosm = ""%{puntosm::%loop-variable%}%"", nivel = ""%{nivel::%loop-variable%}%"", xp = ""%{xp::%loop-variable%}%"", xpnext = ""%{xpnext::%loop-variable%}%"", niveltimer = ""%{lvltimer::%loop-variable%}%"", nivelmultipler = ""%{lvlmultipler::%loop-variable%}%"" WHERE NOMBRE = ""%loop-variable%"""
- execute unsafe {_query} in {-sql}
- else:
- if {nivel::%arg-2%} is 100:
- stop
- else:
- if arg 3 is "M":
- add arg-1 to {xp::%arg-2%}
- set {_Exp} to arg-1
- send "&a+ %{_Exp}%" to arg-2
- else:
- add arg-1 * {lvlmultipler::%arg-2%} to {xp::%arg-2%}
- set {_Exp} to arg-1 * {lvlmultipler::%arg-2%}
- send "&a+ %{_Exp}%" to arg-2
- if {xp::%arg-2%} is greater than {xpnext::%arg-2%}:
- set {xp::%arg-2%} to {xp::%arg-2%} - {xpnext::%arg-2%}
- add 1 to {nivel::%arg-2%}
- add 1 to {Puntosm::%arg-2%} #Editar
- send title "" with subtitle "&9&lSUBISTE AL NIVEL &a%{nivel::%arg-2%}%" to arg-2 for 3 seconds
- if {nivel::%arg-2%} is between 1 and 10:
- add 100 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 11 and 20:
- add 200 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 21 and 30:
- add 500 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 31 and 40:
- add 750 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 41 and 50:
- add 1000 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 51 and 60:
- add 1500 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 61 and 70:
- add 2000 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 71 and 80:
- add 2500 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 81 and 90:
- add 4000 to {xpnext::%arg-2%}
- if {nivel::%arg-2%} is between 91 and 100:
- add 6000 to {xpnext::%arg-2%}
- set {_query} to "UPDATE usuarios SET puntosm = ""%{puntosm::%arg-2%}%"", nivel = ""%{nivel::%arg-2%}%"", xp = ""%{xp::%arg-2%}%"", xpnext = ""%{xpnext::%arg-2%}%"", niveltimer = ""%{lvltimer::%arg-2%}%"", nivelmultipler = ""%{lvlmultipler::%arg-2%}%"" WHERE uuid = ""%arg-2's uuid%"""
- execute unsafe {_query} in {-sql}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement