Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # Mireacul UHC Core — 1.8.8
- # Public Release Version
- #
- # AUTHOR: ValidatedEnd
- #
- # DEPENDENCIES (Required for full functionality):
- # 1. Skript 2.2 v8: https://www.dropbox.com/scl/fo/9glikxpymu43zbgovkyvx/ANymDLhl8u78dIXsgSHbCuI/Old%20Versions/Skript%202.2%20Fixes%20V8.jar?rlkey=8slnpfyojeb1wzm5n8vl2lb1o&e=1&dl=0
- # 2. SkQuery: https://github.com/SkQuery/SkQuery/releases/tag/3.6.3
- # 3. skRayFall v1.8 https://dev.bukkit.org/projects/skrayfall/files/909615
- # 2. BarBridge https://www.spigotmc.org/resources/barbridge-1-8-bossbar-plugin-api.134574/
- # 3. Nate's Scatter: https://www.reddit.com/search/?q=nates+scatter&cId=bfe144f6-a171-4651-b847-b96e1e735625&iId=6f74f21d-a842-47c6-8d10-d2e81d16d5cc (Command: /sca)
- # 4. Advanced Killboard: https://www.reddit.com/r/ultrahardcore/comments/5azg0x/advanced_killboard_sk/ (Command: /killboard)
- # 5. UHCSk-Fork: https://pastebin.com/n9UyrhTB
- # ==========================================
- options:
- spawn: spawn
- P: &7[&6&lMire&e&la&3&lcul&7]&f
- perms: skript.host
- starterFood: 20 steak
- # CHANGE THESE TO YOUR SERVER OWNERS/ADMINS
- serverOwner: ValidatedEnd
- admin: Ranger5o
- on load:
- execute console command "/uhcstop confirm"
- execute console command "/gamerule sendCommandFeedback false"
- wait 5 ticks
- command "/pvparena enable"
- #==========================================
- #SERVER-SIDE
- #==========================================
- #----------------------------------------------
- #Spawn Handler
- #----------------------------------------------
- command /setuhcspawn:
- permission: {@perms}
- trigger:
- set {uhc::spawn} to location of command sender
- send "&7%{uhc::spawn}% » Spawn has been set to this location"
- on hunger meter change:
- event-world is "{@spawn}"
- set event-player's food level to 10
- on damage of player:
- {uhc::running} is not set
- event-world is "{@spawn}"
- cancel event
- damage cause is void
- teleport victim to {uhc::spawn}
- on death of a player:
- set player's gamemode to adventure
- #------------------------------------
- #Death kick
- #------------------------------------
- if {uhc::running} is set:
- {spec::%victim%} is not set
- set {_v} to victim
- execute console command "/wl remove %{_v}%"
- send "{@P} You have fallen in battle, wish your companions and enemies goodbye and leave with honor." to {_v}
- wait 60 seconds
- if {_v} is online:
- kick {_v} due to "You have lost the battle, but not the war. Hone your skills and try again."
- on weather change:
- event-world is "{@spawn}"
- set weather to sun
- on command "/spawn":
- if {uhc::running} is set:
- cancel event
- send "&cError"
- else:
- cancel event
- if event-world is "arena":
- cancel event
- wait 1 tick
- make player execute command "/pvpleave"
- else:
- set command sender's gamemode to adventure
- teleport command sender to {uhc::spawn}
- on join:
- #----------------------------------------------
- #Joining message
- #----------------------------------------------
- if player's name is "{@serverOwner}" or "{@admin}":
- set join message to "&7[&a»&7] &c%player%"
- else:
- set join message to "&7[&a»&7] &f%player%"
- #----------------------------------------------
- #Welcome message
- #----------------------------------------------
- if {uhc::running} is set:
- send "{@P} Welcome back"
- if {uhc::timer} is "prepvp":
- set {_m} to floor({uhc::pvptime} / 60)
- set {_s} to {uhc::pvptime} mod 60
- if {_s} is less than 10:
- set {_s} to "0%{_s}%"
- execute console command "/bar timed %player% %{uhc::pvptime}% &ePvP &7in &a%{_m}%:%{_s}%"
- else if {uhc::timer} is "pvp":
- set {_m} to floor({uhc::mutime} / 60)
- set {_s} to {uhc::mutime} mod 60
- if {_s} is less than 10:
- set {_s} to "0%{_s}%"
- # 2. Update the BarBridge Text dynamically
- execute console command "/bar timed %player% %{uhc::mutime}% &eMeetup &7in &a%{_m}%:%{_s}%"
- else if {uhc::timer} is "meetup":
- execute console command "/bar set %player% &cMeetup &7- &eHead to &c0,0"
- stop
- #----------------------------------------------
- #When game is not running
- #----------------------------------------------
- else:
- teleport player to {uhc::spawn}
- set player's gamemode to adventure
- heal player
- clear player's inventory
- command "/effect %player% clear"
- heal player
- loop 5 times:
- send "" to player
- send "&7⬥ &8&m &7 ⬥" to player
- send "" to player
- send "&7Welcome to {@P}" to player
- if {arena::Enabled} is set:
- send "&3Arena &7» &aEnabled" to player
- send "&3Mode &7» &a%{arena::Mode}%" to player
- send "" to player
- send "&7⬥ &8&m &7 ⬥" to player
- else:
- if {uhc::setup} is set:
- make player execute command "/config"
- send "" to player
- send "&7⬥ &8&m &7 ⬥" to player
- else:
- send "" to player
- send "&7⬥ &8&m &7 ⬥" to player
- #----------------------------------------------
- #Leave message
- #----------------------------------------------
- on disconnect:
- set leave message to "&7[&c«&7] &f%player%"
- # ==========================================
- # HOST SETUP
- # ==========================================
- command /matchpost [<text>]:
- trigger:
- if command sender has permission "{@perms}":
- if arg-1 is set:
- if arg-1 is "del" or "delete":
- if {uhc::matchpost} is set:
- delete {uhc::matchpost}
- send "{@P} Matchpost deleted"
- else:
- send "{@P} No Matchpost to delete"
- else if arg-1 is "send" or "link" or "show" or "now" or "here":
- if {uhc::matchpost} is set:
- send "{@P} Matchpost &7&l» %{uhc::matchpost}%"
- else:
- send "{@P} No match is set"
- else:
- if {uhc::setup} is set:
- set {uhc::matchpost} to arg-1
- send "{@P} Matchpost set: %{uhc::matchpost}%"
- else:
- send "{@P} Game is not setup. Do /setupuhc confirm"
- else:
- send "{@P} Matchpost &7&l» %{uhc::matchpost}%"
- else:
- if {uhc::matchpost} is set:
- send "{@P} Matchpost &7&l» %{uhc::matchpost}%"
- else:
- send "{@P} No match is set"
- command /setupgame [<text>] [<text>]:
- aliases: /setupuhc
- permission: {@perms}
- trigger:
- if arg-1 is not set:
- make command sender execute command "/setupuhc help"
- if arg-1 is "del" or "delete":
- if {uhc::setup} is not set:
- send "{@P} Error: No setup to delete"
- else:
- if {uhc::host} is not set:
- delete {uhc::setup}
- send "{@P} Setup deleted"
- stop
- if command sender's name is "%{uhc::host}%" or "{@serverOwner}" or "{@admin}":
- delete {uhc::setup}
- send "{@P} Setup deleted"
- stop
- else:
- send "{@P} You are not the host"
- stop
- if arg-1 is "confirm":
- if {uhc::host} is not set:
- send "{@P} Error: No Host is set"
- stop
- if {uhc::teamsize} is not set:
- send "{@P} Error: No Teamsize or FFA is set"
- stop
- if {uhc::border} is not set:
- send "{@P} Error: No Border is set"
- stop
- if {uhc::pvpmins} is not set:
- send "{@P} Error: No PvP Time is set"
- stop
- if {uhc::mumins} is not set:
- send "{@P} Error: No Meetup Time is set"
- stop
- set {uhc::setup} to true
- send "{@P} Setup confirmed"
- stop
- if arg-1 is "host":
- if arg-2 is set:
- set {uhc::host} to "%arg-2%" parsed as a offline player
- send "&a%{uhc::host}% has been set as host"
- stop
- else:
- send "&f/setupgame &ahost &7[&aIGN&7]"
- stop
- if arg-1 is "team":
- if arg-2 is set:
- set {uhc::teamlimit} to "%arg-2%" parsed as a integer
- if {uhc::teamlimit} is not set:
- send "&7Teams must have a number for the size limit"
- send "/setupgame teams &7[&fMax players per team&7]"
- stop
- set {uhc::teamsize} to "team"
- send "&aTeams of %{uhc::teamlimit}% have been set"
- stop
- else:
- send "&7Teams must have a number for the size limit"
- send "/setupgame teams &7[&fMax players per team&7]"
- stop
- if arg-1 is "ffa" or "FFA":
- set {uhc::teamsize} to "FFA"
- delete {uhc::teamlimit}
- send "&aFFA has been set"
- stop
- if arg-1 is "border":
- if arg-2 is set:
- set {uhc::border} to "%arg-2%" parsed as a integer
- if {uhc::border} is set:
- send "&a%{uhc::border}% has been set as the border&7(radius)"
- stop
- else:
- send "&7border must have a number for the size limit"
- send "/setupgame border &7[&fvalue&7]"
- stop
- else:
- send "&7border must have a number for the size limit"
- send "/setupgame border &7[&fvalue&7]"
- stop
- if arg-1 is "pvp":
- if arg-2 is set:
- set {uhc::pvpmins} to "%arg-2%" parsed as a integer
- if {uhc::pvpmins} is set:
- if arg-2 is < 1:
- send "&cPvP must be at least 1 minute"
- stop
- send "&aPvP will be enabled after %{uhc::pvpmins}% minutes of start"
- stop
- else:
- send "&7PvP time must have a number for the size limit"
- send "/setupgame pvp &7[&fvalue&7]"
- stop
- else:
- send "&7PvP time must have a number for the size limit"
- send "/setupgame pvp &7[&fvalue&7]"
- stop
- if arg-1 is "meetup":
- if arg-2 is set:
- set {uhc::mumins} to "%arg-2%" parsed as a integer
- if {uhc::mumins} is set:
- if arg-2 is < 1:
- send "&cMeetup time must be at least 1 minute"
- stop
- send "&aMeetup will be set %{uhc::mumins}% minutes after pvp is enabled."
- stop
- else:
- send "&7Meetup time must have a number"
- send "/setupgame meetup &7[&fvalue&7]"
- stop
- else:
- send "&7Meetup time must have a number"
- send "/setupgame meetup &7[&fvalue&7]"
- stop
- if arg-1 is "info":
- send "{@P} &fHost: &e%{uhc::host}%"
- if {uhc::teamlimit} is set:
- send "{@P} &fTeam Size: &e%{uhc::teamlimit}%"
- else:
- send "{@P} &fFFA"
- send "{@P} &fBorder: &e%{uhc::border}%"
- send "{@P} &fPvP: &e%{uhc::pvpmins}% min"
- send "{@P} &fMeetup: &e%{uhc::mumins}% min"
- stop
- if arg-1 is "help":
- send "&f/setupgame &ahost/team(ffa for FFA)/border(radius)/pvp/meetup &c[value]"
- send "&f/setupgame &cconfirm &7- Confirms setup"
- send "&f/setupgame &cinfo &7- Displays match info"
- stop
- command /pregame:
- permission: {@perms}
- trigger:
- if {uhc::pregame} is set:
- send "{@P} Error: Game is already in pregame state"
- stop
- if {uhc::setup} is not set:
- send "{@P} Error: Confirm setup with /setupuhc confirm"
- stop
- set {uhc::pregame} to true
- make command sender execute command "/pvparena disable"
- make command sender execute command "/feature set deathlightning on"
- make command sender execute command "/feature set deathstands on"
- make command sender execute command "/feature set heads on"
- loop all players:
- teleport loop-player to {uhc::spawn}
- clear loop-player's inventory
- set loop-player's gamemode to adventure
- set loop-player's health to 10
- set loop-player's food to 20
- command "/playsound mob.wither.death %loop-player% ~ ~ ~ 1 0.5 1"
- broadcast "&7[&6&lMire&e&la&3&lcul&7] &7&l» &aGame starting soon"
- # ==========================================
- # START
- # ==========================================
- command /uhcstart [<text>]:
- aliases: /start
- permission: {@perms}
- trigger:
- if {uhc::running} is set:
- send "{@P} &cGame is already running."
- stop
- if arg-1 is not set:
- if {uhc::pregame} is set:
- send "{@P} To start game do /start confirm"
- stop
- else:
- send "{@P} Error: no game set."
- stop
- else:
- if arg-1 is not "confirm":
- send "{@P} Error: unknown syntax. /start confirm"
- stop
- if {uhc::setup} is not set:
- send "{@P} Error: Game is not setup. /setupuhc confirm"
- stop
- if {uhc::pregame} is not set:
- send "{@P} Error: Pregame needs to be set. /pregame"
- stop
- delete {uhc::pregame}
- set {uhc::running} to true
- set {uhc::world} to event-world
- message "%{uhc::world}%"
- execute console command "/gamerule sendCommandFeedback false"
- execute console command "/kb on"
- # Clear and prep
- loop all players:
- {spec::%loop-player%} is not set
- set loop-player's gamemode to survival
- clear loop-player's inventory
- set loop-player's food level to 10
- set loop-player's health to loop-player's max health
- give {@starterFood} to loop-player
- execute console command "/xp set * 0"
- # Countdown
- broadcast "{@P} &fGame starting in &c5&f..."
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &c4"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &c3"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &c2"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &c1"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- # Unfreeze
- execute console command "/freeze"
- broadcast "{@P} &a&lGO!"
- loop all players:
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
- # Set time to day
- make command sender execute command "/time set day"
- # Butcher mobs
- loop 3 times:
- wait 1 second
- execute console command "/butcher"
- # PvP off at start
- execute console command "/pvp %{uhc::world}% off"
- make command sender execute command "/killboard on"
- # Final heal after 10 seconds
- wait 5 seconds
- broadcast "{@P} &fFinal Heal: &c3"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &fFinal Heal: &c2"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &fFinal Heal: &c1"
- loop all players:
- command "/playsound note.harp %loop-player% ~ ~ ~ 1 0.5 1"
- wait 1 second
- broadcast "{@P} &fFinal Heal Given!"
- loop all players:
- {spec::%loop-player%} is not set
- heal loop-player
- set loop-player's food level to 10
- command "/playsound random.pop %loop-player% ~ ~ ~ 1 0.5 1"
- # Start timer
- set {uhc::pvptime} to {uhc::pvpmins} * 60
- set {uhc::mutime} to {uhc::mumins} * 60
- set {uhc::gamemins} to {uhc::mumins} + {uhc::pvpmins}
- execute console command "/bar timed * %{uhc::pvptime}% &ePvP &7in &a%{uhc::pvpmins}%:00"
- set {uhc::timer} to "prepvp"
- every 1 second:
- {uhc::running} is set
- if {uhc::timer} is "prepvp":
- if {uhc::pvptime} > 0:
- remove 1 from {uhc::pvptime}
- # 1. Format Time into MM:SS
- set {_m} to floor({uhc::pvptime} / 60)
- set {_s} to {uhc::pvptime} mod 60
- if {_s} is less than 10:
- set {_s} to "0%{_s}%"
- # 2. Update the BarBridge Text dynamically
- execute console command "/bar msg * &ePvP &7in &a%{_m}%:%{_s}%"
- else:
- # 3. PvP Phase Trigger (Timer hit 0)
- set {uhc::timer} to "pvp"
- # Start the new draining bar for the Meetup phase
- set {_t} to {uhc::mumins}
- execute console command "/bar timed * %{uhc::mutime}% &eMeetup &7in &a%{_t}%:00"
- set {uhc::pvp} to true
- execute console command "/pvp %{uhc::world}% on"
- broadcast "{@P} &c&lPvP is now enabled!"
- loop all players:
- command "/playsound tile.piston.out %loop-player% ~ ~ ~ 1 0.5 1"
- stop
- else if {uhc::timer} is "pvp":
- if {uhc::mutime} > 0:
- remove 1 from {uhc::mutime}
- # 1. Format Time into MM:SS
- set {_m} to floor({uhc::mutime} / 60)
- set {_s} to {uhc::mutime} mod 60
- if {_s} is less than 10:
- set {_s} to "0%{_s}%"
- # 2. Update the BarBridge Text dynamically
- execute console command "/bar msg * &eMeetup &7in &a%{_m}%:%{_s}%"
- else:
- # 3. PvP Phase Trigger (Timer hit 0)
- set {uhc::timer} to "meetup"
- broadcast "{@P} &a&lMeetup is NOW! Head to 0,0!"
- execute console command "/bar set * &cMeetup &7- &eHead to &c0,0"
- loop all players:
- command "/playsound tile.piston.in %loop-player% ~ ~ ~ 1 0.5 1"
- # ==========================================
- # STOP
- # ==========================================
- command /uhcstop [<text>]:
- aliases: /gamestop
- permission: {@perms}
- trigger:
- if arg-1 is set:
- if arg-1 is "confirm":
- delete {uhc::running}
- delete {uhc::pvp}
- delete {uhc::meetup}
- delete {uhc::frozen}
- delete {uhc::timer}
- delete {uhc::pvptime}
- delete {uhc::mutime}
- delete {uhc::mumins}
- delete {uhc::pvpmins}
- delete {uhc::matchpost}
- delete {uhc::setup}
- delete {uhc::teamlimit}
- delete {uhc::border}
- delete {uhc::teamsize}
- execute console command "/gamerule sendCommandFeedback false"
- loop all players:
- delete {frozen::%loop-player%}
- broadcast "{@P} &cGame has been stopped."
- loop all players:
- if {spec::%loop-player%} is not set:
- clear inventory of loop-player
- heal loop-player
- set loop-player's food level to 10
- set loop-player's gamemode to adventure
- else:
- make loop-player execute command "/unspec %loop-player%"
- teleport loop-player to {uhc::spawn}
- make command sender execute command "/bar remove *"
- make command sender execute command "/killboard off"
- make command sender execute command "/pvparena enable"
- make command sender execute command "/sb"
- make command sender execute command "/feature set deathlightning off"
- make command sender execute command "/feature set deathstands off"
- make command sender execute command "/feature set heads off"
- execute console command "/gamerule doMobSpawning false"
- execute console command "/killall all"
- else:
- send "{@P} Unknown syntax. /uhcstop confirm"
- else:
- send "{@P} /uhcstop confirm to stop the uhc"
- #==========================================
- # LATE SCATTER
- #==========================================
- command /latescatter <player> <world> <integer>:
- permission: {@perms}
- usage: /latescatter <player> <world> <radius>
- trigger:
- execute console command "/feed %arg-1%"
- wait 5 ticks
- clear arg-1's inventory
- set arg-1's gamemode to survival
- execute console command "/sca %arg-2% %arg-3% %arg-1%"
- wait 5 seconds
- # Late scatter final heal
- send "{@P} &fFinal Heal: &c3" to arg-1
- command "/playsound note.harp %arg-1% ~ ~ ~ 1 0.5 1"
- wait 1 second
- send "{@P} &fFinal Heal: &c2" to arg-1
- command "/playsound note.harp %arg-1% ~ ~ ~ 1 0.5 1"
- wait 1 second
- send "{@P} &fFinal Heal: &c1" to arg-1
- command "/playsound note.harp %arg-1% ~ ~ ~ 1 0.5 1"
- wait 1 second
- send "{@P} &fFinal Heal Given!" to arg-1
- heal arg-1
- give 64 cooked beef to arg-1
- # ==========================================
- # CONFIG DISPLAY — for players
- # ==========================================
- command /config:
- aliases: /matchinfo, /gameinfo
- trigger:
- if {uhc::matchpost} is set:
- send "&7&m "
- send "&e&lMatch Info"
- send "&7&m "
- send " &fHost: &e%{uhc::host}%"
- if {uhc::teamlimit} is set:
- send " &fTeam Size: &e%{uhc::teamlimit}%"
- else:
- send " &fFFA"
- send " &fBorder: &e%{uhc::border}%"
- send " &fPvP: &e%{uhc::pvpmins}% mins"
- if {uhc::gamemins} is not set:
- set {_t} to {uhc::mumins} + {uhc::pvpmins}
- else:
- set {_t} to {uhc::gamemins}
- send " &fTotal Game Length: &e%{_t}% mins"
- send " &fMatchpost: &e%{uhc::matchpost}%"
- send "&7&m "
- else:
- send "&cNo game is planned"
Advertisement
Add Comment
Please, Sign In to add comment