# ======================================================================== # PVPmanager ale w wersji Skript - link do pluginu: # https://www.spigotmc.org/resources/pvpmanager-lite.845/ # ======================================================================== # Z góry mówię, lepszym w tym wypadku jest plugin, natomiast ten skrypt # powstał w celach edukacji i eksperymentowania z skriptem :) # ======================================================================== variables: {al::antylogout::%player%} = false {al::cooldown::%player%} = 10 {al::pvptoggle::%player%} = true on damage: if victim doesn't have permission "pvp.bypass": if {al::antylogout::%attacker%} = false: if attacker is player: set {al::antylogout::%attacker%} to true set {al::antylogout::%victim%} to true set {al::cooldown::%victim%} to 10 set {al::cooldown::%attacker%} to 10 send "&8» &cAntylogout Przeciwnik: %victim% Nie wylogowywuj sie! &8«" to attacker send "&8» &cAntylogout Przeciwnik: %attacker% Nie wylogowywuj sie! &8«" to victim wait 10 seconds send "&8» &cAntylogout minal! &8«" to attacker send "&8» &cAntylogout minal! &8«" to victim set {al::antylogout::%attacker%} to false set {al::antylogout::%victim%} to false if {al::antylogout::%attacker%} = true: set {al::cooldown::%victim%} to 10 set {al::cooldown::%attacker%} to 10 wait 10 seconds send "&8» &cAntylogout minal! &8«" to attacker send "&8» &cAntylogout minal! &8«" to victim set {al::antylogout::%attacker%} to false set {al::antylogout::%victim%} to false every 1 second: loop all players: if {al::cooldown::%loop-player%} is greater than 0: remove 1 from {al::cooldown::%loop-player%} on command: if {al::antylogout::%player%} is true: cancel event send "&8» &cAntylogout jeszcze przez &7%{al::cooldown::%player%}%&c!" on leave: if {al::antylogout::%player%} is true: execute command "kill %player%" send "&8» &c%player% probowal uciec z walki i zginal." to all players command /pvpoff []: permission: pvp.off permission message: &cNie masz permisji! trigger: if arg 1 is set: set {al::pvptoggle::%arg 1%} to false send "&8» &aWylaczyles pvp graczowi %arg 1%" send "&8» &a%player% wylaczyl ci PVP!" to arg 1 if arg 1 is not set: set {al::pvptoggle::%player%} to false send "&8» &aWylaczyles sobie pvp!" command /pvpon []: permission: pvp.on permission message: &cNie masz permisji! trigger: if arg 1 is set: set {al::pvptoggle::%arg 1%} to true send "&8» &cWlaczyles pvp graczowi %arg 1%" send "&8» &c%player% wlaczyl ci PVP!" to arg 1 else: set {al::pvptoggle::%player%} to true send "&8» &cWlaczyles sobie pvp!" command /pvpstatus []: permission: pvp.statuscheck permission message: &cNie masz permisji! trigger: if {al::antylogout::%arg 1%} = true: send "&8» &7%arg 1% &cjest podczas walki." else: send "&8» &7%arg 1% &anie walczy." on damage: if {al::pvptoggle::%victim%} is false: cancel event send "&8» &c%victim% &7ma wylaczone pvp!" to attacker if {al::pvptoggle::%attacker%} is false: cancel event send "&8» &cPosiadasz wylaczone PVP!" to attacker