CloverSEQ

Market+

Mar 14th, 2016
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.52 KB | None | 0 0
  1. #------------------------------------------------------------#
  2. # Author : ItsAN (Arif Nurdiansyah)
  3. #--------------------------------------------------------------#
  4.  
  5. Options:
  6. logo : &a[&2Market+&a]
  7. author : &aItsAN
  8. ExtrasSk: ExtrasSK.jar
  9. WildSkript: WildSkript.jar
  10. SkQuery: SkQuery.jar
  11. skRayFall: skRayFall.jar
  12.  
  13. Variables:
  14. {market.max.1} = 53 #Don't Edit
  15. {market.max.2} = 106 #Don't Edit
  16. {market.max.3} = 159 #Don't Edit
  17. {market.max.4} = 212 #Don't Edit
  18. {market.max.5} = 265 #Don't Edit
  19. {market.max} = 0 # Don't Edit
  20. {market.price.create} = 25000
  21. {market.refund.delete} = 20000
  22. {market.price.move} = 15000
  23. {market.price.itemgui} = 20000
  24. {market.icon.%player%} = tripwire hook #Default Icon GUI
  25. {market.desc.%player%} = "Visit My Market!"
  26. {market.icon.next} = paper
  27.  
  28. Command /market [<text>] [<text>] [<number>]:
  29. trigger:
  30. if arg 1 is not set:
  31. message "{@logo}"
  32. message "&2Author : {@author}"
  33. message "&2Version : 0.2"
  34. message "&2Use /market help For More Info"
  35. stop
  36.  
  37. if arg 1 is "help":
  38. player has permission "market.default":
  39. message "{@logo}"
  40. message "&2/market create - For Set Your Market Location | Price : &a$%{market.price.create}%"
  41. message "&2/market desc <deskripsi> - Change Your Market Description"
  42. message "&2/market List - Open Market List GUI"
  43. message "&2/market go <player> - Teleport To Player's Market"
  44. message "&2/market movehere - Move Your Market Location | Price : &a$%{market.price.move}%"
  45. message "&2/market delete - Delete Your Market | Refund &a$%{market.refund.delete}%"
  46. message "&2/market seticon - Change Your GUI Icon| Price : &a$%{market.price.itemgui}%"
  47. message "&2/market admin - Admin Command"
  48. stop
  49.  
  50. if arg 1 is "desc":
  51. player has permission "market.default":
  52. if {market.%player%} is set:
  53. if arg 2 is set:
  54. set {market.desc.%player%} to arg 2
  55. message "{@logo} Done!"
  56. stop
  57. else:
  58. message "{@logo} Field the Description!"
  59. stop
  60. else:
  61. message "{@logo} You don't have permission"
  62. stop
  63.  
  64. if arg 1 is "movehere":
  65. player has permission "market.default":
  66. if {market.%player%} is set:
  67. if player's money is less than {market.price.move}:
  68. message "{@logo} You don't have enougth money!"
  69. stop
  70. else:
  71. subtract {market.price.move} from player's money
  72. set {market.%player%} to location of the player
  73. message "{@logo} Done"
  74. stop
  75. else:
  76. message "{@logo} You don't have permission"
  77. stop
  78.  
  79. if arg 1 is "seticon":
  80. player has permission "market.default":
  81. if {market.%player%} is set:
  82. if player's held item is air:
  83. message "{@logo} Hold the item!"
  84. else:
  85. if player's money is less than {market.price.itemgui}:
  86. message "{@logo} You don't have enought money!"
  87. stop
  88. else:
  89. subtract {market.price.itemgui} from player's money
  90. set {market.icon.%player%} to player's held item
  91. message "{@logo} Icon Changed!"
  92. stop
  93. else:
  94. message "{@logo} You don't have Market!"
  95. stop
  96. else:
  97. message "{@logo} You don't have permission!"
  98. stop
  99.  
  100. if arg 1 is "create":
  101. if {market.%player%} is not set:
  102. if player's money is less than {market.price.create}:
  103. message "{@logo} You don't have enought money"
  104. stop
  105.  
  106.  
  107.  
  108. else:
  109. if {market.max} is less than {market.max.1}:
  110. subtract {market.price.create} from player's money
  111. set {market.%player%} to location of the player
  112. set {market.visitor.%player%} to 0
  113. set {market.icon.%player%} to tripwire hook
  114. add 1 to {market.max}
  115. message "{@logo} &aMarket Set To This Location!!"
  116. add player to {market::*}
  117. play "LEVEL_UP" only to player with pitch 1 and volume 1
  118. stop
  119. else if {market.max} is less than {market.max.2}:
  120. subtract {market.price.create} from player's money
  121. set {market.%player%} to location of the player
  122. set {market.visitor.%player%} to 0
  123. set {market.icon.%player%} to tripwire hook
  124. add 1 to {market.max}
  125. message "{@logo} &aMarket Set To This Location!!"
  126. add player to {market2::*}
  127. play "LEVEL_UP" only to player with pitch 1 and volume 1
  128. stop
  129. else if {market.max} is less than {market.max.3}:
  130. subtract {market.price.create} from player's money
  131. set {market.%player%} to location of the player
  132. set {market.visitor.%player%} to 0
  133. set {market.icon.%player%} to tripwire hook
  134. add 1 to {market.max}
  135. message "{@logo} &aMarket Set To This Location!!"
  136. add player to {market3::*}
  137. play "LEVEL_UP" only to player with pitch 1 and volume 1
  138. stop
  139. else if {market.max} is less than {market.max.4}:
  140. subtract {market.price.create} from player's money
  141. set {market.%player%} to location of the player
  142. set {market.visitor.%player%} to 0
  143. set {market.icon.%player%} to tripwire hook
  144. add 1 to {market.max}
  145. message "{@logo} &aMarket Set To This Location!!"
  146. add player to {market4::*}
  147. play "LEVEL_UP" only to player with pitch 1 and volume 1
  148. stop
  149. else:
  150. subtract {market.price.create} from player's money
  151. set {market.%player%} to location of the player
  152. set {market.visitor.%player%} to 0
  153. set {market.icon.%player%} to tripwire hook
  154. add 1 to {market.max}
  155. message "{@logo} &aMarket Set To This Location!!"
  156. add player to {market5::*}
  157. play "LEVEL_UP" only to player with pitch 1 and volume 1
  158. stop
  159.  
  160.  
  161. if {market.%player%} is set:
  162. send "{@logo} Market Already Set!"
  163. stop
  164.  
  165. else:
  166. message "{@logo} Market Already Set!"
  167. if arg 1 is "delete":
  168. if {market.%player%} is set:
  169. if player has permission "market.default":
  170. message "{@logo} &aMarket Deleted"
  171. add {market.refund.delete} to player's money
  172. message "{@logo} Refunded &a$%{market.refund.delete}%"
  173. play "NOTE_BASS" only to player with pitch 0.5 volume 1
  174. delete {market.%player%}
  175. remove player from {market::*}
  176. remove player from {market2::*}
  177. remove player from {market3::*}
  178. remove player from {market4::*}
  179. remove player from {market5::*}
  180. delete {market.visitor.%player%}
  181. delete {market.icon.%player%}
  182. subtract 1 from {market.max}
  183. stop
  184. else:
  185. message "{@logo} You don't have permission"
  186. stop
  187. else:
  188. message "{@logo} You don't have Market!"
  189. stop
  190.  
  191. if arg 1 is "go":
  192. if {market.%arg 2%} is set:
  193. if player has permission "market.default":
  194. message "{@logo} Teleported to %arg 2%'s Market"
  195. teleport player to {market.%arg 2%}
  196. add 1 to {market.visitor.%arg 2%}
  197. play "LEVEL_UP" only to player with pitch 0.5 volume 1
  198. send player title "&a%arg 2%'s &2Market" with subtitle "&f%{market.desc.%arg 2%}%" for 2 seconds
  199. if {visit.%player%.%arg 2%} is not set:
  200. set {visit.%player%.%arg 2%} to true
  201. stop
  202. else:
  203. message "{@logo} You don't have permission"
  204. stop
  205. else:
  206. message "{@logo} %arg 2% Doesn't Have Market!"
  207. stop
  208.  
  209. if arg 1 is "list":
  210. if player has permission "market.default":
  211. wait 5 tick
  212. open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
  213. play "CHEST_OPEN" only to player with pitch 0.5 volume 1
  214. loop {market::*}:
  215. add 1 to {_loop-num}
  216. player has permission "market.default":
  217. format slot 53 of player with {market.icon.next} named "&61/5" with lore "&eClick To Page 2" to close then run "sudo %player% market2"
  218. set {_m} to {_loop-num} - 1
  219. format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
  220. wait 1 tick
  221.  
  222. if arg 1 is "admin":
  223. if player has permission "market.admin":
  224. if arg 2 is not set:
  225. message "{@logo}"
  226. message "&2/market admin pricecreate <price> - Change Market Create's Price"
  227. message "&2/market admin pricemove <price> - Change Market Move's Price"
  228. message "&2/market admin priceicon <price> - Change Market Icon's Price"
  229. message "&2/market admin setrefund <money> - Change Refund Money"
  230. message "&2/seticonnext - Change The Next Page's Icon"
  231. if arg 2 is "pricecreate":
  232. arg 3 is not set:
  233. message "{@logo} Gunakan /market admin pricecreate <harga>"
  234. stop
  235. arg 3 is set:
  236. set {market.price.create} to arg 3
  237. message "{@logo} Berhasil!"
  238. stop
  239. if arg 2 is "pricemove":
  240. arg 3 is not set:
  241. message "{@logo} Gunakan /market admin pricemove <harga>"
  242. stop
  243. arg 3 is set:
  244. set {market.price.move} to arg 3
  245. message "{@logo} Berhasil!"
  246.  
  247. if arg 2 is "priceicon":
  248. arg 3 is not set:
  249. message "{@logo} Gunakan /market admin priceicon <harga>"
  250. stop
  251. arg 3 is set:
  252. set {market.price.itemgui} to arg 3
  253. message "{@logo} Berhasil!"
  254. stop
  255.  
  256. if arg 2 is "setrefund":
  257. arg 3 is not set:
  258. message "{@logo} Gunakan /market admin refund <harga>"
  259. stop
  260. arg 3 is set:
  261. set {market.refund.delete} to arg 3
  262. message "{@logo} Berhasil!"
  263. stop
  264.  
  265. command /seticonnext:
  266. trigger:
  267. player has permission "market.admin":
  268. set {market.icon.next} to player's held item
  269. send "{@logo} Done!"
  270. stop
  271.  
  272. Command /market2:
  273. trigger:
  274. wait 5 tick
  275. open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
  276. format slot 53 of player with {market.icon.next} named "&62/5 Page" with lore "&eClick To Page 3" to close then run "sudo %player% market3"
  277. loop {market2::*}:
  278. if {market.visitor.%loop-value%} is not set:
  279. set {market.visitor.%loop-value%} to "&a-"
  280. if {market.rating.%loop-value%} is not set:
  281. set {market.visitor.%loop-value%} to "&a-"
  282. add 1 to {_num}
  283. set {_m} to {_num} - 1
  284. set {market.rating.%loop-value%} to {rate.%loop-value%} / {market.visitor.%loop-value%}
  285. play "CHEST_OPEN" only to player with pitch 0.5 volume 1
  286.  
  287. format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
  288. wait 1 tick
  289.  
  290.  
  291. Command /market3:
  292. trigger:
  293. wait 5 tick
  294. open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
  295. loop {market3::*}:
  296. if {market.visitor.%loop-value%} is not set:
  297. set {market.visitor.%loop-value%} to "&a-"
  298. if {market.rating.%loop-value%} is not set:
  299. set {market.visitor.%loop-value%} to "&a-"
  300. add 1 to {_num}
  301. if player has permission "market.default":
  302. set {_m} to {_num} - 1
  303.  
  304. play "CHEST_OPEN" only to player with pitch 0.5 volume 1
  305. format slot 53 of player with {market.icon.next} named "&63/5 Page" with lore "&eClick To Page 4" to close then run "sudo %player% market3"
  306. format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
  307. wait 1 tick
  308.  
  309.  
  310. Command /market4:
  311. trigger:
  312. wait 5 tick
  313. open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
  314. loop {market4::*}:
  315. if {market.visitor.%loop-value%} is not set:
  316. set {market.visitor.%loop-value%} to "&a-"
  317. if {market.rating.%loop-value%} is not set:
  318. set {market.visitor.%loop-value%} to "&a-"
  319. add 1 to {_num}
  320. if player has permission "market.default":
  321. set {_m} to {_num} - 1
  322.  
  323. play "CHEST_OPEN" only to player with pitch 0.5 volume 1
  324. format slot 53 of player with {market.icon.next} named "&64/5 Page" with lore "&eClick To Page 5" to close then run "sudo %player% market3"
  325. format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
  326. wait 1 tick
  327.  
  328. Command /market5:
  329. trigger:
  330. wait 5 tick
  331. open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
  332. loop {market5::*}:
  333. if {market.visitor.%loop-value%} is not set:
  334. set {market.visitor.%loop-value%} to "&a-"
  335. if {market.rating.%loop-value%} is not set:
  336. set {market.visitor.%loop-value%} to "&a-"
  337. add 1 to {_num}
  338. if player has permission "market.default":
  339. set {_m} to {_num} - 1
  340.  
  341. play "CHEST_OPEN" only to player with pitch 0.5 volume 1
  342. format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
  343. wait 1 tick
  344.  
  345. On Load:
  346. message "{@logo} Skript Success Loaded" to the console
  347. message "{@logo} Author : ItsAN" to the console
  348. message "{@logo} Thank To Use This Skript" to the console
Advertisement
Add Comment
Please, Sign In to add comment