Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _____ _ _ _ _____ _
- # / ____| | (_) | / ____| | |
- # | | _ __ ___ __| |_| |_| | __ _ _ __ __| |
- # | | | '__/ _ \/ _` | | __| | / _` | '__/ _` |
- # | |____| | | __/ (_| | | |_| |___| (_| | | | (_| |
- # \_____|_| \___|\__,_|_|\__|\_____\__,_|_| \__,_|
- command /creditcard [<text>] [<text>] [<text>]:
- aliases: cc
- trigger:
- if arg 1 is "bank":
- if player has permission "creditcard.bank" or "creditcard.*":
- if targeted block is sign:
- set 1st line of targeted block to "&1&l[Bank]"
- set 2nd line of targeted block to "&0Kliknij by"
- set 3rd line of targeted block to "&0otworzyc!"
- send "&3Stworzyles bank!"
- else:
- send "&cMusisz patrzec sie na tabliczke!"
- else:
- send "&cNie masz do tego uprawnien!"
- if arg 1 is "saldo":
- if player has permission "creditcard.saldo" or "creditcard.*":
- if arg 2 parsed as player is set:
- send "&3Saldo gracza %arg 2%:"
- send "&3Portfel: %{CreditCard::Portfel::%arg 2%}%"
- send "&3Konto: %{CreditCard::Konto::%arg 2%}%"
- else:
- send "&3Twoje saldo:"
- send "&3Portfel: %{CreditCard::Portfel::%player%}%"
- send "&3Konto: %{CreditCard::Konto::%player%}%"
- if arg 1 is "set":
- if player has permission "creditcard.set" or "creditcard.*":
- if arg 2 is set:
- if arg 3 is set:
- set {CreditCard::Konto::%arg 2%} to arg 3
- send "&3Wplaciles &3%arg 3%$ na konto gracza %arg 2%!"
- if arg 1 is "reset":
- if player has permission "creditcard.reset" or "creditcard.*":
- send "&7&o... Resetowanie zmiennych ..."
- delete {CreditCard::*}
- wait 5 seconds
- send "&7&o... Inicjowanie ..."
- send "Inicjowanie zmiennych skryptu CreditCard" to console
- wait 2 seconds
- send "&7&o... Gotowe! ..."
- wait 3 seconds
- kick all players due to "&7&o... Wgrywanie nowych zmiennych ..."
- stop
- on rightclick:
- if event-block is sign:
- if 1st line of event-block is "&1&l[Bank]":
- open chest with 4 rows named "&1&lBank" to player
- wait 1 tick
- # Wplacanie
- format slot 0 of player with 1 of gold ingot named "1$" with lore "&fKliknij by wplacic." to run "wplac %player% 1"
- format slot 1 of player with 1 of gold ingot named "5$" with lore "&fKliknij by wplacic." to run "wplac %player% 5"
- format slot 2 of player with 1 of gold ingot named "10$" with lore "&fKliknij by wplacic." to run "wplac %player% 10"
- format slot 3 of player with 1 of gold ingot named "20$" with lore "&fKliknij by wplacic." to run "wplac %player% 20"
- format slot 4 of player with 1 of gold ingot named "50$" with lore "&fKliknij by wplacic." to run "wplac %player% 50"
- format slot 5 of player with 1 of gold ingot named "100$" with lore "&fKliknij by wplacic." to run "wplac %player% 100"
- format slot 6 of player with 1 of gold ingot named "200$" with lore "&fKliknij by wplacic." to run "wplac %player% 200"
- format slot 7 of player with 1 of gold ingot named "500$" with lore "&fKliknij by wplacic." to run "wplac %player% 500"
- format slot 8 of player with 1 of gold ingot named "1000$" with lore "&fKliknij by wplacic." to run "wplac %player% 1000"
- # Wyplacanie
- format slot 9 of player with 1 of iron ingot named "1$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 1"
- format slot 10 of player with 1 of iron ingot named "5$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 5"
- format slot 11 of player with 1 of iron ingot named "10$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 10"
- format slot 12 of player with 1 of iron ingot named "20$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 20"
- format slot 13 of player with 1 of iron ingot named "50$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 50"
- format slot 14 of player with 1 of iron ingot named "100$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 100"
- format slot 15 of player with 1 of iron ingot named "200$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 200"
- format slot 16 of player with 1 of iron ingot named "500$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 500"
- format slot 17 of player with 1 of iron ingot named "1000$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 1000"
- # inne
- format slot 28 of player with 1 of paper named "Karta kredytowa" with lore "&fKliknij by kupic!||&6Koszt: 20$ (portfel)||&7Dzieki niej bedziesz mogl ||&7placic pieniedzmi wplaconymi w banku!" to run "karta %player%"
- format slot 30 of player with 1 of diamond named "Stan konta" with lore "&6%{CreditCard::Konto::%player%}%" to close then run "close"
- format slot 32 of player with 1 of diamond named "Stan portfela" with lore "&6%{CreditCard::Portfel::%player%}%" to close then run "close"
- format slot 34 of player with 1 of paper named "Czek" with lore "&fKliknij aby kupic!||&6Koszt: 10$ (portfel)||&7Mozesz na nie wplacic dowolna||&7 ilosc pieniedzy, i dac na przyklad koledze!" to run "czek %player%"
- command /wplac [<player>] [<integer>]:
- trigger:
- if {CreditCard::Portfel::%player-arg%} is bigger than arg 2-1:
- remove arg 2 from {CreditCard::Portfel::%player-arg%}
- add arg 2 to {CreditCard::Konto::%player-arg%}
- format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE WPLACONO" to close then run "close"
- else:
- format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
- command /wyplac [<player>] [<integer>]:
- trigger:
- if {CreditCard::Konto::%player-arg%} is bigger than arg 2-1:
- remove arg 2 from {CreditCard::Konto::%player-arg%}
- add arg 2 to {CreditCard::Portfel::%player-arg%}
- format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE WYPLACONO" to close then run "close"
- else:
- format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
- command /karta [<player>]:
- trigger:
- if {CreditCard::Portfel::%player-arg%} is bigger than 19:
- remove 20 from {CreditCard::Portfel::%player-arg%}
- give 1 paper of unbreaking 10 named "Karta kredytowa" to the player
- format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE ZAKUPIONO" to close then run "close"
- else:
- format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
- on join:
- if {CreditCard::Portfel::%player%} is not set:
- set {CreditCard::Portfel::%player%} to 0
- if {CreditCard::Konto::%player%} is not set:
- set {CreditCard::Konto::%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment