Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==========================================
- # Flango Shop - by Prignus
- # Versão 0.8
- #
- # ---- Changelog:
- # • Resolvido erro de placas não mudarem automaticamente
- # • Resolvido erro da placa de compra
- #
- #
- # ==========================================
- options:
- prefix: &8&l[&2&lFlango&3&lShop&8&l]
- on sign change:
- line 1 of event-block is "[Comprar]":
- set line 1 of block to "&1[Comprar]"
- stop
- on sign change:
- line 1 of event-block is "[Vender]":
- set line 1 of block to "&1[Vender]"
- stop
- # COMPRAR
- on rightclick on a sign:
- cancel event
- set {_linha1} to line 1 of block
- set {_linha2} to line 2 of block parsed as integer
- set {_linha3} to line 3 of block parsed as an item type
- set {_linha4} to line 4 of block
- replace "$" with "" in {_linha4}
- set {_linha4} to {_linha4} parsed as number
- if {_linha1} is "&1[Comprar]":
- if {_linha3} is set:
- if {_linha4} is set:
- if player's account is more than {_linha4}:
- set {_item} to "%{_linha2}% %{_linha3}%" parsed as an item type
- set {_money} to {_linha4}
- set {_money} to {_money} parsed as number
- if player doesn't have space for {_linha3}:
- message "{@prefix} &cVocê esta sem espaco no inventario!"
- stop
- else:
- give player {_item}
- remove {_money} from player's account
- make console execute command "playsound random.orb %player%"
- message "{@prefix} &c&l - $%{_money}% &8[&a&l+ %{_linha2}%x %{_linha3}%&8]"
- else:
- message "{@prefix} &cVoce nao possui dinheiro!"
- # VENDER
- on rightclick on a sign:
- cancel event
- set {_l1} to line 1 of block
- set {_l2} to line 2 of block
- set {_l3} to line 3 of block parsed as item type
- set {_l4} to line 4 of block
- replace "$" with "" in {_l4}
- replace "/ea" with "" in {_l4}
- set {_l4} to {_l4} parsed as number
- if {_l1} is "&1[Vender]":
- if {_l3} is set:
- if {_l4} is set:
- if the player's inventory contains 1 of {_l3}:
- set {_asdasd} to "%{_l3}%" parsed as item
- set {_l4} to {_l4} parsed as number
- set {_items} to "%amount of {_l3} in player's inventory%" parsed as integer
- set {_money} to {_l4} * "%amount of {_l3} in player's inventory%" parsed as number
- add {_money} to the player's account
- make console execute command "playsound random.orb %player%"
- message "{@prefix} &a&l + $%{_money}% &8[&c&l- %{_items}%x %{_l3}%&8]"
- remove all {_asdasd} from player
- else:
- message "{@prefix} &cVoce nao tem &6%{_l3}%&c para vender!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement