habbu_way

Untitled

Jan 29th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. on sign change:
  2. if line 1 is "Loja":
  3. if line 2 is set:
  4. if line 3 contains "C" or "V" or "Gratis":
  5. if line 4 is set:
  6. if player has permission "shop.admin":
  7. send "&aLoja criada com sucesso"
  8. else:
  9. send "&cVocê não tem permissão para executar esta placa."
  10. cancel event
  11.  
  12. on rightclick on sign:
  13. if line 1 is "Loja":
  14. if line 2 is set:
  15. if line 3 contains "Gratis":
  16. if line 4 is set:
  17. set {_b} to line 3
  18. set {_i} to line 4 parsed as item type
  19. set {_q} to line 2 parsed as number
  20. loop {_q} times:
  21. give {_q} {_i}
  22. send "&aVocê comprou 1 %{_i}% por $0"
  23. stop
  24. if line 3 contains "C" and ":":
  25. if line 4 is set:
  26. set {_b} to line 3
  27. set {_b::*} to {_b} split at "C"
  28. set {_b::*} to {_b::2} split at " "
  29. set {_b::*} to {_b::2} split at ":"
  30. set {_i} to line 4 parsed as item type
  31. set {_q} to line 2 parsed as number
  32. set {_bt} to {_b::1} parsed as number
  33. if player's money is more than or equal to {_bt}:
  34. remove {_bt} from player's balance
  35. loop {_q} times:
  36. give {_i} to player
  37. send "&aVocê comprou %{_i}% por $%{_bt}%"
  38. stop
  39. else:
  40. send "&cVocê não tem dinheiro suficiente"
  41. stop
  42. if line 3 contains "C":
  43. if line 4 is set:
  44. set {_b} to line 3
  45. set {_b::*} to {_b} split at "C"
  46. set {_b::*} to {_b::2} split at " "
  47. set {_i} to line 4 parsed as item type
  48. set {_q} to line 2 parsed as number
  49. set {_bt} to {_b::2} parsed as number
  50. if player's money is more than or equal to {_bt}:
  51. remove {_bt} from player's balance
  52. loop {_q} times:
  53. give {_i} to player
  54. send "&aVocê comprou %{_i}% por $%{_bt}%"
  55. stop
  56. else:
  57. send "&cVocê não tem dinheiro suficiente"
  58. stop
  59.  
  60.  
  61.  
  62. on left click on sign:
  63. if line 1 contains "Loja":
  64. if line 2 is set:
  65. if line 3 is set:
  66. if line 3 contains ":" and "V":
  67. if line 4 is set:
  68. set {_b} to line 3
  69. set {_b::*} to {_b} split at ":"
  70. set {_b::*} to {_b::2} split at " "
  71. set {_i} to line 4 parsed as item type
  72. set {_q} to line 2 parsed as number
  73. set {_bt} to {_b::2} parsed as number
  74. if tool of player is {_i}:
  75. add {_bt} to player's balance
  76. remove {_i} from player
  77. send "&aVocê Vendeu %{_i}% por $%{_bt}%"
  78. else:
  79. send "&cVoce precisa esta com o item em maos para vender"
  80. stop
  81. if line 3 contains "V":
  82. if line 4 is set:
  83. set {_b} to line 3
  84. set {_b::*} to {_b} split at "V"
  85. set {_b::*} to {_b::2} split at " "
  86. set {_i} to line 4 parsed as item type
  87. tool of player is {_i}:
  88. set {_q} to line 2 parsed as number
  89. set {_bt} to {_b::2} parsed as number
  90. remove {_i} from player
  91. send "&aVocê vendeu %{_i}% por $%{_bt}%"
  92. add {_bt} to player's balance
  93. else:
  94. send "&cVocê não tem itens suficientes para vender."
  95. stop
Advertisement
Add Comment
Please, Sign In to add comment