Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &8[&bBest PVE&8]&r
- command /bestPVE [<text>]:
- permission: skript.op
- trigger:
- if arg is "on" or "enable":
- set {BestPVE} to true
- broadcast "{@P} Enabled by %command sender%!"
- execute console command "/bestPVE aps"
- loop all players:
- add loop-player to {BestPVE.list::*}
- set {BestPVE.isOnList.%loop-player%} to true
- if arg is "off" or "disable":
- set {BestPVE} to false
- broadcast "{@P} Disabled by %command sender%!"
- execute console command "/bestPVE aps"
- if arg is "reset":
- set {BestPVE} to false
- loop {BestPVE.list::*}:
- loop-value is player:
- set {_player} to loop-value
- set max health of {_player} to 10
- delete {BestPVE.isOnList.%loop-value%}
- delete {BestPVE.list::*}
- if arg is "toggle" or "switch":
- if {BestPVE} is true:
- command sender command "/bestPVE off"
- stop trigger
- if {BestPVE} is false:
- command sender command "/bestPVE on"
- stop trigger
- if arg is "aps":
- loop all players:
- execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
- on damage:
- {BestPVE} is true:
- {BestPVE.isOnList.%victim%} is true:
- remove victim from {BestPVE.list::*}
- set {BestPVE.isOnList.%victim%} to false
- message "{@P} You were removed from the Best PVE list because you took damage!"
- message "{@P} To get back on the list, get a kill!"
- every 10 seconds:
- {BestPVE} is true:
- loop {BestPVE.list::*}:
- loop-value is player:
- set {_player} to loop-value
- set the max health of {_player} to {_player}'s max health +1
- apply regeneration 2 to {_player} for 3 seconds
- message "{@P} You're on the Best PVE list, so you gained health!" to {_player}
- on death of player:
- attacker is not in {BestPVE.list::*}:
- add attacker to {BestPVE.list::*}
- {BestPVE.isOnList.%attacker%} is false:
- set {BestPVE.isOnList.%attacker%} to true
- message "{@P} You got a kill! You were added back to the Best PVE list." to attacker
- on login:
- {BestPVE} is true:
- {BestPVE.isOnList.%player%} is not set:
- set {BestPVE.isOnList.%player%} to true
- player is not in {BestPVE.list::*}:
- add player to {BestPVE.list::*}
- message "{@P} You weren't online, so you were added to the Best PVE list!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement