szumielxd

FileManager

Oct 6th, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.13 KB | None | 0 0
  1. command /cmdreplacer [<text>]:
  2. permission: wlasciciel
  3. trigger:
  4. arg is set:
  5. set {cmdreplacer.%player%} to arg
  6. send "&aUstawiono replacer na &b%arg%"
  7. else:
  8. delete {cmdreplacer.%player%}
  9. send "&aUsunieto replacer"
  10.  
  11. on command:
  12. if full command contains "%%*rep%%":
  13. if {cmdreplacer.%player%} is set:
  14. cancel event
  15. set {_cmd} to full command
  16. replace all "%%*rep%%" with "%{cmdreplacer.%player%}%" in {_cmd}
  17. execute player command {_cmd}
  18.  
  19.  
  20.  
  21. command /vardel <text>:
  22. permission: wlasciciel
  23. trigger:
  24. delete {%arg%}
  25. send "&aPomyslnie usunieto zmienna &e{%arg%}"
  26.  
  27.  
  28. command /varset <text> <text> <text>:
  29. permission: wlasciciel
  30. trigger:
  31. if arg 2 is "-i":
  32. set {%arg 1%} to arg 3 parsed as integer
  33. if arg 2 is "-d":
  34. set {%arg 1%} to arg 3 parsed as number
  35. if arg 2 is "-p":
  36. set {%arg 1%} to arg 3 parsed as player
  37. if arg 2 is "-s":
  38. set {%arg 1%} to arg 3
  39. send "&aPomyslnie ustawiono zmienna &e{%arg 1%}&a na &e%arg 3%"
  40.  
  41.  
  42. command /createdir <text>:
  43. permission: wlasciciel
  44. trigger:
  45. if "%player%" is "szumielxd_" or "szybkibanan" or "paniwladcaswiata":
  46. file arg 1 exists:
  47. send "&cTen folder juz istnieje"
  48. else:
  49. create dir arg 1
  50. send "&aPomyslnie utworzono folder '%arg 1%'"
  51.  
  52.  
  53. command /movedir <text> <text>:
  54. permission: wlasciciel
  55. trigger:
  56. if "%player%" is "szumielxd_" or "szybkibanan" or "paniwladcaswiata":
  57. file arg 2 is not a directory:
  58. send "&cPlik %arg 2% nie jest folderem"
  59. file arg 1 exists:
  60. if {dirmove.%player%} is true:
  61. move dir arg 1 to arg 2
  62. send "&aPomyslnie przeniesiono folder %arg 1% do lokalizacji '%arg 2%'"
  63. delete {dirmove.%player%}
  64. else:
  65. send "&6Czy napewno chcesz to zrobic?"
  66. send "&aPonownie wpisz komende aby potwierdzic"
  67. set {dirmove.%player%} to true
  68. wait 4 seconds
  69. delete {dirmove.%player%}
  70. else:
  71. send "&cNie ma takiego pliku"
  72.  
  73. command /fsetln <text> <integer> <text>:
  74. permission: wlasciciel
  75. trigger:
  76. if "%player%" is "szumielxd_" or "szybkibanan" or "paniwladcaswiata":
  77. file arg 1 exists:
  78. if line count of file arg 1 is smaller than arg 2:
  79. send "&cTen plik ma tylko %line count of file arg 1% linijek"
  80. stop
  81. if {lnreplace.%player%} is true:
  82. set {_a} to arg 3
  83. replace all "\\" in {_a} with " "
  84. set file arg 1's line arg 2 to {_a}
  85. send "&aPomyslnie ustawiono %arg 2% linijke pliku %arg 1% na '%{_a}%'"
  86. delete {lnreplace.%player%}
  87. else:
  88. send "&6Czy napewno chcesz zastapic %arg 2% linijke &c'%file arg 1's line arg 2%' &6linijka '%{_a}%'&6?"
  89. send "&aPonownie wpisz komende aby potwierdzic"
  90. set {lnreplace.%player%} to true
  91. wait 4 seconds
  92. delete {lnreplace.%player%}
  93. else:
  94. send "&cNie ma takiego pliku"
  95.  
  96.  
  97. on join:
  98. delete {fdelete.%player%}
  99. delete {ddelete.%player%}
  100. delete {fdownload.%player%}
  101. delete {lnreplace.%player%}
  102. delete {dirmove.%player%}
  103.  
  104. command /unzip <text> <text>:
  105. permission: wlasciciel
  106. trigger:
  107. file arg 1 exists:
  108. dir arg 2 does not exist:
  109. unzip arg 1 to dir arg 2
  110. send "&aWypakowano plik&b %arg 1% &ado folderu &b%arg 2%"
  111. else:
  112. send "&cFolder %arg 2% juz istnieje"
  113. else:
  114. send "&cNie ma takiego pliku"
  115.  
  116.  
  117. command /fzip <text>:
  118. permission: wlasciciel
  119. trigger:
  120. set {_s::*} to files in zip arg 1
  121. send "&5Znaleziono %size of {_s::*}% plikow:"
  122. loop {_s::*}:
  123. add 1 to {_l}
  124. send "&d%{_l}%. &b%loop-value%"
  125. wait 1 tick
  126.  
  127. command /files [<text>]:
  128. permission: wlasciciel
  129. trigger:
  130. arg 1 is set:
  131. file arg 1 exists:
  132. file arg 1 is a directory:
  133. set {_s::*} to files in dir arg 1
  134. set {_s::*} to sorted {_s::*}
  135. send "&5Znaleziono %size of {_s::*}% plikow w folderze %arg 1%:"
  136. loop {_s::*}:
  137. add 1 to {_l}
  138. file loop-value is a directory:
  139. send "&d%{_l}%. &6%name of file loop-value%"
  140. else:
  141. set {_loop} to loop-value
  142. replace all "%complete path of """"%/" with "" in {_loop}
  143. send "&d%{_l}%. &b%{_loop}%"
  144. wait 1 tick
  145. else:
  146. send "&cTo nie jest folder"
  147. else:
  148. send "&cPlik %arg 1% nie istnieje"
  149. else:
  150. set {_s::*} to files in dir ""
  151. send "&5Znaleziono %size of {_s::*}% plikow w glownym folderze:"
  152. set {_l} to 1
  153. loop {_s::*}:
  154. add 1 to {_l}
  155. file loop-value is a directory:
  156. send "&d%{_l}%. &6%name of file loop-value%"
  157. else:
  158. set {_loop} to loop-value
  159. replace all "%complete path of """"%/" with "" in {_loop}
  160. send "&d%{_l}%. &b%{_loop}%"
  161. wait 1 tick
  162.  
  163.  
  164. command /fdl <text> <text>:
  165. permission: wlasciciel
  166. trigger:
  167. if {fdownload.%player%} is set:
  168. delete file arg 2
  169. download file from arg 1 to file arg 2
  170. send "&aPobrano zawartosc strony &b%arg 1% &ado pliku &b%arg 2%"
  171. delete {fdownload.%player%}
  172. stop
  173. if file arg 2 exists:
  174. send "&cJuz istnieje taki plik. ponownie wpisz komende, aby potwierdzic zastapienie"
  175. set {fdownload.%player%} to true
  176. stop
  177. download file from arg 1 to file arg 2
  178. send "&aPobrano zawartosc strony &b%arg 1% &ado pliku &b%arg 2%"
  179.  
  180.  
  181. command /fcopy <text> <text>:
  182. permission: wlasciciel
  183. trigger:
  184. file arg 1 exists:
  185. copy file arg 1 to arg 2
  186. send "&aPomyslnie skopiowano plik %arg 1% do folderu %arg 2%"
  187. else:
  188. send "&cPlik %arg 1% nie istnieje"
  189.  
  190.  
  191. command /frename <text> <text>:
  192. permission: wlasciciel
  193. trigger:
  194. file arg 1 exists:
  195. rename file arg 1 to arg 2
  196. send "&aPomyslnie zmieniono nazwe pliku '%arg 1%' na '%arg 2%'"
  197. else:
  198. send "&cPlik %arg 1% nie istnieje"
  199.  
  200.  
  201. command /finfo <text>:
  202. permission: wlasciciel
  203. trigger:
  204. if file arg 1 exists:
  205. set {_u} to file arg 1's creation value
  206. set {_o} to file arg 1's last access value
  207. set {_m} to file arg 1's last modified value
  208. set {_u} to convert unix {_u} to date formatted as "dd.MM.YYYY HH:mm"
  209. set {_m} to convert unix {_m} to date formatted as "dd.MM.YYYY HH:mm"
  210. set {_o} to convert unix {_o} to date formatted as "dd.MM.YYYY HH:mm"
  211. send "&5---------// Wlasciwosci %name of file arg 1% \\---------"
  212. send " &b- rozmiar: &d%size of file arg 1%"
  213. send " &b- rozszerzenie: &d%extension of file arg 1%"
  214. send " &b- utworzony: &d%{_u}%"
  215. send " &b- modyfikowany: &d%{_m}%"
  216. send " &b- otwarty: &d%{_o}%"
  217. send " &b- linijek: &d%line count of file arg 1%"
  218. send " &b- wlasciciel: &d%owner of file arg 1%"
  219. send " &bPelna sciezka: &a%complete path of arg 1%"
  220. else:
  221. send "&cNie ma takiego pliku"
  222.  
  223.  
  224. command /fdel <text>:
  225. permission: wlasciciel
  226. trigger:
  227. set {_p} to convert string "%player%" to lowercase
  228. if "%player%" is "szumielxd_" or "szybkibanan" or "paniwladcaswiata":
  229. if file arg 1 exists:
  230. if file arg 1 is not a dir:
  231. if {fdelete.%player%} is set:
  232. delete {fdelete.%player%}
  233. delete file arg 1
  234. send "&aPomyslnie usunieto plik '%arg 1%'"
  235. else:
  236. set {fdelete.%player%} to true
  237. send "&cJestes pewien? masz 4 sekundy na ponowne wpisanie komendy"
  238. wait 4 seconds
  239. delete {fdelete.%player%}
  240. else:
  241. send "&cTo nie jest zwykly plik"
  242. else:
  243. send "&cNie ma takiego pliku"
  244.  
  245.  
  246. command /dirdel <text>:
  247. permission: wlasciciel
  248. trigger:
  249. set {_p} to convert string "%player%" to lowercase
  250. if {_p} is "szumielxd_" or "szybkibanan" or "paniwladcaswiata":
  251. if file arg 1 exists:
  252. if {ddelete.%player%} is set:
  253. delete {ddelete.%player%}
  254. delete dir arg 1
  255. send "&aPomyslnie usunieto folder '%arg 1%'"
  256. else:
  257. set {ddelete.%player%} to true
  258. send "&cJestes pewien? masz 4 sekundy na ponowne wpisanie komendy"
  259. wait 4 seconds
  260. delete {ddelete.%player%}
  261. else:
  262. send "&cNie ma takiego folderu"
  263.  
  264.  
  265. command /ftext <text> <integer> <integer>:
  266. permission: wlasciciel
  267. trigger:
  268. if arg 3 is smaller than 1:
  269. send "&cDrugi argument nie moze byc mniejszy od 1"
  270. stop
  271. if line count of file arg 1 is smaller than arg 3:
  272. send "&cTen plik ma tylko %line count of file arg 1% linijek"
  273. stop
  274. set {_low} to arg 2
  275. while {_low} is not bigger than arg 3:
  276. set {_s} to file arg 1's line {_low}
  277. send "&b%{_s}%"
  278. wait 5 tick
  279. add 1 to {_low}
Advertisement
Add Comment
Please, Sign In to add comment