Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- # Preço das fichas
- Preco_Maquina: 1000000000
- Preco_Ficha: 50000000
- # Limite das máquinas
- LimiteDeMaquinas: 100
- Mindrop: 5
- maxdrop: 10
- on place ender portal frame:
- if name of player's tool is "&eMáquina":
- show 500 of portal particle at location of block at speed 1
- add location of location of block to {Maquina.Loc::*}
- set {ligada.%location of block%} to false
- set {maquina.%location of block%} to true
- set {maquina.qnt.%location of block%} to 1
- set action bar of player to coloured "&6&lMÁQUINAS: &6Você colocou uma máquina"
- create holo object "&eMaquina &6%{maquina.qnt.%location of block%}%x;&7Desligada" with id "%location of block%.desligada" at location 1.0 meters above location of block
- stop
- on break of ender portal frame:
- if {maquina.%location of block%} is true:
- cancel event
- function MenuMaquina(p: player, i: number):
- if {_i} = 1:
- wait 5 tick
- open chest with 6 row named "&7Máquina - &9%{_p}%" to {_p}
- play raw sound "random.chestopen" at {_p} with pitch 1 volume 5
- wait 5 tick
- format slot 0 of {_p} with a 101 named "&0" to be unstealable
- format slot 1 of {_p} with a 101 named "&0" to be unstealable
- format slot 2 of {_p} with a 101 named "&0" to be unstealable
- format slot 9 of {_p} with a 101 named "&0" to be unstealable
- format slot 10 of {_p} with a 101 named "&0" to be unstealable
- format slot 18 of {_p} with a 101 named "&0" to be unstealable
- format slot 27 of {_p} with a 101 named "&0" to be unstealable
- format slot 36 of {_p} with a 101 named "&0" to be unstealable
- format slot 37 of {_p} with a 101 named "&0" to be unstealable
- format slot 45 of {_p} with a 101 named "&0" to be unstealable
- format slot 46 of {_p} with a 101 named "&0" to be unstealable
- format slot 47 of {_p} with a 101 named "&0" to be unstealable
- format slot 35 of {_p} with a 101 named "&0" to be unstealable
- format slot 44 of {_p} with a 101 named "&0" to be unstealable
- format slot 43 of {_p} with a 101 named "&0" to be unstealable
- format slot 51 of {_p} with a 101 named "&0" to be unstealable
- format slot 52 of {_p} with a 101 named "&0" to be unstealable
- format slot 53 of {_p} with a 101 named "&0" to be unstealable
- format slot 6 of {_p} with a 101 named "&0" to be unstealable
- format slot 7 of {_p} with a 101 named "&0" to be unstealable
- format slot 8 of {_p} with a 101 named "&0" to be unstealable
- format slot 16 of {_p} with a 101 named "&0" to be unstealable
- format slot 17 of {_p} with a 101 named "&0" to be unstealable
- format slot 26 of {_p} with a 101 named "&0" to be unstealable
- format slot 3 of {_p} with a vine named "&0" to be unstealable
- format slot 5 of {_p} with a vine named "&0" to be unstealable
- format slot 11 of {_p} with a vine named "&0" to be unstealable
- format slot 15 of {_p} with a vine named "&0" to be unstealable
- format slot 38 of {_p} with a vine named "&0" to be unstealable
- format slot 42 of {_p} with a vine named "&0" to be unstealable
- format slot 48 of {_p} with a vine named "&0" to be unstealable
- format slot 50 of {_p} with a vine named "&0" to be unstealable
- format slot 21 of {_p} with a iron pickaxe named "&eQuebrar está máquina" with lore "||&7* Clique aqui para quebrar a máquina" to close then run [make {_p} execute command "maquina confirmar quebrar"]
- format slot 23 of {_p} with a eye of ender named "&eComprar ficha de máquina" with lore "||&7* Clique aqui para comprar a ficha de máquina" to close then run [make {_p} execute command "maquina confirmar ficha"]
- format slot 31 of {_p} with a ender portal frame named "&eComprar uma máquina" with lore "||&7* Clique aqui para comprar uma máquina" to close then run [make {_p} execute command "maquina confirmar maquina"]
- if {_i} = 2:
- wait 5 tick
- open chest with 6 row named "&7Máquina - &9%{_p}%" to {_p}
- play raw sound "random.chestopen" at {_p} with pitch 1 volume 5
- wait 5 tick
- format slot 0 of {_p} with a 101 named "&0" to be unstealable
- format slot 1 of {_p} with a 101 named "&0" to be unstealable
- format slot 2 of {_p} with a 101 named "&0" to be unstealable
- format slot 9 of {_p} with a 101 named "&0" to be unstealable
- format slot 10 of {_p} with a 101 named "&0" to be unstealable
- format slot 18 of {_p} with a 101 named "&0" to be unstealable
- format slot 27 of {_p} with a 101 named "&0" to be unstealable
- format slot 36 of {_p} with a 101 named "&0" to be unstealable
- format slot 37 of {_p} with a 101 named "&0" to be unstealable
- format slot 45 of {_p} with a 101 named "&0" to be unstealable
- format slot 46 of {_p} with a 101 named "&0" to be unstealable
- format slot 47 of {_p} with a 101 named "&0" to be unstealable
- format slot 35 of {_p} with a 101 named "&0" to be unstealable
- format slot 44 of {_p} with a 101 named "&0" to be unstealable
- format slot 43 of {_p} with a 101 named "&0" to be unstealable
- format slot 51 of {_p} with a 101 named "&0" to be unstealable
- format slot 52 of {_p} with a 101 named "&0" to be unstealable
- format slot 53 of {_p} with a 101 named "&0" to be unstealable
- format slot 6 of {_p} with a 101 named "&0" to be unstealable
- format slot 7 of {_p} with a 101 named "&0" to be unstealable
- format slot 8 of {_p} with a 101 named "&0" to be unstealable
- format slot 16 of {_p} with a 101 named "&0" to be unstealable
- format slot 17 of {_p} with a 101 named "&0" to be unstealable
- format slot 26 of {_p} with a 101 named "&0" to be unstealable
- format slot 3 of {_p} with a vine named "&0" to be unstealable
- format slot 5 of {_p} with a vine named "&0" to be unstealable
- format slot 11 of {_p} with a vine named "&0" to be unstealable
- format slot 15 of {_p} with a vine named "&0" to be unstealable
- format slot 38 of {_p} with a vine named "&0" to be unstealable
- format slot 42 of {_p} with a vine named "&0" to be unstealable
- format slot 48 of {_p} with a vine named "&0" to be unstealable
- format slot 50 of {_p} with a vine named "&0" to be unstealable
- format slot 23 of {_p} with a eye of ender named "&eComprar ficha de máquina" with lore "||&7* Clique aqui para comprar a ficha de máquina" to close then run [make {_p} execute command "maquina confirmar ficha"]
- format slot 21 of {_p} with a ender portal frame named "&eComprar uma máquina" with lore "||&7* Clique aqui para comprar uma máquina" to close then run [make {_p} execute command "maquina confirmar maquina"]
- command /maquina [<text>] [<text>] [<number>]:
- aliases: maquinas
- trigger:
- if arg 1 is set:
- if arg 2 is set:
- if arg 1 is "llwmtlaktwm":
- MenuMaquina(player, 1)
- if arg 1 is "confirmar":
- if arg 2 is "maquina":
- set {_5} to {@Preco_Maquina} * 5
- set {_51} to {@Preco_Maquina} * 10
- send "&7&m>----------------------------------<"
- send " &3Escolha a quantidade de máquinas a comprar:"
- send json of " - 1" tooltip "&3Preço: {@Preco_Maquina}" run "/maquina comprar maquina 1" to player
- send json of " - 5" tooltip "&3Preço: %{_5}%" run "/maquina comprar maquina 5" to player
- send json of " - 10" tooltip "&3Preço: %{_51}%" run "/maquina comprar maquina 10" to player
- send "&7&m>----------------------------------<"
- if arg 2 is "ficha":
- set {_5} to {@Preco_Ficha} * 5
- set {_51} to {@Preco_Ficha} * 10
- send "&7&m>----------------------------------<"
- send " &3Escolha a quantidade de fichas a comprar:"
- send json of " - 1" tooltip "&3Preço: {@Preco_Ficha}" run "/maquina comprar ficha 1" to player
- send json of " - 5" tooltip "&3Preço: %{_5}%" run "/maquina comprar ficha 5" to player
- send json of " - 10" tooltip "&3Preço: %{_51}%" run "/maquina comprar ficha 10" to player
- send "&7&m>----------------------------------<"
- if arg 2 is "quebrar":
- set {_p} to player
- wait 5 tick
- open chest with 3 row named "&7Máquina (Confirmação) - &9%{_p}%" to {_p}
- play raw sound "random.chestopen" at {_p} with pitch 1 volume 5
- wait 5 tick
- format slot 0 of {_p} with a 324 named "&aVoltar" with lore "||&7* Clique aqui para voltar" to close then run [execute {_p} command "llwmtlaktwm"]
- format slot 8 of {_p} with a barrier named "&aFechar menu" with lore "||&7* Clique aqui para fechar o menu" to close
- format slot 10 of {_p} with a light green wool block named "&aConfirmar" with lore "||&7* Clique aqui para confirmar" to close then run [execute {_p} command "maquina pode quebrar"]
- format slot 13 of {_p} with iron pickaxe named "&aQuebrar está maquina" with lore "||&e* Você tem certeza ?" to be unstealable
- format slot 16 of {_p} with a red wool block named "&cCancelar" with lore "||&7* Clique aqui para cancelar" to close
- if arg 1 is "comprar":
- if arg 2 is "maquina":
- if arg 3 is 1:
- if player's balance >= {@Preco_Maquina}:
- if player has enough space for 1 stone:
- give shiny ender portal frame named "&eMáquina" to player
- remove {@Preco_Maquina} from player's balance
- send "&3[RedWins] &eVocê comprou uma máquina." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 3 is 5:
- set {_i} to {@Preco_Maquina} * 5
- if player's balance >= {_i}:
- if player has enough space for 5 stone:
- give 5 of shiny ender portal frame named "&eMáquina" to player
- remove {_i} from player's balance
- send "&3[RedWins] &eVocê comprou uma máquina." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 3 is 10:
- set {_i} to {@Preco_Maquina} * 10
- if player's balance >= {_i}:
- if player has enough space for 10 stone:
- give 10 of shiny ender portal frame named "&eMáquina" to player
- remove {_i} from player's balance
- send "&3[RedWins] &eVocê comprou uma máquina." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 2 is "ficha":
- if arg 3 is 1:
- if player's balance >= {@Preco_Ficha}:
- if player has enough space for 1 stone:
- give player shiny eye of ender named "&eFicha de máquina" with lore "&7Tipo: Esmeralda"
- remove {@Preco_Ficha} from player's balance
- send "&3[RedWins] &eVocê comprou uma ficha." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 3 is 5:
- set {_i} to {@Preco_Ficha} * 5
- if player's balance >= {_i}:
- if player has enough space for 5 stone:
- give 5 of shiny eye of ender named "&eFicha de máquina" with lore "&7Tipo: Esmeralda" to player
- remove {_i} from player's balance
- send "&3[RedWins] &eVocê comprou uma ficha." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 3 is 10:
- set {_i} to {@Preco_Ficha} * 10
- if player's balance >= {_i}:
- if player has enough space for 10 stone:
- give 10 of shiny eye of ender named "&eFicha de máquina" with lore "&7Tipo: Esmeralda" to player
- remove {_i} from player's balance
- send "&3[RedWins] &eVocê comprou uma ficha." to player
- stop
- else:
- send "&3[RedWins] &eVocê não tem espaço para a máquina."
- stop
- else:
- send "&3[RedWins] &eVocê não tem dinheiro suficiente."
- stop
- if arg 1 is "pode":
- if arg 2 is "quebrar":
- set {_b} to location of target block of player
- if {maquina.%{_b}%} is true:
- if {ligada.%{_b}%} is false:
- set action bar of player to coloured "&6&lMÁQUINA: &6Falhou..."
- if player's tool is enchanted with silk touch:
- if {maquina.qnt.%{_b}%} >= 2:
- show 200 of portal particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada sem perdas"
- delete holo object "%{_b}%.desligada"
- remove 1 from {maquina.qnt.%{_b}%}
- drop shiny ender portal frame named "&eMáquina"
- create holo object "&eMaquina &6%{maquina.qnt.%{_b}%}%x;&7Desligada" with id "%{_b}%.desligada" at location 1.0 meters above location of {_b}
- stop
- else:
- show 200 of portal particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada sem perdas"
- delete holo object "%{_b}%.desligada"
- drop shiny ender portal frame named "&eMáquina"
- set block at {_b} to air
- remove location of location of {_b} from {Maquina.Loc::*}
- set {ligada.%{_b}%} to false
- set {maquina.%{_b}%} to false
- set {maquina.qnt.%{_b}%} to 0
- stop
- else:
- chance of 80%:
- if {maquina.qnt.%{_b}%} >= 2:
- show 200 of flame particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada com perdas"
- delete holo object "%{_b}%.desligada"
- remove 1 from {maquina.qnt.%{_b}%}
- create holo object "&eMaquina &6%{maquina.qnt.%{_b}%}%x;&7Desligada" with id "%{_b}%.desligada" at location 1.0 meters above location of {_b}
- stop
- else:
- show 200 of flame particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada com perdas"
- delete holo object "%{_b}%.desligada"
- set block at {_b} to air
- remove location of location of {_b} from {Maquina.Loc::*}
- set {ligada.%{_b}%} to false
- set {maquina.%{_b}%} to false
- set {maquina.qnt.%{_b}%} to 0
- stop
- chance of 20%:
- if {maquina.qnt.%{_b}%} >= 2:
- show 200 of portal particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada sem perdas"
- delete holo object "%{_b}%.desligada"
- remove 1 from {maquina.qnt.%{_b}%}
- drop shiny ender portal frame named "&eMáquina"
- create holo object "&eMaquina &6%{maquina.qnt.%{_b}%}%x;&7Desligada" with id "%{_b}%.desligada" at location 1.0 meters above location of {_b}
- stop
- else:
- show 200 of portal particle at location of {_b} at speed 0
- set action bar of player to coloured "&6&lMÁQUINA: &6Máquina retirada sem perdas"
- delete holo object "%{_b}%.desligada"
- drop shiny ender portal frame named "&eMáquina"
- set block at {_b} to air
- remove location of location of {_b} from {Maquina.Loc::*}
- set {ligada.%{_b}%} to false
- set {maquina.%{_b}%} to false
- set {maquina.qnt.%{_b}%} to 0
- stop
- else:
- MenuMaquina(player, 2)
- on right click on ender portal frame:
- if player is sneaking:
- if {maquina.%location of block%} is true:
- if {ligada.%location of block%} is false:
- MenuMaquina(player, 1)
- else:
- if {maquina.%location of block%} is true:
- if player's tool is a eye of ender:
- if {ligada.%location of block%} is false:
- if name of player's tool is "&eFicha de máquina":
- if lore of player's tool is "&7Tipo: Esmeralda":
- cancel event
- delete holo object "%location of block%.desligada"
- set action bar of player to coloured "&6&lMÁQUINA: &6Você ligou a máquina"
- set {ligada.%location of block%} to true
- create holo object "&eMaquina &6%{maquina.qnt.%location of block%}%x;&7Ligada" with id "%location of block%.ligada" at location 1.0 meters above location of block
- loop {maquina.qnt.%location of block%} times:
- if player has shiny eye of ender named "&eFicha de máquina" with lore "&7Tipo: Esmeralda":
- remove shiny eye of ender named "&eFicha de máquina" with lore "&7Tipo: Esmeralda" from player's inventory
- add 1 to {_i}
- else:
- stop loop
- loop 20 times:
- show 200 of flame particle at location of block at speed 0
- set {_q} to a random integer between {@Mindrop} and {@maxdrop}
- set {_q} to {_q} * {_i}
- drop {_q} of emerald named "&eEsmeralda &a>> Máquina"
- wait 3 seconds
- delete holo object "%location of block%.ligada"
- create holo object "&eMaquina &6%{maquina.qnt.%location of block%}%x;&7Desligada" with id "%location of block%.desligada" at location 1.0 meters above location of block
- set action bar of player to coloured "&6&lMÁQUINA: &6Acabou a ficha de sua máquina"
- set {ligada.%location of block%} to false
- stop
- else:
- set action bar of player to coloured "&6&lMÁQUINA: &6Essa máquina já possui ficha"
- stop
- if player's tool is a ender portal frame:
- if {ligada.%location of block%} is false:
- if name of player's tool is "&eMáquina":
- if {maquina.qnt.%location of block%} = {@LimiteDeMaquinas}:
- set action bar of player to coloured "&6&lMÁQUINA: &6Limite de máquinas agrupadas é {@LimiteDeMaquinas}"
- cancel event
- stop
- else:
- show 200 of portal particle at location of block at speed 0.1
- delete holo object "%location of block%.desligada"
- cancel event
- add 1 to {maquina.qnt.%location of block%}
- remove shiny ender portal frame named "&eMáquina" from player's inventory
- set action bar of player to coloured "&6&lMÁQUINA: &6Você adicionou uma máquina"
- create holo object "&eMaquina &6%{maquina.qnt.%location of block%}%x;&7Desligada" with id "%location of block%.desligada" at location 1.0 meters above location of block
- on skript load:
- loop {Maquina.Loc::*}:
- set {ligada.%loop-value%} to false
- delete holo object "%loop-value%.ligada"
- delete holo object "%loop-value%.desligada"
- create holo object "&eMaquina &6%{maquina.qnt.%loop-value%}%x;&7Desligada" with id "%loop-value%.desligada" at location 1.0 meters above location of loop-value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement