Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #------------------------------#
- # #
- # iCasino #
- # v. 0.4 #
- # by kukubaczek #
- # #
- #------------------------------#
- #------------------------------#
- # Kongiguracja #
- #------------------------------#
- options:
- tag: &ai&bCasino &6>&r
- # /\ Co ma sie wyswietlac przed wiadomosciami
- slots-los: 10
- # /\ Cena losowania w grze Slots
- slots-win: 25
- # /\ Ilosc zdobytych zetonow po wygranej w grze Slots (1 zeton = 10 monet)
- cards-gra: 5
- # /\ Koszt gry Cards
- cards-win: 1
- # /\ Ilosc zdobytych zetonow po wygranej w grze cards (nie polecam zmieniac) (1 zeton = 10 monet)
- coins-gra: 6
- # /\ Koszt gry Coins
- coins-win: 1
- # /\ Ilosc zdobytych zetonow po wygranej w grze Coins (1 zeton = 10 monet)
- lotto-gra: 10
- # /\ Koszt losowania Lotto
- lotto-win: 100
- # /\ Ilosc zdobytych zetonow po wygranej w grze Lotto (1 zeton = 10 monet)
- lotto-startlosowania: 1
- # /\ Ile graczy ma obstawic w lotto, aby zaczac losowanie
- scoreboard-odswiezanie: 1
- # /\ Czas w sekundach co ile ma sie odswiezac scoreboard
- #------------------------------#
- # Variables #
- #------------------------------#
- variables:
- {zetony.%player%} = 0
- #------------------------------#
- # #
- # Ogolne #
- # #
- #------------------------------#
- command /zetony [<offlineplayer>]:
- trigger:
- if arg 1 is not set:
- send "{@tag} &aMasz &b%{zetony.%player%}% &azetonow. Wymien je przy wyjsciu, inaczej je stracisz."
- stop
- else:
- send "{@tag} &aGracz &b%arg 1% &ama &b%{zetony.%arg 1%}% &azetonow."
- stop
- on quit:
- player do not have permission "casino.zachowanie.zetonow":
- set {zetony.%player%} to 0
- stop
- on leave of region "kasyno":
- if {zetony.%player%} is 0:
- send "{@tag} Zapraszamy ponownie!"
- stop
- else:
- send "{@tag} Przepadlo twoje %{zetony.%player%}% zetonow, bo opusciles kasyno."
- send "{@tag} Zapraszamy ponownie!"
- set {zetony.%player%} to 0
- stop
- on entering of region "kasyno":
- send "{@tag} Witamy w Kasynie!"
- stop
- command /sellzetony:
- trigger:
- player has permission "admin.sellzetony":
- spawn a priest
- set the name of last spawned entity to "&eZetony"
- apply slowness 100 to last spawned entity for 9999 days
- apply regeneration 100 to last spawned entity for 9999 days
- stop
- command /addzetony <number> <player>:
- trigger:
- player has permission "admin.addzetony":
- add arg 1 to {zetony.%arg 2%}
- send "{@tag} &eDodano %arg 1% zetonow do gracza %arg 2%."
- stop
- on right click on priest:
- if name of entity is "&eZetony":
- cancel event
- if {zetony.%player%} is greater than 0:
- set {_zetonysell} to {zetony.%player%} * 10
- add {_zetonysell} to player's balance
- send "{@tag} &eWymieniles &a%{zetony.%player%}%&e zetonow na &a%{_zetonysell}%&e monet. Masz &a%player's money% &emonet!"
- set {zetony.%player%} to 0
- stop
- else:
- send "{@tag} &cMasz &f%{zetony.%player%}% &czetonow, zdabadz troche aby wymienic."
- stop
- on damage:
- if victim is priest:
- if name of victim is "&eZetony":
- if attacker has permission "admin.sellzetony.zabijanie":
- kill the victim
- stop
- else:
- cancel event
- stop
- #------------------------------#
- # Tabliczki do gier" #
- #------------------------------#
- on sign change:
- player has permission "kasino.slots.sign":
- if line 1 of block is "-Slots-":
- set line 1 to "&eCasino"
- set line 3 to "○○○"
- set line 2 to "&1-&b&lSlots&1-"
- set line 4 to "&2[&aReady&2]"
- send "{@tag} Utworzyles gre Slots!"
- stop
- if line 1 is "-Cards-":
- set line 1 to "&eCasino"
- set line 2 to "&1-&b&lCards&1-"
- set line 4 to "&2[&aReady&2]"
- send "{@tag} Utworzyles gre Cards!"
- stop
- if line 1 is "-Coins-":
- set line 1 to "&eCasino"
- set line 2 to "&f&l■■ &0&l■■"
- set line 3 to "&f&l■■ &0&l■■"
- set line 4 to "&f[LPM] &0[PPM]"
- on break a sign:
- if line 1 of block is "&eCasino":
- player has permission "casino.signdestroy":
- send "{@tag} Zniszczyles gre z Casina."
- stop
- else:
- cancel event
- stop
- #------------------------------#
- # Jednoręki bandyta #
- #------------------------------#
- on right click on sign:
- if line 1 of block is "&eCasino":
- line 2 of block is "&1-&b&lSlots&1-"
- line 4 of block is "&2[&aReady&2]"
- if {@slots-los} is greater than player's money:
- message "{@tag} &cMasz za malo kasy, aby zagrac w &2Slots&c! &aKoszt gry: &b{@slots-los} &akasy!"
- stop
- remove {@slots-los} from player's balance
- set line 4 of block to "&4[&cPlaying&4]"
- loop 60 times:
- set {_znak1} to a random integer between 1 and 10
- set {_znak2} to a random integer between 1 and 10
- set {_znak3} to a random integer between 1 and 10
- if {_znak1} is 1:
- set {_znak1} to "■"
- if {_znak1} is 2:
- set {_znak1} to "&c♥&r"
- if {_znak1} is 3:
- set {_znak1} to "&c♦&r"
- if {_znak1} is 4:
- set {_znak1} to "♣"
- if {_znak1} is 5:
- set {_znak1} to "♠"
- if {_znak1} is 6:
- set {_znak1} to "○"
- if {_znak1} is 7:
- set {_znak1} to "•"
- if {_znak1} is 8:
- set {_znak1} to "&e☼&r"
- if {_znak1} is 9:
- set {_znak1} to "&6▲&r"
- if {_znak1} is 10:
- set {_znak1} to "&9▼&r"
- if {_znak2} is 1:
- set {_znak2} to "■"
- if {_znak2} is 2:
- set {_znak2} to "&c♥&r"
- if {_znak2} is 3:
- set {_znak2} to "&c♦&r"
- if {_znak2} is 4:
- set {_znak2} to "♣"
- if {_znak2} is 5:
- set {_znak2} to "♠"
- if {_znak2} is 6:
- set {_znak2} to "○"
- if {_znak2} is 7:
- set {_znak2} to "•"
- if {_znak2} is 8:
- set {_znak2} to "&e☼&r"
- if {_znak2} is 9:
- set {_znak2} to "&6▲&r"
- if {_znak2} is 10:
- set {_znak2} to "&9▼&r"
- if {_znak3} is 1:
- set {_znak3} to "■"
- if {_znak3} is 2:
- set {_znak3} to "&c♥&r"
- if {_znak3} is 3:
- set {_znak3} to "&c♦&r"
- if {_znak3} is 4:
- set {_znak3} to "♣"
- if {_znak3} is 5:
- set {_znak3} to "♠"
- if {_znak3} is 6:
- set {_znak3} to "○"
- if {_znak3} is 7:
- set {_znak3} to "•"
- if {_znak3} is 8:
- set {_znak3} to "&e☼&r"
- if {_znak3} is 9:
- set {_znak3} to "&6▲&r"
- if {_znak3} is 10:
- set {_znak3} to "&9▼&r"
- set line 3 of block to "%{_znak1}% %{_znak2}% %{_znak3}%"
- wait 1 tick
- set line 4 of block to "&2[&aReady&2]"
- if {_znak1} is {_znak2}:
- if {_znak1} is {_znak3}:
- add {@slots-win} to {zetony.%player%}
- send "{@tag} &a%player% &6wygral w grze &b&lSlots &e{@slots-win} &azetonow!"
- send "{@tag} &aMasz juz &e%{zetony.%player%}% &azetonow!"
- stop
- #------------------------------#
- # Trzy karty #
- #------------------------------#
- on right click on sign:
- if line 1 of block is "&eCasino":
- line 2 of block is "&1-&b&lCards&1-"
- line 4 of block is "&2[&aReady&2]"
- if {@cards-gra} is greater than player's money:
- message "{@tag} &cMasz za malo kasy, aby zagrac w &2Cards&c! &aKoszt gry: &b{@cards-gra} &akasy!"
- stop
- remove {@cards-gra} from player's balance
- set {_karta} to random integer between 1 and 4
- set line 4 to "&6[&eMixing&6]"
- wait 1 second
- if {_karta} is 2 or 3:
- set line 3 to "&l■"
- set line 4 to "&4[&cLose&4]"
- wait 2 seconds
- set line 4 to "&2[&aReady&2]"
- stop
- if {_karta} is 4:
- set line 3 to "&f&l■"
- set line 4 to "&2[&aWIN&2]"
- add {@cards-win} to {zetony.%player%}
- send "{@tag} &aWygrales {@cards-win} zetona!"
- wait 25 ticks
- set line 4 to "&2[&aReady&2]"
- stop
- stop
- #------------------------------#
- # Coin Toss #
- #------------------------------#
- on leftclick on sign:
- if line 1 of block is "&eCasino":
- line 2 of block is "&f&l■■ &0&l■■"
- line 3 of block is "&f&l■■ &0&l■■"
- if {@coins-gra} is greater than player's money:
- message "{@tag} &cMasz za malo kasy, aby zagrac w &2Coins&c! &aKoszt gry: &b{@coins-gra} &akasy!"
- stop
- remove {@coins-gra} from player's balance
- if line 4 of block is "&f[LPM] &0[PPM]":
- set {_kolor} to random integer between 1 and 3
- wait 5 ticks
- if {_kolor} is 2:
- set line 4 to "&4[&cLose&4]"
- set line 3 to "&0&l■■"
- set line 2 to "&0&l■■"
- wait 1 second
- set line 2 to "&f&l■■ &0&l■■"
- set line 3 to "&f&l■■ &0&l■■"
- set line 4 to "&f[LPM] &0[PPM]"
- if {_kolor} is 3:
- set line 4 to "&2[&aWIN&2]"
- set line 3 to "&f&l■■"
- set line 2 to "&f&l■■"
- wait 1 second
- set line 2 to "&f&l■■ &0&l■■"
- set line 3 to "&f&l■■ &0&l■■"
- send "{@tag} &aWygrales {@cards-win} zetona!"
- set line 4 to "&f[LPM] &0[PPM]"
- add {@coins-win} to {zetony.%player%}
- stop
- on rightclick on sign:
- if line 1 of block is "&eCasino":
- line 2 of block is "&f&l■■ &0&l■■"
- line 3 of block is "&f&l■■ &0&l■■"
- if {@coins-gra} is greater than player's money:
- message "{@tag} &cMasz za malo kasy, aby zagrac w &2Coins&c! &aKoszt gry: &b{@coins-gra} &akasy!"
- stop
- remove {@coins-gra} from player's balance
- if line 4 of block is "&f[LPM] &0[PPM]":
- set {_kolor} to random integer between 1 and 3
- wait 5 ticks
- if {_kolor} is 2:
- set line 4 to "&2[&aWIN&2]"
- set line 3 to "&0&l■■"
- set line 2 to "&0&l■■"
- wait 1 second
- set line 2 to "&f&l■■ &0&l■■"
- set line 3 to "&f&l■■ &0&l■■"
- set line 4 to "&f[LPM] &0[PPM]"
- add {@coins-win} to {zetony.%player%}
- send "{@tag} &aWygrales {@cards-win} zetona!"
- if {_kolor} is 3:
- set line 4 to "&4[&cLose&4]"
- set line 3 to "&f&l■■"
- set line 2 to "&f&l■■"
- wait 1 second
- set line 2 to "&f&l■■ &0&l■■"
- set line 3 to "&f&l■■ &0&l■■"
- set line 4 to "&f[LPM] &0[PPM]"
- stop
- #------------------------------#
- # Lotto #
- #------------------------------#
- command /obstaw [<integer>]:
- usage: /obstaw <liczba obstawiona 0-100>
- aliases: /lotto
- trigger:
- if arg 1 is set:
- if {@lotto-gra} is greater than player's money:
- message "{@tag} &cMasz za malo kasy, aby zagrac w &2Cards&c! &aKoszt gry: &b{@lotto-gra} &akasy!"
- stop
- remove {@lotto-gra} from player's balance
- loop 100 times:
- if arg 1 is loop-number:
- send "{@tag} Postawiles liczbe %arg 1%, losowanie odbedzie sie gdy bedzie bralo w nim udzial wiecej niz {@lotto-startlosowania} graczy!"
- set {lotto.%player%} to arg 1
- add 1 to {lotto-start}
- if {lotto-start} is greater than {@lotto-startlosowania}:
- set {_losowanie} to random integer between 0 and 100
- send "{@tag} Rozpoczynanie losowania..." to all players
- wait 1 second
- send "{@tag} Wylosowana liczba to %{_losowanie}%!" to all players
- send "{@tag} Sprawdzanie czy ktos wygral..." to all players
- wait 2 seconds
- loop all players:
- if {lotto.%loop-player%} is {_losowanie}:
- send "{@tag} Gracz %loop-player% wygral Lotto! Dostaje {@lotto-win} zetonow!" to all players
- add {@lotto-win} to {zetony.%player%}
- stop
- else:
- send "{@tag} Niestety nikt nie wygral..."
- stop
- clear {lotto.%loop-player%}
- set {lotto-start} to 0
- stop
- stop
- else:
- send "{@tag} Postaw liczbe 1-100!"
- else:
- send "{@tag} Poprawnie: /obstaw <liczba obstawiona 1-100>. Koszt: {@lotto-gra}."
- #------------------------------#
- # Scoreboard #
- #------------------------------#
- every {@scoreboard-odswiezanie} seconds:
- loop all players:
- set {_gracze} to number of all players
- set {_zetony} to {zetony.%loop-player%}
- set {_money} to loop-player's balance
- display board named "&a&li&b&lCasino" to loop-player
- make score "&7Zetony:" in board of loop-player to {_zetony}
- make score "&7Kasa:" in board of loop-player to {_money}
- make score "&7Online:" in board of loop-player to {_gracze}
- move display of loop-player to "sidebar"
- stop
Advertisement
Add Comment
Please, Sign In to add comment