Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.47 KB | None | 0 0
  1. function aukcjeKup(p: player , a: integer ):
  2. wait 5 tick
  3. open chest with 3 rows named " &5&lPotwierdz swoj zakup" to {_p}
  4. format slot 22 of {_p} with gold block named "&6Stan twoich punktów:&l %{aukcjapunkty::%{_p}%}%" with lore "&eKoszt przedmiotu:&l %{aukcja::%{_a}%.koszt}%" to be unstealable
  5. format slot 13 of {_p} with {aukcja::%{_a}%} to be unstealable
  6. format slot 10 of {_p} with red wool named "&c&lNIE" with lore "&cRezygnuje" to close
  7. format slot 16 of {_p} with light green wool named "&a&lTAK" with lore "&7Czy napewno chcesz kupic||&7ten item za &a&l%{aukcja::%{_a}%.koszt}% punktów?" to close then run [run {_p} command "/kupiono %{_a}%" as op]
  8.  
  9. function aukcjeKupiono(p: player , a: integer ):
  10. if {aukcjapunkty::%{_p}%} is greater than or equal to {aukcja::%{_a}%.koszt}:
  11. wait 3 tick
  12. set lore of {aukcja::%{_a}%} to {aukcja::%{_a}%.lore}
  13. delete {aukcja::limit.%{aukcja::%{_a}%.wlasciciel}%}
  14. give {aukcja::%{_a}%} to {_p}
  15. add {aukcja::%{_a}%.koszt} to {aukcjapunkty::%{aukcja::%{_a}%.wlasciciel}%}
  16. send "&a&lPrzedmiot zostal sprzedany, dodano &6&l%{aukcja::%{_a}%.koszt}% &a&lpunktów do konta" to {aukcja::%{_a}%.wlasciciel}
  17. delete {aukcja::%{_a}%.wlasciciel}
  18. remove {aukcja::%{_a}%.koszt} from {aukcjapunkty::%{_p}%}
  19. set {aukcja::%{_a}%} to false
  20. send "&a&lKupiles przedmiot za &6&l%{aukcja::%{_a}%.koszt}% &a&lpunktów" to {_p}
  21. delete {aukcja::%{_a}%.koszt}
  22. else:
  23. send "&c&lNie masz tylu punktów aby to kupic" to {_p}
  24.  
  25. options: #itemy oddzielac "or" a nie spacją albo przecinkiem
  26. itemy: bedrock
  27. delay: 15 #ile trwa aukcja (w minutach)
  28. ilosc: 5 #ilosc punktow po pierwszym wejsciu
  29. iloscs: 5 #ilosc punktow tracona po smierci
  30. iloscz: 5 #ilosc punktow zyskiwana po zabiciu
  31.  
  32.  
  33. on first join:
  34. set {aukcjapunkty::%player%} to {@ilosc}
  35. on join:
  36. if {aukcjapunkty::%player%} is not set:
  37. set {aukcjapunkty::%player%} to {@ilosc}
  38. on load:
  39. broadcast "&6Autor skryptu na aukcje: &b&lGRZYBEEK"
  40. every 1 hour:
  41. broadcast "&6Autor skryptu na aukcje: &b&lGRZYBEEK"
  42.  
  43. on death of player:
  44. if attacker is a player:
  45. remove {@iloscs} from {aukcjapunkty::%victim%}
  46. add {@iloscz} to {aukcjapunkty::%attacker%}
  47.  
  48. command /aukcje:
  49. aliases: ah
  50. trigger:
  51. wait 3 ticks
  52. open chest with 6 rows named " &5&lAukcje" to player
  53. format slot 0 of player with {aukcja::0} to close then run [run player command "/aukcjekup 0" as op]
  54. format slot 1 of player with {aukcja::1} to close then run [run player command "/aukcjekup 1" as op]
  55. format slot 2 of player with {aukcja::2} to close then run [run player command "/aukcjekup 2" as op]
  56. format slot 3 of player with {aukcja::3} to close then run [run player command "/aukcjekup 3" as op]
  57. format slot 4 of player with {aukcja::4} to close then run [run player command "/aukcjekup 4" as op]
  58. format slot 5 of player with {aukcja::5} to close then run [run player command "/aukcjekup 5" as op]
  59. format slot 6 of player with {aukcja::6} to close then run [run player command "/aukcjekup 6" as op]
  60. format slot 7 of player with {aukcja::7} to close then run [run player command "/aukcjekup 7" as op]
  61. format slot 8 of player with {aukcja::8} to close then run [run player command "/aukcjekup 8" as op]
  62. format slot 9 of player with {aukcja::9} to close then run [run player command "/aukcjekup 9" as op]
  63. format slot 10 of player with {aukcja::10} to close then run [run player command "/aukcjekup 10" as op]
  64. format slot 11 of player with {aukcja::11} to close then run [run player command "/aukcjekup 11" as op]
  65. format slot 12 of player with {aukcja::12} to close then run [run player command "/aukcjekup 12" as op]
  66. format slot 13 of player with {aukcja::13} to close then run [run player command "/aukcjekup 13" as op]
  67. format slot 14 of player with {aukcja::14} to close then run [run player command "/aukcjekup 14" as op]
  68. format slot 15 of player with {aukcja::15} to close then run [run player command "/aukcjekup 15" as op]
  69. format slot 16 of player with {aukcja::16} to close then run [run player command "/aukcjekup 16" as op]
  70. format slot 17 of player with {aukcja::17} to close then run [run player command "/aukcjekup 17" as op]
  71. format slot 18 of player with {aukcja::18} to close then run [run player command "/aukcjekup 18" as op]
  72. format slot 19 of player with {aukcja::19} to close then run [run player command "/aukcjekup 19" as op]
  73. format slot 20 of player with {aukcja::20} to close then run [run player command "/aukcjekup 20" as op]
  74. format slot 21 of player with {aukcja::21} to close then run [run player command "/aukcjekup 21" as op]
  75. format slot 22 of player with {aukcja::22} to close then run [run player command "/aukcjekup 22" as op]
  76. format slot 23 of player with {aukcja::23} to close then run [run player command "/aukcjekup 23" as op]
  77. format slot 24 of player with {aukcja::24} to close then run [run player command "/aukcjekup 24" as op]
  78. format slot 25 of player with {aukcja::25} to close then run [run player command "/aukcjekup 25" as op]
  79. format slot 26 of player with {aukcja::26} to close then run [run player command "/aukcjekup 26" as op]
  80. format slot 27 of player with {aukcja::27} to close then run [run player command "/aukcjekup 27" as op]
  81. format slot 28 of player with {aukcja::28} to close then run [run player command "/aukcjekup 28" as op]
  82. format slot 29 of player with {aukcja::29} to close then run [run player command "/aukcjekup 29" as op]
  83. format slot 30 of player with {aukcja::30} to close then run [run player command "/aukcjekup 30" as op]
  84. format slot 31 of player with {aukcja::31} to close then run [run player command "/aukcjekup 31" as op]
  85. format slot 32 of player with {aukcja::32} to close then run [run player command "/aukcjekup 32" as op]
  86. format slot 33 of player with {aukcja::33} to close then run [run player command "/aukcjekup 33" as op]
  87. format slot 34 of player with {aukcja::34} to close then run [run player command "/aukcjekup 34" as op]
  88. format slot 35 of player with {aukcja::35} to close then run [run player command "/aukcjekup 35" as op]
  89.  
  90. format slot 45 of player with glowing bars named "&4&l " with lore " " to be unstealable
  91. format slot 46 of player with glowing bars named "&4&l " with lore " " to be unstealable
  92. format slot 47 of player with glowing bars named "&4&l " with lore " " to be unstealable
  93. format slot 48 of player with glowing bars named "&4&l " with lore " " to be unstealable
  94. format slot 49 of player with gold block named "&2&lStan punktow" with lore "&7Masz &a%{aukcjapunkty::%player%}% &7punktow" to be unstealable
  95. format slot 50 of player with glowing bars named "&4&l " with lore " " to be unstealable
  96. format slot 51 of player with glowing bars named "&4&l " with lore " " to be unstealable
  97. format slot 52 of player with glowing bars named "&4&l " with lore " " to be unstealable
  98. format slot 44 of player with light green dye named "&a&lNastepna strona " with lore "&7Kliknij aby przejsc do nastepnej strony " to be unstealable
  99. format slot 53 of player with barrier named "&4&lWyjdz" with lore "||&7&lKliknij aby wylaczyc to okienko" to close
  100. every 1 minute:
  101. remove 1 from {aukcja::0.delay}
  102. set line 8 of lore of {aukcja::0} to "&eWygasa za: &c&l%{aukcja::0.delay}% min"
  103. if {aukcja::0.delay} is equal to 1:
  104. send "&c&lZostala 1 minuta do konca twojej aukcji!" to {aukcja::0.wlasciciel}
  105. send "&c&lUpewnij sie ze masz miejsce w eq!" to {aukcja::0.wlasciciel}
  106. if {aukcja::0.delay} is equal to 0:
  107. set lore of {aukcja::0} to {aukcja::0.lore}
  108. give {aukcja::0} to {aukcja::0.wlasciciel}
  109. delete {aukcja::limit.%{aukcja::0.wlasciciel}%}
  110. send "&6&lAukcja sie skonczyla lecz nikt nie kupil przedmiotu" to {aukcja::0.wlasciciel}
  111. set {aukcja::0} to false
  112. loop 40 times:
  113. remove 1 from {aukcja::%loop-number%.delay}
  114. set line 8 of lore of {aukcja::%loop-number%} to "&eWygasa za: &c&l%{aukcja::%loop-number%.delay}% min"
  115. if {aukcja::%loop-number%.delay} is equal to 1:
  116. send "&c&lZostala 1 minuta do konca twojej aukcji!" to {aukcja::%loop-number%.wlasciciel}
  117. send "&c&lUpewnij sie ze masz miejsce w eq!" to {aukcja::%loop-number%.wlasciciel}
  118. if {aukcja::%loop-number%.delay} is equal to 0:
  119. set lore of {aukcja::%loop-number%} to {aukcja::%loop-number%.lore}
  120. delete {aukcja::limit.%{aukcja::%loop-number%.wlasciciel}%}
  121. give {aukcja::%loop-number%} to {aukcja::%loop-number%.wlasciciel}
  122. send "&6&lAukcja sie skonczyla lecz nikt nie kupil przedmiotu" to {aukcja::%loop-number%.wlasciciel}
  123. set {aukcja::%loop-number%} to false
  124.  
  125.  
  126. command /aukcja [<text>] [<number>]:
  127. aliases: a
  128. trigger:
  129. if arg 1 is "dodaj":
  130. if arg 2 is greater than 0:
  131. if {aukcja::limit.%player%} is not set:
  132. player is not holding air or {@itemy}:
  133. if {aukcja::0} is false:
  134. set {aukcja::0} to tool of player
  135. set {aukcja::0.%player%} to tool of player
  136. set {aukcja::0.wlasciciel} to player
  137. set {gracz} to player
  138. set {aukcja::0.lore} to lore of tool
  139. set {aukcja::limit.%player%} to true
  140. send "&7&l>> &6&lWstawiles swoj przedmiot na aukcje" to player
  141. remove {aukcja::0} from player
  142. set {aukcja::0.koszt} to arg 2
  143. set {aukcja::0.delay} to {@delay}
  144. set line 5 of lore of {aukcja::0} to "&6==========================="
  145. set line 6 of lore of {aukcja::0} to "&ePrzedmiot dodany przez &l%player%"
  146. set line 7 of lore of {aukcja::0} to "&eKoszt przedmiotu: &a&l%{aukcja::0.koszt}% punktów "
  147. set line 8 of lore of {aukcja::0} to "&eWygasa za: &c&l%{aukcja::0.delay}% min"
  148. set line 9 of lore of {aukcja::0} to "&6==========================="
  149. else:
  150. set {liczba} to 0
  151. while {aukcja::%{liczba}%} is not false:
  152. add 1 to {liczba}
  153. if {aukcja::%{liczba}%} is false:
  154. set {aukcja::%{liczba}%} to tool of player
  155. set {aukcja::%{liczba}%.%player%} to tool of player
  156. set {aukcja::%{liczba}%.wlasciciel} to player
  157. set {aukcja::%{liczba}%.lore} to lore of tool
  158. set {aukcja::limit.%player%} to true
  159. set {gracz} to player
  160. send "&7&l>> &6&lWstawiles swoj przedmiot na aukcje" to player
  161. remove {aukcja::%{liczba}%} from player
  162. set {aukcja::%{liczba}%.koszt} to arg 2
  163. set {aukcja::%{liczba}%.delay} to {@delay}
  164. set line 5 of lore of {aukcja::%{liczba}%} to "&6==========================="
  165. set line 6 of lore of {aukcja::%{liczba}%} to "&ePrzedmiot dodany przez &l%player%"
  166. set line 7 of lore of {aukcja::%{liczba}%} to "&eKoszt przedmiotu: &a&l%{aukcja::%{liczba}%.koszt}% punktów "
  167. set line 8 of lore of {aukcja::%{liczba}%} to "&eWygasa za: &c&l%{aukcja::%{liczba}%.delay}% min"
  168. set line 9 of lore of {aukcja::%{liczba}%} to "&6==========================="
  169. stop
  170. if {aukcja::35} is not false:
  171. send "&6&lNa aukcji nie ma miejsca, poczekaj chwile i sprobuj ponownie" to player
  172. stop
  173.  
  174. else:
  175. if player is holding air or {@itemy}:
  176. send "&c&lZly przedmiot!"
  177. stop
  178. else:
  179. send "&c&lLimit przedmiotow na aukcji to 1" to player
  180. stop
  181.  
  182. else:
  183. if arg 2 is less than 1:
  184. if player is not holding air or {@itemy}:
  185. send "&c&lCena musi byc wieksza niz 0"
  186. if arg 2 is not set:
  187. send "&a&l/aukcja dodaj <cena>"
  188.  
  189.  
  190.  
  191.  
  192. command /aukcjekup [<text>]:
  193. permission: aukcje.kup #niedodawac
  194. trigger:
  195. if {aukcja::0} is not false:
  196. if arg 1 is "0":
  197. wait 5 tick
  198. open chest with 3 rows named " &5&lPotwierdz swoj zakup" to player
  199. format slot 22 of player with gold block named "&6Stan twoich punktów:&l %{aukcjapunkty::%player%}%" with lore "&eKoszt przedmiotu:&l %{aukcja::0.koszt}%" to be unstealable
  200. format slot 13 of player with {aukcja::0} to be unstealable
  201. format slot 10 of player with red wool named "&c&lNIE" with lore "&cRezygnuje" to close
  202. format slot 16 of player with light green wool named "&a&lTAK" with lore "&7Czy napewno chcesz kupic||&7ten item za &a&l%{aukcja::0.koszt}% punktów?" to close then run [run player command "/kupiono 0" as op]
  203. if {aukcja::1} is not false:
  204. if arg 1 is "1":
  205. aukcjeKup(player, 1 )
  206. if {aukcja::2} is not false:
  207. if arg 1 is "2":
  208. aukcjeKup(player, 2 )
  209. if {aukcja::3} is not false:
  210. if arg 1 is "3":
  211. aukcjeKup(player, 3 )
  212. if {aukcja::4} is not false:
  213. if arg 1 is "4":
  214. aukcjeKup(player, 4 )
  215. if {aukcja::5} is not false:
  216. if arg 1 is "5":
  217. aukcjeKup(player, 5 )
  218. if {aukcja::6} is not false:
  219. if arg 1 is "6":
  220. aukcjeKup(player, 6 )
  221. if {aukcja::7} is not false:
  222. if arg 1 is "7":
  223. aukcjeKup(player, 7 )
  224. if {aukcja::8} is not false:
  225. if arg 1 is "8":
  226. aukcjeKup(player, 8 )
  227. if {aukcja::9} is not false:
  228. if arg 1 is "9":
  229. aukcjeKup(player, 9 )
  230. if {aukcja::10} is not false:
  231. if arg 1 is "10":
  232. aukcjeKup(player, 10 )
  233. if {aukcja::11} is not false:
  234. if arg 1 is "11":
  235. aukcjeKup(player, 11 )
  236. if {aukcja::12} is not false:
  237. if arg 1 is "12":
  238. aukcjeKup(player, 12 )
  239. if {aukcja::13} is not false:
  240. if arg 1 is "13":
  241. aukcjeKup(player, 13 )
  242. if {aukcja::14} is not false:
  243. if arg 1 is "14":
  244. aukcjeKup(player, 14 )
  245. if {aukcja::15} is not false:
  246. if arg 1 is "15":
  247. aukcjeKup(player, 15 )
  248. if {aukcja::16} is not false:
  249. if arg 1 is "16":
  250. aukcjeKup(player, 16 )
  251. if {aukcja::17} is not false:
  252. if arg 1 is "17":
  253. aukcjeKup(player, 17 )
  254. if {aukcja::18} is not false:
  255. if arg 1 is "18":
  256. aukcjeKup(player, 18 )
  257. if {aukcja::19} is not false:
  258. if arg 1 is "19":
  259. aukcjeKup(player, 19 )
  260. if {aukcja::20} is not false:
  261. if arg 1 is "20":
  262. aukcjeKup(player, 20 )
  263. if {aukcja::21} is not false:
  264. if arg 1 is "21":
  265. aukcjeKup(player, 21 )
  266. if {aukcja::22} is not false:
  267. if arg 1 is "22":
  268. aukcjeKup(player, 22 )
  269. if {aukcja::23} is not false:
  270. if arg 1 is "23":
  271. aukcjeKup(player, 23 )
  272. if {aukcja::24} is not false:
  273. if arg 1 is "24":
  274. aukcjeKup(player, 24 )
  275. if {aukcja::25} is not false:
  276. if arg 1 is "25":
  277. aukcjeKup(player, 25 )
  278. if {aukcja::26} is not false:
  279. if arg 1 is "26":
  280. aukcjeKup(player, 26 )
  281. if {aukcja::27} is not false:
  282. if arg 1 is "27":
  283. aukcjeKup(player, 27 )
  284. if {aukcja::28} is not false:
  285. if arg 1 is "28":
  286. aukcjeKup(player, 28 )
  287. if {aukcja::29} is not false:
  288. if arg 1 is "29":
  289. aukcjeKup(player, 29 )
  290. if {aukcja::30} is not false:
  291. if arg 1 is "30":
  292. aukcjeKup(player, 30 )
  293. if {aukcja::31} is not false:
  294. if arg 1 is "31":
  295. aukcjeKup(player, 31 )
  296. if {aukcja::32} is not false:
  297. if arg 1 is "32":
  298. aukcjeKup(player, 32 )
  299. if {aukcja::33} is not false:
  300. if arg 1 is "33":
  301. aukcjeKup(player, 33 )
  302. if {aukcja::34} is not false:
  303. if arg 1 is "34":
  304. aukcjeKup(player, 34 )
  305. if {aukcja::35} is not false:
  306. if arg 1 is "35":
  307. aukcjeKup(player, 35 )
  308.  
  309. command /kupiono [<text>]:
  310. permission: aukcje.kupiono #niedodawac
  311. trigger:
  312. if arg 1 is "0":
  313. if {aukcjapunkty::%player%} is greater than or equal to {aukcja::0.koszt}:
  314. wait 3 tick
  315. set lore of {aukcja::0} to {aukcja::0.lore}
  316. delete {aukcja::limit.%{aukcja::0.wlasciciel}%}
  317. give {aukcja::0} to the player
  318. add {aukcja::0.koszt} to {aukcjapunkty::%{aukcja::0.wlasciciel}%}
  319. send "&a&lPrzedmiot zostal sprzedany, dodano &6&l%{aukcja::0.koszt}% &a&lpunktów do konta" to {aukcja::0.wlasciciel}
  320. delete {aukcja::0.wlasciciel}
  321. remove {aukcja::0.koszt} from {aukcjapunkty::%player%}
  322. set {aukcja::0} to false
  323. send "&a&lKupiles przedmiot za &6&l%{aukcja::0.koszt}% &a&lpunktów" to player
  324. delete {aukcja::0.koszt}
  325. delete {aukcja::0.schowek}
  326. else:
  327. send "&c&lNie masz tylu punktów aby to kupic" to player
  328. if arg 1 is "1":
  329. aukcjeKupiono(player, 1 )
  330. if arg 1 is "2":
  331. aukcjeKupiono(player, 2 )
  332. if arg 1 is "3":
  333. aukcjeKupiono(player, 3 )
  334. if arg 1 is "4":
  335. aukcjeKupiono(player, 4 )
  336. if arg 1 is "5":
  337. aukcjeKupiono(player, 5 )
  338. if arg 1 is "6":
  339. aukcjeKupiono(player, 6 )
  340. if arg 1 is "7":
  341. aukcjeKupiono(player, 7 )
  342. if arg 1 is "8":
  343. aukcjeKupiono(player, 8 )
  344. if arg 1 is "9":
  345. aukcjeKupiono(player, 9 )
  346. if arg 1 is "10":
  347. aukcjeKupiono(player, 10 )
  348. if arg 1 is "11":
  349. aukcjeKupiono(player, 11 )
  350. if arg 1 is "12":
  351. aukcjeKupiono(player, 12 )
  352. if arg 1 is "13":
  353. aukcjeKupiono(player, 13 )
  354. if arg 1 is "14":
  355. aukcjeKupiono(player, 14 )
  356. if arg 1 is "15":
  357. aukcjeKupiono(player, 15 )
  358. if arg 1 is "16":
  359. aukcjeKupiono(player, 16 )
  360. if arg 1 is "17":
  361. aukcjeKupiono(player, 17 )
  362. if arg 1 is "18":
  363. aukcjeKupiono(player, 18 )
  364. if arg 1 is "19":
  365. aukcjeKupiono(player, 19 )
  366. if arg 1 is "20":
  367. aukcjeKupiono(player, 20 )
  368. if arg 1 is "21":
  369. aukcjeKupiono(player, 21 )
  370. if arg 1 is "22":
  371. aukcjeKupiono(player, 22 )
  372. if arg 1 is "23":
  373. aukcjeKupiono(player, 23 )
  374. if arg 1 is "24":
  375. aukcjeKupiono(player, 24 )
  376. if arg 1 is "25":
  377. aukcjeKupiono(player, 25 )
  378. if arg 1 is "26":
  379. aukcjeKupiono(player, 26 )
  380. if arg 1 is "27":
  381. aukcjeKupiono(player, 27 )
  382. if arg 1 is "28":
  383. aukcjeKupiono(player, 28 )
  384. if arg 1 is "29":
  385. aukcjeKupiono(player, 29 )
  386. if arg 1 is "30":
  387. aukcjeKupiono(player, 30 )
  388. if arg 1 is "31":
  389. aukcjeKupiono(player, 31 )
  390. if arg 1 is "32":
  391. aukcjeKupiono(player, 32 )
  392. if arg 1 is "33":
  393. aukcjeKupiono(player, 33 )
  394. if arg 1 is "34":
  395. aukcjeKupiono(player, 34 )
  396. if arg 1 is "35":
  397. aukcjeKupiono(player, 35 )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement