Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /turbodrop [<text>] [<text>] [<text>] [<text>]:
- aliases: td
- trigger:
- if player doesn't have the permission "TurboDrop.admin":
- send "&cNie masz uprawnien do tej komendy."
- stop
- if arg 1 is not set:
- send "&3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- send "&3/turbodrop wylacz"
- send "&3/turbodrop status"
- stop
- if arg 1 is "aktywuj":
- if arg 2 is not set:
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if arg 2 is not "sektor" or "ogolny":
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if arg 3 is not set:
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if arg 3 parsed as number is not set:
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if arg 4 is not set:
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if arg 4 parsed as number is not set:
- send "&cPoprawne uzycie: &3/turbodrop aktywuj <sektor|ogolny> <obszar> <czas>"
- stop
- if {TurboDrop::options::status} is set:
- send "&cTurboDrop jest juz wlaczony!"
- stop
- if arg 2 is "sektor":
- if arg 3 parsed as number is smaller than 1:
- send "&cObszar nie moze byc mniejszy niz 1."
- stop
- if arg 4 parsed as number is smaller than 1:
- send "&cCzas nie moze byc mniejszy niz 1."
- stop
- set {TurboDrop::options::tryb} to "Sektor"
- set {TurboDrop::options::obszar} to arg 3 parsed as number
- set {TurboDrop::options::czas} to arg 4 parsed as number
- set {TurboDrop::options::timer} to arg 4 parsed as number
- set {TurboDrop::options::status} to true
- loop players in radius arg 3 parsed as number around location of player:
- set {TurboDrop::status::%loop-player%} to true
- display board named "&4&lTurbo&6&lDrop" to loop-player
- move display of loop-player to sidebar
- make score of "&aCzas do konca:" in board of loop-player to arg 4 parsed as number
- broadcast "&4&lTurbo&6&lDrop &azostal wlaczony dla graczy w obszarze &c%arg 3 parsed as number% &akratek wokol lokalizacji &7(X: &c%x-coordinate of player%&7, Y: &c%y-coordinate of player%&7, Z: &c%x-coordinate of player%&7) &ana &c%arg 4 parsed as number% &asekund."
- stop
- if arg 2 is "ogolny":
- if arg 4 parsed as number is smaller than 1:
- send "&cCzas nie moze byc mniejszy niz 1."
- stop
- set {TurboDrop::options::tryb} to "Ogolny"
- set {TurboDrop::options::obszar} to 0
- set {TurboDrop::options::czas} to arg 4 parsed as number
- set {TurboDrop::options::timer} to arg 4 parsed as number
- set {TurboDrop::options::status} to true
- loop all players:
- set {TurboDrop::status::%loop-player%} to true
- display board named "&4&lTurbo&6&lDrop" to loop-player
- move display of loop-player to sidebar
- make score of "&aCzas do konca:" in board of loop-player to arg 4 parsed as number
- broadcast "&4&lTurbo&6&lDrop &azostal wlaczony dla wszystkich graczy na &c%arg 4 parsed as number% &asekund."
- stop
- if arg 1 is "wylacz":
- if {TurboDrop::options::status} is not set:
- send "&4&lTurbo&6&lDrop &cnie jest wlaczony!"
- stop
- broadcast "&4&lTurbo&6&lDrop &czostal wylaczony!"
- loop {TurboDrop::status::*}:
- display scoreboard named "CLEAR" to loop-index parsed as player
- launch trailing star firework colored red and green fade to orange and blue at loop-index parsed as player timed 0.2
- clear {TurboDrop::*}
- stop
- if arg 1 is "status":
- send "&a&l------&4&lTurbo&6&lDrop&a&l------"
- if {TurboDrop::options::status} is not set:
- send "&6Status: &cwylaczony"
- stop
- else:
- send "&6Status: &awlaczony"
- send "&6Tryb: &a%{TurboDrop::options::tryb}%"
- send "&6Obszar: &a%{TurboDrop::options::obszar}% kratek"
- send "&6Czas: &a%{TurboDrop::options::czas}% sekund"
- send "&6Czas do konca: &a%{TurboDrop::options::timer}% sekund"
- stop
- on mine of stone:
- if {TurboDrop::options::status} is set:
- if {TurboDrop::status::%player%} is true:
- chance of 10%:
- drop diamond at event-block
- stop
- chance of 10%:
- drop golden ingot at event-block
- stop
- every 1 second:
- if {TurboDrop::options::status} is set:
- if {TurboDrop::options::timer} is more than 0:
- remove 1 from {TurboDrop::options::timer}
- loop {TurboDrop::status::*}:
- make score of "&aCzas do konca:" in board of loop-index parsed as player to {TurboDrop::options::timer}
- else:
- broadcast "&4&lTurbo&6&lDrop &cdobiegl konca!"
- loop {TurboDrop::status::*}:
- display scoreboard named "CLEAR" to loop-index parsed as player
- launch trailing star firework colored red and green fade to orange and blue at loop-index parsed as player timed 0.2
- clear {TurboDrop::*}
- on join:
- wait a tick
- if {TurboDrop::options::status} is set:
- display board named "&4&lTurbo&6&lDrop" to player
- move display of player to sidebar
- make score of "&aCzas do konca:" in board of player to {TurboDrop::options::timer}
Add Comment
Please, Sign In to add comment