Advertisement
zGhol

Untitled

Feb 12th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. command /anunciar [<text>] [<integer>]:
  2. trigger:
  3. if {Anuncio.%player%::ITEM} is set:
  4. if player has permission "Anunciar.Vip":
  5. if arg 1 is set:
  6. if arg 2 is set:
  7. if player has 1 %arg 1%:
  8. set {Anuncio.%player%::ITEM} to arg 1
  9. set {Anuncio.%player%::PREÇO} to arg 2
  10. remove 1 %arg 1% from player's inventory
  11. send "&f&l[&a&lAnuncio&f&l] &a&l> &fVocê colocou o item %arg 1% para vender pelo preço de %arg 2%"
  12. broadcast " "
  13. broadcast " &f&l[&a&lAnuncio&f&l] &a&l> &fO Player %player% está anunciando um(a) %arg 1% por %arg 2% Coins!"
  14. send json of " &f&l[&a&lAnuncio&f&l] &3&l> &4&lCLICKE AQUI PARA COMPRAR" run "/ac comprar %player%" to all players
  15. brodcast " "
  16. wait 1 minutes
  17. give 1 %arg 1% to player
  18. clear {Anuncio.%player%::ITEM}
  19. clear {Anuncio.%player%::PREÇO}
  20. stop
  21. else:
  22. send "&f&l[&a&lAnuncio&f&l] &a&l> &fVocê não possue esse item para anunciar !"
  23. stop
  24. else:
  25. send "&f&l[&a&lAnuncio&f&l] &a&l> &fUse /anunciar ITEM PREÇO"
  26. stop
  27. else:
  28. send "&f&l[&a&lAnuncio&f&l] &a&l> &fUse /anunciar ITEM PREÇO"
  29. stop
  30. else:
  31. send "&4&lSem permissão"
  32. stop
  33. else:
  34. send "&f&l[&a&lAnuncio&f&l] &a&l> &fVocê já está anunciando um item"
  35. stop
  36.  
  37. command /ac comprar [<offlineplayer>]:
  38. trigger:
  39. if {Anuncio.%arg 1%::ITEM} is set:
  40. if player's account is more or equal to %{Anuncio.%arg 1%::PREÇO}%:
  41. subtract %{Anuncio.%arg 1%::PREÇO}% from player's account
  42. send "&f&l[&a&lAnuncio&f&l] &a&l> &fVocê comprou um %{Anuncio.%arg 1%::ITEM}% do %arg %"
  43. give 1 %{Anuncio.%arg 1%::ITEM}% to player
  44. add %{Anuncio.%arg 1%::PREÇO}% to the arg 1's account
  45. clear {Anuncio.%arg 1%::ITEM}
  46. clear {Anuncio.%arg 1%::PREÇO}
  47. stop
  48. else:
  49. send "&f&l[&a&lAnuncio&f&l] &a&l> &fVocê não tem money suficiente necessário: %{Anuncio.%arg 1%::PREÇO}% Coins"
  50. stop
  51. else:
  52. send "&f&l[&a&lAnuncio&f&l] &a&l> &fEssa compra já expirou ou já foi comprada!"
  53. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement