QuacziSK

[Skript.pl] Teleporty

May 10th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.24 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  2. # Licencja #
  3. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  4. # Zabraniam: #
  5. # » Podszywania się pod autora #
  6. # » Usuwania licencji #
  7. # » Publikacji kodu #
  8. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  9. # Zezwalam: #
  10. # » Modyfikacja opcji #
  11. # » Modyfikacja kodu #
  12. # » Uzywanie skryptu na serwerze #
  13. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  14. # Autor: Quaczi #
  15. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  16.  
  17.  
  18.  
  19.  
  20. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  21. # Opcje #
  22. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  23.  
  24.  
  25.  
  26. options:
  27. time: 5 # Czas w sekundach po jakim ma teleportowac
  28. cena: 100 # Cena teleportacji w $
  29. x: 0 # Pozycja spawnu x
  30. z: 0 # Pozycja spawnu z
  31. tag: &8[&cM&4HC&8] # tag przed kazda wiadomoscia
  32. warn: &4[&c!&4] # tag przed wiadomoscia (nie korzystna)
  33. lacznik: &6>>> # Wyswietlane miedzy tagiem a wiadomoscia
  34. tpinfo: {@kolorglowny}Teleportacja za: {@kolorzaznaczenia}%{_time}% {@kolorglowny}sek # Wiadomosc o czsie do teleportacji
  35. tpprzerwane: Teleportacja przerwana&4&l! # Wiadomosc o przerwaniu teleportacji
  36. kolorglowny: &7 # Kolor jaki jest używany przed kazda wiadomoscia
  37. kolorzaznaczenia: &b # Kolor ktorym zaznaczane sa najwazniejsze informacje
  38.  
  39.  
  40.  
  41.  
  42. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  43. # System /tpa #
  44. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  45.  
  46.  
  47.  
  48. command /tpa [<player>] [<text>]:
  49. trigger:
  50. if player is "%player%":
  51. if arg 1 is set:
  52. set {_tpa} to "%player-arg%" parsed as text
  53. replace all "a" with "A" in {_tpa}
  54. replace all "b" with "B" in {_tpa}
  55. replace all "c" with "C" in {_tpa}
  56. replace all "d" with "D" in {_tpa}
  57. replace all "e" with "E" in {_tpa}
  58. replace all "f" with "F" in {_tpa}
  59. replace all "g" with "G" in {_tpa}
  60. replace all "h" with "H" in {_tpa}
  61. replace all "i" with "I" in {_tpa}
  62. replace all "j" with "J" in {_tpa}
  63. replace all "k" with "K" in {_tpa}
  64. replace all "l" with "L" in {_tpa}
  65. replace all "n" with "N" in {_tpa}
  66. replace all "m" with "M" in {_tpa}
  67. replace all "o" with "O" in {_tpa}
  68. replace all "p" with "P" in {_tpa}
  69. replace all "r" with "R" in {_tpa}
  70. replace all "s" with "S" in {_tpa}
  71. replace all "t" with "T" in {_tpa}
  72. replace all "u" with "U" in {_tpa}
  73. replace all "v" with "V" in {_tpa}
  74. replace all "w" with "W" in {_tpa}
  75. replace all "x" with "X" in {_tpa}
  76. replace all "y" with "Y" in {_tpa}
  77. replace all "z" with "Z" in {_tpa}
  78. set {_tepa} to "%player%" parsed as text
  79. replace all "a" with "A" in {_tepa}
  80. replace all "b" with "B" in {_tepa}
  81. replace all "c" with "C" in {_tepa}
  82. replace all "d" with "D" in {_tepa}
  83. replace all "e" with "E" in {_tepa}
  84. replace all "f" with "F" in {_tepa}
  85. replace all "g" with "G" in {_tepa}
  86. replace all "h" with "H" in {_tepa}
  87. replace all "i" with "I" in {_tepa}
  88. replace all "j" with "J" in {_tepa}
  89. replace all "k" with "K" in {_tepa}
  90. replace all "l" with "L" in {_tepa}
  91. replace all "n" with "N" in {_tepa}
  92. replace all "m" with "M" in {_tepa}
  93. replace all "o" with "O" in {_tepa}
  94. replace all "p" with "P" in {_tepa}
  95. replace all "r" with "R" in {_tepa}
  96. replace all "s" with "S" in {_tepa}
  97. replace all "t" with "T" in {_tepa}
  98. replace all "u" with "U" in {_tepa}
  99. replace all "v" with "V" in {_tepa}
  100. replace all "w" with "W" in {_tepa}
  101. replace all "x" with "X" in {_tepa}
  102. replace all "y" with "Y" in {_tepa}
  103. replace all "z" with "Z" in {_tepa}
  104. if arg 1 is not set:
  105. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Musisz podac nick gracza&4&l!"
  106. if arg 1 is set:
  107. if arg 2 is not set:
  108. set {tpa.%player-arg%.%player%} to true
  109. send "{@tag} {@lacznik} {@kolorglowny} Wyslales prosbe o teleportacje do {@kolorzaznaczenia}%{_tpa}%" to player
  110. send "{@tag} {@lacznik} {@kolorglowny} Gracz {@kolorzaznaczenia}%{_tepa}% {@kolorglowny}prosi o teleportacje do Ciebie" to player-arg
  111. send "{@tag} {@lacznik} {@kolorglowny} Wpisz {@kolorzaznaczenia}/tpa %player% akceptuj {@kolorglowny}aby zaakceptowac teleportacje" to player-arg
  112. send "{@tag} {@lacznik} {@kolorglowny} Wpisz {@kolorzaznaczenia}/tpa %player% odrzuc {@kolorglowny}aby odrzucic teleportacje" to player-arg
  113. if arg 2 is "akceptuj":
  114. if {tpa.%player%.%player-arg%} is not true:
  115. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Nie masz prosby od tego gracza&4&l!" to player
  116. if {tpa.%player%.%player-arg%} is true:
  117. send "{@tag} {@lacznik} {@kolorglowny} Gracz {@kolorzaznaczenia} %{_tepa}% {@kolorglowny} zaakceptowal twoja prosbe" to player-arg
  118. send "{@tag} {@lacznik} {@kolorglowny} Zaakceptowales prosbe teleportacji od gracza{@kolorzaznaczenia} %{_tpa}%" to player
  119. if player's balance is bigger or equal to {@cena}:
  120. remove {@cena} from player's balance
  121. set {_posx} to x-location of player-arg
  122. set {_posz} to z-location of player-arg
  123. set {_posy} to y-location of player-arg
  124. set {_time} to {@time}
  125. apply nausea to player-arg for 7 seconds
  126. send "{@tag} {@lacznik} {@tpinfo}" to player-arg
  127. wait 1 second
  128. loop {@time} times:
  129. difference between x-location of player-arg and {_posx} is bigger than 0.5:
  130. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}" to player-arg
  131. add {@cena} to player's balance
  132. remove nausea from the player
  133. stop
  134. difference between z-location of player-arg and {_posz} is bigger than 0.5:
  135. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}" to player-arg
  136. add {@cena} to player's balance
  137. remove nausea from the player
  138. stop
  139. difference between y-location of player-arg and {_posy} is bigger than 0.5:
  140. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}" to player-arg
  141. add {@cena} to player's balance
  142. remove nausea from the player
  143. stop
  144. remove 1 from {_time}
  145. {_time} is 0:
  146. teleport player-arg to player
  147. remove nausea from the player
  148. send "{@tag} {@lacznik} {@kolorglowny} Teleportacja dokonana&a!" to player-arg
  149. stop
  150. send "{@tag} {@lacznik} {@tpinfo}" to player-arg
  151. set {tpa.%player%.%player-arg%} to false
  152. set {tpa.%player-arg%.%player%} to false
  153. if arg 2 is "odrzuc":
  154. if {tpa.%player%.%player-arg%} is not true:
  155. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Nie masz prosby od tego gracza&4&l!" to player
  156. if {tpa.%player%.%player-arg%} is true:
  157. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Gracz {@kolorzaznaczenia} %{_tepa}% {@kolorglowny}odrzucil twoja prosbe" to player-arg
  158. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Prosba od gracza {@kolorzaznaczenia} %{_tpa}% {@kolorglowny}zostala odrzucona" to player
  159. set {tpa.%player%.%player-arg%} to false
  160. set {tpa.%player-arg%.%player%} to false
  161.  
  162. command /tpaccept:
  163. trigger:
  164. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Uzyj {@kolorzaznaczenia} /tpa NICK akceptuj&4&l!"
  165.  
  166. command /tpdeny:
  167. trigger:
  168. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Uzyj {@kolorzaznaczenia} /tpa NICK odrzuc&4&l!"
  169.  
  170.  
  171. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  172. # Spawn #
  173. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  174.  
  175. command /spawn:
  176. trigger:
  177. if player's balance is bigger or equal to {@cena}:
  178. remove {@cena} from player's balance
  179. set {_posx} to x-location of player
  180. set {_posz} to z-location of player
  181. set {_posy} to y-location of player
  182. set {_time} to {@time}
  183. apply nausea to player for 7 seconds
  184. send "{@tag} {@lacznik} {@tpinfo}"
  185. wait 1 second
  186. loop {@time} times:
  187. difference between x-location of player and {_posx} is bigger than 0.5:
  188. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  189. add {@cena} to player's balance
  190. remove nausea from the player
  191. stop
  192. difference between z-location of player and {_posz} is bigger than 0.5:
  193. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  194. add {@cena} to player's balance
  195. remove nausea from the player
  196. stop
  197. difference between y-location of player and {_posy} is bigger than 0.5:
  198. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  199. add {@cena} to player's balance
  200. remove nausea from the player
  201. stop
  202. remove 1 from {_time}
  203. {_time} is 0:
  204. teleport player to {spawn}
  205. remove nausea from the player
  206. send "{@tag} {@lacznik} {@kolorglowny} Witaj na {@kolorzaznaczenia}SPAWN&a!"
  207. stop
  208. send "{@tag} {@lacznik} {@tpinfo}"
  209. wait 1 second
  210. send "{@kolorglowny} Aby teleportowac sie musisz miec {@kolorzaznaczenia}{@cena} zlotych."
  211.  
  212.  
  213.  
  214. command /setspawn:
  215. permission: spawn.ustaw
  216. description: Ustawiasz miejsce spawnu.
  217. trigger:
  218. set {spawn} to location of player
  219. send "{@tag} {@lacznik} {@kolorglowny} Ustawiles {@kolorzaznaczenia}SPAWN!"
  220.  
  221. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  222. # Warpy #
  223. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  224.  
  225.  
  226. command /setwarp [<text>]:
  227. permission: spawn.ustaw
  228. description: Ustawiasz miejsce warpu.
  229. trigger:
  230. if arg is not set:
  231. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Musisz podac nazwa warpu&4&l!"
  232. if arg is set:
  233. if {warp.%arg%} is set:
  234. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Jest juz taki warp&4&l!"
  235. if {warp.%arg%} is not set:
  236. if {warpy} is set:
  237. set {warpy} to "%{warpy}% %arg%"
  238. if {warpy} is not set:
  239. set {warpy} to "%arg%"
  240. add 1 to {warpyilosc}
  241. set {warp.%arg%} to player's location
  242. set {_w} to arg parsed as text
  243. replace all "a" with "A" in {_w}
  244. replace all "b" with "B" in {_w}
  245. replace all "c" with "C" in {_w}
  246. replace all "d" with "D" in {_w}
  247. replace all "e" with "E" in {_w}
  248. replace all "f" with "F" in {_w}
  249. replace all "g" with "G" in {_w}
  250. replace all "h" with "H" in {_w}
  251. replace all "i" with "I" in {_w}
  252. replace all "j" with "J" in {_w}
  253. replace all "k" with "K" in {_w}
  254. replace all "l" with "L" in {_w}
  255. replace all "n" with "N" in {_w}
  256. replace all "m" with "M" in {_w}
  257. replace all "o" with "O" in {_w}
  258. replace all "p" with "P" in {_w}
  259. replace all "r" with "R" in {_w}
  260. replace all "s" with "S" in {_w}
  261. replace all "t" with "T" in {_w}
  262. replace all "u" with "U" in {_w}
  263. replace all "v" with "V" in {_w}
  264. replace all "w" with "W" in {_w}
  265. replace all "x" with "X" in {_w}
  266. replace all "y" with "Y" in {_w}
  267. replace all "z" with "Z" in {_w}
  268. send "{@tag} {@lacznik} {@kolorglowny} Ustawiles warp {@kolorzaznaczenia}%{_w}%&a."
  269. wait a second
  270.  
  271.  
  272. command /warpyusun:
  273. permission: warpy.admin
  274. trigger:
  275. delete {warpy}
  276. delete {warpyilosc}
  277. send "{@tag} {@lacznik} {@kolorglowny} Usunieto {@kolorzaznaczenia}WSZYSTKIE {@kolorglowny}warpy&a."
  278.  
  279. command /warpusun [<text>]:
  280. permission: warpy.admin
  281. trigger:
  282. if arg is not set:
  283. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Podaj warp do usuniecia&4&l!"
  284. if arg is set:
  285. if {warp.%arg%} is not set:
  286. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Nie ma takiego warpu&4&l!"
  287. if {warp.%arg%} is set:
  288. set {_w} to arg parsed as text
  289. replace all "a" with "A" in {_w}
  290. replace all "b" with "B" in {_w}
  291. replace all "c" with "C" in {_w}
  292. replace all "d" with "D" in {_w}
  293. replace all "e" with "E" in {_w}
  294. replace all "f" with "F" in {_w}
  295. replace all "g" with "G" in {_w}
  296. replace all "h" with "H" in {_w}
  297. replace all "i" with "I" in {_w}
  298. replace all "j" with "J" in {_w}
  299. replace all "k" with "K" in {_w}
  300. replace all "l" with "L" in {_w}
  301. replace all "n" with "N" in {_w}
  302. replace all "m" with "M" in {_w}
  303. replace all "o" with "O" in {_w}
  304. replace all "p" with "P" in {_w}
  305. replace all "r" with "R" in {_w}
  306. replace all "s" with "S" in {_w}
  307. replace all "t" with "T" in {_w}
  308. replace all "u" with "U" in {_w}
  309. replace all "v" with "V" in {_w}
  310. replace all "w" with "W" in {_w}
  311. replace all "x" with "X" in {_w}
  312. replace all "y" with "Y" in {_w}
  313. replace all "z" with "Z" in {_w}
  314. replace all "%{warp.%arg%}%" in {warpy} with ""
  315. delete {warp.%arg%}
  316. remove 1 from {warpyilosc}
  317. send "{@tag} {@lacznik} {@kolorglowny} Usunieto warp {@kolorzaznaczenia}%{_w}%&a."
  318.  
  319. command /warps:
  320. trigger:
  321. execute player command "/warpy"
  322.  
  323. command /warpy:
  324. trigger:
  325. if {warpy} is set:
  326. set {_warpy} to "%{warpy}%"
  327. replace all " " in {_warpy} with " &a,{@kolorzaznaczenia} "
  328. send "{@kolorglowny} Warpy: {@kolorzaznaczenia}%{warpyilosc}%"
  329. send "&8## {@kolorzaznaczenia}%{_warpy}%"
  330. if {warpy} is not set:
  331. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Nie jeszcze zadnych warpow&4&l!"
  332.  
  333. command /warp [<text>]:
  334. trigger:
  335. if arg is not set:
  336. send "{@tag} {@lacznik} {@warn} {@kolorglowny} Podaj nazwe warpu&4&l!"
  337. if arg is set:
  338. if {warp.%arg%} is set:
  339. set {_w} to arg parsed as text
  340. replace all "a" with "A" in {_w}
  341. replace all "b" with "B" in {_w}
  342. replace all "c" with "C" in {_w}
  343. replace all "d" with "D" in {_w}
  344. replace all "e" with "E" in {_w}
  345. replace all "f" with "F" in {_w}
  346. replace all "g" with "G" in {_w}
  347. replace all "h" with "H" in {_w}
  348. replace all "i" with "I" in {_w}
  349. replace all "j" with "J" in {_w}
  350. replace all "k" with "K" in {_w}
  351. replace all "l" with "L" in {_w}
  352. replace all "n" with "N" in {_w}
  353. replace all "m" with "M" in {_w}
  354. replace all "o" with "O" in {_w}
  355. replace all "p" with "P" in {_w}
  356. replace all "r" with "R" in {_w}
  357. replace all "s" with "S" in {_w}
  358. replace all "t" with "T" in {_w}
  359. replace all "u" with "U" in {_w}
  360. replace all "v" with "V" in {_w}
  361. replace all "w" with "W" in {_w}
  362. replace all "x" with "X" in {_w}
  363. replace all "y" with "Y" in {_w}
  364. replace all "z" with "Z" in {_w}
  365. if player's balance is bigger or equal to {@cena}:
  366. remove {@cena} from player's balance
  367. set {_posx} to x-location of player
  368. set {_posz} to z-location of player
  369. set {_posy} to y-location of player
  370. set {_time} to {@time}
  371. apply nausea to player for 7 seconds
  372. send "{@tag} {@lacznik} {@tpinfo}"
  373. wait 1 second
  374. loop {@time} times:
  375. difference between x-location of player and {_posx} is bigger than 0.5:
  376. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  377. add {@cena} to player's balance
  378. remove nausea from the player
  379. stop
  380. difference between z-location of player and {_posz} is bigger than 0.5:
  381. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  382. add {@cena} to player's balance
  383. remove nausea from the player
  384. stop
  385. difference between y-location of player and {_posy} is bigger than 0.5:
  386. send "{@tag} {@lacznik} {@warn} {@tpprzerwane}"
  387. add {@cena} to player's balance
  388. remove nausea from the player
  389. stop
  390. remove 1 from {_time}
  391. {_time} is 0:
  392. teleport player to {warp.%arg%}
  393. remove nausea from the player
  394. send "{@tag} {@lacznik} {@kolorglowny} Witaj na {@kolorzaznaczenia}%{_w}%&a!"
  395. stop
  396. send "{@tag} {@lacznik} {@tpinfo}"
  397. wait 1 second
Advertisement
Add Comment
Please, Sign In to add comment