Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #A UTILISER AVEC UN SKRIPT DE COINS (https://www.youtube.com/watch?v=-atvmv7dA58)
- on rightclick on sign:
- if line 1 of clicked block is "[Shop]":
- if line 2 of clicked block is "Buy":
- set {_price} to line 3 of clicked block
- set {_item} to line 4 of clicked block
- if {_price} parsed as a number > {coins.%player's UUID%}:
- send "&c[Shop] Vous n'avez pas assez d'argent pour acheter %{_item}%"
- stop
- else:
- remove {_price} parsed as a number from {coins.%player's UUID%}
- give player {_item} parsed as item
- send "&a[Shop] Vous avez bien acheté %{_item}% pour %{_price}%$ ! Il vous reste %{coins.%player's UUID%}% coins !"
- if line 2 of clicked block is "Sell":
- set {_price} to line 3 of clicked block
- set {_item} to line 4 of clicked block
- if player is holding {_item} parsed as a item:
- remove {_item} parsed as an item from player's inventory
- add {_price} parsed as a number to {coins.%player's UUID%}
- send "&a[Shop] Vous avez bien vendu %{_item}% pour %{_price}%$ ! Vous avez %{coins.%player's UUID%}% coins !"
- stop
- else:
- send "&c[Shop] Vous ne tenez pas %{_item}% dans la main !"
- on sign change:
- if line 1 is "[Shop]":
- if player don't have permission "shop.create":
- send "&c[Shop] Tu n'a pas la permission de créer un shop !"
- cancel event
- stop
- if player has permission "shop.create":
- if line 2 is "Buy":
- set {_line3} to line 3
- if {_line3} parsed as a number is a number:
- set {_line4} to line 4
- if {_line4} parsed as an item is an item:
- send "&a[Shop] Shop créé pour l'item %line 4% !"
- stop
- else:
- send "&c[Shop] Mauvaise syntaxe (1:[Shop] 2:Buy/Sell 3:Prix 4:ITEM "
- cancel event
- stop
- else:
- send "&c[Shop] Mauvaise syntaxe (1:[Shop] 2:Buy/Sell 3:Prix 4:ITEM "
- cancel event
- stop
- if line 2 is "Sell":
- set {_line3} to line 3
- if {_line3} parsed as a number is a number:
- set {_line4} to line 4
- if {_line4} parsed as an item is an item:
- send "&a[Shop] Shop créé pour l'item %line 4% !"
- stop
- else:
- send "&c[Shop] Mauvaise syntaxe (1:[Shop] 2:Buy/Sell 3:Prix 4:ITEM "
- cancel event
- stop
- else:
- send "&c[Shop] Mauvaise syntaxe (1:[Shop] 2:Buy/Sell 3:Prix 4:ITEM "
- cancel event
- stop
- else:
- send "&c[Shop] Mauvaise syntaxe (1:[Shop] 2:Buy/Sell 3:Prix 4:ITEM "
- stop
- on break:
- if event-block is a sign:
- if player don't have permission "shop.create":
- if line 1 of event-block is "[Shop]":
- cancel event
- on explode:
- loop exploded blocks:
- if loop-block is a sign:
- if line 1 of loop-block is "[Shop]":
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement