Advertisement
kron1k

Untitled

May 12th, 2019
846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.98 KB | None | 0 0
  1. # LegitMobCatcher
  2. # Built for LEGIT Minecraft Server
  3.  
  4.  
  5. options:
  6.  
  7. # Mobs will only be catchable if set to true
  8. chicken: true
  9. cow: true
  10. cod: true
  11. dolphin: true
  12. mooshroom: true
  13. pig: true
  14. polar bear: true
  15. pufferfish: true
  16. rabbit: true
  17. salmon: true
  18. sheep: true
  19. squid: true
  20. tropical fish: true
  21. turtle: true
  22. donkey: true
  23. horse: true
  24. mule: true
  25. ocelot: true
  26. parrot: true
  27. wolf: true
  28. llama: true
  29.  
  30. # How much to charge the player for catching the mob
  31. cost: 9
  32.  
  33. #-----------------------------------------------------------------------------------------------#
  34.  
  35.  
  36. # Clear the acceptedMobs variable and rebuilds it containing all mobs set to true in options
  37. on load:
  38. clear {acceptedMobs::*}
  39.  
  40. if {@chicken} is true:
  41. add a chicken to {acceptedMobs::*}
  42. if {@cow} is true:
  43. add a cow to {acceptedMobs::*}
  44. if {@cod} is true:
  45. add a cod to {acceptedMobs::*}
  46. if {@dolphin} is true:
  47. add a dolphin to {acceptedMobs::*}
  48. if {@mooshroom} is true:
  49. add a mooshroom to {acceptedMobs::*}
  50. if {@pig} is true:
  51. add a pig to {acceptedMobs::*}
  52. if {@polar bear} is true:
  53. add a polar bear to {acceptedMobs::*}
  54. if {@pufferfish} is true:
  55. add a pufferfish to {acceptedMobs::*}
  56. if {@rabbit} is true:
  57. add a rabbit to {acceptedMobs::*}
  58. if {@salmon} is true:
  59. add a salmon to {acceptedMobs::*}
  60. if {@sheep} is true:
  61. add a sheep to {acceptedMobs::*}
  62. if {@squid} is true:
  63. add a squid to {acceptedMobs::*}
  64. if {@tropical fish} is true:
  65. add a tropical fish to {acceptedMobs::*}
  66. if {@turtle} is true:
  67. add a turtle to {acceptedMobs::*}
  68. if {@donkey} is true:
  69. add a donkey to {acceptedMobs::*}
  70. if {@horse} is true:
  71. add a horse to {acceptedMobs::*}
  72. if {@mule} is true:
  73. add a mule to {acceptedMobs::*}
  74. if {@ocelot} is true:
  75. add a ocelot to {acceptedMobs::*}
  76. if {@parrot} is true:
  77. add a parrot to {acceptedMobs::*}
  78. if {@wolf} is true:
  79. add a wolf to {acceptedMobs::*}
  80. if {@llama} is true:
  81. add a llama to {acceptedMobs::*}
  82.  
  83.  
  84. on damage:
  85.  
  86. # Only start the follwoing code if an egg was thrown
  87. if damage was caused by projectile:
  88. if event-projectile is egg:
  89.  
  90. # Make sure the victim mob is set to true in options
  91. loop {acceptedMobs::*}:
  92. if victim is loop-value:
  93.  
  94. # Stop the victim from taking damage
  95. cancel event
  96.  
  97. # If the victim is allowed to be captured, we will check the attackers money balance
  98. set {_playerBalance} to the attacker's money
  99.  
  100. # If the attackers balance was not more or equal to the cost option ...
  101. if {_playerBalance} is not set:
  102. send "&cError occured" to attacker
  103. stop
  104. if {_playerBalance} is less than {@cost}:
  105. send "&cYou don't have enough Gold to capture this mob!" to attacker
  106. stop
  107.  
  108. # If the player has enough money ...
  109. if {_playerBalance} is not less than {@cost}:
  110.  
  111. # delete the victim instead of killing it so it doesnt drop items
  112. delete victim
  113.  
  114. # check all mobs and drop appropriate spawn egg
  115. if victim is chicken:
  116. drop 1 chicken spawn egg
  117. if victim is cow:
  118. drop 1 cow spawn egg
  119. if victim is cod:
  120. drop 1 cod spawn egg
  121. if victim is dolphin:
  122. drop 1 dolphin spawn egg
  123. if victim is mooshroom:
  124. drop 1 mooshroom spawn egg
  125. if victim is pig:
  126. drop 1 pig spawn egg
  127. if victim is polar bear:
  128. drop 1 polar bear spawn egg
  129. if victim is pufferfish:
  130. drop 1 pufferfish spawn egg
  131. if victim is rabbit:
  132. drop 1 rabbit spawn egg
  133. if victim is salmon:
  134. drop 1 salmon spawn egg
  135. if victim is sheep:
  136. drop 1 sheep spawn egg
  137. if victim is squid:
  138. drop 1 squid spawn egg
  139. if victim is tropical fish:
  140. drop 1 tropical fish spawn egg
  141. if victim is turtle:
  142. drop 1 turtle spawn egg
  143. if victim is donkey:
  144. drop 1 donkey spawn egg
  145. if victim is horse:
  146. drop 1 horse spawn egg
  147. if victim is mule:
  148. drop 1 mule spawn egg
  149. if victim is ocelot:
  150. drop 1 ocelot spawn egg
  151. if victim is parrot:
  152. drop 1 parrot spawn egg
  153. if victim is wolf:
  154. drop 1 wolf spawn egg
  155. if victim is llama:
  156. drop 1 llama spawn egg
  157.  
  158. if world is "Town":
  159. send "&bYou have captured this mob for free" to attacker
  160. else:
  161. send "&bYou paid {@cost} Gold to capture this mob" to attacker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement