Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options:
- logo: &8[&aSkyBlock&8]
- #=================================================================================================
- command /SkyDrop [<text>] [<text>]:
- trigger:
- if arg 1 is "ref" or "refresh":
- if sender is player:
- if player do not have permissions "SkyDrop.refresh":
- stop
- delete {SkyDrop::config::*}
- delete {SkyDrop::bloki::lista::*}
- if folder "plugins/Skript/scripts/SkyDrop/config.yml" doesn't exists:
- create folder "plugins/Skript/scripts/SkyDrop/config.yml"
- create file "plugins/Skript/scripts/SkyDrop/config.yml"
- wf "Drop:" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " diamond: " "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " blocks: " "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " gold:" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " chance: 50" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " drop: 'golde ore'" "plugins/Skript/scripts/SkyDrop/config.yml"
- else:
- if file "plugins/Skript/scripts/SkyDrop/config.yml" doesn't exists:
- create file "plugins/Skript/scripts/SkyDrop/config.yml"
- wf "Drop:" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " diamond: " "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " blocks: " "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " gold:" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " chance: 50" "plugins/Skript/scripts/SkyDrop/config.yml"
- wf " drop: 'golde ore'" "plugins/Skript/scripts/SkyDrop/config.yml"
- else:
- set {_bloki::*} to configuration section "Drop" get of "plugins/Skript/scripts/SkyDrop/config.yml"
- loop {_bloki::*}:
- set {_blok} to loop-value
- set {_blok} to {_blok} parsed as item type
- if {_blok} is set:
- if "%{_blok}%" is "diament" or "diamond" or "diax":
- set {SkyDrop::config::klockiNaDiaxa} to single value "Drop.diamond.blocks" get of "plugins/Skript/scripts/SkyDrop/config.yml" parsed as number
- if {SkyDrop::config::klockiNaDiaxa} is not set:
- send "{@logo} &bDiament &anie ma podanej poprawnej liczby klocków do wykopania"
- else:
- set {SkyDrop::config::szansa::%{_blok}%} to single value "Drop.%{_blok}%.chance" get of "plugins/Skript/scripts/SkyDrop/config.yml" parsed as number
- if {SkyDrop::config::szansa::%{_blok}%} is not set:
- send "{@logo} &aBlok &8%loop-value% &anie ma podanej szansy"
- else:
- set {SkyDrop::config::drop::%{_blok}%} to single value "Drop.%{_blok}%.drop" get of "plugins/Skript/scripts/SkyDrop/config.yml" parsed as item type
- if {SkyDrop::config::drop::%{_blok}%} is not set:
- send "{@logo} &aBlok &8%loop-value% &anie ma podanego dropu"
- else:
- add loop-value to {SkyDrop::bloki::lista::*}
- else:
- send "{@logo} &aBlok &8%loop-value% &ajest niepoprawny"
- send "{@logo} &aOdświeżono skrypt SkyDrop"
- stop
- if arg 1 is "r" or "reload":
- if sender is player:
- if player do not have permissions "SkyDrop.refresh":
- stop
- run player command "skript reload %script%" as op
- #
- on load:
- execute console command "SkyDrop ref"
- #
- on break:
- if block at location of event-block is stone or cobblestone:
- set {_loc} to location of event-block
- #cancel event
- #set block at {_loc} to air
- add 1 to {SkyDrop::gracz::%player%::naDiaxa}
- add 1 to {Statystyki::gracz::%player%::stoneCobblestone}
- set {Statystyki::gracze::stoneCobblestone::%player%} to {Statystyki::gracz::%player%::stoneCobblestone}
- if {SkyDrop::gracz::%player%::naDiaxa} is greater than {SkyDrop::config::klockiNaDiaxa}:
- cancel event
- set block at {_loc} to air
- drop diamond ore at {_loc}
- set {SkyDrop::gracz::%player%::naDiaxa} to 0
- add 1 to {Statystyki::gracz::%player%::diamenty}
- set {Statystyki::gracze::diamenty::%player%} to {Statystyki::gracz::%player%::diamenty}
- stop
- else:
- loop {SkyDrop::bloki::lista::*}:
- set {_blok} to loop-value
- chance of {SkyDrop::config::szansa::%{_blok}%}%:
- cancel event
- set block at {_loc} to air
- drop {SkyDrop::config::drop::%{_blok}%} at {_loc}
- exit loop
- #
- command /sprawdz:
- aliases: stone, cobblestone
- trigger:
- set {_poz} to {SkyDrop::config::klockiNaDiaxa}-{SkyDrop::gracz::%player%::naDiaxa}
- send "{@logo} &aDo wykopania pozostalo ci jeszcze &8%{_poz}% &acobblestone/stone aby dostać &bDiament&a!"
Advertisement
Add Comment
Please, Sign In to add comment