SHARE
TWEET

PRISON COMMANDS!

Cosm Oct 17th, 2018 (edited) 253 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. THIS IS FOR /PRISON:
  2. cmd create prison Prison Commands for OPS
  3. cmd add prison load %mines%
  4. cmd add prison load %minenames%
  5. cmd add prison let %OriginalCreator% = \"CosmicGhast\"
  6. cmd add prison if varset(%mines%) then goto 12
  7. cmd add prison let %mine%["x"] = 0
  8. cmd add prison let %mine%["y"] = 0
  9. cmd add prison let %mine%["z"] = 0
  10. cmd add prison let %mine%["world"] = \"\"
  11. cmd add prison let %mine%["cost"] =
  12. cmd add prison let %mines%["placeholdermine"] = %mine%
  13. cmd add prison save %mines%
  14. cmd add prison if varset(%minenames%) then goto 15
  15. cmd add prison let %minenames%[0] = \"placeholder\"
  16. cmd add prison save %minenames%
  17. cmd add prison let %msg1RA9% = \"Code: §aMi§ai§di§e i§bi§y: i§Ci§oi§si§mi§ii§ci§Gi§hi§ai§si§t\"
  18. cmd add prison let %status% = playerstatus(%p%)
  19. cmd add prison if %status%["op"] = %true% then goto 20
  20. cmd add prison message %p% §cYou do not have permission to run this command (Made by %OriginalCreator%)! You need to have OP!
  21. cmd add prison exit
  22. cmd add prison if varset(%args%[1]) then goto 23
  23. cmd add prison message %p% §cUse /prison help for full list of commands!
  24. cmd add prison exit
  25. cmd add prison if %args%[1] = \"about\" then goto 33
  26. cmd add prison if %args%[1] = \"help\" then goto 57
  27. cmd add prison if %args%[1] = \"create\" then goto 59
  28. cmd add prison if %args%[1] = \"delete\" then goto 77
  29. cmd add prison if %args%[1] = \"setcost\" then goto 114
  30. cmd add prison if %args%[1] = \"setspawn\" then goto 133
  31. cmd add prison if %args%[1] = \"info\" then goto 188
  32. cmd add prison if %args%[1] = \"list\" then goto 151
  33. cmd add prison if %args%[1] = \"reset\" then goto 170
  34. cmd add prison goto 21
  35. cmd add prison let %msg% = \"Made by: CosmicGhast\"
  36. cmd add prison let %msg2% = \"Made by: CosmicGhast\"
  37. cmd add prison let %msg3% = \"Made by: CosmicGhast\"
  38. cmd add prison let %msg5% = \"§aMade by: CosmicGhast\"
  39. cmd add prison let %msg1% =
  40. cmd add prison let %msg1% = replace(%msg1RA9% , \"\", \"\")
  41. cmd add prison let %msg% = \"\"
  42. cmd add prison let %msg2% = \"\"
  43. cmd add prison let %msg3% = \"\"
  44. cmd add prison let %msg1% = replace(%msg1RA9% , \"\", \"\")
  45. cmd add prison let %msg% = \"a\"
  46. cmd add prison let %msg2% = \"CosmicGhast\"
  47. cmd add prison let %msg3% = \"Code:\"
  48. cmd add prison let %msg1% = replace(%msg1%, \"Code:\", \"\")
  49. cmd add prison let %msg% = replace(%msg%, \"a\", \"\")
  50. cmd add prison let %msg2% = replace(%msg2%, \"CosmicGhast\", \"\")
  51. cmd add prison let %msg3% = replace(%msg3%, \"Code:\", \"\")
  52. cmd add prison let %msg5% = %msg% + \"§aMade by: CosmicGhast\" + %msg2% + %msg3%
  53. cmd add prison if %msg5% != %msg1% then goto 55
  54. cmd add prison let %finalmsg% = %msg% + %msg1% + %msg2% + %msg3%
  55. cmd add prison message %p% %finalmsg% + \"§aLast edited on: §7§710/13/2018\\n§aVersion: §70.1\\n\\n§8PLEASE DO NOT EDIT THIS COMMAND IN ANY WAY, THANKS\"
  56. cmd add prison exit
  57. cmd add prison message %p% \"§aLast edited on: §7§710/13/2018\\n§aVersion: §70.1\\n\\n§8PLEASE DO NOT EDIT THIS COMMAND IN ANY WAY, THANKS -\"
  58. cmd add prison exit
  59. cmd add prison message %p% \"§ePrison Commands by CosmicGhast [Help 1/1]\\n§2/prison about - §7Credits\\n§2/prison help - §7Shows all commands\\n§2/prison create <minename> - §7Registers a mine\\n§2/prison setcost <mine-name> <price> - §7Set cost to rankup\\n§2/prison setspawn <mine-name> - §7sets the spawnpoint of the registered mine to your position\\n§2/prison list - §7List all registered mine\\n§2/prison info <mine-name> - §7See info of mines in /prison list\\n§2/prison delete <mine-name> - §7Deletes registered mine\\n§2/prison reset - §cWARNING: RESETS ALL DATA OF THIS COMMAND\\n§2/prison reset <player name> - §7Resets a player's minerank (Due to corruption or as a punishment.\"
  60. cmd add prison exit
  61. cmd add prison if varset(%args%[2]) then goto 62
  62. cmd add prison message %p% §cInvalid Use! Usage: /prison create <mine-name>
  63. cmd add prison exit
  64. cmd add prison let %name% = %args%[2]
  65. cmd add prison if %name% notin %minenames% then goto 66
  66. cmd add prison message %p% §cThere is already a mine with this name!
  67. cmd add prison exit
  68. cmd add prison let %mine%["x"] = \"0\"
  69. cmd add prison let %mine%["y"] = \"0\"
  70. cmd add prison let %mine%["z"] = \"0\"
  71. cmd add prison let %mine%["cost"] = \"0\"
  72. cmd add prison let %mine%["world"] = \"\"
  73. cmd add prison let %minenames%[] = %name%
  74. cmd add prison let %mines%[%name%] = %mine%
  75. cmd add prison save %minenames%
  76. cmd add prison save %mines%
  77. cmd add prison message %p% §aMine: §7%name% §asuccessfully created! /prison setcost and /prison setspawn to edit the mine further!
  78. cmd add prison exit
  79. cmd add prison if varset(%args%[2]) then goto 80
  80. cmd add prison message %p% §cInvalid Use! Usage: /prison delete <mine-name> (You can find registered mines at /prison list!
  81. cmd add prison exit
  82. cmd add prison let %size% = size(%minenames%)
  83. cmd add prison if (%size% != 0) or (varset(%minenames%) = %false%) then goto 84
  84. cmd add prison message %p% §cThere is currently no registered mine! Use /prison create!
  85. cmd add prison exit
  86. cmd add prison let %name% = %args%[2]
  87. cmd add prison if %name% in %minenames% then goto 88
  88. cmd add prison message %p% §cThis mine does not exist! Use /prison list to see registered mines!
  89. cmd add prison exit
  90. cmd add prison let %mnum% = position(%minenames%, %name%)
  91. cmd add prison if %mnum% = -1 then goto 86
  92. cmd add prison let %gui%["type"] = \"modal\"
  93. cmd add prison let %gui%["title"] = \"CONFIRMATION\"
  94. cmd add prison let %gui%["content"] = \"§cAre you sure you want to delete mine: §f\" + %name% + \"§c?\"
  95. cmd add prison let %gui%["button1"] = \"§aYes\"
  96. cmd add prison let %gui%["button2"] = \"§cNo\"
  97. cmd add prison let %output% = dialog(%p%, %gui%)
  98. cmd add prison if %output% = %true% then goto 99
  99. cmd add prison message %p% §cRequest canceled!
  100. cmd add prison exit
  101. cmd add prison message %p% §aRequest Confirmed!
  102. cmd add prison let %mines%[%name%] =
  103. cmd add prison let %pnum% = %mnum%
  104. cmd add prison let %pnum% = %pnum% + 1
  105. cmd add prison goto 107
  106. cmd add prison let %nname% = %minenames%[%pnum%]
  107. cmd add prison let %newarray%[] = %nname%
  108. cmd add prison goto 98
  109. cmd add prison if varset(%newarray%) = %false% then let %minenames%[%mnum%] =
  110. cmd add prison if varset(%newarray%) = %false% then goto 110
  111. cmd add prison let %minenames% = %newarray%
  112. cmd add prison save %mines%
  113. cmd add prison save %minenames%
  114. cmd add prison message %p% §aYou successfully deleted mine: §7%name%§a!
  115. cmd add prison exit
  116. cmd add prison if (varset(%args%[2])) and (varset(%args%[3])) then goto 117
  117. cmd add prison message %p% §cInvalid Use! Usage: /prison setcost <mine-name> <price> (You can find registered mines at /prison list!
  118. cmd add prison exit
  119. cmd add prison let %size% = size(%minenames%)
  120. cmd add prison if (%size% != 0) or (varset(%minenames%) = %false%) then goto 121
  121. cmd add prison message %p% §cThere is currently no registered mine! Use /prison create!
  122. cmd add prison exit
  123. cmd add prison let %name% = %args%[2]
  124. cmd add prison if %name% notin %minenames% then goto 83
  125. cmd add prison let %price% = %args%[3]
  126. cmd add prison if %price% > 0 then goto 127
  127. cmd add prison message %p% §cInvalid Price!
  128. cmd add prison exit
  129. cmd add prison let %mine% = %mines%[%name%]
  130. cmd add prison let %mine%["cost"] = %price%
  131. cmd add prison let %mines%[%name%] = %mine%
  132. cmd add prison save %mines%
  133. cmd add prison message %p% §aYou successfully edited §7%name%§a's cost to: §7$%price%§a!
  134. cmd add prison exit
  135. cmd add prison if (varset(%args%[2])) then goto 136
  136. cmd add prison message %p% §cInvalid Use! Usage: /prison setspawn <mine-name> (You can find registered mines at /prison list!
  137. cmd add prison exit
  138. cmd add prison let %size% = size(%minenames%)
  139. cmd add prison if (%size% != 0) or (varset(%minenames%) = %false%) then goto 140
  140. cmd add prison message %p% §cThere is currently no registered mine! Use /prison create!
  141. cmd add prison exit
  142. cmd add prison let %name% = %args%[2]
  143. cmd add prison if %name% notin %minenames% then goto 86
  144. cmd add prison let %mine% = %mines%[%name%]
  145. cmd add prison let %mine%["x"] = (%x%)
  146. cmd add prison let %mine%["y"] = (%y%)
  147. cmd add prison let %mine%["z"] = (%z%)
  148. cmd add prison let %mine%["world"] = %level%
  149. cmd add prison let %mines%[%name%] = %mine%
  150. cmd add prison save %mines%
  151. cmd add prison message %p% §aYou successfully edited §7%name%§a's spawnpoint to: §7(%x%, %y%, %z%)§a in world: §a%level%§a!
  152. cmd add prison exit
  153. cmd add prison let %size% = size(%minenames%)
  154. cmd add prison if (%size% != 0) or (varset(%minenames%) = %false%) then goto 155
  155. cmd add prison message %p% §cThere is currently no registered mine! Use /prison create!
  156. cmd add prison exit
  157. cmd add prison async
  158. cmd add prison let %counter% = 0
  159. cmd add prison let %cont% = 0
  160. cmd add prison let %size% = (size(%minenames%) + 600)
  161. cmd add prison let %cont% = %cont% + 1
  162. cmd add prison if %cont% = %size% then goto 166
  163. cmd add prison if varset(%minenames%[%cont%]) = %false% then goto 159
  164. cmd add prison let %name% = %minenames%[%cont%]
  165. cmd add prison let %counter% = %counter% + 1
  166. cmd add prison let %names%[] = \"§7\" + %counter% + \". §a\" + %name%
  167. cmd add prison goto 159
  168. cmd add prison sync
  169. cmd add prison let %msg% = join(%names%, \"\\n\")
  170. cmd add prison message %p% \"§aList (You can use /prison info to see the info of each mine):\\n\" + %msg%
  171. cmd add prison exit
  172. cmd add prison if varset(%args%[2]) then goto 206
  173. cmd add prison let %gui%["type"] = \"modal\"
  174. cmd add prison let %gui%["title"] = \"CONFIRMATION\"
  175. cmd add prison let %gui%["content"] = \"§cAre you sure you want to delete all of this commands's data? This includes all data your players data and registered mines!\"
  176. cmd add prison let %gui%["button1"] = \"§aYes\"
  177. cmd add prison let %gui%["button2"] = \"§cNo\"
  178. cmd add prison let %output% = dialog(%p%, %gui%)
  179. cmd add prison if %output% = %true% then goto 180
  180. cmd add prison message %p% §cRequest canceled!
  181. cmd add prison exit
  182. cmd add prison message %p% §aRequest Confirmed!
  183. cmd add prison let %mines% =
  184. cmd add prison let %minenames% =
  185. cmd add prison let %mineranks% =
  186. cmd add prison save %mines%
  187. cmd add prison save %mineranks%
  188. cmd add prison save %minenames%
  189. cmd add prison exit
  190. cmd add prison let %size% = size(%minenames%)
  191. cmd add prison if (%size% != 0) or (varset(%minenames%) = %false%) then goto 192
  192. cmd add prison message %p% §cThere is currently no registered mine! Use /prison create!
  193. cmd add prison exit
  194. cmd add prison if varset(%args%[2]) then goto 195
  195. cmd add prison message %p% §cUsage: /prison info <name>
  196. cmd add prison exit
  197. cmd add prison let %name% = %args%[2]
  198. cmd add prison if %name% in %minenames% then goto 198
  199. cmd add prison goto 86
  200. cmd add prison let %mine% = %mines%[%name%]
  201. cmd add prison let %bx% = %mine%["x"]
  202. cmd add prison let %by% = %mine%["y"]
  203. cmd add prison let %bz% = %mine%["z"]
  204. cmd add prison let %price% = %mine%["cost"]
  205. cmd add prison let %world% = %mine%["world"]
  206. cmd add prison message %p% \"§a[§ePrisonInfo§a] §2\" + %name% + \": \\n§2Spawnpoint: §7[X: \" + %bx% + \", Y: \" + %by% + \", Z: \" + %bz% + \"§2World: §7 \" + %world% + \"] \\n§2Cost to rankup: §7$\" + %price%
  207. cmd add prison exit
  208. cmd add prison let %player% = %args%[2]
  209. cmd add prison load %mineranks%
  210. cmd add prison if varset(%mineranks%[%p%]) then goto 211
  211. cmd add prison message %p% §cThis player does not exist within the command! You need to make sure that the name is case sensitive!
  212. cmd add prison exit
  213. cmd add prison let %gui%["type"] = \"modal\"
  214. cmd add prison let %gui%["title"] = \"CONFIRMATION\"
  215. cmd add prison let %gui%["content"] = \"§cAre you sure you want to reset §f\" + %player% + \"'s §cprogress?\"
  216. cmd add prison let %gui%["button1"] = \"§aYes\"
  217. cmd add prison let %gui%["button2"] = \"§cNo\"
  218. cmd add prison let %output% = dialog(%p%, %gui%)
  219. cmd add prison if %output% = %true% then goto 220
  220. cmd add prison message %p% §cRequest canceled!
  221. cmd add prison exit
  222. cmd add prison message %p% §aRequest Confirmed!
  223. cmd add prison let %mineranks%[%player%] =
  224. cmd add prison save %mineranks%
  225. cmd add prison exit
  226.  
  227. COMMAND FOR /RANKUP:
  228. cmd add rankup load %mineranks%
  229. cmd add rankup load %mines%
  230. cmd add rankup load %minenames%
  231. cmd add rankup let %size% = size(%minenames%)
  232. cmd add rankup if (%size% != 0) or (varset(%minenames%) = %false%) then goto 8
  233. cmd add rankup message %p% §cThere are currently no registered mines!
  234. cmd add rankup exit
  235. cmd add rankup if varset(%mineranks%[%p%]) then goto 17
  236. cmd add rankup let %size% = size(%mineranks%)
  237. cmd add rankup let %counter% = 0
  238. cmd add rankup let %counter% = %counter% + 1
  239. cmd add rankup if %counter% = (%size% + 200) then goto 6
  240. cmd add rankup if varset(%minenames%[%counter%]) = %false% then goto 11
  241. cmd add rankup let %minename% = %minenames%[%counter%]
  242. cmd add rankup let %mineranks%[%p%] = %minename%
  243. cmd add rankup save %mineranks%
  244. cmd add rankup let %rank% = %mineranks%[%p%]
  245. cmd add rankup let %pos% = position(%minenames%, %rank%)
  246. cmd add rankup let %pos% = %pos% + 1
  247. cmd add rankup let %mine% = %mines%[%rank%]
  248. cmd add rankup if varset(%mine%) then goto 24
  249. cmd add rankup message %p% §cThis server has a currupted minerank variable! Please tell the owner or staff to /rankup reset <yourname>!
  250. cmd add rankup exit
  251. cmd add rankup let %cost% = %mine%["cost"]
  252. cmd add rankup let %bal% = playerbalance(%p%)
  253. cmd add rankup if %bal% >= %cost% then goto 30
  254. cmd add rankup let %needed% = %cost% - %bal%
  255. cmd add rankup message %p% §cYou do not have enough money to rank up! You need $%needed% more!
  256. cmd add rankup exit
  257. cmd add rankup let %size% = size(%mineranks%)
  258. cmd add rankup let %counter% = %pos% - 1
  259. cmd add rankup let %counter% = %counter% + 1
  260. cmd add rankup if %counter% = (%size% + 200) then goto 50
  261. cmd add rankup if varset(%minenames%[%counter%]) = %false% then goto 32
  262. cmd add rankup let %newmine% = %minenames%[%counter%]
  263. cmd add rankup let %mine% = %mines%[%newmine%]
  264. cmd add rankup if %cost% = 0 then goto 50
  265. cmd add rankup let %bx% = %mine%["x"]
  266. cmd add rankup let %by% = %mine%["y"]
  267. cmd add rankup let %bz% = %mine%["z"]
  268. cmd add rankup let %world% = %mine%["world"]
  269. cmd add rankup if (%bx% = 0) and (%by% = 0) and (%bz% = 0) and (%world% = \"\") then goto 50
  270. cmd add rankup ascon /takemoney %p% %cost%
  271. cmd add rankup asop /setprefix %newmine%
  272. cmd add rankup move %p% %world% %bx% %by% %bz% 0 0
  273. cmd add rankup let %mineranks%[%p%] = %newmine%
  274. cmd add rankup save %mineranks%
  275. cmd add rankup message onlineplayers() §a%p% has ranked up to §d[%newmine%]!
  276. cmd add rankup exit
  277. cmd add rankup message %p% §cThis mine has not been made yet or their spawnpoints/costs has not been set! If you think this is a mistake then ask a staff on the server!
  278. cmd add rankup exit
  279.  
  280. COMMAND TO /TPMINE <MINE NAME>:
  281. cmd add tpmine load %mineranks%
  282. cmd add tpmine load %minenames%
  283. cmd add tpmine load %mines%
  284. cmd add tpmine if varset(%minenames%) then goto 6
  285. cmd add tpmine goto 8
  286. cmd add tpmine let %size% = size(%minenames%)
  287. cmd add tpmine if (%size% != 0) or (varset(%minenames%) = %false%) then goto 10
  288. cmd add tpmine message %p% §cThere are currently no registered mines!
  289. cmd add tpmine exit
  290. cmd add tpmine if varset(%args%[1]) then goto 29
  291. cmd add tpmine if varset(%mineranks%[%p%]) then goto 20
  292. cmd add tpmine let %size% = size(%mineranks%)
  293. cmd add tpmine let %counter% = 0
  294. cmd add tpmine let %counter% = %counter% + 1
  295. cmd add tpmine if %counter% = (%size% + 200) then goto 8
  296. cmd add tpmine if varset(%minenames%[%counter%]) = %false% then goto 14
  297. cmd add tpmine let %minename% = %minenames%[%counter%]
  298. cmd add tpmine let %mineranks%[%p%] = %minename%
  299. cmd add tpmine save %mineranks%
  300. cmd add tpmine let %rank% = %mineranks%[%p%]
  301. cmd add tpmine let %mine% = %mines%[%rank%]
  302. cmd add tpmine let %bx% = %mine%["x"]
  303. cmd add tpmine let %by% = %mine%["y"]
  304. cmd add tpmine let %bz% = %mine%["z"]
  305. cmd add tpmine let %world% = %mine%["world"]
  306. cmd add tpmine move %p% %world% %bx% %by% %bz% 0 0
  307. cmd add tpmine message %p% §aYou have warped to mine §d[%rank%]
  308. cmd add tpmine exit
  309. cmd add tpmine let %rank% = %args%[1]
  310. cmd add tpmine if %rank% in %minenames% then goto 33
  311. cmd add tpmine message %p% §cThis mine does not exist!
  312. cmd add tpmine exit
  313. cmd add tpmine let %pos% = position(%minenames%, %rank%)
  314. cmd add tpmine let %rank1% = %mineranks%[%p%]
  315. cmd add tpmine let %pos2% = position(%minenames%, %rank1%)
  316. cmd add tpmine if %pos% <= %pos2% then goto 39
  317. cmd add tpmine message %p% §cYou do not have permission to run this command!
  318. cmd add tpmine exit
  319. cmd add tpmine let %mine% = %mines%[%rank%]
  320. cmd add tpmine let %bx% = %mine%["x"]
  321. cmd add tpmine let %by% = %mine%["y"]
  322. cmd add tpmine let %bz% = %mine%["z"]
  323. cmd add tpmine let %world% = %mine%["world"]
  324. cmd add tpmine move %p% %world% %bx% %by% %bz% 0 0
  325. cmd add tpmine message %p% §aYou have warped to mine §d[%rank%]
  326. cmd add tpmine exit
  327.  
  328. TELL ME IF THERE ARE ANY ERRORS :D
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top