Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # By: AfonsoSK (!Afonso)
- # Name: AfonsoEFight
- # Version: 1.0
- # Support: pedro_afonsoaapp <skype>
- # Perms: fight.adm
- # Dep's: Skript, SkPower(1.5.2) ou SkQuery (1.7+)
- options:
- #Principal
- #Perm
- spm: &6[Fight]&c Sem permissao.
- #Anuncios
- ads: 6
- #Tempo entre cada
- tca: 20
- #Prêmio
- pde: 50000
- #TAG
- tag: &4[Fighter]
- #HELP Comandos
- fh1: &6[Fight]&a /fight participar &7-&3 Entra no evento.
- fh2: &6[Fight]&a /fight sair &7-&3 Sai do evento.
- fh3: &6[Fight]&a /fight help &7-&3 Comandos do fight.
- fh4: &6[Fight]&a /fight tuto &7-&3 Tutorial do evento.
- fh5: &5[Fight]&a /fight iniciar &7-&3 Inicia o evento.
- fh6: &5[Fight]&a /fight cancelar &7-&3 Cancela o evento.
- fh7: &5[Fight]&a /fight setentrada &7-&3 Seta local de entrada.
- fh8: &5[Fight]&a /fight setsaida &7-&3 Seta local de saída.
- fh9: &5[Fight]&a /fight setloc1 &7-&3 Seta local da batalha 1.
- fh10: &5[Fight]&a /fight setloc2 &7-&3 Seta local da batalha 2.
- #Tutorial
- ft1: &c>>&6 [Tutorial do evento Fight]
- ft2: &3Os players participantes se enfrentam, 2 a 2,
- ft3: &3em uma arena utilizando apenas as armas entregues
- ft4: &3pelos realizadores do evento, quem ganha a luta
- ft5: &3avança para a próxima fase, até que sobre apenas 1 vencedor.
- #Participando
- fp1: &6[Fight]&c O evento ja está acontecendo.
- fp2: &6[Fight]&c Você já está participando do evento.
- fp3: &6[Fight]&c Esvazie o inventário para entrar no evento.
- fp4: &6[Fight]&3 Você entrou no evento.
- fp5: &6[Fight]&c Nao há nenhum evento acontecendo.
- #Saindo
- fs1: &6[Fight]&c Você saiu do evento.
- fs2: &6[Fight]&c Você nao está no evento.
- #Iniciando
- fi1: &6[Fight]&c O evento ja está acontecendo.
- fi2: &6[Fight]&3 Evento Fight iniciado!
- fi3: &6[Fight]&3 Para participar /fight participar.
- fi4: &6[Fight]&3 Prêmio do evento: &a50000
- fi5: &6[Fight]&3 Evento Fight cancelado!
- fi6: &6[Fight]&c Motivo: Jogadores insuficientes.
- fi7: &6[Fight]&3 FIGHT!!! &c{fighter1}&7 x&c {fighter2}
- fi8: &6[Fight]&c {fighter1}&3 venceu&c {fighter2}
- fi9: &6[Fight]&3 Evento Fight finalizado!
- fi10: &6[Fight]&3 Prêmio do evento: &a50000&3 + TAG &4[Fighter]&3.
- fi11: &6[Fight]&3 Vencedor do evento: %{fight.winner}%
- #Cancelando
- fc1: &6[Fight]&c Evento Fight cancelado!
- fc2: &6[Fight]&c Motivo: Staffer cancelou o evento.
- fc3: &6[Fight]&c Nao há nenhum evento acontecendo.
- #SetLocais
- fse: &5[Fight]&3 Local de entrada setado com sucesso!
- f11: &5[Fight]&3 Local de batalha 1 setado com sucesso!
- f12: &5[Fight]&3 Local de batalha 2 setado com sucesso!
- fss: &5[Fight]&3 Local de saída setado com sucesso!
- #Options 2 a baixo do código script
- command /fight [<text>]:
- trigger:
- if arg 1 is not set:
- execute player command "/fight help"
- if arg 1 is "help":
- if player dues not permission "fight.adm":
- send "{@fh1}"
- send "{@fh2}"
- send "{@fh3}"
- send "{@fh4}"
- stop
- if player has permission "fight.adm":
- send "{@fh5}"
- send "{@fh6}"
- send "{@fh7}"
- send "{@fh8}"
- send "{@fh9}"
- send "{@fh10}"
- stop
- if arg 1 is "tuto":
- send "{@ft1}"
- send "{@ft2}"
- send "{@ft3}"
- send "{@ft4}"
- send "{@ft5}"
- stop
- if arg 1 is "participar" or "join":
- if {fight.happening.start} is true:
- if {fight.start.block.input} is true:
- send "{@fp1}"
- stop
- else:
- if {fight.inside.event::%player%} is true:
- send "{@fp2}"
- stop
- else:
- loop items in player's inventory:
- add loop-item to {temporary.%player%::*}
- if {temporary.%player%::*} is set:
- send "{@fp3}"
- clear {temporary.%player%::*}
- stop
- if player's helmet or chestplate or leggings or boots is not air:
- send "{@fp3}"
- stop
- clear {temporary.%player%::*}
- add 1 to {fight.players.checker}
- add player's name to {fight.name.players.participating::*}
- set {fight.inside.event::%player%} to true
- teleport player to {fight.input}
- send "{@fp4}"
- stop
- else:
- send "{@fp5}"
- stop
- if arg 1 is "sair" or "leave":
- if {fight.inside.event::%player%} is true:
- clear {fight.inside.event::%player%}
- remove 1 from {fight.players.checker}
- remove player's name from {fight.name.players.participating::*}
- clear the inventory of player
- send "{@fs1}"
- teleport player to {fight.output}
- else:
- send "{@fs2}"
- if arg 1 is "iniciar" or "start":
- if player has permission "fight.adm":
- if {fight.happening.start} is true:
- send "{@fi1}"
- stop
- else:
- set {fight.happening.start} to true
- set {ads} to {@ads}
- remove 1 from {ads}
- loop {ads} times:
- if {fight.happening.start} is true:
- broadcast "{@fi2}"
- broadcast "{@fi3}"
- broadcast "{@fi4}"
- remove 1 from {ads}
- wait {@tca} seconds
- else:
- stop
- if {fight.happening.start} is true:
- if {fight.players.checker} is not set:
- broadcast "{@fi5}"
- broadcast "{@fi6}"
- clear {fight.inside.event::*}
- clear {fight.start.block.input}
- clear {fight.players.checker}
- clear {fight.happening.start}
- clear {fight.name.players.participating::*}
- stop
- else:
- if {fight.players.checker} = 4:
- broadcast "{@fi5}"
- broadcast "{@fi6}"
- clear {fight.inside.event::*}
- clear {fight.start.block.input}
- clear {fight.players.checker}
- clear {fight.happening.start}
- clear {fight.name.players.participating::*}
- stop
- else:
- set {fight.start.block.input} to true
- broadcast "{@fi2}"
- broadcast "{@fi3}"
- broadcast "{@fi4}"
- wait 10 seconds:
- loop 100 times:
- set {fighter1} to a random element out of {fight.name.players.participating::*}
- set {fighter2} to a random element out of {fight.name.players.participating::*}
- while {fighter1} is {fighter2}:
- if {fight.happening.start} is true:
- set {fighter1} to a random element out of {fight.name.players.participating::*}
- set {fighter2} to a random element out of {fight.name.players.participating::*}
- equip {fighter1} with a leather helmet
- equip {fighter1} with a leather chestplate
- equip {fighter1} with a leather leggings
- equip {fighter1} with a leather boots
- give 5 golden apple to the {fighter1}
- give 1 wood sword with unbreaking 50 to the {fighter1}
- give 1 golden apple:1 to the {fighter1}
- equip {fighter2} with a leather helmet
- equip {fighter2} with a leather chestplate
- equip {fighter2} with a leather leggings
- equip {fighter2} with a leather boots
- give 5 golden apple to the {fighter2}
- give 1 wood sword with unbreaking 50 to the {fighter2}
- give 1 golden apple:1 to the {fighter2}
- broadcast "{@fi7}"
- teleport {fighter1} to {fight.loc1}
- teleport {fighter2} to {fight.loc2}
- set {battle.check} to true
- while {battle.check} is true:
- if {fight.happening.start} is true:
- if {fight.dc.death.%{fighter1}%} is not set:
- if {fight.dc.death.%{fighter2}%} is not set:
- wait 3 seconds
- else:
- teleport {fighter1} to {fight.input}
- broadcast "{@fi8}"
- clear {battle.check}
- clear {fight.dc.death.%{fighter2}%}
- if {fight.players.checker} = 4:
- if {fight.happening.start} is true:
- set {fight.winner} to "%{fight.name.players.participating::*}%"
- broadcast "{@fi9}"
- broadcast "{@fi10}"
- broadcast "{@fi11}"
- add {@pde} to {fight.winner}'s balance
- set the {fighter.winner}'s prefix to "&f"
- set the attacker's prefix to "{@tag}&f"
- clear {fight.winner}
- clear {fight.inside.event::*}
- clear {fight.start.block.input}
- clear {fight.players.checker}
- clear {fight.happening.start}
- clear {fighter1}
- clear {fighter2}
- clear {battle.check}
- clear {fight.name.players.participating::*}
- stop loop
- stop
- else:
- send "{@spm}"
- stop
- if arg 1 is "cancelar" or "cancel":
- if player has permission "fight.adm":
- if {fight.happening.start} is true:
- broadcast "{@fc1}"
- broadcast "{@fc2}"
- clear {fight.inside.event::*}
- clear {fight.start.block.input}
- clear {fight.players.checker}
- clear {fight.happening.start}
- clear {fighter1}
- clear {fighter2}
- clear {battle.check}
- loop {fight.name.players.participating::*}:
- teleport loop-value to {fight.output}
- clear the inventory of loop-value
- clear {fight.name.players.participating::*}
- clear {fight.inside.event::%player%}
- else:
- send "{@fc3}"
- stop
- else:
- send "{@spm}"
- stop
- if arg 1 is "setloc1":
- if player has permission "fight.adm":
- set {fight.loc1} to location of player
- send "{@f11}"
- stop
- else:
- send "{@spm}"
- stop
- if arg 1 is "setloc2":
- if player has permission "fight.adm":
- set {fight.loc2} to location of player
- send "{@f12}"
- stop
- else:
- send "{@spm}"
- stop
- if arg 1 is "setentrada" or "setinput":
- if player has permission "fight.adm":
- set {fight.input} to location of player
- send "{@fse}"
- stop
- else:
- send "{@spm}"
- stop
- if arg 1 is "setsaida" or "setoutput":
- if player has permission "fight.adm":
- set {fight.output} to location of player
- send "{@fss}"
- stop
- else:
- send "{@spm}"
- stop
- options:
- oc1: &6[Fight]&c Este comando nao é permitido durante o evento.
- oc2: &6[Fight]&c Termine a batalha para utilizar comandos.
- oq1: &6[Fight]&c %{fighter1}%&3 deu dc no meio do combate contra &c%{fighter2}%&3.
- oq2: &6[Fight]&c %{fighter2}%&3 deu dc no meio do combate contra &c%{fighter1}%&3.
- on command:
- if {fight.happening.start} is true:
- if {fight.start.block.input} is true:
- if {fight.inside.event::%player%} is true:
- if player is not {fighter1} or {fighter2}:
- if command is "/fight sair" or "/fight cancelar" or "/g" or "/tell" or "/r" or "/." or "/ally":
- stop
- else:
- send "{@oc1}"
- cancel event
- else:
- if command is "/login" or "/register":
- stop
- else:
- send "{@oc2}"
- cancel event
- on death:
- if {fight.happening.start} is true:
- if {fight.start.block.input} is true:
- if {fight.inside.event::%victim%} is true:
- if victim is {fighter1}:
- wait 1 seconds
- clear {fight.dc.death.%{fighter1}%}
- clear {fight.inside.event::%victim%}
- remove 1 from {fight.players.checker}
- remove victim's name from {fight.name.players.participating::*}
- clear the inventory of victim
- teleport victim to {fight.output}
- else:
- if victim is {fighter2}:
- clear {fight.dc.death.%{fighter2}%}
- clear {fight.inside.event::%victim%}
- remove 1 from {fight.players.checker}
- remove victim's name from {fight.name.players.participating::*}
- clear the inventory of victim
- teleport victim to {fight.output}
- on quit:
- if {fight.happening.start} is true:
- if {fight.start.block.input} is true:
- if {fight.inside.event::%player%} is true:
- if player is {fighter1}:
- wait 1 seconds
- clear {fight.dc.death.%{fighter1}%}
- broadcast "{@oq1}"
- clear {fight.inside.event::%player%}
- remove 1 from {fight.players.checker}
- remove player's name from {fight.name.players.participating::*}
- clear the inventory of player
- teleport player to {fight.output}
- else:
- if player is {fighter2}:
- clear {fight.dc.death.%{fighter2}%}
- broadcast "{@oq2}"
- clear {fight.inside.event::%player%}
- remove 1 from {fight.players.checker}
- remove player's name from {fight.name.players.participating::*}
- clear the inventory of player
- teleport player to {fight.output}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement