Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &8[&6Jack&bpot&8]
- C: &f
- H: &d
- Scenario: Jackpot
- Command: /jackpot
- Permission: skript.jackpot
- ScenarioCreator: ShutUpBrick
- Skripter: Fleft
- UseScoreboard: true
- Name: &8[&bJackpot&8]
- ScoreboardGold: &6Gold
- ScoreboardDiamond: &bDiamond
- BroadcastWhenMined: true
- BroadcastPlayerNameWhenMined: true
- command {@Command} [<text>]:
- trigger:
- if arg-1 is "on" or "enable":
- command sender has permission "{@Permission}":
- if {Jackpot::Enabled} is not set:
- set {Jackpot::Enabled} to true
- set {Jackpot::Count::Diamonds} to 0
- set {Jackpot::Count::Gold} to 0
- if {@UseScoreboard} is true:
- execute console command "/scoreboard objectives add {@Name} dummy"
- execute console command "/scoreboard objectives setdisplay sidebar"
- wait 1 tick
- execute console command "/scoreboard objectives setdisplay sidebar {@Name}"
- broadcast "{@P}{@C} Enabled by {@H}%command sender%!"
- else:
- message "{@P}{@C} Already enabled!" to the command sender
- stop trigger
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@P}{@C} You don't have permission for that!" to the command sender
- else if arg-1 is "off" or "disable":
- command sender has permission "{@Permission}":
- if {Jackpot::Enabled} is true:
- delete {Jackpot::*}
- if {@UseScoreboard} is true:
- execute console command "/scoreboard objectives remove {@Name}"
- wait 1 tick
- execute console command "/scoreboard players reset {@ScoreboardDiamond}"
- execute console command "/scoreboard players reset {@ScoreboardGold}"
- broadcast "{@P}{@C} Disabled by {@H}%command sender%!"
- else:
- message "{@P}{@C} Already disabled!" to the command sender
- stop trigger
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@P}{@C} You don't have permission for that!" to the command sender
- else if arg-1 is "toggle" or "switch":
- if {Jackpot::Enabled} is true:
- command sender command "/{@Command} off"
- stop trigger
- if {Jackpot::Enabled} is not set:
- command sender command "/{@Command} on"
- stop trigger
- else if arg-1 is "reset":
- broadcast "{@P}{@C} %command sender% reset the count!"
- set {Jackpot::Count::Diamonds} to 0
- set {Jackpot::Count::Gold} to 0
- execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 0"
- execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 0"
- else if arg-1 is "help" or "?" or "question" or "info" or "information":
- message "" to the command sender
- if command sender has permission "{@Permission}":
- message "{@P}{@C} /{@Command} {@H}on/off/toggle" to the command sender
- message "{@P}{@C} Scenario by: {@H}{@ScenarioCreator}"
- message "{@P}{@C} Skript: {@H}{@Skripter}" to the command sender
- else if arg-1 is not set:
- command sender command "/{@Command} help"
- else:
- command sender command "/{@Command} help"
- on death of player:
- if {Jackpot::Enabled} is true:
- victim is in "world"
- if {@UseScoreboard} is true:
- execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 1"
- execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 1"
- execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 0"
- execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 0"
- attacker is player:
- set {_loc} to location of victim
- broadcast "{@P}{@C} %attacker% killed %victim%!"
- broadcast "{@P}{@C} Jackpot: &b%{Jackpot::Count::Diamonds}% diamonds{@C} and &6%{Jackpot::Count::Gold}% gold!"
- loop {Jackpot::Count::Diamonds} times:
- drop 1 diamond at {_loc}
- loop {Jackpot::Count::Gold} times:
- drop 1 gold ingot at {_loc}
- set {Jackpot::Count::Diamonds} to 0
- set {Jackpot::Count::Gold} to 0
- else:
- set {_loc} to location of victim
- broadcast "{@P}{@C} %victim% died at %{_loc}%!"
- broadcast "{@P}{@C} Jackpot: &b%{Jackpot::Count::Diamonds}% diamonds{@C} and &6%{Jackpot::Count::Gold}% gold!"
- loop {Jackpot::Count::Diamonds} times:
- drop 1 diamond at {_loc}
- loop {Jackpot::Count::Gold} times:
- drop 1 gold ingot at {_loc}
- set {Jackpot::Count::Diamonds} to 0
- set {Jackpot::Count::Gold} to 0
- on mine:
- {Jackpot::Enabled} is true:
- event-block is diamond ore:
- if {@BroadcastWhenMined} is true:
- if {@BroadcastPlayerNameWhenMined} is true:
- broadcast "{@P}{@C} %event-player% mined a &bdiamond!"
- else:
- broadcast "{@P}{@C} Someone mined a &bdiamond!"
- add 1 to {Jackpot::Count::Diamonds}
- cancel the event
- set the block to air
- drop 1 diamond at event-block
- loop 7 times:
- spawn 1 experience orb at event-block
- if {@UseScoreboard} is true:
- execute console command "/scoreboard players add {@ScoreboardDiamond} {@Name} 1"
- else if event-block is gold ore:
- if {@BroadcastWhenMined} is true:
- if {@BroadcastPlayerNameWhenMined} is true:
- broadcast "{@P}{@C} %event-player% mined &6gold!"
- else:
- broadcast "{@P}{@C} Someone mined a &6gold!"
- add 1 to {Jackpot::Count::Gold}
- cancel the event
- set the block to air
- drop 1 gold ingot at event-block
- spawn 1 experience orb at event-block
- if {@UseScoreboard} is true:
- execute console command "/scoreboard players add {@ScoreboardGold} {@Name} 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement