Advertisement
shirobonq

[SKRIPT] Flango Shop v0.8

Sep 28th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. # ==========================================
  2. # Flango Shop - by Prignus
  3. # Versão 0.8
  4. #
  5. # ---- Changelog:
  6. # • Resolvido erro de placas não mudarem automaticamente
  7. # • Resolvido erro da placa de compra
  8. #
  9. #
  10. # ==========================================
  11.  
  12. options:
  13. prefix: &8&l[&2&lFlango&3&lShop&8&l]
  14.  
  15. on sign change:
  16. line 1 of event-block is "[Comprar]":
  17. set line 1 of block to "&1[Comprar]"
  18. stop
  19. on sign change:
  20. line 1 of event-block is "[Vender]":
  21. set line 1 of block to "&1[Vender]"
  22. stop
  23.  
  24. # COMPRAR
  25.  
  26. on rightclick on a sign:
  27. cancel event
  28. set {_linha1} to line 1 of block
  29. set {_linha2} to line 2 of block parsed as integer
  30. set {_linha3} to line 3 of block parsed as an item type
  31. set {_linha4} to line 4 of block
  32. replace "$" with "" in {_linha4}
  33. set {_linha4} to {_linha4} parsed as number
  34. if {_linha1} is "&1[Comprar]":
  35. if {_linha3} is set:
  36. if {_linha4} is set:
  37. if player's account is more than {_linha4}:
  38. set {_item} to "%{_linha2}% %{_linha3}%" parsed as an item type
  39. set {_money} to {_linha4}
  40. set {_money} to {_money} parsed as number
  41. if player doesn't have space for {_linha3}:
  42. message "{@prefix} &cVocê esta sem espaco no inventario!"
  43. stop
  44. else:
  45. give player {_item}
  46. remove {_money} from player's account
  47. make console execute command "playsound random.orb %player%"
  48. message "{@prefix} &c&l - $%{_money}% &8[&a&l+ %{_linha2}%x %{_linha3}%&8]"
  49. else:
  50. message "{@prefix} &cVoce nao possui dinheiro!"
  51.  
  52. # VENDER
  53.  
  54. on rightclick on a sign:
  55. cancel event
  56. set {_l1} to line 1 of block
  57. set {_l2} to line 2 of block
  58. set {_l3} to line 3 of block parsed as item type
  59. set {_l4} to line 4 of block
  60. replace "$" with "" in {_l4}
  61. replace "/ea" with "" in {_l4}
  62. set {_l4} to {_l4} parsed as number
  63. if {_l1} is "&1[Vender]":
  64. if {_l3} is set:
  65. if {_l4} is set:
  66. if the player's inventory contains 1 of {_l3}:
  67. set {_asdasd} to "%{_l3}%" parsed as item
  68. set {_l4} to {_l4} parsed as number
  69. set {_items} to "%amount of {_l3} in player's inventory%" parsed as integer
  70. set {_money} to {_l4} * "%amount of {_l3} in player's inventory%" parsed as number
  71. add {_money} to the player's account
  72. make console execute command "playsound random.orb %player%"
  73. message "{@prefix} &a&l + $%{_money}% &8[&c&l- %{_items}%x %{_l3}%&8]"
  74. remove all {_asdasd} from player
  75. else:
  76. message "{@prefix} &cVoce nao tem &6%{_l3}%&c para vender!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement