Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Best PvE: A scenario by: Terribuilder/Dans1988 - Skripted by: Bitlington/Codes97
- #The Configurations
- options:
- name: &f[&cBestPvE&f]&b
- variables:
- {join.%player%}="offline"
- #Commands
- command /bestpve <text>:
- description: Switches the state of the Best PvE scenario.
- usage: /bestpve <on/off/toggle>
- permission: bestpve.skript
- executable by: players and console
- aliases: /bpve
- trigger:
- if arg 1 is "on":
- if {pve} is "on":
- message "{@name} Sorry cannot do. This is already enabled."
- stop
- else:
- loop all players:
- set {bestpve.%loop-player%} to "list"
- execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
- set {join.%loop-player%} to "online"
- broadcast "{@name} is enabled"
- set {pve} to "on"
- set {currenthearts} to 10
- if arg 1 is "off":
- if {pve} is "off":
- message "{@name} Sorry cannot do. This is already disabled."
- stop
- else:
- loop all players:
- set {bestpve.%loop-player%} to "off"
- execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
- broadcast "{@name} is disabled"
- set {pve} to "off"
- if arg 1 is "toggle":
- if {pve} is "off":
- loop all players:
- set {bestpve.%loop-player%} to "list"
- execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
- set {join.%loop-player%} to "online"
- broadcast "{@name} is enabled"
- set {pve} to "on"
- stop
- if {pve} is "on":
- loop all players:
- set {bestpve.%loop-player%} to "off"
- execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
- broadcast "{@name} is disabled"
- set {pve} to "off"
- set {currenthearts} to 10
- set {round} to 0
- stop
- command /iambestpve:
- description: Tells the player if they on the Best PvE list.
- trigger:
- if {bestpve.%command sender%} is "list":
- message "{@name} Yes, you are on the Best PvE list."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- else:
- message "{@name} No, you are off the Best PvE list."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- command /isbestpveon:
- description: Tells the player if the Best PvE scenario is on.
- trigger:
- if {pve} is "on":
- message "{@name} Yes, Best PvE is on."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- else:
- message "{@name} No, Best PvE is off."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- command /addbestpve <player>:
- description: Adds the player to the best PvE list.
- usage: /addbestpve <player>
- permission: bestpve.skript
- trigger:
- set {bestpve.%arg 1%} to "list"
- broadcast "{@name} %arg 1% is now on the Best PvE list."
- execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
- command /normalhealth <player>:
- description: Sets the player to normal health
- usage: /normalhealth <player>
- permission: bestpve.skript
- aliases: /nh
- trigger:
- set {_player} to arg 1
- set {_player}'s max health to 10
- broadcast "{@name} %arg 1% is now at normal health."
- execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
- heal {_player}
- command /removebestpve <player>:
- description: Removes the player to the best PvE list.
- usage: /removebestpve <player>
- permission: bestpve.skript
- trigger:
- set {bestpve.%arg 1%} to "off"
- broadcast "{@name} %arg 1% is off on the Best PvE list."
- execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
- command /healthreset:
- description: Resets everyone's health.
- permission: bestpve.skript
- trigger:
- loop all players:
- set loop-player's health to 10
- set loop-player's max health to 10
- execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
- broadcast "{@name} All player's health have had a global reset by %command sender%!"
- command /bestpvehelp:
- description: Teaches you about the Best PvE scenario.
- aliases: /bph, /bphelp,
- trigger:
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- message "{@name} This is the Best PvE scenario. Created by: /u/Dans1988 and skripted by /u/Bitlington"
- wait 0.1 seconds
- message "{@name} At the beginning of the game, all players are added to a ""best PvE"" list. Every 10 minutes, they are healed by 1 heart and get 1 potential heart."
- wait 0.1 seconds
- message "{@name} When you take damage you are removed from this list. When you kill someone, you are on the list."
- wait 0.1 seconds
- message "{@name} Some useful commands are /iambestpve and /isbestpveon - Thanks for Reading - Bit!"
- if player is an op:
- message "{@name} Mister.Op here is the commands to help you run this scenario."
- wait 0.1 seconds
- message "{@name} /removebestpve , /normalhealth, /bestpve <on/off/toggle> , /addbestpve , /healthreset . - Bit!"
- #The Real Deal
- on damage of player:
- if {pve} is "on":
- if damage was caused by a projectile:
- projectile is not a snowball:
- if {bestpve.%victim%} is "list":
- set {bestpve.%victim%} to "off"
- message "{@name} You are no longer on the BestPvE list." to the victim
- execute console command "/playsound mob.wolf.howl %victim% ~ ~ ~ 1 1 1"
- else:
- if {bestpve.%victim%} is "list":
- set {bestpve.%victim%} to "off"
- message "{@name} You are no longer on the BestPvE list." to the victim
- execute console command "/playsound mob.wolf.howl %victim% ~ ~ ~ 1 1 1"
- on death of player:
- if {pve} is "on":
- if {bestpve.%attacker%} is "off":
- set {bestpve.%attacker%} to "list"
- message "{@name} You are now on the BestPvE list." to the attacker
- execute console command "/playsound note.pling %attacker% ~ ~ ~ 1 1 1"
- every 10 minutes:
- if {pve} is "on":
- set {currenthearts} to {currenthearts} + 1
- set {round} to {round} + 1
- loop all players:
- if {bestpve.%loop-player%} is "list":
- set loop-player's max health to loop-player's max health + 1
- add 1 to loop-player's health
- execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
- broadcast "{@name} Best PvE players gained a heart."
- #Login System
- on login:
- {pve} is "on":
- if {bestpve.%player%} is "list":
- player's max health is not {currenthearts}:
- wait 0.5 seconds
- set player's max health to {currenthearts}
- add {left.%player%} to player's health
- message "{@name} Your health is fixed."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- on disconnect:
- {pve} is "on":
- if {bestpve.%player%} is "list":
- set {left.%player%} to {round}
- on login:
- {pve} is "on":
- if {join.%player%} is "offline":
- set {join.%player%} to "online"
- player's max health is not {currenthearts}
- heal player
- add {round} to player's health
- message "{@name} Your health is fixed."
- execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
- on login:
- {pve} is "off":
- {bestpve.%player%} is "list":
- player's max health is more than 10:
- {left.%player%} is more than 0:
- execute player command "/normalhealth %player%"
- execute player command "/removebestpve %player%"
- on login:
- {pve} is "off":
- player's max health is more than 10:
- {left.%player%} is more than 0:
- execute player command "/normalhealth %player%"
- execute player command "/removebestpve %player%"
- #Reset System
- on respawn:
- {pve} is "on":
- set the player's health to 10
- message "{@name} Thanks for playing"
- set the player's max health to 10
- #Makes Sure Best PvE is off when reloaded on turned on
- on skript start:
- set {pve} to "off"
- on skript load:
- set {pve} to "off"
- #End of Transmission
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement