Advertisement
CREAMPAN0408

Untitled

Feb 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.54 KB | None | 0 0
  1. #------------------------------------------------------------
  2. # RPG Skills
  3. # by RedDragon
  4. #------------------------------------------------------------
  5. #
  6. #Skills:
  7. # Swords - Done
  8. # Bleeding - Makes victim bleed for amount of time (level * 0.05)
  9. # Aura - Hits everything around attacker for (level * 0.05) hearts
  10. #
  11. # Woodcutting - Done
  12. # Tree feller - Breaks whole tree at once [for amount of time]
  13. # Apple - Chance of dropping more apples!
  14. #
  15. # Archery - Done
  16. # Nausea blow - Give enemy nausea for few seconds!
  17. # Poison blow - Chance to give enemy poison for few seconds!
  18. #
  19. # Acrobatics - Done
  20. # Roll - Chance to take less fall damage!
  21. # DodgeFall - Evade all fall damage!
  22. #
  23. # Mining - Done
  24. # Drilling - Breaks everything quick!
  25. # Looting - Chance of dropping multiple ores!
  26. #
  27. #Permissions:
  28. # skills.admin - Access to /skills Admin commands!
  29. #------------------------------------------------------------
  30. # Dependencies
  31. #------------------------------------------------------------
  32. #Download: www.dragonuniverse.net/Spigot
  33. #------------------------------------------------------------
  34. # Edit after this part!
  35. #------------------------------------------------------------
  36.  
  37. options:
  38. #Logo will be displayed before each message!
  39. logo: &7
  40.  
  41. #This is world guard region in which people wont be able
  42. #to use their skills!
  43. spawn: spawn
  44.  
  45. #-----------------------------
  46. # Skill options:
  47. #-----------------------------
  48. #Required xp for level up
  49. swordslvlup: 250
  50. woodcuttinglvlup: 500
  51. archerylvlup: 300
  52. acrobaticslvlup: 50
  53. mininglvlup: 250
  54.  
  55. #Maximal levels of each skill
  56. maxswords: 100
  57. maxwoodcutting: 100
  58. maxarchery: 100
  59. maxacrobatics: 100
  60. maxmining: 100
  61.  
  62. #Minimal level for skills to use
  63. minimalswords: 10
  64. minimalwoodcutting: 10
  65. minimalarchery: 10
  66. minimalacrobatics: 10
  67. minimalmining: 10
  68.  
  69. #Cooldown options:
  70. #This is in seconds!
  71. swordscooldown: 10
  72. woodcuttingcooldown: 10
  73. archerycooldown: 10
  74. acrobaticscooldown: 10
  75. miningcooldown: 10
  76.  
  77. #XpOptions
  78.  
  79. #Swords xp
  80. playerxp: 10
  81. pigxp: 2
  82. cowxp: 2
  83. sheepxp: 2
  84. zombiexp: 4
  85. skeletonxp: 4
  86. spiderxp: 3
  87. creeperxp: 5
  88. witchxp: 12
  89. endermanxp: 15
  90. ghastxp: 18
  91. blazexp: 20
  92. slimexp: 2
  93. guardianxp: 15
  94. elderguardianxp: 50
  95. witherxp: 150
  96. dragonxp: 100
  97.  
  98. #Mining xp
  99. stonexp: 1
  100. cobblestonexp: 1
  101. sandstonexp: 1
  102. coalxp: 2
  103. ironxp: 8
  104. redstonexp: 5
  105. lapisxp: 5
  106. goldxp: 10
  107. diamondxp: 15
  108. emeraldxp: 18
  109.  
  110. #Woodcutting xp
  111. woodenaxe: 2
  112. stoneaxe: 3
  113. goldenaxe: 5
  114. ironaxe: 5
  115. diamondaxe: 7
  116.  
  117. #Acrobatics xp
  118. falldmgxp: 1
  119. rollxp: 3
  120. dodgefallxp: 5
  121.  
  122. #Archery xp
  123. bowxp: 3
  124.  
  125. #-----------------------------
  126. # Messages
  127. #-----------------------------
  128. #Amount of xp will be added after "&e"
  129. cantuse: &cYou cannot use skill in spawn!
  130. notrecharged: &cYour skill is not ready yet!
  131. youarebleeding: &cYou are bleeding!
  132. victimisbleeding: &e%victim% &ais bleeding!
  133. nolongerbleeding: &aYou are no longer bleeding!
  134. rolled: &aYou have rolled and took less damage!
  135. dodgedfall: &aYou have evaded all fall damage!
  136. lootingreward: &aYou have recieved reward from looting skill!
  137. extraapple: &aYou have recieved a new &capple &afrom &eApple &askill!
  138. pickstarted: &aYou have started Drill skill!
  139. axestarted: &aYou have started Tree Feller skill!
  140. successfulswords: &aYou have successfully hit players with Aura!
  141. nothingenough: &cYou level is to low to use this skill!
  142. nauseastarted: &7You used &eNausea blow&7!
  143. successfullnausea: &eNausea blow &7used with sucess!
  144. yougotnausea: &cYou were hited with &enausea blow&7!
  145. poisoned: &7You were poisoned!
  146. poisonshot: &7You have poisoned your opponent!
  147. #-------------
  148. #Level ups!
  149. #-------------
  150. swordslvl: &aYou have reached new level for swords! &e%{swords.%loop-player%}%&aLvl!
  151. woodcuttinglvl: &aYou have reached new level for woodcutting! &e%{woodcutting.%loop-player%}%&aLvl!
  152. archerylvl: &aYou have reached new level for archery! &e%{archery.%loop-player%}%&aLvl!
  153. acrobaticslvl: &aYou have reached new level for acrobatics! &e%{acrobatics.%loop-player%}%&aLvl!
  154. mininglvl: &aYou have reached new level for mining! &e%{mining.%loop-player%}%&aLvl!
  155. #-------------
  156. #Help command!
  157. #-------------
  158. bordermsg1: &c&m---------&8[&6&lMMO SurvivalSkills&8]&c&m---------
  159. help1: &e/skills &7- Command list
  160. help2: &e/skills levels &7- Levels of your skills!
  161. help3: &e/skills xp &7- XP of every skill!
  162. ajuda: &e/skill help <page> &7- Tutorial!
  163. admin1: &e/skills admin setlevel <skill> <player> <level>
  164. bordermsg2: &c&m--------------------------------------------
  165. #-------------
  166. #Admin command!
  167. #-------------
  168. setlevel: &7You defined the skill
  169. setlevel2: &7of %arg 4%&7 to level &e%arg 5% &7!
  170. #-------------
  171. #Skill command!
  172. #-------------
  173. skill1: &cSwords
  174. skill2: &eWood Cutting
  175. skill3: &bArchery
  176. skill4: &aAcrobatics
  177. skill5: &7Mining
  178. #----------------------------------------------------------------------------
  179.  
  180. #------------------------------------------------------------
  181. # Do NOT touch anythinc after this! It might break!
  182. #------------------------------------------------------------
  183.  
  184. variables:
  185. #----------------------------------
  186. {swords.%player%} = 0
  187. {woodcutting.%player%} = 0
  188. {archery.%player%} = 0
  189. {acrobatics.%player%} = 0
  190. {mining.%player%} = 0
  191. #----------------------------------
  192. {swordsxp.%player%} = 0
  193. {woodcuttingxp.%player%} = 0
  194. {archeryxp.%player%} = 0
  195. {acrobaticsxp.%player%} = 0
  196. {miningxp.%player%} = 0
  197. #----------------------------------
  198. {swordscooldown.%player%} = 0
  199. {woodcuttingcooldown.%player%} = 0
  200. {archerycooldown.%player%} = 0
  201. {acrobaticscooldown.%player%} = 0
  202. {miningcooldown.%player%} = 0
  203. #----------------------------------
  204. {pickstarted.%player%} = 0
  205. {pickstart.%player%} = false
  206. {axestarted.%player%} = false
  207. {axecooldown.%player%} = false
  208. {usedaxe.%player%} = false
  209. {pickcooldown.%player%} = false
  210. {startednausea.%player%} = false
  211. {nauseacooldown.%player%} = false
  212.  
  213. #---------------
  214. # Bug fixes
  215. #--------------
  216. on any movement:
  217. if {swords.%player%} is 0:
  218. set {swords.%player%} to 1
  219. #Bug fix, when the player comes in, is on level 0 of swords and after killing mobs, he dosen't recieve XP
  220. #Because of a bug in line if {swords.%attacker%} < {@maxswords}: so i putted already on the level 1
  221.  
  222. on join:
  223. set {axestarted.%player%} to false
  224. set {pickstart.%player%} to false
  225. #Bug fix, when the players uses the axe or pickaxe skill it wasnt working
  226.  
  227. command /skills [<text>] [<text>] [<text>] [<offline player>] [<number>]:
  228. trigger:
  229. if arg 1 is not set:
  230. if player has permission "skills.admin":
  231. message "{@bordermsg1}"
  232. message "{@help1}"
  233. message "{@help2}"
  234. message "{@help3}"
  235. message "{@ajuda}"
  236. message "{@admin1}"
  237. message "{@bordermsg2}"
  238. else:
  239. message "{@bordermsg1}"
  240. message "{@help1}"
  241. message "{@help2}"
  242. message "{@help3}"
  243. message "{@ajuda}"
  244. message "{@bordermsg2}"
  245. if arg 1 is "help":
  246. if arg 2 is not set:
  247. message "&cChoose one of the pages in question &e(1 to 3)&c!"
  248. if arg 2 is "1":
  249. message "{@bordermsg1}"
  250. message "&7You can add your help pages to your players"
  251. message "&7with the pages you want to add! Just add your own"
  252. message "&7method of explanation!"
  253. message "{@bordermsg2}"
  254. if arg 2 is "2":
  255. message "{@bordermsg1}"
  256. message "{@bordermsg2}"
  257. if arg 2 is "3":
  258. message "{@bordermsg1}"
  259. message "&7"
  260. message "{@bordermsg2}"
  261. if arg 1 is "skills":
  262. message "{@bordermsg1}"
  263. message "{@skill1}"
  264. message "{@skill2}"
  265. message "{@skill3}"
  266. message "{@skill4}"
  267. message "{@skill5}"
  268. message "{@bordermsg2}"
  269. if arg 1 is "levels":
  270. message "{@bordermsg1}"
  271. message "{@skill1}&f: &e%{swords.%player%}%"
  272. message "{@skill2}&f: &e%{woodcutting.%player%}%"
  273. message "{@skill3}&f: &e%{archery.%player%}%"
  274. message "{@skill4}&f: &e%{acrobatics.%player%}%"
  275. message "{@skill5}&f: &e%{mining.%player%}%"
  276. message "{@bordermsg2}"
  277. if arg 1 is "xp":
  278. message "{@bordermsg1}"
  279. message "{@skill1}&f: &e%{swordsxp.%player%}%"
  280. message "{@skill2}&f: &e%{woodcuttingxp.%player%}%"
  281. message "{@skill3}&f: &e%{archeryxp.%player%}%"
  282. message "{@skill4}&f: &e%{acrobaticsxp.%player%}%"
  283. message "{@skill5}&f: &e%{miningxp.%player%}%"
  284. message "{@bordermsg2}"
  285. if arg 1 is "admin":
  286. if player has permission "dragonmmo.admin":
  287. if arg 2 is "setlevel":
  288. if arg 3 is "swords":
  289. if arg 4 is set:
  290. if arg 5 is set:
  291. set {swords.%arg 4%} to arg 5
  292. message "{@setlevel} {@skill1} {@setlevel2}"
  293. stop
  294. if arg 3 is "woodcutting":
  295. if arg 4 is set:
  296. if arg 5 is set:
  297. set {woodcutting.%arg 4%} to arg 5
  298. message "{@setlevel} {@skill2} {@setlevel2}"
  299. stop
  300. if arg 3 is "acrobatics":
  301. if arg 4 is set:
  302. if arg 5 is set:
  303. set {acrobatics.%arg 4%} to arg 5
  304. message "{@setlevel} {@skill4} {@setlevel2}"
  305. stop
  306. if arg 3 is "archery":
  307. if arg 4 is set:
  308. if arg 5 is set:
  309. set {archery.%arg 4%} to arg 5
  310. message "{@setlevel} {@skill3} {@setlevel2}"
  311. stop
  312. if arg 3 is "mining":
  313. if arg 4 is set:
  314. if arg 5 is set:
  315. set {mining.%arg 4%} to arg 5
  316. message "{@setlevel} {@skill5} {@setlevel2}"
  317. stop
  318.  
  319.  
  320. every second:
  321. loop all players:
  322. if {swordscooldown.%loop-player%} > 0:
  323. remove 1 from {swordscooldown.%loop-player%}
  324. wait 3 ticks
  325. if {woodcuttingcooldown.%loop-player%} > 0:
  326. remove 1 from {swordscooldown.%loop-player%}
  327. wait 3 ticks
  328. if {archerycooldown.%loop-player%} > 0:
  329. remove 1 from {swordscooldown.%loop-player%}
  330. wait 3 ticks
  331. if {acrobaticscooldown.%loop-player%} > 0:
  332. remove 1 from {swordscooldown.%loop-player%}
  333. wait 3 ticks
  334. if {miningcooldown.%loop-player%} > 0:
  335. remove 1 from {swordscooldown.%loop-player%}
  336. wait 3 ticks
  337.  
  338. #-------------------
  339. # Leveling
  340. #-------------------
  341. on any movement:
  342. #----Woodcutting----
  343. if {woodcuttingxp.%player%} is higher than or equal to {@woodcuttinglvlup}:
  344. if {woodcutting.%player%} is 0:
  345. set {woodcutting.%player%} to 1
  346. else:
  347. add 1 to {woodcutting.%player%}
  348. remove {@woodcuttinglvlup} from {woodcuttingxp.%player%}
  349. wait 2 ticks
  350. send "{@woodcuttinglvl}" to player
  351. stop
  352. #----Swords----
  353. if {swordsxp.%player%} is higher than or equal to {@swordslvlup}:
  354. if {swords.%player%} is 0:
  355. set {swords.%player%} to 1
  356. else:
  357. add 1 to {swords.%player%}
  358. remove {@swordslvlup} from {swordsxp.%player%}
  359. wait 2 ticks
  360. send "{@swordslvl}" to player
  361. stop
  362. #----Archery----
  363. if {archeryxp.%player%} is higher than or equal to {@archerylvlup}:
  364. if {archery.%player%} is 0:
  365. set {archery.%player%} to 1
  366. else:
  367. add 1 to {archery.%player%}
  368. remove {@archerylvlup} from {archeryxp.%player%}
  369. wait 2 ticks
  370. send "{@archerylvl}" to player
  371. stop
  372. #----Acrobatics----
  373. if {acrobaticsxp.%player%} is higher than or equal to {@acrobaticslvlup}:
  374. if {acrobatics.%player%} is 0:
  375. set {acrobatics.%player%} to 1
  376. else:
  377. add 1 to {acrobatics.%player%}
  378. remove {@acrobaticslvlup} from {acrobaticsxp.%player%}
  379. wait 2 ticks
  380. send "{@acrobaticslvl}" to player
  381. stop
  382. #----Mining----
  383. if {miningxp.%player%} is higher than or equal to {@mininglvlup}:
  384. if {mining.%player%} is 0:
  385. set {mining.%player%} to 1
  386. else:
  387. add 1 to {mining.%player%}
  388. remove {@mininglvlup} from {miningxp.%player%}
  389. wait 2 ticks
  390. send "{@mininglvl}" to player
  391. stop
  392. #----------------------------------------------------------------------------------------------------
  393. # Sword Skills
  394. #----------------------------------------------------------------------------------------------------
  395.  
  396. on death:
  397. if attacker is a player:
  398. tool of attacker is a sword:
  399. if {swords.%attacker%} < {@maxswords}:
  400. #------------
  401. #Player
  402. #------------
  403. if victim is a player:
  404. add {@playerxp} to {swordsxp.%attacker%}
  405. stop
  406. #------------
  407. #Mobs
  408. #------------
  409. if victim is a zombie:
  410. add {@zombiexp} to {swordsxp.%attacker%}
  411. stop
  412. if victim is a skeleton:
  413. add {@skeletonxp} to {swordsxp.%attacker%}
  414. stop
  415. if victim is a spider:
  416. add {@spiderxp} to {swordsxp.%attacker%}
  417. stop
  418. if victim is a creeper:
  419. add {@creeperxp} to {swordsxp.%attacker%}
  420. stop
  421. if victim is a witch:
  422. add {@playerxp} to {swordsxp.%attacker%}
  423. stop
  424. if victim is a enderman:
  425. add {@endermanxp} to {swordsxp.%attacker%}
  426. stop
  427. if victim is a blaze:
  428. add {@blazexp} to {swordsxp.%attacker%}
  429. stop
  430. if victim is a ghast:
  431. add {@ghastxp} to {swordsxp.%attacker%}
  432. stop
  433. if victim is a slime:
  434. add {@slimexp} to {swordsxp.%attacker%}
  435. stop
  436. if victim is a guardian:
  437. add {@guardianxp} to {swordsxp.%attacker%}
  438. stop
  439. if victim is a pig:
  440. add {@pigxp} to {swordsxp.%attacker%}
  441. stop
  442. if victim is a cow:
  443. add {@cowxp} to {swordsxp.%attacker%}
  444. stop
  445. if victim is a sheep:
  446. add {@sheepxp} to {swordsxp.%attacker%}
  447. stop
  448. #------------
  449. #Bosses
  450. #------------
  451. if victim is a elder guardian:
  452. add {@elderguardianxp} to {swordsxp.%attacker%}
  453. stop
  454. if victim is a wither:
  455. add {@witherxp} to {swordsxp.%attacker%}
  456. stop
  457. if victim is a ender dragon:
  458. add {@dragonxp} to {swordsxp.%attacker%}
  459. stop
  460.  
  461. #------------------
  462. # Aura
  463. #------------------
  464. on right click with a sword:
  465. if {swords.%player%} is higher than or equal to {@minimalswords}:
  466. if {swordscooldown.%player%} is higher than 0:
  467. send "{@notrecharged}" to player
  468. else:
  469. loop all entities in radius 8 around player:
  470. if "%region at player%" contains "{@spawn}":
  471. send "{@cantuse}"
  472. stop
  473. else:
  474. damage loop-entity by {swords.%player%} * 0.05
  475. send "{@successfulswords}"
  476. set {swordscooldown.%player%} to {@swordscooldown}
  477. wait {@swordscooldown} seconds
  478. set {swordscooldown.%player%} to 0
  479. stop
  480. else:
  481. send "{@nothingenough}" to player
  482.  
  483. #------------------
  484. # Bleeding
  485. #------------------
  486. on damage:
  487. if attacker is player:
  488. tool of attacker is a sword:
  489. set {_chance} to {swords.%attacker%} * 0.01
  490. chance of {_chance}:
  491. set {bleeding.%victim%} to 3
  492. send "{@youarebleeding}" to victim
  493. send "{@victimisbleeding}" to attacker
  494. wait 1 second
  495. damage victim by 1 heart
  496. remove 1 from {bleeding.%victim%}
  497. wait 1 second
  498. damage victim by 1 heart
  499. remove 1 from {bleeding.%victim%}
  500. wait 1 second
  501. damage victim by 1 heart
  502. remove 1 from {bleeding.%victim%}
  503. wait 1 second
  504. send "{@nolongerbleeding}" to victim
  505. stop
  506.  
  507. on death:
  508. if {bleeding.%victim%} > 0:
  509. set {bleeding.%victim%} to 0
  510. send "{@nolongerbleeding}" to victim
  511. stop
  512.  
  513. #----------------------------------------------------------------------------------------------------
  514.  
  515. #----------------------------------------------------------------------------------------------------
  516. # Woodcutting Skills
  517. #----------------------------------------------------------------------------------------------------
  518. on break of a leaves:
  519. set {_chance} to {woodcutting.%player%} * 0.01
  520. chance of {_chance}:
  521. drop an apple
  522. send "{@extraapple}"
  523.  
  524. on break of a oak wood block or spruce wood block or birch wood block or jungle wood block or acacia wood block or dark oak wood block:
  525. if {woodcutting.%player%} < {@maxwoodcutting}:
  526. if {axestarted.%player%} is true:
  527. loop blocks upwards:
  528. loop-block is oak wood block or spruce wood block or birch wood block or jungle wood block or acacia wood block or dark oak wood block:
  529. give loop-block to player
  530. set loop-block to air
  531. set {axestarted.%player%} to false
  532. set {usedaxe.%player%} to true
  533.  
  534. else:
  535. tool of player is a wooden axe:
  536. add {@woodenaxe} to {woodcuttingxp.%player%}
  537. wait 4 ticks
  538. tool of player is a stone axe:
  539. add {@stoneaxe} to {woodcuttingxp.%player%}
  540. wait 4 ticks
  541. tool of player is a golden axe:
  542. add {@goldenaxe} to {woodcuttingxp.%player%}
  543. wait 4 ticks
  544. tool of player is a iron axe:
  545. add {@ironaxe} to {woodcuttingxp.%player%}
  546. wait 4 ticks
  547. tool of player is a diamond axe:
  548. add {@diamondaxe} to {woodcuttingxp.%player%}
  549. wait 4 ticks
  550.  
  551. on right click with axe:
  552. if "%region at player%" contains "{@spawn}":
  553. send "{@cantuse}"
  554. stop
  555. if {woodcutting.%player%} is higher than or equal to {@minimalwoodcutting}:
  556. if {axestarted.%player%} is false:
  557. if {usedaxe.%player%} is false:
  558. set {axestarted.%player%} to true
  559. send "{@axestarted}"
  560. wait 10 seconds
  561. set {usedaxe.%player%} to true
  562. set {axestarted.%player%} to false
  563. wait 10 seconds
  564. set {usedaxe.%player%} to false
  565. stop
  566. else:
  567. send "{@notrecharged}" to player
  568. stop
  569. else:
  570. send "{@nothingenough}" to player
  571. #----------------------------------------------------------------------------------------------------
  572.  
  573. #----------------------------------------------------------------------------------------------------
  574. # Acrobatics Skills
  575. #----------------------------------------------------------------------------------------------------
  576.  
  577. #------------------
  578. # Roll
  579. #------------------
  580. on damage:
  581. damage cause is fall:
  582. victim is a player:
  583. add {@falldmgxp} to {acrobaticsxp.%victim%}
  584. if {acrobatics.%victim%} is higher than or equal to {@minimalacrobatics}:
  585. set {_chance} to {acrobatics.%victim%} * 0.02
  586. chance of {_chance}:
  587. set damage to damage * 0.5
  588. add {@rollxp} to {acrobaticsxp.%victim%}
  589. send "{@rolled}" to victim
  590. stop
  591. #------------------
  592. # Dodged
  593. #------------------
  594. on damage:
  595. damage cause is fall:
  596. victim is a player:
  597. add {@falldmgxp} to {acrobaticsxp.%victim%}
  598. if {acrobatics.%victim%} is higher than or equal to {@minimalacrobatics}:
  599. set {_chance} to {acrobatics.%victim%} * 0.02
  600. chance of {_chance}:
  601. set damage to 0
  602. add {@dodgefallxp} to {acrobaticsxp.%victim%}
  603. send "{@dodgedfall}" to victim
  604. stop
  605.  
  606. #----------------------------------------------------------------------------------------------------
  607.  
  608. #----------------------------------------------------------------------------------------------------
  609. # Mining Skills
  610. #----------------------------------------------------------------------------------------------------
  611.  
  612. on break of a stone:
  613. tool of player is any pickaxe:
  614. if {mining.%player%} < {@maxmining}:
  615. add {@stonexp} to {miningxp.%player%}
  616. wait 3 ticks
  617.  
  618. on break of a sandstone:
  619. tool of player is any pickaxe:
  620. if {mining.%player%} < {@maxmining}:
  621. add {@sandstonexp} to {miningxp.%player%}
  622. wait 3 ticks
  623.  
  624. on break of a cobblestone:
  625. tool of player is any pickaxe:
  626. if {mining.%player%} < {@maxmining}:
  627. add {@cobblestonexp} to {miningxp.%player%}
  628. wait 3 ticks
  629.  
  630. on break of a coal ore:
  631. tool of player is any pickaxe:
  632. if {mining.%player%} < {@maxmining}:
  633. add {@coalxp} to {miningxp.%player%}
  634. set {_chance} to {mining.%player%} * 0.01
  635. chance of {_chance}:
  636. drop a coal
  637. send "{@lootingreward}" to player
  638. wait 3 ticks
  639.  
  640. on break of a iron ore:
  641. tool of player is any pickaxe:
  642. if {mining.%player%} < {@maxmining}:
  643. add {@ironxp} to {miningxp.%player%}
  644. set {_chance} to {mining.%player%} * 0.01
  645. chance of {_chance}:
  646. drop a iron ingot
  647. send "{@lootingreward}" to player
  648. wait 3 ticks
  649.  
  650. on break of a redstone ore:
  651. tool of player is any pickaxe:
  652. if {mining.%player%} < {@maxmining}:
  653. add {@redstonexp} to {miningxp.%player%}
  654. set {_chance} to {mining.%player%} * 0.01
  655. chance of {_chance}:
  656. drop a redstone
  657. send "{@lootingreward}" to player
  658. wait 3 ticks
  659.  
  660. on break of a lapis ore:
  661. tool of player is any pickaxe:
  662. if {mining.%player%} < {@maxmining}:
  663. add {@lapisxp} to {miningxp.%player%}
  664. set {_chance} to {mining.%player%} * 0.01
  665. chance of {_chance}:
  666. drop a lapis
  667. send "{@lootingreward}" to player
  668. wait 3 ticks
  669.  
  670. on break of a gold ore:
  671. tool of player is any pickaxe:
  672. if {mining.%player%} < {@maxmining}:
  673. add {@goldxp} to {miningxp.%player%}
  674. set {_chance} to {mining.%player%} * 0.01
  675. chance of {_chance}:
  676. drop a golden ingot
  677. send "{@lootingreward}" to player
  678. wait 3 ticks
  679.  
  680. on break of a diamond ore:
  681. tool of player is any pickaxe:
  682. if {mining.%player%} < {@maxmining}:
  683. add {@diamondxp} to {miningxp.%player%}
  684. set {_chance} to {mining.%player%} * 0.01
  685. chance of {_chance}:
  686. drop a diamond
  687. send "{@lootingreward}" to player
  688. wait 3 ticks
  689.  
  690. on break of a emerald ore:
  691. tool of player is any pickaxe:
  692. if {mining.%player%} < {@maxmining}:
  693. add {@emeraldxp} to {miningxp.%player%}
  694. set {_chance} to {mining.%player%} * 0.01
  695. chance of {_chance}:
  696. drop a emerald
  697. send "{@lootingreward}" to player
  698. wait 3 ticks
  699.  
  700.  
  701. every second:
  702. loop all players:
  703. if {pickstarted.%loop-player%} > 0:
  704. remove 1 from {pickstarted.%loop-player%}
  705. stop
  706. else:
  707. stop
  708.  
  709. on left click:
  710. #------------------
  711. # Drill
  712. #------------------
  713. if {pickstarted.%player%} > 0:
  714. if {pickcooldown.%player%} is true:
  715. if event-block is stone:
  716. drop 1 stone
  717. set event-block to air
  718. if event-block is cobblestone:
  719. drop 1 cobblestone
  720. set event-block to air
  721. if event-block is sandstone:
  722. drop 1 sandstone
  723. set event-block to air
  724. if event-block is coal ore:
  725. drop 1 coal
  726. set event-block to air
  727. if event-block is iron ore:
  728. drop 1 iron ingot
  729. set event-block to air
  730. if event-block is gold ore:
  731. drop 1 gold ingot
  732. set event-block to air
  733. if event-block is redstone ore:
  734. drop 1 redstone
  735. set event-block to air
  736. if event-block is lapis ore:
  737. drop 1 lapis lazuli
  738. set event-block to air
  739. if event-block is diamond ore:
  740. drop 1 diamond
  741. set event-block to air
  742. if event-block is emerald ore:
  743. drop 1 emerald
  744. set event-block to air
  745. if event-block is diorite:
  746. drop 1 diorite
  747. set event-block to air
  748. if event-block is andesite:
  749. drop 1 andesite
  750. set event-block to air
  751.  
  752. on right click with pickaxe:
  753. if "%region at player%" contains "{@spawn}":
  754. send "{@cantuse}"
  755. stop
  756. if {mining.%player%} is higher than or equal to {@minimalmining}:
  757. if {pickstart.%player%} is false:
  758. if {pickcooldown.%player%} is false:
  759. set {pickstarted.%player%} to 10
  760. set {pickcooldown.%player%} to true
  761. send "{@pickstarted}"
  762. wait 10 seconds
  763. set {pickstarted.%player%} to 0
  764. wait 60 seconds
  765. set {pickcooldown.%player%} to false
  766. stop
  767. else:
  768. send "{@notrecharged}" to player
  769. stop
  770. else:
  771. send "{@nothingenough}" to player
  772. #----------------------------------------------------------------------------------------------------
  773.  
  774. #----------------------------------------------------------------------------------------------------
  775. # Archery Skills
  776. #----------------------------------------------------------------------------------------------------
  777.  
  778. on damage:
  779. if tool of attacker is a bow:
  780. if attacker is a player:
  781. add {@bowxp} to {archeryxp.%attacker%}
  782. if {startednausea.%attacker%} is true:
  783. set {nauseacooldown.%attacker%} to true
  784. set {startednausea.%attacker%} to false
  785. apply nausea 2 to victim for 2 seconds
  786. apply blindness 2 to victim for 2 seconds
  787. send "{@successfullnausea}" to attacker
  788. send "{@yougotnausea}" to victim
  789. wait 20 seconds
  790. set {nauseacooldown.%attacker%} to false
  791. stop
  792. else:
  793. set {_chance} to {archery.%shooter%} * 0.05
  794. chance of {_chance}:
  795. apply poison 2 to the victim for 3 seconds
  796. send "{@poisoned}" to victim
  797. send "{@poisonshot}" to attacker
  798. stop
  799.  
  800.  
  801.  
  802. on left click with a bow:
  803. if "%region at player%" contains "{@spawn}":
  804. send "{@cantuse}"
  805. stop
  806. if {archery.%player%} is higher than or equal to {@minimalarchery}:
  807. if {startednausea.%player%} is false:
  808. if {nauseacooldown.%player%} is false:
  809. set {startednausea.%player%} to true
  810. send "{@nauseastarted}" to player
  811. stop
  812. else:
  813. send "{@notrecharged}" to player
  814. else:
  815. send "{@nothingenough}" to player
  816. #----------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement