Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # LegitMobCatcher
- # Built for LEGIT Minecraft Server
- options:
- # Mobs will only be catchable if set to true
- chicken: true
- cow: true
- cod: true
- dolphin: true
- mooshroom: true
- pig: true
- polar bear: true
- pufferfish: true
- rabbit: true
- salmon: true
- sheep: true
- squid: true
- tropical fish: true
- turtle: true
- donkey: true
- horse: true
- mule: true
- ocelot: true
- parrot: true
- wolf: true
- llama: true
- # How much to charge the player for catching the mob
- cost: 9
- #-----------------------------------------------------------------------------------------------#
- # Clear the acceptedMobs variable and rebuilds it containing all mobs set to true in options
- on load:
- clear {acceptedMobs::*}
- if {@chicken} is true:
- add a chicken to {acceptedMobs::*}
- if {@cow} is true:
- add a cow to {acceptedMobs::*}
- if {@cod} is true:
- add a cod to {acceptedMobs::*}
- if {@dolphin} is true:
- add a dolphin to {acceptedMobs::*}
- if {@mooshroom} is true:
- add a mooshroom to {acceptedMobs::*}
- if {@pig} is true:
- add a pig to {acceptedMobs::*}
- if {@polar bear} is true:
- add a polar bear to {acceptedMobs::*}
- if {@pufferfish} is true:
- add a pufferfish to {acceptedMobs::*}
- if {@rabbit} is true:
- add a rabbit to {acceptedMobs::*}
- if {@salmon} is true:
- add a salmon to {acceptedMobs::*}
- if {@sheep} is true:
- add a sheep to {acceptedMobs::*}
- if {@squid} is true:
- add a squid to {acceptedMobs::*}
- if {@tropical fish} is true:
- add a tropical fish to {acceptedMobs::*}
- if {@turtle} is true:
- add a turtle to {acceptedMobs::*}
- if {@donkey} is true:
- add a donkey to {acceptedMobs::*}
- if {@horse} is true:
- add a horse to {acceptedMobs::*}
- if {@mule} is true:
- add a mule to {acceptedMobs::*}
- if {@ocelot} is true:
- add a ocelot to {acceptedMobs::*}
- if {@parrot} is true:
- add a parrot to {acceptedMobs::*}
- if {@wolf} is true:
- add a wolf to {acceptedMobs::*}
- if {@llama} is true:
- add a llama to {acceptedMobs::*}
- on damage:
- # Only start the follwoing code if an egg was thrown
- if damage was caused by projectile:
- if event-projectile is egg:
- # Make sure the victim mob is set to true in options
- loop {acceptedMobs::*}:
- if victim is loop-value:
- # Stop the victim from taking damage
- cancel event
- # If the victim is allowed to be captured, we will check the attackers money balance
- set {_playerBalance} to the attacker's money
- # If the attackers balance was not more or equal to the cost option ...
- if {_playerBalance} is not set:
- send "&cError occured" to attacker
- stop
- if {_playerBalance} is less than {@cost}:
- send "&cYou don't have enough Gold to capture this mob!" to attacker
- stop
- # If the player has enough money ...
- if {_playerBalance} is not less than {@cost}:
- # delete the victim instead of killing it so it doesnt drop items
- delete victim
- # check all mobs and drop appropriate spawn egg
- if victim is chicken:
- drop 1 chicken spawn egg
- if victim is cow:
- drop 1 cow spawn egg
- if victim is cod:
- drop 1 cod spawn egg
- if victim is dolphin:
- drop 1 dolphin spawn egg
- if victim is mooshroom:
- drop 1 mooshroom spawn egg
- if victim is pig:
- drop 1 pig spawn egg
- if victim is polar bear:
- drop 1 polar bear spawn egg
- if victim is pufferfish:
- drop 1 pufferfish spawn egg
- if victim is rabbit:
- drop 1 rabbit spawn egg
- if victim is salmon:
- drop 1 salmon spawn egg
- if victim is sheep:
- drop 1 sheep spawn egg
- if victim is squid:
- drop 1 squid spawn egg
- if victim is tropical fish:
- drop 1 tropical fish spawn egg
- if victim is turtle:
- drop 1 turtle spawn egg
- if victim is donkey:
- drop 1 donkey spawn egg
- if victim is horse:
- drop 1 horse spawn egg
- if victim is mule:
- drop 1 mule spawn egg
- if victim is ocelot:
- drop 1 ocelot spawn egg
- if victim is parrot:
- drop 1 parrot spawn egg
- if victim is wolf:
- drop 1 wolf spawn egg
- if victim is llama:
- drop 1 llama spawn egg
- if world is "Town":
- send "&bYou have captured this mob for free" to attacker
- else:
- send "&bYou paid {@cost} Gold to capture this mob" to attacker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement