GrimoN

Untitled

Feb 22nd, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.43 KB | None | 0 0
  1. #Wersja: 1.1#
  2. #Nie usuwaj linijki wyzej, inaczej automatyczne aktualizacje nie będą działać!!
  3.  
  4. command /wystaw [<number>]:
  5. permission: aukcja.wystaw
  6. permission message: &cNie masz do tego uprawnien
  7. trigger:
  8. if arg 1 is set:
  9. if {aukcja::Status} is not set:
  10. if player's tool is not air:
  11. if {aukcja::Blacklist::Player::%player%} is not set:
  12. if {aukcja::Blacklist::Item::%type of player's tool%} is not set:
  13. if arg 1 is greater or equal to 0:
  14. set {aukcja::Cena} to arg 1
  15. set {aukcja::Item} to player's tool
  16. set {aukcja::Item::Name} to name of player's tool
  17. if {aukcja::Item::Name} is not set:
  18. set {aukcja::Item::Name} to "Brak"
  19. remove {aukcja::Item} from player
  20. set {aukcja::Sprzedajacy} to player
  21. set {aukcja::Kupujacy} to "&fBrak"
  22. set {aukcja::Status} to true
  23. broadcast "================"
  24. broadcast " &6Aukcja&f:"
  25. broadcast "&6Sprzedajacy: &2%{aukcja::Sprzedajacy}%"
  26. broadcast "&6Przedmiot: &2%{aukcja::Item}%"
  27. broadcast "&6Nazwa przedmiotu: &f%{aukcja::Item::Name}%"
  28. broadcast "&6Cena: &2%{aukcja::Cena}%"
  29. broadcast "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  30. broadcast "&6Do konca aukcji: &260 sekund"
  31. broadcast "================"
  32. wait 30 second
  33. broadcast "================"
  34. broadcast " &6Aukcja&f:"
  35. broadcast "&6Sprzedajacy: &2%{aukcja::Sprzedajacy}%"
  36. broadcast "&6Przedmiot: &2%{aukcja::Item}%"
  37. broadcast "&6Nazwa przedmiotu: &f%{aukcja::Item::Name}%"
  38. broadcast "&6Cena: &2%{aukcja::Cena}%"
  39. broadcast "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  40. broadcast "&6Do konca aukcji: &230 sekund"
  41. broadcast "================"
  42. wait 10 second
  43. broadcast "================"
  44. broadcast " &6Aukcja&f:"
  45. broadcast "&6Sprzedajacy: &2%{aukcja::Sprzedajacy}%"
  46. broadcast "&6Przedmiot: &2%{aukcja::Item}%"
  47. broadcast "&6Nazwa przedmiotu: &f%{aukcja::Item::Name}%"
  48. broadcast "&6Cena: &2%{aukcja::Cena}%"
  49. broadcast "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  50. broadcast "&6Do konca aukcji: &220 sekund"
  51. broadcast "================"
  52. wait 10 second
  53. broadcast "================"
  54. broadcast " &6Aukcja&f:"
  55. broadcast "&6Sprzedajacy: &2%{aukcja::Sprzedajacy}%"
  56. broadcast "&6Przedmiot: &2%{aukcja::Item}%"
  57. broadcast "&6Nazwa przedmiotu: &f%{aukcja::Item::Name}%"
  58. broadcast "&6Cena: &2%{aukcja::Cena}%"
  59. broadcast "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  60. broadcast "&6Do konca aukcji: &210 sekund"
  61. broadcast "================"
  62. wait 5 second
  63. broadcast "================"
  64. broadcast "&6Aukcja konczy sie za: &25 sekund"
  65. broadcast "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  66. broadcast "================"
  67. wait 5 second
  68. broadcast "================"
  69. broadcast "&6Aukcja &4ZAKONCZONA"
  70. broadcast "&6Aukcje wygral: &2%{aukcja::Kupujacy}%"
  71. broadcast "================"
  72. if {aukcja::Kupujacy} is "&fBrak":
  73. give {aukcja::Item} to player
  74. clear {aukcja::Cena}
  75. clear {aukcja::Item}
  76. clear {aukcja::Item::Name}
  77. clear {aukcja::Sprzedajacy}
  78. set {aukcja::Status} to false
  79. wait 30 second
  80. clear {aukcja::Status}
  81. stop
  82. else:
  83. give {aukcja::Item} to {aukcja::Kupujacy}
  84. add {aukcja::Cena} to player's account
  85. remove {aukcja::Cena} from {aukcja::Kupujacy}'s account
  86. clear {aukcja::Cena}
  87. clear {aukcja::Item}
  88. clear {aukcja::Item::Name}
  89. if {aukcja::Pkt::%player%} is not set:
  90. set {aukcja::Pkt::%player%} to 0
  91. add 1 to {aukcja::Pkt::%player%}
  92. clear {aukcja::Sprzedajacy}
  93. set {aukcja::Kupujacy} to "&fBrak"
  94. set {aukcja::Status} to false
  95. wait 30 second
  96. clear {aukcja::Status}
  97. stop
  98. else:
  99. send "&cCena nie moze byc mniejsza niz 0"
  100. stop
  101. else:
  102. send "&cNie mozesz wystawic tego przedmiotu na aukcje"
  103. stop
  104. else:
  105. send "&cNie mozesz wystawiac przedmiotow na aukcje"
  106. stop
  107. else:
  108. send "&cMusisz trzymac przedmiot w rece"
  109. stop
  110. if {aukcja::Status} is false:
  111. send "&cMusisz odczekac 30 sekund od zakonczenia ostatniej aukcji"
  112. stop
  113. if {aukcja::Status} is true:
  114. send "&cAukcja juz trwa"
  115. stop
  116. else:
  117. send "&cMusisz podac cene przedmiotu"
  118. stop
  119. command /podbij [<number>]:
  120. permission: aukcja.podbij
  121. permission message: &cNie masz do tego uprawnien
  122. trigger:
  123. if {aukcja::Status} is true:
  124. if arg 1 is set:
  125. if arg 1 is greater or equal to 1:
  126. if player's balance is greater or equal to {aukcja::Cena}+arg 1:
  127. if player is {aukcja::Sprzedajacy}:
  128. send "&cNie mozesz podbic wlasnej aukcji"
  129. stop
  130. else:
  131. set {aukcja::Cena} to {aukcja::Cena}+arg 1
  132. set {aukcja::Kupujacy} to player
  133. broadcast "&2%player% &6podbija do &2%{aukcja::Cena}%"
  134. stop
  135. else:
  136. send "&cNie masz tyle kasy"
  137. stop
  138. else:
  139. send "&cNie mozesz podbic o mniej niz 1"
  140. stop
  141. if arg 1 is not set:
  142. if player's balance is greater or equal to {aukcja::Cena}+1:
  143. if player is {aukcja::Sprzedajacy}:
  144. send "&cNie mozesz podbic wlasnej aukcji"
  145. stop
  146. else:
  147. set {aukcja::Cena} to {aukcja::Cena}+1
  148. set {aukcja::Kupujacy} to player
  149. broadcast "&2%player% &6podbija do &2%{aukcja::Cena}%"
  150. stop
  151. else:
  152. send "&cNie masz tyle kasy"
  153. stop
  154. if {aukcja::Status} is false:
  155. send "&cNie trwa rzadna aukcja"
  156. stop
  157. if {aukcja::Status} is not set:
  158. send "&cNie trwa rzadna aukcja"
  159. stop
  160. command /aukcja [<text>]:
  161. permission: aukcja.info
  162. permission message: &cNie masz do tego uprawnien
  163. trigger:
  164. if arg 1 is not set:
  165. if {aukcja::Status} is true:
  166. send "&6Aukcja&f:"
  167. send "&6Sprzedajacy: &2%{aukcja::Sprzedajacy}%"
  168. send "&6Przedmiot: &2%{aukcja::Item}%"
  169. send "&6Cena: &2%{aukcja::Cena}%"
  170. send "&6Kupujacy: &2%{aukcja::Kupujacy}%"
  171. send "&6Autor: &2GrimoN"
  172. else:
  173. send "&cNie ma rzadnej aukcji"
  174. send "&6Autor: &2GrimoN"
  175. if arg 1 is "top" or "top10":
  176. set {_num} to size of {aukcja::Pkt::*}
  177. loop {_num} times:
  178. loop {aukcja::Pkt::*}:
  179. {_v.%loop-number%} is not set:
  180. set {_v.%loop-number%} to loop-value
  181. set {_n.%loop-number%} to loop-index
  182. loop-value is greater than {_v.%loop-number%}:
  183. set {_v.%loop-number%} to loop-value
  184. set {_n.%loop-number%} to loop-index
  185. remove {_v.%loop-number%} from {aukcja::Pkt::*}
  186. loop {_num} times:
  187. loop-number is less than or equal to 10:
  188. send "%loop-number%. &6%{_n.%loop-number%}% &4(&2%{_v.%loop-number%}%&4)"
  189. set {aukcja::Pkt::%{_n.%loop-number%}%} to {_v.%loop-number%}
  190. {_num} is less than 10:
  191. set {_r} to {_num}
  192. loop 10 - {_num} times:
  193. add 1 to {_r}
  194. send "%{_r}%. &fPusto"
  195. stop
  196. command /aukcjaadmin [<text>] [<text>] [<text>]:
  197. permission: aukcja.admin
  198. permission message: &cNie masz do tego uprawnien
  199. aliases: aa, aadmin, aukcjaa
  200. trigger:
  201. if arg 1 is "playerblacklist" or "pbl":
  202. if arg 2 is "add" or "dodaj":
  203. if arg 3 is set:
  204. set {_player} to arg 3 parsed as player
  205. if {aukcja::Blacklist::Player::%{_player}%} is not set:
  206. set {aukcja::Blacklist::Player::%{_player}%} to true
  207. broadcast "&4[Aukcje]&6Gracz &2%{_player}% &6zostal dodany na czarna liste."
  208. stop
  209. else:
  210. send "&cTen gracz jest juz na czarnej liscie"
  211. stop
  212. else:
  213. send "&cMusisz podac nick gracza, ktorego chcesz dodac na czarna liste"
  214. stop
  215. if arg 2 is "usun" or "remove":
  216. if arg 3 is set:
  217. set {_player} to arg 3 parsed as player
  218. if {aukcja::Blacklist::Player::%{_player}%} is true:
  219. clear {aukcja::Blacklist::Player::%{_player}%}
  220. send "&6Gracz &2%{_player}%&6 zostal usuniety z czarnej listy."
  221. stop
  222. else:
  223. send "&cTego gracza nie ma na czarnej liscie"
  224. stop
  225. else:
  226. send "&cMusisz podac nick gracza, ktorego chcesz usunac z czarnej listy"
  227. stop
  228. if arg 1 is "itemblacklist" or "ibl":
  229. if arg 2 is "add" or "dodaj":
  230. if player's tool is air:
  231. send "&cNie mozna dodac powietrza na czarna liste"
  232. stop
  233. else:
  234. set {_item} to type of player's tool
  235. if {aukcja::Blacklist::Item::%{_item}%} is not set:
  236. set {aukcja::Blacklist::Item::%{_item}%} to true
  237. send "&6Przedmiot &2%{_item}% &6zostal dodany na czarna liste"
  238. stop
  239. else:
  240. send "&cTen przedmiot jest juz dodany na czarna liste"
  241. stop
  242. if arg 2 is "usun" or "remove":
  243. if player's tool is air:
  244. send "&cNie mozna usunac powietrza z czarnej listy"
  245. stop
  246. else:
  247. set {_item} to type of player's tool
  248. if {aukcja::Blacklist::Item::%{_item}%} is true:
  249. clear {aukcja::Blacklist::Item::%{_item}%}
  250. send "&6Przedmiot &2%{_item}% &6zostal usuniety z czarnej listy"
  251. stop
  252. else:
  253. send "&cTego przedmiotu nie ma na czarnej liscie"
  254. stop
  255. on skript start:
  256. clear {aukcja::Cena}
  257. clear {aukcja::Item}
  258. clear {aukcja::Item::Name}
  259. clear {aukcja::Sprzedajacy}
  260. set {aukcja::Kupujacy} to "&fBrak"
  261. clear {aukcja::Status}
  262.  
  263. on skript stop:
  264. clear {aukcja::Cena}
  265. clear {aukcja::Item}
  266. clear {aukcja::Item::Name}
  267. clear {aukcja::Sprzedajacy}
  268. set {aukcja::Kupujacy} to "&fBrak"
  269. clear {aukcja::Status}
  270.  
  271.  
  272. on load:
  273. set {_version} to content of file "plugins/Skript/scripts/%script%.sk"
  274. set {_v} to index of "##" in {_version}
  275. set {_v2} to subtext of {_version} from character ({_v}+1) to character (length of {_version})
  276. set {_v3} to index of "##" in {_v2}
  277. set {version} to subtext of {_version} from character ({_v}+1) to character ({_v3})
  278. set {_version} to result of connect to "http://pastebin.com/raw.php?i=9zcFK7nu"
  279. set {_v} to index of "##" in {_version}
  280. set {_v2} to subtext of {_version} from character ({_v}+1) to character (length of {_version})
  281. set {_v3} to index of "##" in {_v2}
  282. set {version.new} to subtext of {_version} from character ({_v}+1) to character ({_v3})
  283. {version} is not {version.new}:
  284. download "http://pastebin.com/raw.php?i=9zcFK7nu" to "plugins/Skript/scripts/%script%.sk"
  285. execute console command "sk reload %script%.sk"
  286. stop
Advertisement
Add Comment
Please, Sign In to add comment