Oxalist

Untitled

Feb 11th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.86 KB | None | 0 0
  1. # Skript créé par : Zmolahah => http://dev.bukkit.org/profiles/Zmolahah/
  2. # Modifié par : HalCroves (Doc/LoD_Doc)
  3.  
  4. # ----------------------------------------------------------------------------------------------
  5.  
  6. options:
  7. Max-Land: 30 # The max land default players can claim.
  8. # Set to -1 for unlimited land claiming for default players)
  9.  
  10. Max-Land-VIP: 60 # The max land VIP's can claim. Requires permission node land.claim.vip
  11. # Set to -1 for unlimited land claiming for VIP's)
  12.  
  13. Max-Land-OP: -1 # The max land staff can claim. Requires permission node land.claim.op
  14. # Set to -1 for unlimited land claiming for staff)
  15.  
  16. World: world # The world default players can claim.
  17.  
  18. spawn_region : spawn_survie # If you have WorlGuard and you have a region 'Spawn', you can protect the region of command "/land"
  19.  
  20. # ----------------------------------------------------------------------------------------------
  21.  
  22. variables:
  23. {landclaims.%player%} = 0
  24. {claimedland.%player%} = 0
  25.  
  26. on join:
  27. if {played.%player%} is not set:
  28. set {played.%player%} to true
  29.  
  30. every 1 ticks in world "{@World}":
  31. loop all players:
  32. {chunk.%chunk at location of loop-player%} is not set:
  33. {landnotify.%loop-player%} is not "&6» The land is not claim.":
  34. send "&aThe land is free." to loop-player
  35. set {landnotify.%loop-player%} to "&6» The land is not claim."
  36. {landnotify.%loop-player%} is not {chunk.%chunk at location of loop-player%}:
  37. {chunk.%chunk at location of loop-player%} is not set:
  38. {landnotify.%loop-player%} is not "&6» The land is not claim.":
  39. send "&aThe land is free." to loop-player
  40. set {landnotify.%loop-player%} to "&6» The land is not claim."
  41. set {land.unclaim.%loop-player%} to true
  42. {chunk.%chunk at location of loop-player%} is set:
  43. send "&aThe land belongs to &e%{chunk.%chunk at location of loop-player%}%&a." to loop-player
  44. set {landnotify.%loop-player%} to {chunk.%chunk at location of loop-player%}
  45. {landnotify.%loop-player%} is not set:
  46. {chunk.%chunk at location of loop-player%} is not set:
  47. send "&aThe land is free." to loop-player
  48. set {landnotify.%loop-player%} to "&6» The land is not claim."
  49. set {land.unclaim.%loop-player%} to true
  50.  
  51. on command "/land":
  52. wait 2 ticks
  53. if "%region at player%" contains "{@spawn_region}":
  54. cancel event
  55. message "LandClaim &9> &7Unable to claim this area !"
  56.  
  57.  
  58. #startfold
  59. command /land [<text>] [<offline player>]:
  60. description: For all land related commands
  61. usage: &c/land (claim, unclaim, add, remove)
  62. trigger:
  63. argument 1 is not set:
  64. message "-----------------------------------------------------"
  65. message "Number of claim &9> &7%{claimedland.%player%}%"
  66. message "-----------------------------------------------------"
  67. #subfold @help
  68. argument 1 is "help" or "h":
  69. message "-----------------------------------------------------"
  70. message "/land &9> &7To view the number of land claim"
  71. message "/land list &9> &7Affiche la liste de vos claim"
  72. message "/land claim &9> &7Displays your claim list"
  73. message "/land unclaim &9> &7For unclaim a field"
  74. message "/land info &9> &7Displays information about the field where you are"
  75. message "/land add <player> &9> &7Add a player to your claim"
  76. message "/land remove <player> &9> &7Delete a player from your claim"
  77. message "/land teleport &9> &7Teleport to your first claim"
  78. message "/land delhome &9> &7Delete your home"
  79. message "/land map &9> &7Displays a mini map"
  80. if player has permission "land.bypass":
  81. message "/land bypass &9> &7Access all claims"
  82. message "-----------------------------------------------------"
  83. #subfold @stats
  84. argument 1 is "info" or "i":
  85. if {chunk.%chunk at location of player%} is set:
  86. message "-----------------------------------------------------"
  87. message "Land Owner &9> &7 %{chunk.%chunk at location of player%}%"
  88. message "Authorized Member &9> &7 %{land.%chunk at location of player%::*}%"
  89. message "-----------------------------------------------------"
  90. stop
  91. message "&6This area currently owned by anyone.."
  92. stop
  93. #subfold @error
  94. argument 1 is "error":
  95. if player has permission "land.bypass":
  96. message "&cIncorrect use. Try '/land [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
  97. else:
  98. message "&cIncorrect use. Try '/land [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
  99. message "&7 ()'s = Options, []'s = Requis."
  100. stop
  101. #subfold @claim
  102. argument 1 is "claim" or "c":
  103. if {chunk.%chunk at location of player%} is set:
  104. message "&cThis area is already claim."
  105. stop
  106. if {@Max-Land} is -1:
  107. add name of player to {land.%chunk at location of player%::*}
  108. set {chunk.%chunk at location of player%} to name of player
  109. set {chunk.%chunk at location of player%.%player%} to true
  110. message "&6You now own the land."
  111. add 1 to {claimedland.%player%}
  112. log "%player% in the world %world% en %player's location%" to "LandClaim/Claim.log"
  113. if {home.%player%} is not set:
  114. set {home.%player%} to location of the player
  115. stop
  116. else:
  117. if {@Max-Land} is 0:
  118. if player has permission "land.claim.vip" or "land.claim.op":
  119. if {claimedland.%player%} is greater than {@Max-Land-VIP} -1:
  120. if player has permission "land.claim.op":
  121. if {claimedland.%player%} is greater than {@Max-Land-OP} -1:
  122. message "&cYou have reached your claim limit."
  123. stop
  124. else:
  125. message "&cYou have reached your claim limit."
  126. stop
  127. else:
  128. message "&cYou have reached your claim limit."
  129. stop
  130. if {claimedland.%player%} is greater than {@Max-Land} -1:
  131. if player has permission "land.claim.vip" or "land.claim.op":
  132. if {claimedland.%player%} is greater than {@Max-Land-VIP} -1:
  133. if player has permission "land.claim.op":
  134. if {claimedland.%player%} is greater than {@Max-Land-OP} -1:
  135. message "&cYou have reached your claim limit."
  136. stop
  137. else:
  138. message "&cYou have reached your claim limit."
  139. stop
  140. else:
  141. message "&cYou have reached your claim limit."
  142. stop
  143. add name of player to {land.%chunk at location of player%::*}
  144. set {chunk.%chunk at location of player%} to name of player
  145. set {chunk.%chunk at location of player%.%player%} to true
  146. set {loc.chunks.%player%::%chunk at location of player%} to location of player
  147. set {loc.chunks.%player%::%chunk at location of player%} to location of player
  148. message "&6You are now the owner of the area."
  149. add 1 to {claimedland.%player%}
  150. log "%player% in the world %world% en %player's location%" to "LandClaim/Claim.log"
  151. if {home.%player%} is not set:
  152. set {home.%player%} to location of the player
  153. stop
  154. stop
  155. #subfold @unclaim
  156. argument 1 is "unclaim" or "u":
  157. if {chunk.%chunk at location of player%} is not set:
  158. message "&cThe land is not claim."
  159. stop
  160. if {chunk.%chunk at location of player%} is not name of player:
  161. if {bypassland.%player%} is not true:
  162. message "&cYou do not own this land."
  163. stop
  164. else:
  165. if {bypassland.%player%} is true:
  166. remove 1 from {claimedland.%{chunk.%chunk at location of player%}%}
  167. clear {land.%chunk at location of player%::*}
  168. clear {chunk.%chunk at location of player%}
  169. delete {loc.chunks.%player%::%chunk at location of player%}
  170. message "&6You unclaim this land."
  171. stop
  172. message "&cYou do not own this land."
  173. message "&cThe land belongs to %{chunk.%chunk at location of player%}%"
  174. else:
  175. if {chunk.%chunk at location of player%} is name of player:
  176. remove 1 from {claimedland.%{chunk.%chunk at location of player%}%}
  177. clear {land.%chunk at location of player%::*}
  178. clear {chunk.%chunk at location of player%}
  179. delete {loc.chunks.%player%::%chunk at location of player%}
  180. message "&6You unclaim this land."
  181. if {home.%player%} is set:
  182. delete {home.%player%}
  183. stop
  184. # subfold @add
  185. argument 1 is "add":
  186. if {chunk.%chunk at location of player%} is not set:
  187. message "&cThe land is not claim"
  188. stop
  189. if {chunk.%chunk at location of player%} is not name of player:
  190. if {bypassland.%player%} is true:
  191. if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
  192. message "&cThis player is already a member of this land."
  193. stop
  194. else:
  195. add "%name of argument 2%" to {land.%chunk at location of player%::*}
  196. set {chunk.%chunk at location of player%.%argument 2%} to true
  197. message "&6%name of argument 2% can now build on this earth."
  198. stop
  199. else:
  200. message "&cYou do not own this land."
  201. stop
  202. if {played.%argument 2%} is not set:
  203. message "&cThis player does not exist."
  204. stop
  205. if {chunk.%chunk at location of player%} is argument 2:
  206. message "&cYou can not add to your own land."
  207. stop
  208. set {_playersearch} to 0
  209. loop 10000 times:
  210. if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
  211. message "&cThis player is already a member of this land."
  212. stop
  213. else:
  214. add 1 to {_playersearch}
  215. if {_playersearch} is 10000:
  216. message "&6%name of argument 2% can now build on this earth."
  217. add "%name of argument 2%" to {land.%chunk at location of player%::*}
  218. set {chunk.%chunk at location of player%.%argument 2%} to true
  219. stop
  220. #subfold @remove
  221. argument 1 is "remove" or "r":
  222. if argument 2 is not set:
  223. make player execute command "&cland error"
  224. stop
  225. if {chunk.%chunk at location of player%} is not set:
  226. message "&cThe land is not claim."
  227. stop
  228. if {chunk.%chunk at location of player%} is not name of player:
  229. if {bypassland.%player%} is not true:
  230. message "&cYou do not own this land."
  231. stop
  232. else:
  233. if {bypassland.%player%} is true:
  234. if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
  235. message "&cThis player is already a member of this land."
  236. stop
  237. else:
  238. add "%name of argument 2%" to {land.%chunk at location of player%::*}
  239. set {chunk.%chunk at location of player%.%argument 2%} to true
  240. message "&6%name of argument 2% can now build on this earth."
  241. stop
  242. if {played.%argument 2%} is not set:
  243. message "&cThis player does not exist."
  244. stop
  245. if {chunk.%chunk at location of player%} is argument 2:
  246. message "&cYou can not remove yourself from your own land."
  247. stop
  248. loop {land.%chunk at location of player%::*}:
  249. if loop-value is argument 2:
  250. clear {chunk.%chunk at location of player%.%argument 2%}
  251. delete {land.%chunk at location of player%::%loop-index%}
  252. exit loop
  253. clear {chunk.%chunk at location of player%.%argument 2%}
  254. message "&6%name of argument 2% can not build on this land."
  255. stop
  256. #subfold @bypass
  257. argument 1 is "bypass":
  258. player has permission "land.bypass":
  259. if {bypassland.%player%} is true:
  260. clear {bypassland.%player%}
  261. message "&6You can no longer access all lands."
  262. stop
  263. set {bypassland.%player%} to true
  264. message "&6You now have access to all land claim."
  265. stop
  266. message "&cYou do not have permission to use this command."
  267. stop
  268. #subfold @list
  269. argument 1 is "list" or "l":
  270. argument 2 is not set:
  271. loop {loc.chunks.%player%::*}:
  272. set {_loc} to {loc.chunks.%player%::%loop-index%}
  273. set {_chunk} to chunk at location of {_loc}
  274. set {_chunk.name} to {chunk.name.%{_chunk}%}
  275. {_count} is not set:
  276. set {_count} to 0
  277. add 1 to {_count}
  278. {chunk.name.%{_chunk}%} is not set:
  279. set {chunk.name.%{_chunk}%} to "%{_count}%"
  280. set {_chunk.name} to {chunk.name.%{_chunk}%}
  281. {_chunk.name} is not set:
  282. set {_chunk.name} to "&cNot Named"
  283. send "&a%{_count}% ------ %{_chunk}% ------ %{_chunk.name}%" to player
  284. stop
  285. argument 2 is set:
  286. loop {loc.chunks.%argument 2%::*}:
  287. set {_loc} to loop-value
  288. set {_chunk} to chunk at location of {_loc}
  289. set {_chunk.name} to {chunk.name.%{_chunk}%}
  290. {_count} is not set:
  291. set {_count} to 0
  292.  
  293. {_chunk.name} is not set:
  294. set {_chunk.name} to "&cNot Named"
  295. {chunk.%{_chunk}%.%player%} is true:
  296. add 1 to {_count}
  297. send "&a%{_count}%----->%{_chunk}%---->%{_chunk.name}%" to player
  298. stop
  299. #subfold @map
  300. argument 1 is "map" or "m":
  301. message "------------ [ Mini Map ] ------------"
  302. set {_mapX} to 11
  303. set {_mapY} to 6
  304. set {_m} to ""
  305. loop 13 times:
  306. loop 23 times:
  307. set {_x} to {_mapX} * 16
  308. set {_y} to {_mapY} * 16
  309. set {_chunk2} to chunk at block {_y} blocks north {_x} blocks west of player
  310. if {loc.chunks::%{_chunk2}%} isn't set:
  311. set {_result} to ""
  312. else:
  313. set {_result} to {loc.chunks::%{_chunk2}%}
  314. # Position du joueur sur la mini-map
  315. if {_chunk2} is chunk at player:
  316. set {_m} to "%{_m}%&2█"
  317. # Claim du joueur
  318. else if {_result} is {loc.chunks.%player%::%{_chunk2}%}:
  319. set {_m} to "%{_m}%&a█"
  320. else if {_result} is "":
  321. set {_m} to "%{_m}%&7█"
  322. else:
  323. set {_m} to "%{_m}%&c█"
  324. add -1 to {_mapX}
  325. message "%{_m}%" to player
  326.  
  327. set {_m} to ""
  328. add -1 to {_mapY}
  329. set {_mapX} to 11
  330. set {_n} to "N"
  331. set {_s} to "S"
  332. set {_e} to "E"
  333. set {_w} to "W"
  334. if facing of player is north:
  335. set {_n} to "&4N&6"
  336. else if facing of player is south:
  337. set {_s} to "&4S&6"
  338. else if facing of player is west:
  339. set {_w} to "&4W&6"
  340. else if facing of player is east:
  341. set {_e} to "&4E&6"
  342.  
  343. message " "
  344. message "&a█&7 &aYour claim&2█&7 &2You &c█&7 &cOther player &6\%{_n}%/"
  345. message "&7█ Free Zone &6%{_w}%+%{_e}%"
  346. message "
  347. #subfold @tp
  348. argument 1 is "teleport" or "tp":
  349. if {home.%player%} is set:
  350. teleport player to {home.%player%}
  351. send "&aSuccessful teleportation !" to player
  352. stop
  353. else:
  354. send "&cNo home, you must claim at least once !"
  355. stop
  356. #subfold @delhomeclaim
  357. argument 1 is "delhome" or "dh":
  358. if {home.%player%} is set:
  359. delete {home.%player%}
  360. send "&cHome (land) deleted."
  361. stop
  362. else:
  363. send "&cNo home, you must claim at least once !"
  364. stop
  365.  
  366. #endfold
  367. on quit:
  368. if {bypassland.%player%} is true:
  369. clear {bypassland.%player%}
  370.  
  371. on place:
  372. if {bypassland.%player%} is true:
  373. stop
  374. if {chunk.%chunk at location of block%} is set:
  375. if {chunk.%chunk at location of block%.%player%} is true:
  376. stop
  377. message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
  378. cancel event
  379.  
  380. on break:
  381. if {bypassland.%player%} is true:
  382. stop
  383. if {chunk.%chunk at location of block%} is set:
  384. if {chunk.%chunk at location of block%.%player%} is true:
  385. stop
  386. message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
  387. cancel event
  388.  
  389. on right click:
  390. if {bypassland.%player%} is true:
  391. stop
  392. if {chunk.%chunk at location of block%} is set:
  393. if {chunk.%chunk at location of block%.%player%} is true:
  394. stop
  395. message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
  396. cancel event
  397.  
  398. on right click on horse:
  399. if {bypassland.%player%} is true:
  400. stop
  401. if {chunk.%chunk at location of event-player%} is set:
  402. {chunk.%chunk at location of event-player%} is not event-player:
  403. {chunk.%chunk at location of event-player%.%event-player%} is set:
  404. stop
  405. send "&cYou can not mount this animal !" to event-player
  406. cancel event
  407. stop trigger
  408.  
  409. on place of tnt:
  410. if {bypassland.%player%} is true:
  411. stop
  412. loop blocks in radius 10 of block:
  413. if {chunk.%chunk at location of loop-block%} is set:
  414. if {chunk.%chunk at location of loop-block%.%player%} is true:
  415. exit loop
  416. else:
  417. cancel event
  418. message "&cYou can not use explosives here."
  419. stop
  420. on explode:
  421. entity is creeper
  422. loop blocks in radius 10 of entity:
  423. if {chunk.live.%chunk at location of loop-block%} is set:
  424. cancel event
  425. set {_safe} to true
  426. {_safe} is set:
  427. create safe explosion of force 3 at event-location
  428.  
  429. on damage of a entity:
  430. victim is a chicken or a cow or a mooshroom or a horse or a sheep or a pig or a wolf or a ocelot or a villager or a squid or a item frame
  431. attacker is a player
  432. victim is a cow:
  433. attacker's tool is a empty bucket
  434. stop
  435. if {bypassland.%attacker%} is true:
  436. stop
  437. loop blocks in radius 3 of victim:
  438. if {chunk.%chunk at location of loop-block%} is set:
  439. if {chunk.%chunk at location of loop-block%.%attacker%} is true:
  440. stop
  441. send "&cYou can not kill the &7%victim% &c!" to attacker
  442. cancel event
  443. stop
  444.  
  445. on break glass:
  446. if {bypassland.%player%} is true:
  447. stop
  448. if {chunk.%chunk at location of event-player%} is set:
  449. {chunk.%chunk at location of event-player%} is not event-player:
  450. {chunk.%chunk at location of event-player%.%event-player%} is set:
  451. stop
  452. send "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c." to event-player
  453. cancel event
  454. stop trigger
  455.  
  456. on right click on lead:
  457. if {bypassland.%player%} is true:
  458. stop
  459. if {chunk.%chunk at location of event-player%} is set:
  460. {chunk.%chunk at location of event-player%} is not event-player:
  461. {chunk.%chunk at location of event-player%.%event-player%} is set:
  462. stop
  463. send "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c." to event-player
  464. cancel event
  465. stop trigger
  466.  
  467. on enderman pickup:
  468. if {chunk.live.%chunk at location of block%} is set:
  469. cancel event
Advertisement
Add Comment
Please, Sign In to add comment