Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /aukcja [<text>] [<text>]:
- trigger:
- if arg 1 is "wystaw":
- if arg 2 is set:
- set {_cena} to arg 2 parsed as integer
- if {_cena} is set:
- if player's tool is not air:
- if {aukcje::stan} is false:
- set {aukcje::stan} to true
- set {aukcje::item} to player's tool
- remove player's tool from player's inventory
- set {aukcje::cena} to {_cena}
- set {aukcje::wystawiajacy} to player
- broadcast "Gracz %player% wystawił na sprzedać przedmiot %{aukcje::item}% za %{aukcje::cena}%"
- wait 60 seconds
- if {aukcje::kupujacy} is set:
- add {aukcje::item} to "%{aukcje::kupujacy}%" parsed as player
- remove {aukcje::cena} from {aukcje::kupujacy}'s balance
- add {aukcje::cena} to player's balance
- broadcast "Gracz %{aukcje::kupujacy}% wygra aukcję"
- delete {aukcje::*}
- set {aukcje::stan} to false
- broadcast "Można wystawić nowy przedmiot!"
- else:
- send "Musisz poczekać, aktualnie jakiś przedmiot jest już licytowany"
- else:
- send "Musisz trzymać coś w ręce"
- else:
- send "Podaj poprawną cenę"
- else:
- send "Musisz podać kwotę za którą chcesz wystawić item"
- if arg 1 is "licytuj":
- if arg 2 is set:
- set {_cena} to arg 2 parsed as integer
- if {_cena} is set:
- if player's balance is greater than or equal to {_cena}
- if {aukcje::stan} is true:
- if {aukcje::cena} is greater than or equal to {_cena}:
- send "Musisz podać cenę większą niż %{_aukcje::cena}%"
- else:
- set {aukcje::cena} to {_cena}
- set {aukcje::kupujacy} to player
- else:
- send "Aktualnie nie trwa żadna aukcja"
- else:
- send "Masz za mało pieniędzy"
- else:
- send "Podaj poprawną cenę"
- else:
- send "Musisz podać kwotę za którą chcesz podbić item"
- if arg 1 is not set:
- execute console command "aukcja help"
- if arg 1 is "help":
- send "pomoc...."
Advertisement
Add Comment
Please, Sign In to add comment