xb52hWss
Język: Skript
|
Autor: Anonimowy
options: tag.chat: &r &6test &f» &e&o name.gui: &c&l&oDrop z kamienia. bonus.fortune1: 0.05 bonus.fortune2: 0.10 bonus.fortune3: 0.15 bonus.ranga1: 0.10 bonus.ranga2: 0.15 bonus.ranga3: 0.05 bonus.ranga4: 0.10 bonus.turbo: 0.5 exp: 1 on load: set {turbodrop} to now variables: {bruk.%player%} = true command /drop [<text>] [<number>] [<number>]: cooldown: 0 seconds cooldown message: {@tag.chat}&c&oTej komendy mozesz uzywac co &42 sekundy! aliases: /dropy, /drops, /stone trigger: if perm(player, "drop.use") is false: stop if arg 1 is "add" or "dodaj" or "+": if perm(player, "drop.add") is false: stop if player's tool isn't air or light gray stained glass pane: if arg 2 is between 0 and 100: if amount of {drop::*} < 36: send "{@tag.chat}Dodales do dropu: &c%player's tool% &7(%arg 2%&7%%)" to player add player's tool to {drop::*} add arg 2 to {szansa::*} stop send "{@tag.chat}Wez przedmiot w lapke i wpisz: /drop add (szansa 0-100)" stop if arg 1 is "rem" or "usun" or "-": if perm(player, "drop.rem") is false: stop if {drop::%arg 2%} is set: send "{@tag.chat}Usunales z do dropu: &c%{drop::%arg 2%}% &7(%{szansa::%arg 2%}%&7%%)" to player delete {drop::%arg 2%} delete {szansa::%arg 2%} stop send "{@tag.chat}Nie prawidlowe id: /drop rem (id z gui)" stop if arg 1 is "change" or "zmien" or "=": if perm(player, "drop.change") is false: stop if {drop::%arg 2%} is set: if arg 3 is between 0 and 100: set {szansa::%arg 2%} to arg 3 send "{@tag.chat}Zmieniles szanse dropu: &c%{drop::%arg 2%}% &7(%{szansa::%arg 2%}%&7%%)" to player stop send "{@tag.chat}Nie prawidlowe id lub szansa: /drop change (id z gui) (szansa 0-100)" stop wait a tick close player's inventory open chest with 5 row named "{@name.gui}" to player loop 36 times: set player's current inventory's slot loop-number - 1 to light gray stained glass pane named " " with lore "&8##ID:%loop-number%" loop {drop::*}: add 1 to {_slot} set {_id} to loop-index parsed as integer bonus(player, {_id}, true, {_slot}) loop 9 times: set player's current inventory's slot loop-number + 35 to red stained glass pane named " " if {wiadomosc::%player%} isn't set: set player's current inventory's slot 36 to glowing book named " &7» &c&lKliknij, aby wylaczyc wiadomosci" else: set player's current inventory's slot 36 to book named " &7» &a&lKliknij, aby wlaczyc wiadomosci" set player's current inventory's slot 38 to pumpkin named " &7» &c&lWylacz drop wszystkich blokow! &7(&c&l✘&7)" if {bruk.%player%} is true: set player's current inventory's slot 41 to cobblestone named " &7» &c&lKliknij, aby wylaczyc drop bruku" else: set player's current inventory's slot 41 to cobblestone named " &7» &a&lKliknij, aby wlaczyc drop bruku" set player's current inventory's slot 42 to mossy cobblestone named " &7» &a&lKliknij aby zobaczyć drop z CobbleX" set player's current inventory's slot 39 to jack o lantern named " &7» &a&lWlacz drop wszystkich blokow! &7(&a&l✓&7)" set player's current inventory's slot 44 to writable book named " &f» &cInformacje na temat Bonusow:" with lore " &7» &7Wszystkie trzy bonusy sumuja sie!" and " &7» &7Zasada: Szansa + (Szansa * SumaBonusow)" and " " and " &f» &6Bonus od szczescia:" and " &7» &eI &8- &f{@bonus.fortune1}" and " &7» &eII &8- &f{@bonus.fortune2}" and " &7» &eIII &8- &f{@bonus.fortune3}" and " " and " &f» &6Bonus od rang:" and " &7» &eVIP &8- &f{@bonus.ranga1}" and " &7» &eSVIP &8- &f{@bonus.ranga2}" and " " and " &f» &6Bonus od Turbodropu:" and " &7» &eTurbodrop &8- &f{@bonus.turbo}" command /turbodrop [<timespan>]: cooldown: 0 seconds cooldown message: {@tag.chat}&c&oTej komendy mozesz uzywac co &42 sekundy! aliases: /td usage: {@tag.chat}Przyklad: &c/turbodrop 1 day and 10 seconds trigger: if perm(player, "turbodrop.use") is false: stop if arg 1 is set: set {turbodrop} to now add arg 1 to {turbodrop} broadcast "{@tag.chat}Administrator %player%&e wlaczyl TURBODROP na &c%arg 1%&e!" stop send "{@tag.chat}Podaj na ile chcesz wlaczyc turbodrop!" on mine of stone: clear drops add {@exp} exp to player loop {drop::*}: set {_id} to loop-index parsed as integer bonus(player, {_id}, false, 0) if {bruk.%player%} is true: drop 1 cobblestone on break of any ore: clear drops send "{@tag.chat}Drop z rud zostal wylaczony!" to player on inventory click: if type of event-inventory = chest inventory: if inventory name of player's current inventory is "&4 Nagrody": cancel event if clicked slot is 0: execute player command "cx" if clicked slot is 8: execute player command "drop" if inventory name of player's current inventory is "{@name.gui}": cancel event if clicked slot is between 0 and 35: set {_id::*} to uncolored lore of clicked item if {_id::12} is set: replace all "##ID:" with "" in {_id::12} set {_id::12} to {_id::12} parsed as integer set {_slot} to "%clicked slot + 1%" parsed as integer if {status::%player%::%{_id::12}%} is set: delete {status::%player%::%{_id::12}%} send "{@tag.chat}Przelaczyles drop: %{drop::%{_id::12}%}% &7(&a&l✓&7)" to player else: set {status::%player%::%{_id::12}%} to true send "{@tag.chat}Przelaczyles drop: %{drop::%{_id::12}%}% &7(&c&l✘&7)" to player bonus(player, {_id::12}, true, {_slot}) if clicked slot is 38: send "{@tag.chat}Przelaczyles drop wszystkich blokow &7(&c&l✘&7)" to player loop {drop::*}: add 1 to {_slot} set {_id} to loop-index parsed as integer set {status::%player%::%{_id}%} to true bonus(player, {_id}, true, {_slot}) if clicked slot is 41: if {bruk.%player%} is true: send "{@tag.chat}&cWylaczyles drop bruku z kamienia " to player set player's current inventory's slot 41 to cobblestone named " &7» &a&lKliknij, aby wlaczyc drop bruku" set {bruk.%player%} to false else: send "{@tag.chat}&aWlaczyles drop bruku z kamienia " to player set player's current inventory's slot 41 to cobblestone named " &7» &c&lKliknij, aby wylaczyc drop bruku" set {bruk.%player%} to true if clicked slot is 42: open chest with 1 row named "&4 Nagrody" to player set player's current inventory's slot 0 to 1 of mossy cobblestone named "&a&lStworz CobbleX" set player's current inventory's slot 2 to 1 of enchanted golden apple named "&3 1 Kox" set player's current inventory's slot 3 to 1 of emerald named "&3 64 Szmaragdy" set player's current inventory's slot 4 to 1 of ender pearl named "&3 2 perly" set player's current inventory's slot 5 to 1 of tnt named "&3 16 TNT" set player's current inventory's slot 6 to 1 of golden apple named "&3 4 Refy" set player's current inventory's slot 8 to 1 of paper named "&a&lWroc" if clicked slot is 39: send "{@tag.chat}Przelaczyles drop wszystkich blokow &7(&a&l✓&7)" to player loop {drop::*}: add 1 to {_slot} set {_id} to loop-index parsed as integer delete {status::%player%::%{_id}%} bonus(player, {_id}, true, {_slot}) if clicked slot is 36: if {wiadomosc::%player%} is set: set player's current inventory's slot 36 to glowing book named " &7» &c&lKliknij, aby wylaczyc wiadomosci" delete {wiadomosc::%player%} else: set player's current inventory's slot 36 to book named " &7» &a&lKliknij, aby wlaczyc wiadomosci" set {wiadomosc::%player%} to true function perm(p: player, perm: text) :: boolean: if {_p} doesn't have permission "%{_perm}%": send "{@tag.chat} » &cNie posiadasz uprawnien do tego polecenia! &7(&4%{_perm}%&7)" to {_p} return false return true function bonus(p: player, id: integer, gui: boolean, slot: integer): set {_forinfo} to 0 set {_bonus} to 0 if enchant level of fortune of {_p}'s tool >= 1: add {@bonus.fortune1} to {_bonus} add {@bonus.fortune1} to {_forinfo} if enchant level of fortune of {_p}'s tool >= 2: add {@bonus.fortune2} to {_bonus} add {@bonus.fortune2} to {_forinfo} if enchant level of fortune of {_p}'s tool >= 3: add {@bonus.fortune3} to {_bonus} add {@bonus.fortune3} to {_forinfo} if {_p} has permission "drop.bonus1": add {@bonus.ranga1} to {_bonus} add {@bonus.ranga1} to {_raninfo} if {_p} has permission "drop.bonus2": add {@bonus.ranga2} to {_bonus} add {@bonus.ranga2} to {_raninfo} if {_p} has permission "drop.bonus3": add {@bonus.ranga3} to {_bonus} add {@bonus.ranga3} to {_raninfo} if {_p} has permission "drop.bonus4": add {@bonus.ranga4} to {_bonus} add {@bonus.ranga4} to {_raninfo} if {turbodrop} > now: add {@bonus.turbo} to {_bonus} add {@bonus.turbo} to {_turinfo} set {_szansa} to {szansa::%{_id}%} + ({_bonus} * {szansa::%{_id}%}) if {_gui} is true: set {_forinfo} to {_forinfo} * {szansa::%{_id}%} set {_raninfo} to {_raninfo} * {szansa::%{_id}%} set {_turinfo} to {_turinfo} * {szansa::%{_id}%} if {status::%{_p}%::%{_id}%} is set: set {_status} to "&c&l✘" else: set {_status} to "&a&l✓" if {turbodrop} > now: set {_turbo} to "&a&l✓ &8(%{turbodrop}%)" else: set {_turbo} to "&c&l✘" set {_p}'s current inventory's slot {_slot} - 1 to {drop::%{_id}%} named " &f» &ePrzedmiot: &f&l%{drop::%{_id}%}%" with lore "" and " &f» &e&lINFORMACJE:" and " &7» &eSzansa: &6&l%{_szansa}%%% &8(%{szansa::%{_id}%}%%%)" and " &7» &eStatus: %{_status}%" and " &7» &eTurbodrop: %{_turbo}%" and "" and " &f» &e&lBONUSY OD:" and " &7» &eSzczescia: &b&l+%{_forinfo}%%%" and " &7» &eRangi: &b&l+%{_raninfo}%%%" and " &7» &eTurbodropu: &b&l+%{_turinfo}%%%" and "&cKliknij, aby przelaczyc drop!" and "&8##ID:%{_id}%" else: if {status::%{_p}%::%{_id}%} isn't set: chance of {_szansa}%: if {_p} can hold {drop::%{_id}%}: add {drop::%{_id}%} to {_p} else: drop {drop::%{_id}%} at {_p} if {wiadomosc::%{_p}%} isn't set: send "{@tag.chat}Znalazles w kamieniu: &c%{drop::%{_id}%}% &7(%{_szansa}%&7%%)" to {_p}