AdamGrzegorz

CreditCard

Jan 1st, 2015
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. # _____ _ _ _ _____ _
  2. # / ____| | (_) | / ____| | |
  3. # | | _ __ ___ __| |_| |_| | __ _ _ __ __| |
  4. # | | | '__/ _ \/ _` | | __| | / _` | '__/ _` |
  5. # | |____| | | __/ (_| | | |_| |___| (_| | | | (_| |
  6. # \_____|_| \___|\__,_|_|\__|\_____\__,_|_| \__,_|
  7.  
  8.  
  9.  
  10.  
  11. command /creditcard [<text>] [<text>] [<text>]:
  12. aliases: cc
  13. trigger:
  14. if arg 1 is "bank":
  15. if player has permission "creditcard.bank" or "creditcard.*":
  16. if targeted block is sign:
  17. set 1st line of targeted block to "&1&l[Bank]"
  18. set 2nd line of targeted block to "&0Kliknij by"
  19. set 3rd line of targeted block to "&0otworzyc!"
  20. send "&3Stworzyles bank!"
  21. else:
  22. send "&cMusisz patrzec sie na tabliczke!"
  23. else:
  24. send "&cNie masz do tego uprawnien!"
  25. if arg 1 is "saldo":
  26. if player has permission "creditcard.saldo" or "creditcard.*":
  27. if arg 2 parsed as player is set:
  28. send "&3Saldo gracza %arg 2%:"
  29. send "&3Portfel: %{CreditCard::Portfel::%arg 2%}%"
  30. send "&3Konto: %{CreditCard::Konto::%arg 2%}%"
  31. else:
  32. send "&3Twoje saldo:"
  33. send "&3Portfel: %{CreditCard::Portfel::%player%}%"
  34. send "&3Konto: %{CreditCard::Konto::%player%}%"
  35. if arg 1 is "set":
  36. if player has permission "creditcard.set" or "creditcard.*":
  37. if arg 2 is set:
  38. if arg 3 is set:
  39. set {CreditCard::Konto::%arg 2%} to arg 3
  40. send "&3Wplaciles &3%arg 3%$ na konto gracza %arg 2%!"
  41. if arg 1 is "reset":
  42. if player has permission "creditcard.reset" or "creditcard.*":
  43. send "&7&o... Resetowanie zmiennych ..."
  44. delete {CreditCard::*}
  45. wait 5 seconds
  46. send "&7&o... Inicjowanie ..."
  47. send "Inicjowanie zmiennych skryptu CreditCard" to console
  48. wait 2 seconds
  49. send "&7&o... Gotowe! ..."
  50. wait 3 seconds
  51. kick all players due to "&7&o... Wgrywanie nowych zmiennych ..."
  52. stop
  53.  
  54. on rightclick:
  55. if event-block is sign:
  56. if 1st line of event-block is "&1&l[Bank]":
  57. open chest with 4 rows named "&1&lBank" to player
  58. wait 1 tick
  59. # Wplacanie
  60. format slot 0 of player with 1 of gold ingot named "1$" with lore "&fKliknij by wplacic." to run "wplac %player% 1"
  61. format slot 1 of player with 1 of gold ingot named "5$" with lore "&fKliknij by wplacic." to run "wplac %player% 5"
  62. format slot 2 of player with 1 of gold ingot named "10$" with lore "&fKliknij by wplacic." to run "wplac %player% 10"
  63. format slot 3 of player with 1 of gold ingot named "20$" with lore "&fKliknij by wplacic." to run "wplac %player% 20"
  64. format slot 4 of player with 1 of gold ingot named "50$" with lore "&fKliknij by wplacic." to run "wplac %player% 50"
  65. format slot 5 of player with 1 of gold ingot named "100$" with lore "&fKliknij by wplacic." to run "wplac %player% 100"
  66. format slot 6 of player with 1 of gold ingot named "200$" with lore "&fKliknij by wplacic." to run "wplac %player% 200"
  67. format slot 7 of player with 1 of gold ingot named "500$" with lore "&fKliknij by wplacic." to run "wplac %player% 500"
  68. format slot 8 of player with 1 of gold ingot named "1000$" with lore "&fKliknij by wplacic." to run "wplac %player% 1000"
  69. # Wyplacanie
  70. format slot 9 of player with 1 of iron ingot named "1$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 1"
  71. format slot 10 of player with 1 of iron ingot named "5$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 5"
  72. format slot 11 of player with 1 of iron ingot named "10$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 10"
  73. format slot 12 of player with 1 of iron ingot named "20$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 20"
  74. format slot 13 of player with 1 of iron ingot named "50$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 50"
  75. format slot 14 of player with 1 of iron ingot named "100$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 100"
  76. format slot 15 of player with 1 of iron ingot named "200$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 200"
  77. format slot 16 of player with 1 of iron ingot named "500$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 500"
  78. format slot 17 of player with 1 of iron ingot named "1000$" with lore "&fKliknij by wyplacic." to run "wyplac %player% 1000"
  79. # inne
  80. 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%"
  81. format slot 30 of player with 1 of diamond named "Stan konta" with lore "&6%{CreditCard::Konto::%player%}%" to close then run "close"
  82. format slot 32 of player with 1 of diamond named "Stan portfela" with lore "&6%{CreditCard::Portfel::%player%}%" to close then run "close"
  83. 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%"
  84.  
  85.  
  86. command /wplac [<player>] [<integer>]:
  87. trigger:
  88. if {CreditCard::Portfel::%player-arg%} is bigger than arg 2-1:
  89. remove arg 2 from {CreditCard::Portfel::%player-arg%}
  90. add arg 2 to {CreditCard::Konto::%player-arg%}
  91. format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE WPLACONO" to close then run "close"
  92. else:
  93. format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
  94. command /wyplac [<player>] [<integer>]:
  95. trigger:
  96. if {CreditCard::Konto::%player-arg%} is bigger than arg 2-1:
  97. remove arg 2 from {CreditCard::Konto::%player-arg%}
  98. add arg 2 to {CreditCard::Portfel::%player-arg%}
  99. format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE WYPLACONO" to close then run "close"
  100. else:
  101. format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
  102. command /karta [<player>]:
  103. trigger:
  104. if {CreditCard::Portfel::%player-arg%} is bigger than 19:
  105. remove 20 from {CreditCard::Portfel::%player-arg%}
  106. give 1 paper of unbreaking 10 named "Karta kredytowa" to the player
  107. format slot 23 of player-arg with 1 of green wool named "&a&lPOMYSLNIE ZAKUPIONO" to close then run "close"
  108. else:
  109. format slot 21 of player-arg with 1 of red wool named "&c&lBRAK PIENIEDZY" to close then run "close"
  110.  
  111. on join:
  112. if {CreditCard::Portfel::%player%} is not set:
  113. set {CreditCard::Portfel::%player%} to 0
  114. if {CreditCard::Konto::%player%} is not set:
  115. set {CreditCard::Konto::%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment