Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.79 KB | None | 0 0
  1. options:
  2. fake: Unknown command. Type ""/help"" for help.
  3.  
  4.  
  5. # Chat
  6.  
  7. on quit:
  8. broadcast "&8[&c-&8] &7%player%"
  9. set {%player%.bomblob} to false
  10.  
  11. on chat:
  12. cancel event
  13. if {mute::%player's uuid%::mute} is true:
  14. if {mute::%player's uuid%::span} is greater than 0 seconds:
  15. set {_diff} to difference between now and {mute::%player's uuid%::stamp}
  16. if {_diff} >= {mute::%player's uuid%::span}:
  17. set {mute::%player's uuid%::span} to 0 seconds
  18. set {mute::%player's uuid%::mute} to false
  19. set {mute::%player's uuid%::stamp} to 0 seconds
  20. else:
  21. set {_wait} to difference between {mute::%player's uuid%::span} and {_diff}
  22. send ""
  23. send "&7You are &cmuted &7for &e%{mute::%player's uuid%::msg}%"
  24. send "&7You may speak in &e%{_wait}%"
  25. send ""
  26. stop
  27. else:
  28. if {mute::%player's uuid%::msg} is false:
  29. send "&7You are &cmuted! &7You cannot speak."
  30. else:
  31. send "&7You are &cmuted &7for &e%{mute::%player's uuid%::msg}%"
  32. stop
  33. if {%player%.sc} is true:
  34. if {%player%.rank} is "default":
  35. set {%player%.sc} to false
  36. else:
  37. sendStaffMsg(player, message)
  38. stop
  39. set message to coloured message
  40. if {%player%.rank} is "default":
  41. broadcast "&8[&7%{%player%.level}%&8] &7%player%&7: %message%"
  42. stop
  43. if {%player%.rank} is "admin":
  44. broadcast "&8[&7%{%player%.level}%&8] &4[ADMIN] &c%player%&f: %message%"
  45. stop
  46. if {%player%.rank} is "owner":
  47. broadcast "&8[&7%{%player%.level}%&8] &4[OWNER] &c%player%&f: %message%"
  48. stop
  49. if {%player%.rank} is "dev":
  50. broadcast "&8[&7%{%player%.level}%&8] &2[DEV] &a%player%&f: %message%"
  51. stop
  52. if {%player%.rank} is "builder":
  53. broadcast "&8[&7%{%player%.level}%&8] &5[BUILDER] &d%player%&f: %message%"
  54. stop
  55. if {%player%.rank} is "mod":
  56. broadcast "&8[&7%{%player%.level}%&8] &6[MOD] &e%player%&f: %message%"
  57. stop
  58. if {%player%.rank} is "god":
  59. broadcast "&8[&7%{%player%.level}%&8] &3[GOD] &b%player%&f: %message%"
  60. stop
  61.  
  62. # Load
  63.  
  64. on load:
  65. delete {ranks::*}
  66. add "admin" to {ranks::*}
  67. add "owner" to {ranks::*}
  68. add "dev" to {ranks::*}
  69. add "builder" to {ranks::*}
  70. add "default" to {ranks::*}
  71. add "mod" to {ranks::*}
  72. add "god" to {ranks::*}
  73.  
  74. delete {staffranks::*}
  75. add "admin" to {staffranks::*}
  76. add "owner" to {staffranks::*}
  77. add "dev" to {staffranks::*}
  78. add "builder" to {staffranks::*}
  79. add "mod" to {staffranks::*}
  80.  
  81. loop all players:
  82. if {%loop-player%.rank} is not set:
  83. set {%loop-player%.rank} to "default"
  84. if {%loop-player%.level} is not set:
  85. set {%loop-player%.level} to 0
  86.  
  87. # Join
  88.  
  89. on join:
  90. broadcast "&8[&a+&8] &7%player%"
  91. if {%player%.rank} is not set:
  92. set {%player%.rank} to "default"
  93. if {%player%.level} is not set:
  94. set {%player%.level} to 0
  95. set {%player%.bomblob} to false
  96.  
  97. on connect:
  98. if {tempban::%player's uuid%::ban} is true:
  99. set {_diff} to difference between now and {tempban::%player's uuid%::stamp}
  100. set {_remain} to difference between {tempban::%player's uuid%::span} and {_diff}
  101. if {_diff} < {tempban::%player's uuid%::span}:
  102. kick the player due to "%{tempban::%player's uuid%::msg}% &8| &7Punishment expires in %{_remain}%"
  103. else:
  104. set {tempban::%player's uuid%::ban} to false
  105. set {tempban::%player's uuid%::msg} to ""
  106. set {tempban::%player's uuid%::span} to 0 seconds
  107. set {tempban::%player's uuid%::stamp} to 0 seconds
  108.  
  109. function updateStaff():
  110. delete {staff::*}
  111. loop all players:
  112. if {staffranks::*} contains {%loop-player%.rank}:
  113. add loop-player to {staff::*}
  114.  
  115. function sendStaffMsg(p: player, m: text):
  116. loop {staff::*}:
  117. message "&8[&6Staff&8] &e%{_p}%&f: %{_m}%" to loop-value
  118.  
  119.  
  120.  
  121. command /id:
  122. permission: staff.id
  123. permission message: {@fake}
  124. description: Find the ID of the item you're holding
  125. trigger:
  126. message "&aYou're holding a &e%type of tool% &awhose ID is &e%id of tool%."
  127.  
  128. command /ranks:
  129. permission: staff.ranks
  130. permission message: {@fake}
  131. trigger:
  132. send "&6Ranks: &e%{ranks::*}%"
  133.  
  134.  
  135. command /staff [<text>]:
  136. trigger:
  137. updateStaff()
  138. set {_fail} to false
  139. if size of {staff::*} is 0:
  140. set {_fail} to true
  141. if {vanishAll} is true:
  142. set {_fail} to true
  143. if {_fail} is true:
  144. send "&aNo staff online."
  145. stop
  146. send "&2Staff online: &a%{staff::*}%"
  147. if arg-1 is "help":
  148. if {staff::*} contains player:
  149. send ""
  150. send "&e/ranks &8- &7Available ranks."
  151. send "&e/rank &8- &7Set a player's rank."
  152. send "&e/sc &8- &7Enable staff chat."
  153. send "&e/fs &8- &7Force start a game."
  154. send ""
  155.  
  156. command /rank [<offline player>] [<text>]:
  157. permission: op
  158. permission message: {@fake}
  159. trigger:
  160. if arg-1 is not set:
  161. send "&c/rank <player> <rank>"
  162. else:
  163. if arg-2 is not set:
  164. send "&7%arg-1%'s &arank is %{%arg-1%.rank}%"
  165. else:
  166. if {ranks::*} contains arg-2:
  167. set {%arg-1%.rank} to arg-2
  168. send "&7Set &c%arg-1%'s &7rank to &c%arg-2%"
  169. updateStaff()
  170. send "&7Your rank is now &c%arg-2%." to arg-1
  171. if {staffranks::*} contains arg-2:
  172. loop {staff::*}:
  173. send "" to loop-value
  174. send "&6Staff Update! > &e%arg-1% &7is now &e%arg-2%!" to loop-value
  175. send "" to loop-value
  176. else:
  177. send "&cInvalid rank. Try /ranks."
  178.  
  179. command /staffchat [<text>]:
  180. aliases: /sc
  181. trigger:
  182. updateStaff()
  183. if {staff::*} contains player:
  184. if arg-1 is not set:
  185. if {%player%.sc} is not set:
  186. send "&aEnabled &eStaff chat"
  187. set {%player%.sc} to true
  188. stop
  189. if {%player%.sc} is false:
  190. send "&aEnabled &eStaff chat"
  191. set {%player%.sc} to true
  192. stop
  193. set {%player%.sc} to false
  194. send "&cDisabled &eStaff chat"
  195. stop
  196. sendStaffMsg(player, arg-1)
  197. else:
  198. send "{@fake}"
  199.  
  200.  
  201. # ###############
  202. # Miscellaneous #
  203. # ###############
  204.  
  205. command /buy:
  206. trigger:
  207. send ""
  208. send "&6<link:http://kaboom4v4.buycraft.net>Click here<reset> &eto view our Buycraft"
  209. send ""
  210.  
  211. command /tphere [<offline player>]:
  212. permission: staff.tphere
  213. permission message: {@fake}
  214. trigger:
  215. if arg-1 is set:
  216. if arg-1 is online:
  217. teleport arg-1 to player
  218. send "&eTeleporting..."
  219. else:
  220. send "&c%arg-1% is offline."
  221. else:
  222. send "&c/tphere (player)"
  223.  
  224. command /tpall:
  225. permission: staff.tpall
  226. permission message: {@fake}
  227. trigger:
  228. teleport all players to player
  229. send "&eTeleported all players."
  230.  
  231. command /feed [<offline player>]:
  232. permission: staff.feed
  233. permission message: {@fake}
  234. trigger:
  235. if arg-1 is set:
  236. if arg-1 is online:
  237. set {_feed} to arg-1
  238. else:
  239. send "&c%arg-1% is offline."
  240. stop
  241. else:
  242. set {_feed} to player
  243. set the food level of {_feed} to 10
  244. send "&6Fed &e%{_feed}%."
  245.  
  246. command /speed [<number>] [<text>]:
  247. executable by: players
  248. permission: staff.speed
  249. permission message: {@fake}
  250. trigger:
  251. if arg-1 is not set:
  252. send "&c/speed <number> [fly / walk]"
  253. stop
  254. else:
  255. set {_val} to arg-1
  256. set {_val} to round({_val})
  257. if {_val} > 3:
  258. set {_val} to 3
  259. if {_val} < 1:
  260. set {_val} to 1
  261. if player is flying:
  262. set {_mode} to 1
  263. else:
  264. set {_mode} to 2
  265. if arg-2 is set:
  266. if arg-2 is "fly" or "flying":
  267. set {_mode} to 1
  268. if arg-2 is "walk" or "walking":
  269. set {_mode} to 2
  270. if {_mode} is 1:
  271. if {_val} is 1:
  272. set the player's fly speed to 0.1
  273. if {_val} is 2:
  274. set the player's fly speed to 2
  275. if {_val} is 3:
  276. set the player's fly speed to 3
  277. send "&eSet flying speed to &6%{_val}%"
  278. stop
  279. if {_mode} is 2:
  280. if {_val} is 1:
  281. set the player's walk speed to 0.2
  282. if {_val} is 2:
  283. set the player's walk speed to 2
  284. if {_val} is 3:
  285. set the player's walk speed to 3
  286. send "&eSet walking speed to &6%{_val}%"
  287.  
  288. command /help:
  289. trigger:
  290. send ""
  291. send "&6Kaboom &8- &e4v4"
  292. send "&e/buy &8- &7View our &eBuycraft"
  293. send ""
  294.  
  295. command /?:
  296. trigger:
  297. make player execute "/help"
  298.  
  299.  
  300.  
  301.  
  302.  
  303. # ##############
  304. # Punishments #
  305. # ##############
  306.  
  307. command /mute [<offline player>] [<text>] [@ <timespan>]:
  308. permission: staff.mute
  309. permission message: {@fake}
  310. trigger:
  311. if arg-1 is set:
  312. if arg-1 is online:
  313. set {_minspan} to 1 second
  314. set {_zerospan} to 0 seconds
  315. set {_uuid} to uuid of arg-1
  316. if arg-2 is set:
  317. set {_reason} to arg-2
  318. set {_reason} to colored {_reason}
  319. if arg-3 is set:
  320. if arg-3 >= {_minspan}:
  321. set {mute::%{_uuid}%::span} to arg-3
  322. set {mute::%{_uuid}%::mute} to true
  323. set {mute::%{_uuid}%::stamp} to now
  324. set {mute::%{_uuid}%::msg} to {_reason}
  325. send "&7You have been &cmuted &7for &e%arg-2% &7[&e%arg-3%&7]" to arg-1
  326. broadcast "&b%player% &7muted &b%arg-1% &7for &e%arg-2% &7[&e%arg-3%&7]"
  327. else:
  328. if arg-3 = {_zerospan}:
  329. make player execute "/unmute %arg-1%"
  330. else:
  331. send "&cYour mute span should be at least 1 second."
  332. else:
  333. if arg-2 is set:
  334. if {mute::%{_uuid}%::mute} is not set:
  335. set {mute::%{_uuid}%::mute} to false
  336. send "&7Muted &e%arg-1% &7for &e%{_reason}% &7(FOREVER)"
  337. set {mute::%{_uuid}%::span} to {_zerospan}
  338. set {mute::%{_uuid}%::mute} to true
  339. set {mute::%{_uuid}%::stamp} to now
  340. set {mute::%{_uuid}%::msg} to {_reason}
  341. broadcast "&b%player% &7muted &b%arg-1% &7for &e%{_reason}% &7[&7FOREVER&7]"
  342. send "&7You have been &cmuted &7for &e%{_reason}%" to arg-1
  343. else:
  344. if {mute::%{_uuid}%::mute} is not set:
  345. set {mute::%{_uuid}%::mute} to false
  346. if {mute::%{_uuid}%::mute} is false:
  347. send "&7Muted &e%arg-1% &7forever."
  348. set {mute::%{_uuid}%::span} to {_zerospan}
  349. set {mute::%{_uuid}%::mute} to true
  350. set {mute::%{_uuid}%::stamp} to now
  351. set {mute::%{_uuid}%::msg} to false
  352. broadcast "&b%player% &7muted &b%arg-1% &7[&7FOREVER&7]"
  353. send "&7You have been &cmuted." to arg-1
  354. else:
  355. make player execute "/unmute %arg-1%"
  356. else:
  357. send "&cPlayer is not online."
  358. else:
  359. send "&c/mute (player) [reason] @ [timespan]"
  360.  
  361.  
  362. command /unmute [<offline player>]:
  363. permission: staff.unmute
  364. permission message: {@fake}
  365. trigger:
  366. if arg-1 is set:
  367. if arg-1 is online:
  368. set {_uuid} to uuid of arg-1
  369. if {mute::%{_uuid}%::mute} is not set:
  370. set {mute::%{_uuid}%::mute} to false
  371. if {mute::%{_uuid}%::mute} is false:
  372. send "&e%arg-1% &7is not &6muted."
  373. stop
  374. set {mute::%{_uuid}%::mute} to false
  375. set {mute::%{_uuid}%::span} to 0 seconds
  376. send "&7Unmuted &e%arg-1%."
  377. broadcast "&b%player% &7unmuted &b%arg-1%"
  378. else:
  379. send "&cPlayer is not online."
  380. else:
  381. send "&c/unmute (player)"
  382.  
  383.  
  384. function sendBanFlags(p: player):
  385. send "&4Note: &cThis is a FOREVER ban" to {_p}
  386. send "&e/ban (player) [reason with flags] @ [timespan]" to {_p}
  387. send "" to {_p}
  388. send "&4Flags &c(include in reason if applicable):" to {_p}
  389. send "&e-s &8- &7Silent ban." to {_p}
  390. send "&e-f &8- &7Force ban." to {_p}
  391. send "&e-c &8- &7Anonymous ban (console)." to {_p}
  392.  
  393. command /ban [<offline player>] [<text>] [@ <timespan>]:
  394. permission: staff.ban
  395. permission message: {@fake}
  396. trigger:
  397. if arg-1 is set:
  398. if arg-1 is "help":
  399. sendBanFlags(player)
  400. stop
  401. set {_content} to arg-2
  402. updateStaff()
  403. set {_staffsafe} to false
  404. set {_force} to false
  405. if {staff::*} contains arg-1:
  406. set {_staffsafe} to true
  407. set {_force} to true
  408. if {_content} contains "-f":
  409. set {_staffsafe} to false
  410. replace all " -f" in {_content} with ""
  411. replace all "-f " in {_content} with ""
  412. replace all "-f" in {_content} with ""
  413. if arg-1 is player:
  414. if {_force} is false:
  415. send "&cNo banning yourself!"
  416. stop
  417. set {_silent} to false
  418. if {_content} contains "-s":
  419. set {_silent} to true
  420. replace all " -s" in {_content} with ""
  421. replace all "-s " in {_content} with ""
  422. replace all "-s" in {_content} with ""
  423. set {_banner} to player
  424. if {_content} contains "-c":
  425. set {_banner} to "&bConsole"
  426. replace all " -c" in {_content} with ""
  427. replace all "-c " in {_content} with ""
  428. replace all "-c" in {_content} with ""
  429. if {_staffsafe} is false:
  430. set {_empty} to false
  431. set {_realcontent} to {_content}
  432. if arg-2 is not set:
  433. set {_realcontent} to "&fBanned by an operator."
  434. set {_empty} to true
  435. if {_realcontent} is "":
  436. set {_realcontent} to "&fBanned by an operator."
  437. set {_empty} to true
  438. if {_realcontent} is " ":
  439. set {_realcontent} to "&fBanned by an operator."
  440. set {_empty} to true
  441. if arg-3 is not set:
  442. set {tempban::%arg-1's uuid%::ban} to false
  443. set {tempban::%arg-1's uuid%::span} to 0 seconds
  444. set {tempban::%arg-1's uuid%::stamp} to 0 seconds
  445. ban arg-1 because "&c&lPerm Ban &8|&r &6Bed&eClash &8- &7%colored {_realcontent}%"
  446. kick arg 1 due to "&c&lPerm Ban &8|&r &6Bed&eClash &8- &7%colored {_realcontent}%"
  447. else:
  448. unban arg-1
  449. set {tempban::%arg-1's uuid%::ban} to true
  450. set {tempban::%arg-1's uuid%::span} to arg-3
  451. set {tempban::%arg-1's uuid%::stamp} to now
  452. set {tempban::%arg-1's uuid%::msg} to "&c&lTempban&r &8| &6Bed&eClash &8- &7%colored {_realcontent}%"
  453. kick arg 1 due to "&c&lTempban&r &8| &6Bed&eClash &8- &7%colored {_realcontent}% &8| &7Expires in &e%arg-3%"
  454. if {_silent} is false:
  455. if arg-2 is not set:
  456. broadcast "&b%{_banner}% &cbanned &b%arg-1% &7[FOREVER]"
  457. else:
  458. if {_empty} is false:
  459. if arg-3 is set:
  460. broadcast "&b%{_banner}% &cbanned &b%arg-1% &7for &c%colored {_content}% &7[&e%arg-3%&7]"
  461. else:
  462. broadcast "&b%{_banner}% &cbanned &b%arg-1% &7for &c%colored {_content}% &7[FOREVER]"
  463. else:
  464. if arg-3 is set:
  465. broadcast "&b%{_banner}% &cbanned &b%arg-1% &7[&e%arg-3%&7]"
  466. else:
  467. broadcast "&b%{_banner}% &cbanned &b%arg-1% &7[FOREVER]"
  468.  
  469. else:
  470. if {_empty} is false:
  471. if arg-3 is set:
  472. loop {staff::*}:
  473. send "&6Staff > &b%{_banner}% &6&lsilently&r &cbanned &b%arg-1% &7for &c%colored {_content}% &7[&e%arg-3%&7]" to loop-value
  474. else:
  475. loop {staff::*}:
  476. send "&6Staff > &b%{_banner}% &6&lsilently&r &cbanned &e%arg-1% &7for &c%colored {_content}% &7[FOREVER]" to loop-value
  477. else:
  478. loop {staff::*}:
  479. send "&6Staff > &b%{_banner}% &6&lsilently&r &cbanned &e%arg-1% &7[FOREVER]" to loop-value
  480. if {_banner} is "&bConsole":
  481. loop {staff::*}:
  482. send "&6Staff > &b%player% &7banned the user above &e&lanonymously." to loop-value
  483. else:
  484. send "&4Warning: &cThis will ban a staff member."
  485. send "&cPlease add the &4-f &cflag to the reason to ban the user."
  486. else:
  487. sendBanFlags(player)
  488.  
  489. command /unban [<offline player>] [<text>]:
  490. permission: staff.unban
  491. permission message: {@fake}
  492. trigger:
  493. if arg-1 is set:
  494. unban arg-1
  495. if {tempban::%arg-1's uuid%::ban} is true:
  496. set {tempban::%arg-1's uuid%::ban} to false
  497. set {tempban::%arg-1's uuid%::span} to 0 seconds
  498. set {tempban::%arg-1's uuid%::stamp} to 0 seconds
  499. set {_silent} to false
  500. if arg-2 is set:
  501. set {_content} to arg-2
  502. if {_content} contains "-s":
  503. set {_silent} to true
  504. if {_silent} is false:
  505. broadcast "&b%player% &cunbanned &b%arg-1%"
  506. else:
  507. updateStaff()
  508. loop {staff::*}:
  509. send "&6Staff > &b%player% &6&lsilently&r &cunbanned &e%arg-1%" to loop-value
  510. else:
  511. send "&c/unban (username) [flags]"
  512. send "&aFlags:"
  513. send "&e-s &8- &7Silently unban"
  514.  
  515. command /status [<offline player>]:
  516. permission: staff.status
  517. permission message: {@fake}
  518. trigger:
  519. if arg-1 is set:
  520. set {_user} to arg-1
  521. else:
  522. set {_user} to player
  523. set {_joined} to "&aYes."
  524. if {%{_user}%.rank} is not set:
  525. set {_joined} to "&cNo."
  526. set {_uuid} to uuid of {_user}
  527. set {_detailsban} to "&cNo."
  528. if {tempban::%{_uuid}%::ban} is true:
  529. set {_diff} to difference between now and {tempban::%{_uuid}%::stamp}
  530. if {_diff} >= {tempban::%{_uuid}%::span}:
  531. set {tempban::%{_uuid}%::ban} to false
  532. set {tempban::%{_uuid}%::span} to 0 seconds
  533. set {tempban::%{_uuid}%::stamp} to 0 seconds
  534. set {tempban::%{_uuid}%::msg} to ""
  535. else:
  536. set {_realdiff} to difference between {tempban::%{_uuid}%::span} and {_diff}
  537. set {_detailsban} to "&aYes. &7(&aRemaining time: &e%{_realdiff}%&7) &7[&6Reason: &e%{tempban::%{_uuid}%::msg}%&7]"
  538. else:
  539. if {_user} is banned:
  540. set {_detailsban} to "&aYes. &7(FOREVER)"
  541. set {_muted} to "&cNo."
  542. if {mute::%{_uuid}%::mute} is true:
  543. set {_diff} to difference between now and {mute::%{_uuid}%::stamp}
  544. set {_mutefail} to false
  545. if {mute::%{_uuid}%::span} is greater than 0 seconds:
  546. if {_diff} >= {mute::%{_uuid}%::span}:
  547. set {mute::%{_uuid}%::mute} to false
  548. set {mute::%{_uuid}%::span} to 0 seconds
  549. set {mute::%{_uuid}%::stamp} to 0 seconds
  550. set {mute::%{_uuid}%::msg} to false
  551. else:
  552. set {_mutefail} to true
  553. else:
  554. set {_mutefail} to true
  555. if {_mutefail} is true:
  556. if {mute::%{_uuid}%::span} is 0 seconds:
  557. set {_muted} to "&aYes. &7(FOREVER)"
  558. else:
  559. set {_realdiff} to difference between {mute::%{_uuid}%::span} and {_diff}
  560. set {_muted} to "&aYes. &7(&aRemaining time: &e%{_realdiff}%&7)"
  561. if {mute::%{_uuid}%::msg} is false:
  562. set {_muted} to "%{_muted}% &7[No reason attached]"
  563. else:
  564. set {_muted} to "%{_muted}% &7[&e%{mute::%{_uuid}%::msg}%&7]"
  565. if {%{_user}%.rank} is not set:
  566. set {_rank} to "default"
  567. else:
  568. set {_rank} to {%{_user}%.rank}
  569. send ""
  570. send "&6Status for &e%{_user}%:"
  571. send "&eHas joined server: %colored {_joined}%"
  572. send "&eIs banned: %colored {_detailsban}%"
  573. send "&eRank: &a%{_rank}%"
  574. send "&eIs muted: %colored {_muted}%"
  575. send ""
  576.  
  577. command /punpurge <text>:
  578. permission: op
  579. trigger:
  580. if arg-1 is "$GINGHASTHEBIGRACIST":
  581. delete {tempban::*}
  582. delete {mute::*}
  583. send "&cPurged all tempban and mute histories."
  584. else:
  585. send "{@fake}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement