Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 64.01 KB | None | 0 0
  1. on skript load:
  2. login to "xxx" with the name "beans"
  3.  
  4. options:
  5. prefix: ?, "%mention tag of event-bot% "
  6.  
  7. discord command ping:
  8. prefixes: {@prefix}
  9. trigger:
  10. reply with "Pong!"
  11.  
  12. discord command command <text>:
  13. prefixes: {@prefix}
  14. trigger:
  15. if event-member does not have permission administrator:
  16. reply with "You don't have access to that command."
  17. else:
  18. command arg
  19.  
  20. on chat:
  21. if event is not canceled:
  22. send "**%player%:** %message%" to channel with id "552991851045584897" with "beans"
  23.  
  24. on guild message received:
  25. if id of event-channel is "552991851045584897":
  26. send "&3[Discord] &7%event-user%##%discriminator of event-user%&8: &f%event-message%" to all players
  27.  
  28. on join:
  29. send ":inbox_tray: **%player%** joined the server." to channel with id "552991851045584897" with "beans"
  30.  
  31. on quit:
  32. send ":outbox_tray: **%player%** left the server." to channel with id "552991851045584897" with "eansb"
  33.  
  34. command /auc [<text>] [<text>]:
  35. permission: rank.admin
  36. permission message: An unxpected issue has occured. This has been disabled.
  37. trigger:
  38. if arg 1 is not set:
  39. send "&c/auc <start | cancel | info> ([<amount>])"
  40. else:
  41. if arg 1 is not "start" or "cancel" or "info":
  42. player command "/auc"
  43. else:
  44. if arg 1 is "info":
  45. if {auc::owner} is not set:
  46. send "&cThere is no current auction."
  47. else:
  48. if {auc::bidder} is not set:
  49. set {_bid} to {auc::bid}
  50. else:
  51. set {_bid} to {auc::bid} + 50
  52. set {_name} to name of {auc::item} ? type of {auc::item}
  53. set {_lore} to lore of {auc::item}
  54. replace all "||" with nl in {_lore}
  55. if {_lore} is "":
  56. set {_lore} to "&7No Lore"
  57. set {_enchantments::*} to enchantments of {auc::item}
  58. loop {_enchantments::*}:
  59. add 1 to {_n}
  60. set {_e::%{_n}%} to "%loop-value% %level of loop-value on {auc::item}%%nl%"
  61. set {_e2} to "%{_e::*}%"
  62. replace all ", " and " and " with "" in {_e2}
  63. if "%{_e2}%" is "<none>":
  64. set {_e2} to "No Enchantments"
  65. set {_tooltip} to "&e(%{auc::count}%x) &8| &7%{_name} ? type of {auc::item}%&r &8| &e(%type of {auc::item}%)%nl%&7%{_e2} ? ""No Enchantments""%%nl%&7%{_lore} ? ""No Lore""%"
  66. set {_weapon} to "<tooltip:%{_tooltip}%>&a&l[ &f%{auc::count}%x %name of tool ? type of {auc::item}% &a&l]&r"
  67. send ""
  68. send "&6[Auction] &7%{auc::owner}% started an auction for %{_weapon}% &6[$%short({_bid})%]"
  69. send ""
  70. else if arg 1 is "cancel":
  71. if {auc::owner} is not set:
  72. send "&cThere is no current auction."
  73. else:
  74. if "%{auc::owner}%" is not "%player%":
  75. send "&cbruh how you finna do %{auc::owner}% like that..."
  76. else:
  77. if {auc::time} is less than 10:
  78. send "&cYou can't cancel an auction with that little time left :O"
  79. else:
  80. give {auc::count} of {auc::item} to player
  81. send "&6[Auctions] &7The auction has been canceled by &e%player%&7."
  82. if {auc::bidder} is set:
  83. set {_bidder} to {auc::bidder}'s uuid
  84. add {auc::bid} to {balance::%{_bidder}%}
  85. delete {auc::*}
  86. else if arg 1 is "start":
  87. if {auc::owner} is set:
  88. send "&cThere is an auction in progress!"
  89. else:
  90. set {_amount} to arg 2 parsed as integer
  91. if {_amount} is not set:
  92. send "&cMust be an integer."
  93. else:
  94. if {_amount} is less than 10:
  95. send "&cYou must sell that for more than $10."
  96. else:
  97. if {_amount} is greater than 25000:
  98. send "&cYou must sell that for less than $25,000."
  99. else:
  100. if player is holding air:
  101. send "&cYou can't sell that."
  102. else:
  103.  
  104. if durability of tool is not 0:
  105. send "&cYou can only sell a repaired item."
  106. else:
  107. set {_enchantments} to "%enchantments of tool%"
  108. if "%{_enchantments}%" is "<none>":
  109. set {auc::item} to "%tool%"
  110. else:
  111. set {auc::item} to "%tool% of %{_enchantments}%"
  112. if {auc::item} is not set:
  113. set {auc::item} to "%1 of tool%"
  114.  
  115. set {auc::item} to {auc::item} parsed as item
  116.  
  117. set {auc::count} to amount of tool in player's inventory
  118. set {auc::owner} to player
  119. set {auc::bid} to {_amount}
  120. remove {auc::count} of tool from player's inventory
  121.  
  122. set {auc::time} to 30
  123. all players command "/auc info"
  124.  
  125. command /bid [<number>]:
  126. trigger:
  127. if arg 1 is not set:
  128. send "&c/bid <integer>"
  129. else:
  130. if {auc::owner} is not set:
  131. send "&cThere is no current auction."
  132. else:
  133. if "%{auc::owner}%" is "%player%":
  134. send "&cYou can't bid on your own auction."
  135. else:
  136. if "%{auc::bidder}%" is "%player%":
  137. send "&cYou have already bid on that."
  138. else:
  139. set {_amount} to (rounded up arg 1)
  140. if {balance::%player's uuid%} is less than {_amount}:
  141. send "&cInsufficient Funds!"
  142. else:
  143. if arg 1 is less than or equal to ({auc::bid} + 50):
  144. send "&cYou must bid at least $%{auc::bid} + 50%."
  145. else:
  146. set {_bidder} to {auc::bidder}'s uuid
  147. add {auc::bid} to {balance::%{_bidder}%}
  148. set {auc::bidder} to player
  149. set {auc::bid} to {_amount}
  150. remove {auc::bid} from {balance::%player's uuid%}
  151. send "&6[Auctions] &e%player% &7has bid &e$%{_amount}%&7." to all players
  152.  
  153. every second:
  154. if {auc::time} is set:
  155. remove 1 from {auc::time}
  156. if {auc::time} is 20 or 15 or 10 or 5 or 4 or 3 or 2 or 1:
  157. send "&6[Auctions] &7There are &e%{auc::time}% &7seconds remaining." to all players
  158. else if {auc::time} is 0:
  159. if {auc::bidder} is not set:
  160. send "&6[Auctions] &7No one won the auction :(" to all players
  161. if {auc::owner} is offline:
  162. set {_owner} to {auc::owner}'s uuid
  163. set {itemq::%{_owner}%} to {auc::item}
  164. set {itemqb::%{_owner}%} to {auc::bid}
  165. else:
  166. give {auc::count} of {auc::item} to {auc::owner}
  167. else:
  168. send "&6[Auctions] &e%{auc::bidder}% &7won the auction for &e$%{auc::bid}%&7!" to all players
  169. set {_owner} to {auc::owner}'s uuid
  170. add {auc::bid} to {balance::%{_owner}%}
  171. if {auc::bidder} is offline:
  172. set {_bidder} to {auc::bidder}'s uuid
  173. set {itemq::%{_bidder}%} to {auc::item}
  174. set {itemqb::%{_bidder}%} to {auc::bid}
  175. else:
  176. give {auc::count} of {auc::item} to {auc::bidder}
  177. delete {auc::*}
  178.  
  179. on join:
  180. if {itemq::%player's uuid%} is set:
  181. send "&6[Auctions] &7You won the auction for &e$%{itemqb::%player's uuid%}%&7!"
  182. give 1 of {itemq::%player's uuid%} to player
  183. delete {itemq::%player's uuid%}
  184. delete {itemqb::%player's uuid%}
  185.  
  186. # auc::time - time left in auction
  187. # auc::bidder - person bidding
  188. # auc::owner - auc starter
  189. # auc::bid - current bid
  190. # auc::item - item for sale
  191. # auc::count - amount of item
  192.  
  193. on load:
  194. delete {mrl}
  195. send "&6[Bealz] &7The mine may be reset again! (/reset)" to all players
  196.  
  197. command /reset [<text>]:
  198. trigger:
  199. if player has permission "rank.jrmod":
  200. set {_r} to player's name
  201. else:
  202. if {mrl} is set:
  203. send "&6[Bealz] &7Currently on cooldown!"
  204. else:
  205. set {_r} to true
  206. set {_r1} to true
  207.  
  208. if {_r} is set:
  209. execute console command "/mrl reset mine"
  210. send "&6[Bealz] &7The mine has been reset by &e%player%&7! (/reset)" to all players
  211.  
  212. if {_r1} is set:
  213. set {mrl} to true
  214. wait 5 minutes
  215. delete {mrl}
  216. send "&6[Bealz] &7The mine may be reset again! (/reset)" to all players
  217.  
  218. command /sell [<text>]:
  219. trigger:
  220. if arg 1 is not set:
  221. send "&c/sell <hand|all>"
  222. else if arg 1 is set:
  223. if arg 1 is not "hand" or "all":
  224. player command "/sell"
  225. else:
  226.  
  227. set {_booster} to 1.0
  228. add {booster} to {_booster}
  229. add size of all players / 100 to {_booster}
  230. if player has permission "rank.mvp":
  231. add 0.15 to {_booster}
  232. if player has permission "rank.vip":
  233. add 0.1 to {_booster}
  234.  
  235. if player is holding any pickaxe:
  236. set {_lore} to lore of tool
  237. if {_lore} contains "Merchant":
  238. chance of 40%:
  239. send "&6[Merchant] &e+7x booster!"
  240. add 7.0 to {_booster}
  241.  
  242. if arg 1 is "all":
  243. loop all items in player's inventory:
  244. set {_item} to "%1 of loop-item%"
  245. if {worth::%{_item}%} is set:
  246. set {_count} to amount of loop-item in player's inventory
  247. add {_count} to {_total}
  248. add {worth::%{_item}%} * {_count} to {_profit}
  249. remove 2304 of loop-item from player's inventory
  250. if {_total} is not set:
  251. send "&6[Sell] &7You had no sellable items."
  252. else if {_total} is set:
  253. set {_profit} to {_profit} * {_booster}
  254. add {_profit} to {balance::%player's uuid%}
  255. send "&6[Sell] &7Sold &e%{_total}% &7items for &e$%short({_profit})%&7. &6(%{_booster}%x booster)"
  256.  
  257. if arg 1 is "hand":
  258. set {_item} to "%1 of player's tool%"
  259. if {worth::%{_item}%} is not set:
  260. send "&6[Sell] &7That item is not sellable."
  261. else if {worth::%{_item}%} is set:
  262. set {_count} to amount of tool in player's inventory
  263. set {_profit} to {worth::%{_item}%} * {_count}
  264. set {_profit} to {_profit} * {_booster}
  265. add {_profit} to {balance::%player's uuid%}
  266. send "&6[Sell] &7Sold &e%{_count}%x %1 of tool% &7for &e$%short({_profit})%&7. &6(%{_booster}%x booster)"
  267. remove all tool from player's inventory
  268.  
  269. command /worth [<text>]:
  270. trigger:
  271. set {_item} to "%1 of tool%"
  272. if {worth::%{_item}%} is not set:
  273. send "&6[Sell] &7That item is not sellable."
  274. else:
  275. send "&6[Sell] &7That is worth &e$%short({worth::%{_item}%})%."
  276.  
  277. command /setworth [<number>]:
  278. permission: admin
  279. trigger:
  280. set {_item} to "%1 of tool%"
  281. if arg 1 is not set:
  282. send "&c/setworth <amount>"
  283. else:
  284. if arg 1 is -1:
  285. delete {worth::%{_item}%}
  286. send "&6[Sell] &7That item is now worth nothing."
  287. else:
  288. set {worth::%{_item}%} to arg 1
  289. send "&6[Sell] &7Set worth of &e%1 of tool% &7to &e$%arg 1%&7."
  290.  
  291. command /prices [<text>]:
  292. trigger:
  293. loop {worth::*}:
  294. send "%loop-index% - %loop-value%"
  295.  
  296. function purchase(p: player, i: item, c: number, co: number):
  297. set {_u} to {_p}'s uuid
  298. set {_bal} to {balance::%{_u}%}
  299. if {_bal} is less than {_co}:
  300. play "ENTITY_VILLAGER_NO" to {_p} at volume 10000
  301. set {_amount} to {_co} - {balance::%{_u}%}
  302. send "&6[Shop] &7You need &e$%{_amount}% more &7to purchase that." to {_p}
  303. else:
  304. if {_p} has not enough space for {_c} of {_i}:
  305. send "&cYour inventory is full!" to {_p}
  306. else:
  307. if {_i} is diamond helmet:
  308. give {_p} all diamond armor
  309. else:
  310. give {_p} {_c} of {_i}
  311. remove {_co} from {balance::%{_u}%}
  312. shop({_p}, {shop::%{_u}%})
  313. play "BLOCK_NOTE_PLING" to {_p} at volume 10000
  314. send "&6[Shop] &7You've purchased &f%{_c}%x %{_i}% &7for &e$%{_co}%" to {_p}
  315.  
  316. function shop(p: player, t: text):
  317. set {_u} to {_p}'s uuid
  318. set {shop::%{_u}%} to {_t}
  319. set {_bal} to short({balance::%{_u}%})
  320. set {_lore} to "&7Click to purchase."
  321.  
  322. play "ENTITY_ENDERDRAGON_FLAP" to {_p} at volume 10000
  323. open virtual chest inventory with size 1 named "&8Shop &3($%{_bal}%)" to {_p}
  324. format gui slot 0 of {_p} with feather named "&c&lMain Menu" with lore "&7Click to return to the main menu." to run function shop({_p}, "main")
  325.  
  326. if {_t} is "main":
  327. format gui slot 3 of {_p} with oak wood log named "&a&lBlocks Shop" with lore "&7Click to view the blocks shop." to run function shop({_p}, "blocks")
  328. format gui slot 4 of {_p} with diamond sword named "&3&lCombat Shop" with lore "&7Click to view the combat shop." to run function shop({_p}, "combat")
  329. format gui slot 5 of {_p} with lapis named "&b&lMisc Shop" with lore "&7Click to view the misc shop." to run function shop({_p}, "misc")
  330.  
  331. else if {_t} is "blocks":
  332. format gui slot 2 of {_p} with prismarine named "&f16x &bPrismarine &7(&n$100&7)" with lore {_lore} to run function purchase({_p}, prismarine, 16, 100)
  333. format gui slot 3 of {_p} with sea lantern named "&f4x &bSea Lantern &7(&n$100&7)" with lore {_lore} to run function purchase({_p}, sea lantern, 4, 100)
  334. format gui slot 4 of {_p} with oak wood log named "&f16x &bLogs &7(&n$60&7)" with lore {_lore} to run function purchase({_p}, oak wood log, 16, 60)
  335. format gui slot 5 of {_p} with white wool block named "&f16x &bWool &7(&n$60&7)" with lore {_lore} to run function purchase({_p}, white wool block, 16, 60)
  336. format gui slot 6 of {_p} with stone named "&f64x &bStone &7(&n$20&7)" with lore {_lore} to run function purchase({_p}, stone, 64, 20)
  337.  
  338. else if {_t} is "combat":
  339. format gui slot 2 of {_p} with turtle helmet named "&f&l1x &bTurtle helmet &7(&n$5,000&7)" with lore {_lore} to run function purchase({_p}, turtle helmet, 1, 5000)
  340. format gui slot 3 of {_p} with diamond helmet named "&f&l1x &bSet of Diamond armor &7(&n$100&7)" with lore {_lore} to run function purchase({_p}, diamond helmet, 1, 100)
  341. format gui slot 4 of {_p} with diamond sword named "&f&l1x &bDiamond Sword &7(&n$50&7)" with lore {_lore} to run function purchase({_p}, diamond sword, 1, 50)
  342. format gui slot 5 of {_p} with bow named "&f&l1x &bBow&7(&n$50&7)" with lore {_lore} to run function purchase({_p}, bow, 1, 50)
  343. format gui slot 6 of {_p} with arrow named "&f&l4x &bArrows &7(&n$20&7)" with lore {_lore} to run function purchase({_p}, arrow, 4, 20)
  344.  
  345. else if {_t} is "misc":
  346. format gui slot 2 of {_p} with elytra named "&f&l1x &bElytra &7(&n$5&7)" with lore {_lore} to run function purchase({_p}, elytra, 1, 5)
  347. format gui slot 3 of {_p} with lapis named "&f&l16x &bLapis &7(&n$20&7)" with lore {_lore} to run function purchase({_p}, lapis, 16, 20)
  348. format gui slot 4 of {_p} with book named "&f&l4x &bBook &7(&n$50&7)" with lore {_lore} to run function purchase({_p}, book, 4, 50)
  349. format gui slot 5 of {_p} with firework named "&f&l16x &bFirework &7(&n$50&7)" with lore {_lore} to run function purchase({_p}, firework, 16, 50)
  350. format gui slot 6 of {_p} with xp bottle named "&f&l16x &bXP Bottles &7(&n$50&7)" with lore {_lore} to run function purchase({_p}, xp bottle, 16, 50)
  351. format gui slot 7 of {_p} with golden apple named "&f&l4x &bGolden Apple &7(&n$250&7)" with lore {_lore} to run function purchase({_p}, golden apple, 4, 250)
  352.  
  353. command /shop [<text>]:
  354. trigger:
  355. set {_s} to arg 1 ? "main"
  356. shop(player, {_s})
  357.  
  358. command /bounty [<offlineplayer>] [<number>]:
  359. cooldown: 3 seconds
  360. cooldown message: &6[Bounty] &7Calm thou breasts
  361. trigger:
  362. if arg 2 is not set:
  363. send "&c/bounty <player> <amount>"
  364. else:
  365. if arg 1 is offline:
  366. send "&cThat player is offline."
  367. else:
  368. if arg 2 is less than 500:
  369. send "&cBounty has to be greater than $500."
  370. else:
  371. if {balance::%player's uuid%} is less than arg 2:
  372. send "&cYou don't have that much money."
  373. else:
  374. remove arg 2 from {balance::%player's uuid%}
  375. add arg 2 to {bounty::%arg 1's uuid%}
  376. send "%nl%&6[Bounty] &e%player% &7added a &e$%arg 2% &7bounty on &e%arg 1%&7.%nl%" to all players
  377.  
  378. on death of player:
  379. "%attacker%" is not "%victim%"
  380. "%attacker%" is not "<none>"
  381. set {_b} to {bounty::%victim's uuid%}
  382. {_b} is set
  383. send "%nl%&6[Bounty] &e%attacker% &7claimed the &e$%{_b}% &7on &e%victim%&7.%nl% " to all players
  384. add {_b} to {balance::%attacker's uuid%}
  385. delete {bounty::%victim's uuid%}
  386.  
  387. command /tool [<item>]:
  388. trigger:
  389. open virtual chest inventory with size 1 for player
  390. format gui slot 0 of player with arg to close
  391.  
  392. on chat:
  393.  
  394. if {recent} is first 3 characters of message:
  395. cancel event
  396. send "&6Possible spam detected."
  397.  
  398. set {recent} to first 3 characters of message
  399.  
  400. if {mute::%player's uuid%} is set:
  401. if {mutet::%player's uuid%} is not set:
  402. send {mute::%player's uuid%}
  403. cancel event
  404. else:
  405. if difference between {mutet::%player's uuid%} and now is greater than {mutet2::%player's uuid%}:
  406. send "&6[Beans] &eYou have been unmuted!"
  407. delete {mute::%player's uuid%}
  408. delete {mutet::%player's uuid%}
  409. delete {mutet2::%player's uuid%}
  410. set chat format to "&7%player's prefix%%player%%player's suffix%&8: &f%message%"
  411. else:
  412. send {mute::%player's uuid%}
  413. cancel event
  414.  
  415. else:
  416. if player doesn't have permission "rank.jrmod":
  417.  
  418. if {chat} is set:
  419. cancel event
  420. send "&6[Bealz] &7Chat is currently muted by &e%{chat}%&7."
  421.  
  422. if message contains "[item]":
  423. {chat} is not set
  424. player is not holding air
  425. cancel event
  426.  
  427. set {_name} to name of tool ? type of tool
  428. set {_lore} to lore of tool
  429. replace all "||" with nl in {_lore}
  430. if {_lore} is "":
  431. set {_lore} to "&7No Lore"
  432. set {_enchantments::*} to enchantments of tool
  433. loop {_enchantments::*}:
  434. add 1 to {_n}
  435. set {_e::%{_n}%} to "%loop-value% %level of loop-value on tool%%nl%"
  436. set {_e2} to "%{_e::*}%"
  437. replace all ", " and " and " with "" in {_e2}
  438. if "%{_e2}%" is "<none>":
  439. set {_e2} to "No Enchantments"
  440. set {_tooltip} to "&e(%amount of tool in player's inventory%x) &8| &7%{_name} ? type of tool%&r &8| &e(%type of tool%)%nl%&7%{_e2} ? ""No Enchantments""%%nl%&7%{_lore} ? ""No Lore""%"
  441. set {_weapon} to "<tooltip:%{_tooltip}%>&a&l[ &f%amount of tool in player's inventory%x %name of tool ? type of tool% &a&l]&r"
  442.  
  443. replace all "[item]" with "%{_weapon}%" in message
  444. send "&7%player's prefix%%player%%player's suffix%&8: &f%message%" to all players
  445.  
  446. set chat format to "&7%player's prefix%%player%%player's suffix%&8: &f%message%"
  447.  
  448. command /chat [<text>]:
  449. permission: rank.jrmod
  450. permission message: &cYou don't have access to that command.
  451. trigger:
  452. if arg 1 is not set:
  453. send "&cUsage: /chat <mute | clear>"
  454. else:
  455. if arg 1 is not "mute" or "clear":
  456. player command "/chat"
  457. else if arg 1 is "mute":
  458. if {chat} is not set:
  459. set {chat} to player's name
  460. send "%nl%&6[Bealz] &7Chat has been muted by &e%player%&7.%nl%" to all players
  461. else:
  462. delete {chat}
  463. send "%nl%&6[Bealz] &7Chat has been unmuted by &e%player%&7.%nl%" to all players
  464. else if arg 1 is "clear":
  465. loop 200 times:
  466. send "" to all players
  467. send "&6[Bealz] &7Chat has been cleared by &e%player%&7.%nl%" to all players
  468.  
  469. on quit:
  470. if {ct::%player%} is set:
  471. send "&c%player% &7just logged out in combat!" to all players
  472. set {_attacker} to {attacker::%player%}
  473. set {_u} to {_attacker}'s uuid
  474. add 1 to {kills::%{_u}%}
  475. add 1 to {deaths::%player's uuid%}
  476. delete {attacker::%player%}
  477.  
  478. on command:
  479. {ct::%player%} is set
  480. set {_c} to command
  481. if {_c} is "hub" or "lobby" or "server":
  482. add 1 to {confirm::%player%}
  483. if {confirm::%player%} is 1:
  484. cancel event
  485. send "Type command again to confirm. (Punishable Offense)"
  486. else:
  487. delete {confirm::%player%}
  488. else if {_c} is "spawn":
  489. cancel event
  490. send "You can't use that command in combat!"
  491.  
  492. on damage of player:
  493.  
  494. if event is not canceled:
  495.  
  496. "%damage cause%" is not "suffocation"
  497. attacker is a player
  498.  
  499. set {attacker::%victim%} to attacker
  500.  
  501. if {ct::%attacker%} is not set:
  502. send "&7You have combat tagged &c%victim%&7." to attacker
  503.  
  504. if {ct::%victim%} is not set:
  505. send "&7You've been combat tagged by &c%attacker%&7." to victim
  506.  
  507. set {ct::%attacker%} to 20
  508. set {ct::%victim%} to 20
  509.  
  510. every second:
  511. loop all players:
  512. if {ct::%loop-player%} is set:
  513. remove 1 from {ct::%loop-player%}
  514. if {ct::%loop-player%} is 0:
  515. delete {ct::%loop-player%}
  516. send "&7You are free to log out!" to loop-player
  517.  
  518. command /ct [<text>]:
  519. trigger:
  520. if {ct::%player%} is not set:
  521. send "&7You are not combat tagged."
  522. else:
  523. send "&7You are combat tagged for &c%{ct::%player%}% &7seconds."
  524.  
  525. on load:
  526. add "<link:https://discord.gg/kHF76Qq>Click here to join the discord!" to {announcements::*}
  527. add "<command:/repair>Tool durability getting low? Use /repair! ($50)" to {announcements::*}
  528. add "<command:Look at my [item]!>You can display your item in chat by typing [item]." to {announcements::*}
  529. add "<command:/shop>Want to buy materials? Use /shop!" to {announcements::*}
  530.  
  531. every 2 minutes:
  532. send "&6[Bealz] &7%random element out of {announcements::*}%" to all players
  533.  
  534. command /bc [<text>]:
  535. permission: rank.srmod
  536. permission message: &cYou don't have access to that command.
  537. trigger:
  538. if arg 1 is not set:
  539. send "&c/bc <message>"
  540. else:
  541. send "&6[Bealz] &7%arg 1%" to all players
  542.  
  543. command /ec [<text>]:
  544. trigger:
  545. open player's ender chest to player
  546.  
  547. command /balance [<offlineplayer>]:
  548. aliases: /bal
  549. trigger:
  550. if arg 1 is not set:
  551. send "&6[Bealz] &e%player% &7has a balance of &e$%{balance::%player's uuid%}%&7."
  552. else:
  553. if {balance::%arg 1's uuid%} is not set:
  554. send "&cHmm... It seems that user has never joined."
  555. else:
  556. send "&6[Bealz] &e%arg 1% &7has a balance of &e$%{balance::%arg 1's uuid%}%&7."
  557.  
  558. command /pay [<offlineplayer>] [<number>]:
  559. trigger:
  560. if arg 2 is not set:
  561. send "&cUsage: /pay <player> <amount>"
  562. else:
  563. if arg 1 is offline:
  564. send "&cThat player is offline."
  565. else:
  566. if arg 2 is less than 10:
  567. send "&cYou must pay %arg 1% more than $10."
  568. else:
  569. if {balance::%player's uuid%} is less than arg 2:
  570. set {_missing} to arg 2 - {balance::%player's uuid%}
  571. send "&6[Bealz] &7You are missing &e$%{_missing}%&7."
  572. else:
  573. send "&6[Bealz] &e%player% &7paid you &e$%arg 2%&7." to arg 1
  574. send "&6[Bealz] &e%arg 1% &7recieved &e$%arg 2%&7."
  575. remove arg 2 from {balance::%player's uuid%}
  576. add arg 2 to {balance::%arg 1's uuid%}
  577.  
  578.  
  579. command /eco [<text>] [<offlineplayer>] [<number>]:
  580. permission: rank.admin
  581. permission message: &cYou don't have access to that command.
  582. trigger:
  583. if arg 3 is not set:
  584. send "&cUsage: /eco <set | add | remove> <player> <amount>"
  585. else:
  586. if arg 1 is "set":
  587. set {balance::%arg 2's uuid%} to arg 3
  588. else if arg 1 is "add":
  589. add arg 3 to {balance::%arg 2's uuid%}
  590. else if arg 1 is "remove":
  591. remove arg 3 from {balance::%arg 2's uuid%}
  592. player command "/bal %arg 2%"
  593.  
  594. function short(n: num) :: string:
  595. set {_units::*} to "K", "M", "B", "T", "q", "Q", "s", "S" and "O"
  596. loop size of {_units::*} times:
  597. {_n} >= 1000 ^ loop-num:
  598. {_n} < 1000 ^ (loop-num + 1)
  599. return "%{_n} / 1000 ^ loop-num%%{_units::%loop-num%}%"
  600. return "%{_n}%"
  601.  
  602. every minute:
  603. assign()
  604.  
  605. function assign():
  606.  
  607. delete {mined::*}
  608. loop {blocks::*}:
  609. add 1 to {_size}
  610. if {_mined::%loop-value%} is not set:
  611. set {_mined::%loop-value%} to loop-index
  612. else:
  613. set {_mn} to 0
  614. loop {_size} times:
  615. set {_mn} to {_mn}+1
  616. {_mined::%loop-value-1%.%{_mn}%} is not set
  617. set {_mined::%loop-value-1%.%{_mn}%} to loop-index
  618. stop loop
  619. wait 1 tick
  620. set {_mn} to size of {_mined::*}
  621. loop {_mined::*}:
  622. set {_mined2::%{_mn}%} to loop-value
  623. set {_mn} to {_mn}-1
  624. wait 1 tick
  625. set {_i} to 0
  626. loop {_mined2::*}:
  627. add 1 to {_topnumber1}
  628. set {_player} to "%loop-value%" parsed as offlineplayer
  629. set {_u} to {_player}'s uuid
  630. set {mined::%{_u}%} to {_topnumber}
  631. set {mined::%{_topnumber1}%::player} to {_player}
  632.  
  633. delete {baltop::*}
  634. loop {balance::*}:
  635. add 1 to {_size}
  636. if {_baltop::%loop-value%} is not set:
  637. set {_baltop::%loop-value%} to loop-index
  638. else:
  639. set {_bn} to 0
  640. loop {_size} times:
  641. set {_bn} to {_bn}+1
  642. {_baltop::%loop-value-1%.%{_bn}%} is not set
  643. set {_baltop::%loop-value-1%.%{_bn}%} to loop-index
  644. stop loop
  645. wait 1 tick
  646. set {_bn} to size of {_baltop::*}
  647. loop {_baltop::*}:
  648. set {_baltop2::%{_bn}%} to loop-value
  649. set {_bn} to {_bn}-1
  650. wait 1 tick
  651. set {_i} to 0
  652. loop {_baltop2::*}:
  653. add 1 to {_topnumber}
  654. set {_player} to "%loop-value%" parsed as offlineplayer
  655. set {_u} to {_player}'s uuid
  656. set {baltop::%{_u}%} to {_topnumber}
  657. set {baltop::%{_topnumber}%::player} to {_player}
  658.  
  659. delete {killtop::*}
  660. loop {kills::*}:
  661. add 1 to {_size}
  662. if {_killtop::%loop-value%} is not set:
  663. set {_killtop::%loop-value%} to loop-index
  664. else:
  665. set {_kn} to 0
  666. loop {_size} times:
  667. set {_kn} to {_kn}+1
  668. {_killtop::%loop-value-1%.%{_kn}%} is not set
  669. set {_killtop::%loop-value-1%.%{_kn}%} to loop-index
  670. stop loop
  671. wait 1 tick
  672. set {_kn} to size of {_killtop::*}
  673. loop {_killtop::*}:
  674. set {_killtop2::%{_kn}%} to loop-value
  675. set {_kn} to {_kn}-1
  676. wait 1 tick
  677. set {_i} to 0
  678. loop {_killtop2::*}:
  679. add 1 to {_topnumber2}
  680. set {_player} to "%loop-value%" parsed as offlineplayer
  681. set {_u} to {_player}'s uuid
  682. set {killtop::%{_u}%} to {_topnumber2}
  683. set {killtop::%{_topnumber2}%::player} to {_player}
  684.  
  685. command /baltop [<text>]:
  686. trigger:
  687. send ""
  688. send " &6&lBaltop"
  689. send ""
  690.  
  691. loop 5 times:
  692. set {_p%loop-number%} to {baltop::%loop-number%::player}
  693. set {_pu%loop-number%} to {_p%loop-number%}'s uuid
  694. set {_b%loop-number%} to short({balance::%{_pu%loop-number%}%})
  695.  
  696. send " &e(##1) &7%{baltop::1::player}% &e$%{_b1}%"
  697. send " &e(##2) &7%{baltop::2::player}% &e$%{_b2}%"
  698. send " &e(##3) &7%{baltop::3::player}% &e$%{_b3}%"
  699. send " &e(##4) &7%{baltop::4::player}% &e$%{_b4}%"
  700. send " &e(##5) &7%{baltop::5::player}% &e$%{_b5}%"
  701. if {baltop::%player's uuid%} is set:
  702. if {baltop::%player's uuid%} is not between 0 and 5:
  703. send " &6(##%{baltop::%player's uuid%}%) &7%player% &e$%short({balance::%player's uuid%})%"
  704. send ""
  705.  
  706. command /blocktop [<text>]:
  707. trigger:
  708. send ""
  709. send " &6&lBlocktop"
  710. send ""
  711.  
  712. loop 5 times:
  713. set {_p%loop-number%} to {mined::%loop-number%::player}
  714. set {_pu%loop-number%} to {_p%loop-number%}'s uuid
  715. set {_b%loop-number%} to short({blocks::%{_pu%loop-number%}%})
  716.  
  717. send " &e(##1) &7%{mined::1::player}% &e%{_b1}% blocks"
  718. send " &e(##2) &7%{mined::2::player}% &e%{_b2}% blocks"
  719. send " &e(##3) &7%{mined::3::player}% &e%{_b3}% blocks"
  720. send " &e(##4) &7%{mined::4::player}% &e%{_b4}% blocks"
  721. send " &e(##5) &7%{mined::5::player}% &e%{_b5}% blocks"
  722. if {mined::%player's uuid%} is set:
  723. if {mined::%player's uuid%} is not between 0 and 5:
  724. send " &6(##%{mined::%player's uuid%}%) &7%player% &e%short({mined::%player's uuid%})% blocks"
  725. send ""
  726.  
  727. command /killtop [<text>]:
  728. trigger:
  729. send ""
  730. send " &6&lKilltop"
  731. send ""
  732.  
  733. loop 6 times:
  734. set {_p%loop-number%} to {killtop::%loop-number%::player}
  735. set {_pu%loop-number%} to {_p%loop-number%}'s uuid
  736. set {_b%loop-number%} to short({kills::%{_pu%loop-number%}%})
  737.  
  738. send " &e(##1) &7%{killtop::2::player}% &e%{_b2}% kills"
  739. send " &e(##2) &7%{killtop::3::player}% &e%{_b3}% kills"
  740. send " &e(##3) &7%{killtop::4::player}% &e%{_b4}% kills"
  741. send " &e(##4) &7%{killtop::5::player}% &e%{_b5}% kills"
  742. send " &e(##5) &7%{killtop::6::player}% &e%{_b6}% kills"
  743. if {killtop::%player's uuid%} is set:
  744. if {killtop::%player's uuid%} is not between 0 and 5:
  745. send " &6(##%{killtop::%player's uuid%}%) &7%player% &e%short({kills::%player's uuid%})% kills"
  746. send ""
  747.  
  748. command /gmc [<offlineplayer>]:
  749. permission: rank.srmod
  750. permission message: &cYou don't have access to that command.
  751. trigger:
  752. set {_p} to arg 1 ? player
  753. set {_p}'s gamemode to creative
  754.  
  755. command /gms [<offlineplayer>]:
  756. permission: rank.jrmod
  757. permission message: &cYou don't have access to that command.
  758. trigger:
  759. if player has permission "rank.srmod":
  760. set {_p} to arg 1 ? player
  761. else:
  762. set {_p} to player
  763. set {_p}'s gamemode to survival
  764.  
  765. command /gmsp [<offlineplayer>]:
  766. permission: rank.jrmod
  767. permission message: &cYou don't have access to that command.
  768. trigger:
  769. if player has permission "rank.srmod":
  770. set {_p} to arg 1 ? player
  771. else:
  772. set {_p} to player
  773. set {_p}'s gamemode to spectator
  774.  
  775. command /sc [<text>]:
  776. permission: rank.jrmod
  777. permission message: &cYou don't have access to that command.
  778. trigger:
  779. if arg 1 is not set:
  780. send "&c/sc <message>"
  781. else:
  782. send " &c(Staff) &7%player%&8: &c%arg 1%" to all players where [input has permission "rank.jrmod"]
  783.  
  784. command /ac [<text>]:
  785. permission: rank.srmod
  786. permission message: &cYou don't have access to that command.
  787. trigger:
  788. if arg 1 is not set:
  789. send "&c/ac <message>"
  790. else:
  791. send " &b(Staff) &7%player%&8: &b%arg 1%" to all players where [input has permission "rank.srmod"]
  792.  
  793. command /discord [<text>]:
  794. trigger:
  795. send "<link:https://discord.gg/kHF76Qq>&6[Bealz] &7Click here to join our discord!"
  796.  
  797. command /help [<text>]:
  798. trigger:
  799. if arg 1 is not set:
  800. send ""
  801. send " &6[Beans] &7Help Page"
  802. send ""
  803. send " <command:/help eco>&e&lEconomy&7: click for economy help"
  804. send " <command:/help misc>&e&lMisc&7: click for misc. help"
  805. if player has permission "rank.jrmod":
  806. send " <command:/help jrmodplus>&6&lStaff&7: click for staff help"
  807. send ""
  808. else:
  809. if arg 1 is "eco" or "misc" or "jrmodplus":
  810. send ""
  811. send " &6[Beans] &7Help Page"
  812. send ""
  813. if arg 1 is "eco":
  814. send " &e/bal&7: view someone's balance"
  815. send " &e/baltop&7: view the richest players"
  816. send " &e/pay&7: pay a user"
  817. send " &e/auc&7: auction system"
  818. else if arg 1 is "misc":
  819. send " &e/spawn&7: teleport to spawn"
  820. send " &e/pv&7: open one of your private vaults"
  821. send " &e/ct&7: view your combat tag"
  822. send " &e/ec&7: open your ender chest"
  823. else if arg 1 is "jrmodplus":
  824. send " &e/sc&7: staff chat (jrmod+)"
  825. send " &e/ac&7: admin chat (srmod+)"
  826. send " &e/gmc&7: gamemode creative (srmod+)"
  827. send " &e/gms&7: gamemode survival (jrmod+)"
  828. send " &e/gmsp&7: gamemode spectator (jrmod+)"
  829. send " &e/chat&7: manage the chat (jrmod+)"
  830. send ""
  831. else:
  832. player command "/help"
  833.  
  834. command /rename [<text>]:
  835. trigger:
  836. if tool is air:
  837. send "&6[Rename] &7u cant rename that"
  838. else:
  839. if arg 1 is not set:
  840. send "&c/rename <item name>"
  841. else:
  842. if player does not have permission "rank.vip":
  843. if {balance::%player's uuid%} is less than 50:
  844. send "&6[Rename] &7That costs $50."
  845. else:
  846. if arg 1 contains "&l" or "&o":
  847. send "&6[Rename] &7Only donators may have bold or italic."
  848. else:
  849. remove 50 from {balance::%player's uuid%}
  850. send "&6[Rename] &7Successfully renamed your item."
  851. set name of tool to arg 1
  852. else:
  853. send "&6[Rename] &7Successfully renamed your item."
  854. set name of tool to colored arg 1
  855.  
  856. command /repair [<text>]:
  857. trigger:
  858. if player is holding air:
  859. send "&6[Repair] &7so you just gonna repair air? ok then"
  860. else:
  861. if player does not have permission "rank.vip":
  862. if {balance::%player's uuid%} is less than 50:
  863. send "&6[Repair] &7That costs $50."
  864. else:
  865. if durability of tool is less than 1:
  866. send "&6[Repair] &7That item can't be repaired."
  867. else:
  868. remove 50 from {balance::%player's uuid%}
  869. repair player's tool by 1500
  870. send "&6[Repair] &7Successffully repaired your item."
  871. else:
  872. if durability of tool is less than 1:
  873. send "&6[Repair] &7That item can't be repaired."
  874. else:
  875. remove 15 from {balance::%player's uuid%}
  876. repair player's tool by 1500
  877. send "&6[Repair] &7Successfully repaired your item."
  878.  
  879.  
  880. command /invsee [<offlineplayer>]:
  881. permission: rank.jrmod
  882. permission message: &cYou don't have access to that command.
  883. trigger:
  884. set {_p} to arg 1 ? player
  885. if {_p} is offline:
  886. send "&cThat player is offline."
  887. else:
  888. show {_p}'s inventory for player
  889.  
  890. command /rules [<text>]:
  891. trigger:
  892. send ""
  893. send " &6[Beans] &7List of rules"
  894. send ""
  895. send " &e1. &7use common sense ffs"
  896. send ""
  897.  
  898. command /trash [<text>]:
  899. aliases: /mrscopes
  900. trigger:
  901. open virtual chest inventory with size 5 named "&8Trash" to player
  902.  
  903. command /tp [<offlineplayer>]:
  904. permission: rank.jrmod
  905. permission message: &cYou don't have access to that command.
  906. trigger:
  907. if arg 1 is offline:
  908. send "&6[Bealz] &cPlayer not found"
  909. else:
  910. teleport player to arg 1
  911. send "&6[Bealz] &aTeleported to %arg 1%!"
  912.  
  913. command /tphere [<offlineplayer>]:
  914. permission: rank.jrmod
  915. permission message: &cYou don't have access to that command.
  916. trigger:
  917. if arg 1 is offline:
  918. send "&6[Bealz] &cPlayer not found"
  919. else:
  920. teleport arg 1 to player
  921. send "&6[Bealz] &aTeleported %arg 1% to you!"
  922.  
  923. options:
  924. logo: &6[Bealz]
  925. permission: rank.jrmod
  926. permissionalert: rank.srmod
  927.  
  928. command /vanish:
  929. permission: {@permission}
  930. permission message: &4You do not have access to this command!
  931. aliases: /v
  932. executable by: player
  933. trigger:
  934. if {vanish.%player%} is not set:
  935. hide the player from all players
  936. send "{@logo} &7You are &cVanish&7."
  937. set {vanish.%player%} to true
  938. loop all players:
  939. if loop-player has permission "{@permissionalert}":
  940. send "" to loop-player
  941. send "&8[&4Alert&8] &c%player% &7is now in vanish." to loop-player
  942. send "" to loop-player
  943.  
  944. else:
  945. reveal the player from all players
  946. send "{@logo} &7You are no longer &cVanish&7."
  947. delete {vanish.%player%}
  948. loop all players:
  949. if loop-player has permission "{@permissionalert}":
  950. send "" to loop-player
  951. send "&8[&4Alert&8] &c%player% &7is no longer in vanish." to loop-player
  952. send "" to loop-player
  953.  
  954.  
  955. on quit:
  956. if {vanish.%player%} is set:
  957. delete {vanish.%player%}
  958. on join:
  959. loop all players:
  960. if {vanish.%loop-player%} is true:
  961. reveal the loop-player from all players
  962. hide the loop-player from all players
  963.  
  964. command /vanishinfo [<offline player>]:
  965. aliases: /vinfo, /vi
  966. permission: {@permission}
  967. permission message: &4You do not have access to this command!
  968. aliases: /vinfo
  969. executable by: player
  970. trigger:
  971. if arg 1 is not set:
  972. if {vanish.%player%} is set:
  973. send ""
  974. send "&6[Beans] &e%player%"
  975. send "&8*&7Vanish: &aTrue"
  976. send ""
  977. else:
  978. send ""
  979. send "&6[Beans] &e%player%"
  980. send "&8*&7Vanish: &cFase"
  981. send ""
  982. if arg 1 is set:
  983. if {vanish.%arg 1%} is set:
  984. send ""
  985. send "&6[Beans] &e%arg 1%"
  986. send "&8*&7Vanish: &aTrue"
  987. send ""
  988. else:
  989. send ""
  990. send "&6[Beans] &e%arg 1%"
  991. send "&8*&7Vanish: &cFalse"
  992. send ""
  993.  
  994. command /ban [<offlineplayer>] [<text>]:
  995. permission: rank.jrmod
  996. permission message: &cYou don't have access to that command.
  997. trigger:
  998. if arg 2 is not set:
  999. send "&c/ban <player> <reason>"
  1000. else:
  1001. send "%nl% &6%player% &7banned &6%arg 1% &7for &6%arg 2%&7.%nl% " to all players
  1002. set {_r} to "%nl% &6You've been banned!%nl%%nl% &ePunished by: &7%player%%nl% &eReason: &7%arg 2%%nl% "
  1003. add "(%now%) &6%player% &7banned &6%arg 1% &e[%arg 2%]" to {punishments::%arg 1's uuid%::*}
  1004. kick arg 1 due to {_r}
  1005. ban arg 1 due to {_r}
  1006.  
  1007. command /unban [<offlineplayer>] [<text>]:
  1008. permission: rank.jrmod
  1009. permission message: &cYou don't have access to that command.
  1010. trigger:
  1011. if arg 1 is not set:
  1012. send "&c/unban <player>"
  1013. else:
  1014. send "%nl% &6%player% &7unbanned &6%arg 1%&7.%nl% " to all players
  1015. unban arg 1
  1016.  
  1017. command /kick [<offlineplayer>] [<text>]:
  1018. permission: rank.jrmod
  1019. permission message: &cYou don't have access to that command.
  1020. trigger:
  1021. if arg 2 is not set:
  1022. send "&c/kick <player> <reason>"
  1023. else:
  1024. send "%nl% &6%player% &7kicked &6%arg 1% &7for &6%arg 2%&7.%nl% " to all players
  1025. set {_r} to "%nl% &6You've been kicked!%nl%%nl% &ePunished by: &7%player%%nl% &eReason: &7%arg 2%%nl% "
  1026. add "(%now%) &6%player% &7kicked &6%arg 1% &e[%arg 2%]" to {punishments::%arg 1's uuid%::*}
  1027. kick arg 1 due to {_r}
  1028.  
  1029. command /mute [<offlineplayer>] [<text>] [<text>]:
  1030. permission: rank.jrmod
  1031. permission message: &cYou don't have access to that command.
  1032. trigger:
  1033. if arg 3 is not set:
  1034. send "&c/mute <player> <time | forever> <reason>"
  1035. else:
  1036. if arg 2 is "forever":
  1037. send "%nl% &6%player% &7muted &6%arg 1% &7for &6%arg 3%&7.%nl% " to all players
  1038. add "(%now%) &6%player% &7muted &6%arg 1% &e[%arg 3%]" to {punishments::%arg 1's uuid%::*}
  1039. set {mute::%arg 1's uuid%} to "%nl% &6You've been muted!%nl%%nl% &ePunished by: &7%player%%nl% &eReason: &7%arg 3%%nl% "
  1040. else:
  1041. set {_t} to toTimespan(arg 2)
  1042. if {_t} is not set:
  1043. send "&cInvalid Time!"
  1044. else:
  1045. send "%nl% &6%player% &7muted &6%arg 1% &7for &6%arg 3%&7. &e[%{_t}%]%nl% " to all players
  1046. add "(%now%) &6%player% &7muted &6%arg 1% &e[%arg 3%] &e%{_t}%" to {punishments::%arg 1's uuid%::*}
  1047. set {mute::%arg 1's uuid%} to "%nl% &6You've been muted!%nl%%nl% &ePunished by: &7%player%%nl% &eReason: &7%arg 3%%nl% &eLength: &7%{_t}%%nl% &eTime muted: &7%now%%nl% "
  1048. set {mutet::%arg 1's uuid%} to {_t} from now
  1049. set {mutet2::%arg 1's uuid%} to {_t}
  1050.  
  1051. command /unmute [<offlineplayer>]:
  1052. permission: rank.jrmod
  1053. permission message: &cYou don't have access to that command.
  1054. trigger:
  1055. if arg 1 is not set:
  1056. send "&c/unmute <player>"
  1057. else:
  1058. send "%nl% &6%player% &7unmuted &6%arg 1%&7.%nl% " to all players
  1059. delete {mute::%arg 1's uuid%}
  1060.  
  1061. command /warn [<offlineplayer>] [<text>]:
  1062. permission: rank.jrmod
  1063. permission message: &cYou don't have access to that command.
  1064. trigger:
  1065. if arg 2 is not set:
  1066. send "&c/warn <player> <reason>"
  1067. else:
  1068. send "%nl% &6%player% &7warned &6%arg 1% &7for &6%arg 2%&7.%nl% " to all players
  1069. add "(%now%) &6%player% &7warned &6%arg 1% &e[%arg 2%]" to {punishments::%arg 1's uuid%::*}
  1070.  
  1071. command /history [<offlineplayer>]:
  1072. permission: rank.jrmod
  1073. permission message: &cYou don't have access to that command.
  1074. trigger:
  1075. if arg 1 is not set:
  1076. send "&c/history <player>"
  1077. else:
  1078. loop {punishments::%arg 1's uuid%::*}:
  1079. add "%loop-value%%nl%&f" to {_p::*}
  1080. set {_p2} to "%{_p::*}%"
  1081. replace all ", " and " and" with "" in {_p2}
  1082. set {_p2} to "No Punishments" if {_p2} is "<none>"
  1083. send ""
  1084. send "<tooltip:%{_p2}%> &6%arg 1%'s Punishments <hover>"
  1085. send ""
  1086.  
  1087. every second:
  1088. loop all players:
  1089. {mute::%loop-player's uuid%} is set
  1090. {mutet::%loop-player's uuid%} is set
  1091. if difference between {mutet::%loop-player's uuid%} and now is less than 1 second:
  1092. send "&6[Beans] &eYou have been unmuted!" to loop-player
  1093. delete {mute::%loop-player's uuid%}
  1094. delete {mutet::%loop-player's uuid%}
  1095. delete {mutet2::%loop-player's uuid%}
  1096.  
  1097. function toTimespan(t: text) :: timespan:
  1098. set {_conversion::s} to "seconds"
  1099. set {_conversion::m} to "minutes"
  1100. set {_conversion::h} to "hours"
  1101. set {_conversion::d} to "days"
  1102. set {_l} to length of {_t}
  1103. set {_a} to 1 if {_l} is 2
  1104. set {_a} to 2 if {_l} is 3
  1105. set {_l::1} to first {_a} characters of {_t}
  1106. set {_l::2} to last character of {_t}
  1107. set {_t} to "%{_l::1}% %{_conversion::%{_l::2}%}%"
  1108. return ({_t} parsed as timespan)
  1109.  
  1110. function newPlayer(p: player):
  1111. set {_u} to {_p}'s uuid
  1112. set {joined::%{_u}%} to true
  1113. set {balance::%{_u}%} to 25
  1114. set {blocks::%{_u}%} to 0
  1115. set {kills::%{_u}%} to 0
  1116. set {deaths::%{_u}%} to 0
  1117. clear {_p}'s inventory
  1118. give {_p} 1 diamond pickaxe
  1119. set {_p}'s chestplate to elytra
  1120.  
  1121. on join:
  1122. set player's gamemode to survival
  1123. teleport player to spawn
  1124. if {joined::%player's uuid%} is not set:
  1125. newPlayer(player)
  1126. set join message to "&6[Bealz] &7Welcome &e%player% &7to the server! &e[##%size of all offline players%]"
  1127. else:
  1128. set join message to "&7%player% joined the server."
  1129.  
  1130. on quit:
  1131. set quit message to "&7%player% left the server."
  1132.  
  1133. on damage of player:
  1134. damage cause is fall
  1135. cancel event
  1136.  
  1137. on break:
  1138. if y-coordinate of event-block is less than 25:
  1139. cancel event
  1140.  
  1141. on explosion:
  1142. cancel event
  1143.  
  1144. every second:
  1145. loop all players:
  1146. if {balance::%loop-player's uuid%} is not set:
  1147. newPlayer(loop-player)
  1148. else if {blocks::%loop-player's uuid%} is not set:
  1149. set {blocks::%loop-player's uuid%} to 0
  1150. set {kills::%loop-player's uuid%} to 0
  1151. set {deaths::%loop-player's uuid%} to 0
  1152. set tablist name of loop-player to " &7%loop-player's prefix%%loop-player% &6&l%{bounty::%loop-player's uuid%} ? """"%"
  1153. set tab header to "%nl%&f&l* &6Beans &f&l*%nl% &7Elytra, pvp and mining %nl% &7&l&m*&7 FaactoNetwork &7&l&m*%nl%" and footer to "%nl%&7(&nSeason 9&7)%nl%%nl%&f&l* &6Online: &f%number of all players%&e/&f10 &f&l*%nl%&7" for loop-player
  1154.  
  1155. on server ping:
  1156. set {maxPlayers} to max player count
  1157.  
  1158. on food level change:
  1159. if player's food level is not 20:
  1160. set player's food level to 20
  1161. else:
  1162. cancel event
  1163.  
  1164. on respawn:
  1165. wait 5 ticks
  1166. teleport player to spawn
  1167.  
  1168. on death:
  1169. delete {ct::%victim%}
  1170. set {_a} to {balance::%victim's uuid%} / 100
  1171. send "&6[Beans] &7You lost &e$%{_a}%&7, OMG!" to victim
  1172. send "&6[Beans] &7Wowwww, you gained &e$%{_a}%&7." to attacker
  1173. remove {_a} from {balance::%victim's uuid%}
  1174. add {_e} to {balance::%attacker's uuid%}
  1175. add 1 to {kills::%attacker's uuid%}
  1176. add 1 to {deaths::%victim's uuid%}
  1177.  
  1178. on load:
  1179. delete {ces::*}
  1180.  
  1181. add "Laser" to {ces::*}
  1182. add "Haste" to {ces::*}
  1183. add "Merchant" to {ces::*}
  1184. add "Superbreaker" to {ces::*}
  1185. add "Explosive" to {ces::*}
  1186.  
  1187. add "Nuke" to {ces::*}
  1188. add "Nuke" to {ces::*}
  1189. add "Autosell" to {ces::*}
  1190. add "Autosell" to {ces::*}
  1191. add "Upgrader" to {ces::*}
  1192. add "Upgrader" to {ces::*}
  1193. add "Lightning" to {ces::*}
  1194. add "Lightning" to {ces::*}
  1195.  
  1196. add "Xp" to {ces::*}
  1197. add "Xp" to {ces::*}
  1198. add "Xp" to {ces::*}
  1199. add "Unbreakable" to {ces::*}
  1200. add "Unbreakable" to {ces::*}
  1201. add "Unbreakable" to {ces::*}
  1202. add "Speed" to {ces::*}
  1203. add "Speed" to {ces::*}
  1204. add "Speed" to {ces::*}
  1205. add "Furnace" to {ces::*}
  1206. add "Furnace" to {ces::*}
  1207. add "Furnace" to {ces::*}
  1208.  
  1209. on item damage:
  1210. if lore of item contains "Unbreakable":
  1211. cancel event
  1212.  
  1213. on mine:
  1214. "%region at event-block%" is "mine in world ul_world"
  1215. player is holding any pickaxe
  1216. add 1 to {blocks::%player's uuid%}
  1217. set {_n} to a random integer between 1 and 10000
  1218.  
  1219. if {_n} is 1:
  1220. set {_n2} to a random element out of {ces::*}
  1221. send "%nl%&6[Bealz] &e&l%player% &ejust got the %{_n2}% enchantment from mining! &6(0.01%% chance)%nl%" to all players
  1222. ench(player, tool, {_n2})
  1223.  
  1224. set {_lore} to lore of tool
  1225.  
  1226. if player has not enough space for event-block:
  1227. if {_lore} contains "Autosell":
  1228. player command "/sell all"
  1229.  
  1230. if {_lore} contains "Haste":
  1231. remove haste from player
  1232. apply haste 3 without particles to player for 3 seconds
  1233.  
  1234. if {_lore} contains "Speed":
  1235. remove speed from player
  1236. apply speed 5 without particles to player for 3 seconds
  1237.  
  1238. if {_lore} contains "Upgrader":
  1239. chance of 20%:
  1240. give player 1 of smelt(upgrade(event-block))
  1241.  
  1242. if {_lore} contains "Xp":
  1243. chance of 10%:
  1244. set {_x} to a random number between 10 and 100
  1245. add {_x} to xp of player
  1246.  
  1247. if {_lore} contains "Lightning":
  1248. chance of 5%:
  1249. strike lightning effect at the event-block
  1250. loop blocks below event-block:
  1251. "%region at loop-block%" is "mine in world ul_world"
  1252. loop-block is not bedrock
  1253. chance of 75%:
  1254. if {_lore} contains "Xp":
  1255. chance of 3%:
  1256. set {_x} to a random number between 10 and 100
  1257. add {_x} to xp of player
  1258. set {_a} to a random integer between 1 and 3
  1259. add {_a} to xp of player
  1260. chance of 20%:
  1261. set {_l} to level of fortune on player's tool
  1262. if {_l} is set:
  1263. set {_b} to smelt(loop-block)
  1264. if {_lore} contains "Upgrader":
  1265. chance of 20%:
  1266. set {_b} to smelt(upgrade(loop-block))
  1267. give player {_l} of {_b}
  1268. else:
  1269. give player 1 of smelt(loop-block)
  1270. give player 1 of smelt(loop-block)
  1271. set loop-block to air
  1272.  
  1273. if {_lore} contains "Explosive":
  1274. chance of 25%:
  1275. loop all blocks in radius 1.5 around event-block:
  1276. loop-block is not bedrock
  1277. "%region at loop-block%" is "mine in world ul_world"
  1278. chance of 75%:
  1279. if {_lore} contains "Xp":
  1280. chance of 3%:
  1281. set {_x} to a random number between 10 and 100
  1282. add {_x} to xp of player
  1283. set {_a} to a random integer between 1 and 3
  1284. add {_a} to xp of player
  1285. chance of 20%:
  1286. set {_l} to level of fortune on player's tool
  1287. if {_l} is set:
  1288. set {_b} to smelt(loop-block)
  1289. if {_lore} contains "Upgrader":
  1290. chance of 20%:
  1291. set {_b} to smelt(upgrade(loop-block))
  1292. give player {_l} of {_b}
  1293. else:
  1294. give player 1 of smelt(loop-block)
  1295. chance of 10%:
  1296. add 1 to {blocks::%player's uuid%}
  1297. set loop-block to air
  1298.  
  1299. if {_lore} contains "Nuke":
  1300. chance of 3.5%:
  1301. loop all blocks in radius 4.5 around event-block:
  1302. loop-block is not bedrock
  1303. "%region at loop-block%" is "mine in world ul_world"
  1304. chance of 25%:
  1305. if {_lore} contains "Xp":
  1306. chance of 2%:
  1307. set {_x} to a random number between 10 and 100
  1308. add {_x} to xp of player
  1309. set {_a} to a random integer between 1 and 3
  1310. add {_a} to xp of player
  1311. chance of 3%:
  1312. set {_l} to level of fortune on player's tool
  1313. if {_l} is set:
  1314. set {_b} to smelt(loop-block)
  1315. give player {_l} of {_b}
  1316. else:
  1317. give player 1 of smelt(loop-block)
  1318. chance of 3%:
  1319. add 1 to {blocks::%player's uuid%}
  1320. set loop-block to air
  1321.  
  1322.  
  1323. if {_lore} contains "Laser":
  1324. chance of 1%:
  1325. loop blocks north of the event-block:
  1326. "%region at loop-block%" contains "mine"
  1327. loop-block is not bedrock
  1328. chance of 10%:
  1329. add 1 to {blocks::%player's uuid%}
  1330. give player 1 of smelt(loop-block)
  1331. set loop-block to air
  1332. show smoke at loop-block
  1333. loop blocks south of the event-block:
  1334. "%region at loop-block%" contains "mine"
  1335. loop-block is not bedrock
  1336. chance of 10%:
  1337. add 1 to {blocks::%player's uuid%}
  1338. give player 1 of smelt(loop-block)
  1339. set loop-block to air
  1340. show smoke at loop-block
  1341. loop blocks east of the event-block:
  1342. "%region at loop-block%" contains "mine"
  1343. loop-block is not bedrock
  1344. chance of 10%:
  1345. add 1 to {blocks::%player's uuid%}
  1346. give player 1 of smelt(loop-block)
  1347. set loop-block to air
  1348. show smoke at loop-block
  1349. loop blocks west of the event-block:
  1350. "%region at loop-block%" contains "mine"
  1351. loop-block is not bedrock
  1352. chance of 10%:
  1353. add 1 to {blocks::%player's uuid%}
  1354. give player 1 of smelt(loop-block)
  1355. set loop-block to air
  1356. show smoke at loop-block
  1357.  
  1358. if {_lore} contains "Furnace":
  1359. if event-block is any ore:
  1360. chance of 75%:
  1361. set {_a} to a random integer between 1 and 3
  1362. add {_a} to xp of player
  1363. if player's tool is enchanted with fortune:
  1364. chance of 20%:
  1365. set {_l} to level of fortune on player's tool
  1366. if {_l} is set:
  1367. set {_b} to smelt(event-block)
  1368. give player {_l} of {_b}
  1369. else:
  1370. give player 1 of smelt(event-block)
  1371. set event-block to air
  1372.  
  1373. if {ach::%player's uuid%::1} is not set:
  1374. if {blocks::%player's uuid%} is greater than 5000:
  1375. set {_n2} to a random element out of {ces::*}
  1376. send "%nl%&6[Bealz] &e&l%player% &ejust got the %{_n2}% enchantment from mining! &6(5000 blocks)%nl%" to all players
  1377. ench(player, tool, {_n2})
  1378. set {ach::%player's uuid%::1} to true
  1379.  
  1380. if {ach::%player's uuid%::2} is not set:
  1381. if {blocks::%player's uuid%} is greater than 25000:
  1382. set {_n2} to a random element out of {ces::*}
  1383. send "%nl%&6[Bealz] &e&l%player% &ejust got the %{_n2}% enchantment from mining! &6(25000 blocks)%nl%" to all players
  1384. ench(player, tool, {_n2})
  1385. set {ach::%player's uuid%::2} to true
  1386.  
  1387. if {ach::%player's uuid%::3} is not set:
  1388. if {blocks::%player's uuid%} is greater than 50000:
  1389. set {_n2} to a random element out of {ces::*}
  1390. send "%nl%&6[Bealz] &e&l%player% &ejust got the %{_n2}% enchantment from mining! &6(50000 blocks)%nl%" to all players
  1391. ench(player, tool, {_n2})
  1392. set {ach::%player's uuid%::3} to true
  1393.  
  1394. if {ach::%player's uuid%::4} is not set:
  1395. if {blocks::%player's uuid%} is greater than 100000:
  1396. set {_n2} to a random element out of {ces::*}
  1397. send "%nl%&6[Bealz] &e&l%player% &ejust got the %{_n2}% enchantment from mining! &6(100000 blocks)%nl%" to all players
  1398. ench(player, tool, {_n2})
  1399. set {ach::%player's uuid%::4} to true
  1400.  
  1401.  
  1402. on rightclick with diamond pickaxe:
  1403. if lore of tool contains "Superbreaker":
  1404. if {sb::%player's uuid%} is set:
  1405. send "&6[Superbreaker] &7Currently on cooldown."
  1406. else:
  1407. set {sb::%player's uuid%} to true
  1408. set {_e} to level of efficiency on tool
  1409. send "&6[Superbreaker] &7Activated."
  1410. enchant tool with "efficiency %level of efficiency of tool + 5%" parsed as enchantment type
  1411. wait 10 seconds
  1412. loop all items in player's inventory:
  1413. set {_e::%loop-item%} to level of efficiency on loop-item
  1414. if {_e::%loop-item%} is greater than 5:
  1415. enchant loop-item with efficiency 5
  1416. send "&6[Superbreaker] &7Disabled."
  1417. wait 1 minute 30 seconds
  1418. send "&6[Superbreaker] &7You can now use superbreaker again."
  1419. delete {sb::%player's uuid%}
  1420.  
  1421. on load:
  1422. delete {sb::*}
  1423.  
  1424. on join:
  1425. loop all items in player's inventory:
  1426. set {_e::%loop-item%} to level of efficiency on loop-item
  1427. {_e::%loop-item%} is set
  1428. if {_e::%loop-item%} is greater than 5:
  1429. enchant loop-item with efficiency 5
  1430. delete {sb::%player's uuid%}
  1431.  
  1432. function upgrade(i: item) :: item:
  1433. set {_b} to coal ore if {_i} is stone
  1434. set {_b} to iron ore if {_i} is coal ore
  1435. set {_b} to gold ore if {_i} is iron ore
  1436. set {_b} to diamond ore if {_i} is gold ore
  1437. set {_b} to emerald ore if {_i} is diamond ore
  1438. set {_b} to emerald block if {_i} is emerald ore
  1439. return {_b}
  1440.  
  1441. function smelt(i: item) :: item:
  1442. set {_s} to emerald if {_i} is emerald ore
  1443. set {_s} to diamond if {_i} is diamond ore
  1444. set {_s} to gold ingot if {_i} is gold ore
  1445. set {_s} to iron ingot if {_i} is iron ore
  1446. set {_s} to coal if {_i} is coal ore
  1447. set {_s} to stone if {_i} is stone or cobblestone
  1448. return {_s}
  1449.  
  1450. function ench(p: player, i: item, e: text):
  1451. set {_l::*} to lore of {_i} split at "||"
  1452. if {_l::*} contains "&d%{_e}%":
  1453. send "&6[Enchanter] &7Your tool already has that enchantment. Here's $10k. &6Successfully added %{_e}% to your stored enchantments." to {_p}
  1454. set {_u} to {_p}'s uuid
  1455. add {_e} to {stored::%{_u}%::*}
  1456. add 10000 to {balance::%{_u}%}
  1457. else:
  1458. set {_l2} to lore of {_i}
  1459. if {_l2} is "":
  1460. set lore of {_i} to "&d%{_e}%"
  1461. else:
  1462. set lore of {_i} to "%{_l2}%||&d%{_e}%"
  1463.  
  1464. command /stats [<offlineplayer>]:
  1465. trigger:
  1466. set {_p} to arg 1 ? player
  1467. set {_u} to {_p}'s uuid
  1468. if {blocks::%{_u}%} is not set:
  1469. send "&cThat player has not joined."
  1470. else:
  1471. send ""
  1472. send " &6[Stats] &7Viewing &e%{_p}%'s &7stats"
  1473. send ""
  1474. send " &eBlocks&7: %{blocks::%{_u}%}%"
  1475. send " &eKills&7: %{kills::%{_u}%}%"
  1476. send " &eDeaths&7: %{deaths::%{_u}%}%"
  1477. send " &eBalance&7: $%short({balance::%{_u}%})%"
  1478. send ""
  1479.  
  1480. command /pickaxe [<text>]:
  1481. trigger:
  1482. give player diamond pickaxe
  1483.  
  1484. command /ce [<text>]:
  1485. trigger:
  1486. send "&6[Beans] &eCustom enchantments are completely random. 1/10000 chance of getting them when you mine. There is /lotto which gives you a chance to get one for xp levels."
  1487.  
  1488. command /lotto [<text>]:
  1489. trigger:
  1490. if player is not holding any pickaxe:
  1491. send "&cYou must be holding a pickaxe."
  1492. else:
  1493. if xp of player is less than 50000:
  1494. send "&cYou don't have enough xp! (50k required, you have %xp of player%)"
  1495. else:
  1496. remove 50000 from xp of player
  1497. set {_n} to a random integer between 1 and 100
  1498. if {_n} is between 1 and 3:
  1499. set {_n2} to a random element out of {ces::*}
  1500. send "%nl%&6[Beans] &e&l%player% &ejust got the %{_n2}% enchantment from the lotto! &6(3%% chance)%nl%" to all players
  1501. ench(player, tool, {_n2})
  1502. else:
  1503. send "&6&lUNLUCKY!!!"
  1504.  
  1505. command /xp [<text>]:
  1506. trigger:
  1507. add amount of xp bottles in player's inventory * random integer between 3 and 11 to player's xp
  1508. remove 2304 xp bottles from player's inventory
  1509.  
  1510. command /store [<text>]:
  1511. trigger:
  1512. if arg 1 is not set:
  1513. send "&c/store <enchantments | list>"
  1514. else:
  1515. if arg 1 is "list":
  1516. loop {stored::%player's uuid%::*}:
  1517. if {_ces::*} does not contain loop-value:
  1518. add loop-value to {_ces::*}
  1519. send ""
  1520. send " &6[Bealz] &7Stored CE's"
  1521. send ""
  1522. loop {_ces::*}:
  1523. send "&e%loop-value%"
  1524. send ""
  1525. else if arg 1 is "enchantments":
  1526. set {_l::*} to lore of tool split at "||"
  1527. replace all "||" with "" in {_l::*}
  1528. loop {_l::*}:
  1529. if loop-value is not "":
  1530. add uncolored loop-value to {stored::%player's uuid%::*}
  1531. set lore of tool to ""
  1532. send "&7Successfully stored &6%loop-value%&7."
  1533. else:
  1534. player command "/store"
  1535.  
  1536. command /withdraw [<text>]:
  1537. trigger:
  1538. if arg 1 is not set:
  1539. send "&c/withdraw <enchantment>"
  1540. else:
  1541. if {stored::%player's uuid%::*} does not contain arg 1:
  1542. send "&cYou don't have that enchantment stored. (/store list)"
  1543. else:
  1544. if lore of tool contains arg 1:
  1545. send "&cYour tool already has that enchantment."
  1546. else:
  1547. remove arg 1 from {stored::%player's uuid%::*}
  1548. set lore of tool to "%lore of tool%||&d%arg 1%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement