Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /pvp [<text>] [<text>]:
- trigger:
- if arg 1 is not set:
- if player has permission "admin":
- send "Komendy pvp:"
- send "/pvp off <gracz> &7Wylacza pvp dla gracza."
- send "/pvp on <gracz> &7Wlacza pvp dla gracza."
- send "pvp list &7Lista graczy z wylaczonym pvp"
- stop
- if {pvpoff::%player%} is not set:
- set {pvpoff::%player%} to true
- send "Wlaczyles sobie pvp."
- stop
- clear {pvpoff::%player%}
- send "Wylaczyles sobie pvp."
- stop
- if player has permission "admin":
- if arg 1 is "list":
- if size of {pvpoff::*} is smaller than 1:
- send "Nikt nie ma wlaczonego pvp."
- stop
- send "Lista graczy z wlaczonym pvp:"
- set {_p} to ""
- loop {pvpoff::*}:
- set {_p} to "%{_p}%, %loop-index%"
- set {_p} to (length of {_p} - 2) last characters of {_p}
- send "%{_p}%"
- stop
- if arg 2 is not set:
- send "Podaj nick gracza."
- stop
- if arg 1 is "on":
- set {_arg} to "%arg 2%" parsed as offlineplayer
- if {_arg} is online:
- if {pvpoff::%arg 2%} is not set:
- set {pvpoff::%arg 2%} to true
- send "Wlaczyles pvp dla gracza %arg 2%"
- stop
- send "Ten gracz juz ma wlaczone PVP"
- stop
- send "Tego gracza nie ma na serwerze."
- stop
- if arg 1 is "off":
- if {pvpoff::%arg 2%} is set:
- clear {pvpoff::%arg 2%}
- send "Wylaczyles pvp dla gracza: %arg 2%"
- stop
- send "Ten gracz ma wylaczone pvp."
- stop
- on damage:
- loop all players:
- if {_v} and {_a} is set:
- exit loop
- if "%victim%" is "%loop-player%":
- set {_v} to loop-player
- if "%attacker%" is "%loop-player%":
- set {_a} to loop-player
- if {_v} is set:
- if {pvpoff::%{_v}%} is not set:
- cancel event
- if {_a} is set:
- if {pvpoff::%{_a}%} is not set:
- if {_v} is set:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement