Advertisement
Link1147

Bedwars Code [Full Madcommand] - Link1147

May 8th, 2019
984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.67 KB | None | 0 0
  1. cmd create bedwars §o§7Bedwars minigame - By: Link1147
  2. cmd add bedwars load %pvp%
  3. cmd add bedwars if varset(%pvp%) then goto 5
  4. cmd add bedwars let %pvp% = array()
  5. cmd add bedwars let %pvp% = %pvp% - array()
  6. cmd add bedwars if size(%pvp%) = 8 then message %p% §cA §3Bedwars §cmatch is already happening try again later!
  7. cmd add bedwars if size(%pvp%) = 8 then exit
  8. cmd add bedwars if %p% in %pvp% then message %p% §cYou are already in a §3Bedwars §cmatch!
  9. cmd add bedwars if %p% in %pvp% then exit
  10. cmd add bedwars let %pvp% = array(%pvp%, %p%)
  11. cmd add bedwars save %pvp%
  12. cmd add bedwars message %p% §aSuccessfully joined a §3Bedwars §amatch!
  13. cmd add bedwars let %teams% = array(\"RED\", \"BLUE\", \"GREEN\", \"YELLOW\", \"WHITE\", \"LIGHT-BLUE\", \"PURPLE\", \"BLACK\")
  14. cmd add bedwars let %rnd% = random(0, 1)
  15. cmd add bedwars let %myteam% = %teams%[%rnd%]
  16. cmd add bedwars message %p% §aYou have joined the §2%myteam% team.
  17. cmd add bedwars asop /storeinventory %player1%
  18. cmd add bedwars asop /storeinventory %player2%
  19. cmd add bedwars asop /storeinventory %player3%
  20. cmd add bedwars asop /storeinventory %player4%
  21. cmd add bedwars asop /storeinventory %player5%
  22. cmd add bedwars asop /storeinventory %player6%
  23. cmd add bedwars asop /storeinventory %player7%
  24. cmd add bedwars asop /storeinventory %player8%
  25. cmd add bedwars asop /setinventory %player1% 0
  26. cmd add bedwars asop /setinventory %player2% 0
  27. cmd add bedwars asop /setinventory %player3% 0
  28. cmd add bedwars asop /setinventory %player4% 0
  29. cmd add bedwars asop /setinventory %player5% 0
  30. cmd add bedwars asop /setinventory %player6% 0
  31. cmd add bedwars asop /setinventory %player7% 0
  32. cmd add bedwars asop /setinventory %player8% 0
  33. cmd add bedwars asop /setarmor %player1% 0 0 0 0
  34. cmd add bedwars asop /setarmor %player2% 0 0 0 0
  35. cmd add bedwars asop /setarmor %player3% 0 0 0 0
  36. cmd add bedwars asop /setarmor %player4% 0 0 0 0
  37. cmd add bedwars asop /setarmor %player5% 0 0 0 0
  38. cmd add bedwars asop /setarmor %player6% 0 0 0 0
  39. cmd add bedwars asop /setarmor %player7% 0 0 0 0
  40. cmd add bedwars asop /setarmor %player8% 0 0 0 0
  41. cmd add bedwars /copyblock world 100 100 100 100 100 100
  42. cmd add bedwars /copyblock world 100 100 100 100 100 100
  43. cmd add bedwars /copyblock world 100 100 100 100 100 100
  44. cmd add bedwars /copyblock world 100 100 100 100 100 100
  45. cmd add bedwars move %player1% world 1000 5 1000
  46. cmd add bedwars move %player2% world 1000 5 1000
  47. cmd add bedwars move %player3% world 1000 5 1000
  48. cmd add bedwars move %player4% world 1000 5 1000
  49. cmd add bedwars move %player5% world 1000 5 1000
  50. cmd add bedwars move %player6% world 1000 5 1000
  51. cmd add bedwars move %player7% world 1000 5 1000
  52. cmd add bedwars move %player8% world 1000 5 1000
  53. cmd add bedwars if size(%pvp%) = 8 then goto 55
  54. cmd add bedwars exit
  55. cmd add bedwars ascon /cmd run duelwinner
  56. cmd add bedwars load %pvp%
  57. cmd add bedwars ascon /freeze %player1%
  58. cmd add bedwars ascon /freeze %player2%
  59. cmd add bedwars ascon /freeze %player3%
  60. cmd add bedwars ascon /freeze %player4%
  61. cmd add bedwars ascon /freeze %player5%
  62. cmd add bedwars ascon /freeze %player6%
  63. cmd add bedwars ascon /freeze %player7%
  64. cmd add bedwars ascon /freeze %player8%
  65. cmd add bedwars message %pvp% §aStarting in...
  66. cmd add bedwars sleep 1
  67. cmd add bedwars message %pvp% §e3
  68. cmd add bedwars sleep 1
  69. cmd add bedwars message %pvp% §62
  70. cmd add bedwars sleep 1
  71. cmd add bedwars message %pvp% §c1
  72. cmd add bedwars sleep 1
  73. cmd add bedwars message %p% §4Go!!!
  74. cmd add bedwars ascon /unfreeze %player1%
  75. cmd add bedwars ascon /unfreeze %player2%
  76. cmd add bedwars ascon /unfreeze %player3%
  77. cmd add bedwars ascon /unfreeze %player4%
  78. cmd add bedwars ascon /unfreeze %player5%
  79. cmd add bedwars ascon /unfreeze %player6%
  80. cmd add bedwars ascon /unfreeze %player7%
  81. cmd add bedwars ascon /unfreeze %player8%
  82. cmd add bedwars ascon /give %player1% wooden_sword 1
  83. cmd add bedwars ascon /give %player2% wooden_sword 1
  84. cmd add bedwars ascon /give %player3% wooden_sword 1
  85. cmd add bedwars ascon /give %player4% wooden_sword 1
  86. cmd add bedwars ascon /give %player5% wooden_sword 1
  87. cmd add bedwars ascon /give %player6% wooden_sword 1
  88. cmd add bedwars ascon /give %player7% wooden_sword 1
  89. cmd add bedwars ascon /give %player8% wooden_sword 1
  90. cmd add bedwars ascon /give %player1% white_wool 200
  91. cmd add bedwars ascon /give %player2% white_wool 200
  92. cmd add bedwars ascon /give %player3% white_wool 200
  93. cmd add bedwars ascon /give %player4% white_wool 200
  94. cmd add bedwars ascon /give %player5% white_wool 200
  95. cmd add bedwars ascon /give %player6% white_wool 200
  96. cmd add bedwars ascon /give %player7% white_wool 200
  97. cmd add bedwars ascon /give %player8% white_wool 200
  98. cmd add bedwars ascon /give %player1% leather_helmet 1
  99. cmd add bedwars ascon /give %player2% leather_helmet 1
  100. cmd add bedwars ascon /give %player3% leather_helmet 1
  101. cmd add bedwars ascon /give %player4% leather_helmet 1
  102. cmd add bedwars ascon /give %player5% leather_helmet 1
  103. cmd add bedwars ascon /give %player6% leather_helmet 1
  104. cmd add bedwars ascon /give %player6% leather_helmet 1
  105. cmd add bedwars ascon /give %player7% leather_helmet 1
  106. cmd add bedwars ascon /give %player8% leather_helmet 1
  107. cmd add bedwars ascon /give %player1% leather_chestplate 1
  108. cmd add bedwars ascon /give %player2% leather_chestplate 1
  109. cmd add bedwars ascon /give %player3% leather_chestplate 1
  110. cmd add bedwars ascon /give %player4% leather_chestplate 1
  111. cmd add bedwars ascon /give %player5% leather_chestplate 1
  112. cmd add bedwars ascon /give %player6% leather_chestplate 1
  113. cmd add bedwars ascon /give %player6% leather_chestplate 1
  114. cmd add bedwars ascon /give %player7% leather_chestplate 1
  115. cmd add bedwars ascon /give %player8% leather_chestplate 1
  116. cmd add bedwas ascon /cmd run bwg
  117.  
  118. cmd create death
  119. cmd add death load %pvp%
  120. cmd add death if %p% in %pvp% then goto 4
  121. cmd add death exit
  122. cmd add death load %teams%
  123. cmd add death if (varset(%teams%[%p%]) = %false%) or (%teams%[%p%] = array(0) - array(0)) or (%teams%[%p%] = \"\") or (%teams%[%p%] = array(\"\")) then exit
  124. cmd add death if %teams%[%p%] = \"RED\" then let %team% = array(110, 100, 100, 14)
  125. cmd add death if %teams%[%p%] = \"BLUE\" then let %team% = array(109, 100, 100, 13)
  126. cmd add death if %teams%[%p%] = \"GREEN\" then let %team% = array(108, 100, 100, 12)
  127. cmd add death if %teams%[%p%] = \"YELLOW\" then let %team% = array(107, 100, 100, 18)
  128. cmd add death if %teams%[%p%] = \"WHITE\" then let %team% = array(106, 100, 100, 19)
  129. cmd add death if %teams%[%p%] = \"LIGHT-BLUE\" then let %team% = array(105, 100, 100, 17)
  130. cmd add death if %teams%[%p%] = \"PURPLE\" then let %team% = array(101, 100, 100, 16)
  131. cmd add death if %teams%[%p%] = \"BLACK\") then let %team% = array(102, 100, 100, 9)
  132. cmd add death let %bed% = blockinfo(\"world\", %team%[0], %team%[1], %team%[2])
  133. cmd add death if (%bed%[\"id\"] = 355) and (%bed%[\"variant\"] = %teams%[3]) then exit
  134. cmd add death asop /gamemode 3
  135. cmd add death message %p% §cGame Over!!
  136. cmd add death let %pvp% = %pvp% - array(%p%)
  137. cmd add death save %pvp%
  138. cmd add death %teams%[%p%] = array(0) - array(0)
  139. cmd add death save %teams%
  140. cmd unregister death
  141. cmd trigger death death
  142.  
  143. cmd create bwott
  144. cmd add bwott let %hand% = playerhand(%p%)
  145. cmd add bwott let %count% = %hand%["count"]
  146. cmd add bwott let %id% = %hand%["id"]
  147. cmd add bwott if %id% notin array(388, 264, 266, 265) then exit
  148. cmd add bwott if %id% = 388 then %cost% = 10000
  149. cmd add bwott if %id% = 264 then %cost% = 5000
  150. cmd add bwott if %id% = 266 then %cost% = 1000
  151. cmd add bwott if %id% = 265 then %cost% = 500
  152. cmd add bwott let %cost% = %count% * %cost%
  153. cmd add bwott asop /givemoney %p% %cost%
  154. cmd add bwott if %id% = 388 then goto 16
  155. cmd add bwott if %id% = 264 then goto 18
  156. cmd add bwott if %id% = 266 then goto 20
  157. cmd add bwott if %id% = 265 then goto 22
  158. cmd add bwott exit
  159. cmd add bwott ascon /cmd run rmitem %p% 388
  160. cmd add bwott exit
  161. cmd add bwott ascon /cmd run rmitem %p% 264
  162. cmd add bwott exit
  163. cmd add bwott ascon /cmd run rmitem %p% 266
  164. cmd add bwott exit
  165. cmd add bwott ascon /cmd run rmitem %p% 265
  166. cmd add bwott exit
  167. cmd unregister bwott
  168. cmd trigger touch bwott
  169.  
  170. cmd create bws §o§7Bedwars Shop
  171. cmd add bws let %money% = playerbalance(%p%)
  172. cmd add bws %gui2%[\"type\"] = \"form\"
  173. cmd add bws %gui2%[\"title\"] = \"§c§lBedWars §6Shop\"
  174. cmd add bws %button0%[\"text\"] = \"§cCancel\"
  175. cmd add bws %button1%[\"text\"] = \"§fWool\"
  176. cmd add bws %button2%[\"text\"] = \"§cWood\"
  177. cmd add bws %button3%[\"text\"] = \"§8Obsidian\"
  178. cmd add bws %button4%[\"text\"] = \"§bDiamond Sword\"
  179. cmd add bws %button5%[\"text\"] = \"§9Diamond Pickaxe\"
  180. cmd add bws %button6%[\"text\"] = \"§7Chainmail Armor\"
  181. cmd add bws %button7%[\"text\"] = \"§3Diamond Armor\"
  182. cmd add bws %button8%[\"text\"] = \"§4TNT\"
  183. cmd add bws %button9%[\"text\"] = \"§5Flint & Steel\"
  184. cmd add bws %buttons%[] = %button0%
  185. cmd add bws %buttons%[] = %button1%
  186. cmd add bws %buttons%[] = %button2%
  187. cmd add bws %buttons%[] = %button3%
  188. cmd add bws %buttons%[] = %button4%
  189. cmd add bws %buttons%[] = %button5%
  190. cmd add bws %buttons%[] = %button6%
  191. cmd add bws %buttons%[] = %button7%
  192. cmd add bws %buttons%[] = %button8%
  193. cmd add bws %buttons%[] = %button9%
  194. cmd add bws %gui2%[\"buttons\"] = %buttons%
  195. cmd add bws %content%[] = %gui2%
  196. cmd add bws %gui2%[\"content\"] = \"§§\"
  197. cmd add bws %response% = dialog(%player%, %gui2%)
  198. cmd add bws if %response% = 0 then exit
  199. cmd add bws if %response% = 1 then goto 100
  200. cmd add bws if %response% = 2 then goto 200
  201. cmd add bws if %response% = 3 then goto 300
  202. cmd add bws if %response% = 4 then goto 400
  203. cmd add bws if %response% = 5 then goto 500
  204. cmd add bws if %response% = 7 then goto 600
  205. cmd add bws if %response% = 8 then goto 700
  206. cmd add bws if %response% = 9 then goto 800
  207. cmd insert bws 100 if %money% > 1000 then goto 103
  208. cmd add bws message %p% §cInsuciccient balance.
  209. cmd add bws exit
  210. cmd add bws §aSucessfully purchased §2Wool§a.
  211. cmd add bws ascon /give %p% white_wool 200
  212. cmd insert bws 200 if %money% > 1000 then goto 203
  213. cmd add bws message %p% §cInsuciccient balance.
  214. cmd add bws exit
  215. cmd add bws §aSucessfully purchased §2Wood§a.
  216. cmd add bws ascon /give %p% wood 64
  217. cmd insert bws 300 if %money% > 1500 then goto 303
  218. cmd add bws message %p% §cInsuciccient balance.
  219. cmd add bws exit
  220. cmd add bws §aSucessfully purchased §2Obsidian§a.
  221. cmd add bws ascon /give %p% obsidian 10
  222. cmd insert bws 400 if %money% > 8000 then goto 403
  223. cmd add bws message %p% §cInsuciccient balance.
  224. cmd add bws exit
  225. cmd add bws §aSucessfully purchased §2Diamond Sword§a.
  226. cmd add bws ascon /give %p% diamond_sword 1
  227. cmd insert bws 500 if %money% > 10000 then goto 503
  228. cmd add bws message %p% §cInsuciccient balance.
  229. cmd add bws exit
  230. cmd add bws §aSucessfully purchased §2Diamond Pickaxe§a.
  231. cmd add bws ascon /give %p% diamond_pickaxe 1
  232. cmd insert bws 600 if %money% > 6000 then goto 603
  233. cmd add bws message %p% §cInsuciccient balance.
  234. cmd add bws exit
  235. cmd add bws §aSucessfully purchased §2Chainmail Armor§a.
  236. cmd add bws ascon /give %p% chainmail_leggings 1
  237. cmd add bws ascon /give %p% chainmail_boots 1
  238. cmd insert bws 700 if %money% > 18000 then goto 703
  239. cmd add bws message %p% §cInsuciccient balance.
  240. cmd add bws exit
  241. cmd add bws §aSucessfully purchased §2Diamond Armor§a.
  242. cmd add bws ascon /give %p% diamond_leggings 1
  243. cmd add bws ascon /give %p% dismond_boots 1
  244. cmd insert bws 800 if %money% > 20000 then goto 803
  245. cmd add bws message %p% §cInsuciccient balance.
  246. cmd add bws exit
  247. cmd add bws §aSucessfully purchased §2TNT§a.
  248. cmd add bws ascon /give %p% tnt 4
  249. cmd insert bws 900 if %money% > 8000 then goto 903
  250. cmd add bws message %p% §cInsuciccient balance.
  251. cmd add bws exit
  252. cmd add bws §aSucessfully purchased §2Flint & Steel§a.
  253. cmd add bws ascon /give %p% flint_and_steel 1
  254. cmd unregister bws
  255.  
  256. cmd create bwg
  257. cmd add bwg load %pvp%
  258. cmd add bwg if (varset(%pvp%) = %false%) or (%pvp% = array(0) - array(0)) or (%pvp% = \"\") or (%pvp% = array(\"\")) then exit
  259. cmd add bwg if size(%pvp%) < 1 then exit
  260. cmd add bwg drop 100 100 100 265
  261. cmd add bwg drop 100 100 100 265
  262. cmd add bwg drop 100 100 100 265
  263. cmd add bwg drop 100 100 100 265
  264. cmd add bwg drop 100 100 100 265
  265. cmd add bwg drop 100 100 100 265
  266. cmd add bwg drop 100 100 100 265
  267. cmd add bwg drop 100 100 100 265
  268. cmd add bwg sleep 2
  269. cmd add bwg drop 100 100 100 266
  270. cmd add bwg drop 100 100 100 266
  271. cmd add bwg drop 100 100 100 266
  272. cmd add bwg drop 100 100 100 266
  273. cmd add bwg drop 100 100 100 266
  274. cmd add bwg drop 100 100 100 266
  275. cmd add bwg drop 100 100 100 266
  276. cmd add bwg drop 100 100 100 266
  277. cmd add bwg load %bwdiamond%
  278. cmd add bwg %cooldown% = 58
  279. cmd add bwg %current% = %time%
  280. cmd add bwg if varset(%bwdiamond%) = %false% then goto 29
  281. cmd add bwg %previous% = %bwdiamond%
  282. cmd add bwg %elapsed% = %current% - %previous%
  283. cmd add bwg if %elapsed% >= %cooldown% then goto 29
  284. cmd add bwg goto 1
  285. cmd add bwg %bwdiamond% = %time%
  286. cmd add bwg save %bwdiamond%
  287. cmd add bwg #diamond
  288. cmd add bwg drop 100 100 100 264
  289. cmd add bwg drop 100 100 100 264
  290. cmd add bwg drop 100 100 100 264
  291. cmd add bwg drop 100 100 100 264
  292. cmd add bwg load %bwemerald%
  293. cmd add bwg %cooldown% = 118
  294. cmd add bwg %current% = %time%
  295. cmd add bwg if varset(%bwemerald%) = %false% then goto 44
  296. cmd add bwg %previous% = %bwemerald%
  297. cmd add bwg %elapsed% = %current% - %previous%
  298. cmd add bwg if %elapsed% >= %cooldown% then goto 44
  299. cmd add bwg goto 1
  300. cmd add bwg %bwemerald% = %time%
  301. cmd add bwg save %bwemerald%
  302. cmd add bwg drop 100 100 100 388
  303. cmd add bwg drop 100 100 100 388
  304. cmd add bwg drop 100 100 100 388
  305. cmd add bwg drop 100 100 100 388
  306. cmd add bwg goto 1
  307. cmd unregister bwg
  308.  
  309. cmd create bww
  310. cmd add bww load %pvp%
  311. cmd add bww if size(%pvp%) = 1 then goto 6
  312. cmd add bww if size(%pvp%) = 0 then exit
  313. cmd add bww sleep 1
  314. cmd add bww goto 1
  315. cmd add bww move %bww% world 5000 5 5000
  316. cmd add bww message onlineplayers() §6%bww% §ahas won a §3Bedwars §amatch!
  317. cmd add bww ascon /givemoney %bww% 100000
  318. cmd add bww let %pvp% = array()
  319. cmd add bww let %pvp% = %pvp% - array()
  320. cmd add bww save %pvp%
  321. cmd add bww exit
  322. cmd unregister bww
  323.  
  324. cmd create rmitem
  325. cmd edit rmitem 1 # Remove Specific Item v2.1.1 | Nuxeel | MadCommands v2.1.4 build 1027
  326. cmd edit rmitem 2 # /rmitem <player> <id:meta> <quantity> [tags]
  327. cmd edit rmitem 3 # -- Add this if only OPs are allowed to run the command --
  328. cmd edit rmitem 4 %p-name% = %p%
  329. cmd edit rmitem 5 %console% = array(\"Rcon\",\"CONSOLE\")
  330. cmd edit rmitem 6 if %p-name% in %console% then goto 20
  331. cmd edit rmitem 7 %is-op% = playerstatus(%p%)
  332. cmd edit rmitem 8 if %is-op%[\"op\"] = %true% then goto 20
  333. cmd edit rmitem 9 message %p% §cYou are not allowed to run this command.
  334. cmd edit rmitem 10 exit
  335. cmd edit rmitem 11 # -- End --
  336. cmd edit rmitem 20 # Validation process starts here.
  337. cmd edit rmitem 21 if varset(%args%[1]) = %true% then goto 40
  338. cmd edit rmitem 22 message %p% §aUsage: /rmitem <player> <id:meta> <quantity> [tags]
  339. cmd edit rmitem 23 exit
  340. cmd edit rmitem 40 # Check if player is online.
  341. cmd edit rmitem 41 %player% = %args%[1]
  342. cmd edit rmitem 42 if %player% in onlineplayers() then goto 60
  343. cmd edit rmitem 43 message %p% §cPlayer must be online.
  344. cmd edit rmitem 44 exit
  345. cmd edit rmitem 60 # Check if item id is valid.
  346. cmd edit rmitem 61 if varset(%args%[2]) = %false% then goto 22
  347. cmd edit rmitem 62 %item% = \"\" + %args%[2] + \"\"
  348. cmd edit rmitem 63 %item% = split(%item%, \":\")
  349. cmd edit rmitem 64 %item-id% = %item%[0]
  350. cmd edit rmitem 80 # Check if item variant/meta id is valid.
  351. cmd edit rmitem 81 if (varset(%item%[1]) = %false%) or (%item%[1] = \"\") then goto 86
  352. cmd edit rmitem 82 %item-variant% = %item%[1]
  353. cmd edit rmitem 83 if %item-variant% >= 0 then goto 87
  354. cmd edit rmitem 84 message %p% §cInvalid meta id.
  355. cmd edit rmitem 85 exit
  356. cmd edit rmitem 86 %item-variant% = 0
  357. cmd edit rmitem 87 if %item-id% > 0 then goto 100
  358. cmd edit rmitem 88 message %p% §cInvalid item id.
  359. cmd edit rmitem 89 exit
  360. cmd edit rmitem 100 # Check whether a quantity is specified.
  361. cmd edit rmitem 101 %cond% = %false%
  362. cmd edit rmitem 102 if varset(%args%[3]) = %false% then goto 120
  363. cmd edit rmitem 103 if %args%[3] = \"\" then goto 120
  364. cmd edit rmitem 104 %cond% = %true%
  365. cmd edit rmitem 105 %quantity% = %args%[3]
  366. cmd edit rmitem 106 if %quantity% > 0 then goto 120
  367. cmd edit rmitem 107 message %p% §cInvalid quantity.
  368. cmd edit rmitem 108 exit
  369. cmd edit rmitem 120 # Check whether tags is specified.
  370. cmd edit rmitem 121 %tag% = \"\"
  371. cmd edit rmitem 122 if varset(%args%[4]) = %false% then goto 140
  372. cmd edit rmitem 123 if %args%[4] = \"\" then goto 140
  373. cmd edit rmitem 124 %tag% = %args%[4]
  374. cmd edit rmitem 125 goto 140
  375. cmd edit rmitem 140 # Check quantity and remove item starts here.
  376. cmd edit rmitem 141 %inv% = playerinventory(%player%)
  377. cmd edit rmitem 142 async
  378. cmd edit rmitem 143 %index% = size(%inv%) - 1
  379. cmd edit rmitem 144 %get-slot% = %inv%[%index%]
  380. cmd edit rmitem 145 %check-id% = %get-slot%[\"id\"]
  381. cmd edit rmitem 146 %check-variant% = %get-slot%[\"variant\"]
  382. cmd edit rmitem 147 %check-tag% = %get-slot%[\"tags\"]
  383. cmd edit rmitem 148 if %check-id% != %item-id% then goto 165
  384. cmd edit rmitem 149 if %check-variant% != %item-variant% then goto 165
  385. cmd edit rmitem 150 if %check-tag% != %tag% then goto 165
  386. cmd edit rmitem 151 if %cond% = %false% then goto 163
  387. cmd edit rmitem 152 %count% = %get-slot%[\"count\"]
  388. cmd edit rmitem 153 if %quantity% >= %count% then goto 162
  389. cmd edit rmitem 154 %new-count% = %count% - %quantity%
  390. cmd edit rmitem 155 if %new-count% = 0 then goto 162
  391. cmd edit rmitem 156 %new-item%[\"id\"] = %item-id%
  392. cmd edit rmitem 157 %new-item%[\"variant\"] = %item-variant%
  393. cmd edit rmitem 158 %new-item%[\"count\"] = %new-count%
  394. cmd edit rmitem 159 %new-item%[\"tags\"] = %tag%
  395. cmd edit rmitem 160 %inv%[%index%] = %new-item%
  396. cmd edit rmitem 161 goto 180
  397. cmd edit rmitem 162 %quantity% = %quantity% - %count%
  398. cmd edit rmitem 163 # Condition: ALL
  399. cmd edit rmitem 164 %inv%[%index%] =
  400. cmd edit rmitem 165 # Update index
  401. cmd edit rmitem 166 %index% = %index% - 1
  402. cmd edit rmitem 167 if %cond% = %false% then goto 169
  403. cmd edit rmitem 168 if %quantity% <= 0 then goto 180
  404. cmd edit rmitem 169 if %index% > -1 then goto 144
  405. cmd edit rmitem 180 # Update player's inventory.
  406. cmd edit rmitem 181 sync
  407. cmd edit rmitem 182 carry %player% %inv%
  408. cmd edit rmitem 183 %check% = substring(%player%, -1, 1)
  409. cmd edit rmitem 184 if %check% = \"s\" then message %p% §aPlayer §6%player%§a' inventory updated!
  410. cmd edit rmitem 185 if %check% != \"s\" then message %p% §aPlayer §6%player%§a's inventory updated!
  411.  
  412. NOTE: All credits of rmitem go to Nuxeel, he was the original creator.
  413. SPECIAL THANKS: Thank you so much to xXPro98Xx for his help, without him, this wouldn't be possible. Make sure to drop him a thank you for me if you plan to use this. :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement