Slupik98

Untitled

Jan 31st, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. command /aukcja [<text>] [<text>]:
  2. trigger:
  3. if arg 1 is "wystaw":
  4. if arg 2 is set:
  5. set {_cena} to arg 2 parsed as integer
  6. if {_cena} is set:
  7. if player's tool is not air:
  8. if {aukcje::stan} is false:
  9. set {aukcje::stan} to true
  10. set {aukcje::item} to player's tool
  11. remove player's tool from player's inventory
  12. set {aukcje::cena} to {_cena}
  13. set {aukcje::wystawiajacy} to player
  14. broadcast "Gracz %player% wystawił na sprzedać przedmiot %{aukcje::item}% za %{aukcje::cena}%"
  15. wait 60 seconds
  16. if {aukcje::kupujacy} is set:
  17. add {aukcje::item} to "%{aukcje::kupujacy}%" parsed as player
  18. remove {aukcje::cena} from {aukcje::kupujacy}'s balance
  19. add {aukcje::cena} to player's balance
  20. broadcast "Gracz %{aukcje::kupujacy}% wygra aukcję"
  21. delete {aukcje::*}
  22. set {aukcje::stan} to false
  23. broadcast "Można wystawić nowy przedmiot!"
  24. else:
  25. send "Musisz poczekać, aktualnie jakiś przedmiot jest już licytowany"
  26. else:
  27. send "Musisz trzymać coś w ręce"
  28. else:
  29. send "Podaj poprawną cenę"
  30. else:
  31. send "Musisz podać kwotę za którą chcesz wystawić item"
  32. if arg 1 is "licytuj":
  33. if arg 2 is set:
  34. set {_cena} to arg 2 parsed as integer
  35. if {_cena} is set:
  36. if player's balance is greater than or equal to {_cena}
  37. if {aukcje::stan} is true:
  38. if {aukcje::cena} is greater than or equal to {_cena}:
  39. send "Musisz podać cenę większą niż %{_aukcje::cena}%"
  40. else:
  41. set {aukcje::cena} to {_cena}
  42. set {aukcje::kupujacy} to player
  43. else:
  44. send "Aktualnie nie trwa żadna aukcja"
  45. else:
  46. send "Masz za mało pieniędzy"
  47. else:
  48. send "Podaj poprawną cenę"
  49. else:
  50. send "Musisz podać kwotę za którą chcesz podbić item"
  51. if arg 1 is not set:
  52. execute console command "aukcja help"
  53. if arg 1 is "help":
  54. send "pomoc...."
Advertisement
Add Comment
Please, Sign In to add comment