Zaaxel

MiniChat and MyPhone

Mar 2nd, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.44 KB | None | 0 0
  1. # Nazwa: MiniChat and MyPhone
  2. # Autor: Zaaxel
  3. # Wersja: 1.0
  4.  
  5.  
  6. variables:
  7. {minichat.sms} = false
  8. {mcmoney.%player%} = 100
  9. {mymoney.%player%} = 0
  10.  
  11.  
  12. every 1 minutes:
  13. loop all players:
  14. add 1 to {mcmoney.%loop-player%}
  15. send "&eCo minute otrzymujesz &a1€" to loop-player
  16.  
  17.  
  18. on first join:
  19. set {minichat.sms} to false
  20. send "&2Witaj! Na serwerze uzywamy &6Telefonow. &2Wiecej pod /myinfo"
  21. on join:
  22. set {minichat.sms} to false
  23.  
  24.  
  25. on chat:
  26. cancel event
  27. loop players in radius 25 around player:
  28. send "%coloured player's displayname%&7: %message%" to loop-player
  29. send "%coloured player's displayname%&7: %message%" to all ops
  30.  
  31.  
  32. command /buy:
  33. trigger:
  34. wait 2 tick
  35. open chest with 1 rows named "&6MobileShop" to player
  36. wait 2 tick
  37. format slot 0 of player with 1 of brick named "&bNOKIA" with lore "&a250€" to run "buyphone %player% nokia"
  38. format slot 1 of player with 1 of iron ingot named "&bSAMSUNG" with lore "&a350€" to run "buyphone %player% samsung"
  39. format slot 2 of player with 1 of gold ingot named "&bLG" with lore "&a400€" to run "buyphone %player% lg"
  40.  
  41.  
  42. command /buyphone [<player>] [<text>]:
  43. executable by: console
  44. trigger:
  45. if arg 1 is set:
  46. if arg 2 is "nokia":
  47. if {mcmoney.%player-arg%} is more than 250:
  48. remove 250 from {mcmoney.%player-arg%}
  49. give 1 brick named "&bNOKIA" to the player-arg
  50. send "&6Zakupiles/las telefon NOKIA za &a250€"
  51. else:
  52. send "&cNie masz tyle pieniedzy!"
  53. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  54. if arg 2 is "samsung":
  55. if {mcmoney.%player-arg%} is more than 350:
  56. remove 350 from {mcmoney.%player-arg%}
  57. give 1 iron ingot named "&bSAMSUNG" to the player-arg
  58. send "&6Zakupiles/las telefon SAMSUNG za &a350€"
  59. else:
  60. send "&cNie masz tyle pieniedzy!"
  61. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  62. if arg 2 is "lg":
  63. if {mcmoney.%player-arg%} is more than 400:
  64. remove 400 from {mcmoney.%player-arg%}
  65. give 1 gold ingot named "&bLG" to the player-arg
  66. send "&6Zakupiles/las telefon LG za &a400€"
  67. else:
  68. send "&cNie masz tyle pieniedzy!"
  69. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  70.  
  71.  
  72. on rightclick:
  73. if player's tool is brick named "&bNOKIA":
  74. wait 2 tick
  75. open chest with 1 rows named "&6MyNOKIA" to player
  76. wait 2 tick
  77. format slot 0 of player with 1 of sunflower named "&aStan Konta" to run "myphone %player% stan"
  78. format slot 1 of player with 1 of clay named "&aDoladuj" to run "myphone %player% doladuj"
  79. format slot 8 of player with 1 of redstone dust named "&cInformacje" to run "myphone %player% info"
  80.  
  81. on rightclick:
  82. if player's tool is iron ingot named "&bSAMSUNG":
  83. wait 2 tick
  84. open chest with 1 rows named "&6MySAMSUNG" to player
  85. wait 2 tick
  86. format slot 0 of player with 1 of sunflower named "&aStan Konta" to run "myphone %player% stan"
  87. format slot 1 of player with 1 of clay named "&aDoladuj" to run "myphone %player% doladuj"
  88. format slot 8 of player with 1 of redstone dust named "&cInformacje" to run "myphone %player% info"
  89.  
  90. on rightclick:
  91. if player's tool is gold ingot named "&bLG":
  92. wait 2 tick
  93. open chest with 1 rows named "&6MyLG" to player
  94. wait 2 tick
  95. format slot 0 of player with 1 of sunflower named "&aStan Konta" to run "myphone %player% stan"
  96. format slot 1 of player with 1 of clay named "&aDoladuj" to run "myphone %player% doladuj"
  97. format slot 8 of player with 1 of redstone dust named "&cInformacje" to run "myphone %player% info"
  98.  
  99.  
  100. command /myphone [<player>] [<text>] [<text>]:
  101. executable by: console
  102. trigger:
  103. if arg 1 is set:
  104. if arg 2 is "stan":
  105. send "&cStan konta wynosi: &a%{mymoney.%player-arg%}%€" to player-arg
  106. if arg 2 is "doladuj":
  107. wait 2 tick
  108. open chest with 1 rows named "&6Doladowania" to player-arg
  109. wait 2 tick
  110. format slot 0 of player-arg with 1 paper named "&a5€" to run "myphone %player-arg% doladuj 5"
  111. format slot 1 of player-arg with 1 paper named "&a10€" to run "myphone %player% doladuj 10"
  112. format slot 2 of player-arg with 1 paper named "&a25€" to run "myphone %player% doladuj 25"
  113. if arg 3 is "5":
  114. if {mcmoney.%player-arg%} is more than 5:
  115. remove 5 from {mcmoney.%player-arg%}
  116. add 5 to {mymoney.%player-arg%}
  117. send "&cDoladowales telefon kwota &a5€"
  118. else:
  119. send "&cNie masz tyle pieniedzy!"
  120. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  121. if arg 3 is "10":
  122. if {mcmoney.%player-arg%} is more than 10:
  123. remove 10 from {mcmoney.%player-arg%}
  124. add 10 to {mymoney.%player-arg%}
  125. send "&cDoladowales telefon kwota &a10€"
  126. else:
  127. send "&cNie masz tyle pieniedzy!"
  128. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  129. if arg 3 is "25":
  130. if {mcmoney.%player-arg%} is more than 25:
  131. remove 25 from {mcmoney.%player-arg%}
  132. add 25 to {mymoney.%player-arg%}
  133. send "&cDoladowales telefon kwota &a25€"
  134. else:
  135. send "&cNie masz tyle pieniedzy!"
  136. send "&cPosiadasz: &a%{mcmoney.%player-arg%}%€"
  137. if arg 2 is "info":
  138. send "&c>>> &6MyPhone and MiniChat &c<<<"
  139. send "&bAuthor: Zaaxel"
  140. send "&bVersion: 1.0"
  141. send "&c>>> &6MyPhone and MiniChat &c<<<"
  142. send "&aNa serwerze gracze widza co napisales jezeli sa w promieniu 25 kratek od ciebie"
  143. send "&bAby kupic telefon wpisz &6--> /buy"
  144. send "&bAby zobaczyc ile posiadasz przy sobie pieniedzy wpisz &6--> /kasa"
  145. send "&bAby wyslac sms musisz miec doladowany telefo i wpisac &6--> /sms <gracz> <tresc> &cKOSZT 1€"
  146. send "&bAby wyslac ogloszenie musisz posiadac telefon LG i wpisac &6--> /toall <tresc> &cKOSZT 5€"
  147.  
  148.  
  149. command /sms [<player>] [<text>]:
  150. trigger:
  151. if arg 1 is set:
  152. if {mymoney.%player%} is more than 2:
  153. remove 2 from {mymoney.%player%}
  154. set {minichat.sms} to true
  155. execute player command "msg %player-arg% %arg 2%"
  156. wait 2 tick
  157. set {minichat.sms} to false
  158. else:
  159. send "&cBrak srodkow na koncie"
  160. else:
  161. send "&cWprowadz odbiorce i tresc wiadomosci"
  162.  
  163.  
  164. command /toall [<text>]:
  165. trigger:
  166. if {mymoney.%player%} is more than 5:
  167. remove 5 from {mymoney.%player%}
  168. send "&e%arg%" to all players
  169. else:
  170. send "&cZbyt mala ilosc srodkow na koncie: &a%{mymoney.%player%}%€"
  171.  
  172.  
  173. command /kasa:
  174. trigger:
  175. send "&cPosiadasz &a%{mcmoney.%player%}%€"
  176.  
  177.  
  178. command /msg [<player>] [<text>]:
  179. trigger:
  180. if {minichat.sms} is false:
  181. cancel event
  182. send "&cJezeli masz telefon to uzyj komendy /sms"
  183.  
  184.  
  185. command /myinfo:
  186. trigger:
  187. send "&c>>> &6MyPhone and MiniChat &c<<<"
  188. send "&bAuthor: Zaaxeel"
  189. send "&bVersion: 1.0"
  190. send "&c>>> &6MyPhone and MiniChat &c<<<"
  191. send "&aNa serwerze gracze widza co napisales jezeli sa w promieniu 25 kratek od ciebie"
  192. send "&bAby kupic telefon wpisz &6--> /buy"
  193. send "&bAby zobaczyc ile posiadasz przy sobie pieniedzy wpisz &6--> /kasa"
  194. send "&bAby wyslac sms musisz miec doladowany telefo i wpisac &6--> /sms <gracz> <tresc> &cKOSZT 1€"
  195. send "&bAby wyslac ogloszenie musisz posiadac telefon LG i wpisac &6--> /toall <tresc> &cKOSZT 5€"
Advertisement
Add Comment
Please, Sign In to add comment