################################################################################ # # C u s t o m D r o p s E n g i n e # A more efficient rewrite of the original # # # Authors: |Anthony| anthony@mineconomy.org # Version: 0.1 # dScript Version: 0.9.6 # # Original script: http://mcmonkey.org/haste/13679 # # ##################################################### # # # Custom Drops Engine (Towny/Wilderness) # # # ##################################################### # # Provides additional rare drop crafting materials # CustomDropScript: type: world speed: 0 debug: false ################################################## # # # Towny Base Drop Chance Variables # # # # 10000 = 1%, 100000 = 10%, 500000 = 50% # # # ################################################## cT1Oil: 2000 cT1Tannin: 2000 cT2Oil: 1000 cT2Tannin: 1000 cT2Flux: 1000 ############################################ # # # McMMO Factor Variables # # # # 250 = 6x drop chance at level 1000 # # 500 = 3x drop chance at level 1000 # # 1000 = no skill level factor # # # ############################################ MiningFactor: 500 ExcavationFactor: 500 WoodcuttingFactor: 500 # Configure the sounds that will play for these events # Sounds can be found here: http://jd.bukkit.org/dev/apidocs/org/bukkit/Sound.html Sound_Ach_Chopped: firework_twinkle2 Sound_Ach_Mined: firework_twinkle2 Sound_Ach_Dug: firework_twinkle2 Sound_RareDrop_Chopped: level_up Sound_RareDrop_Mined: level_up Sound_RareDrop_Dug: level_up events: on player breaks block: # You are not canceling the block break event, so it's better to run a subscript. # This way the event isn't waiting for your script to finish processing. - run s@CustomDropScript p:ProcessEvent def: ProcessEvent: #- log " " type:fine file:/plugins/Denizen/logs/BreakLog.log # This happens before the world check, idk if that's what you intended, # but that's how it was in your original. It's not used anywhere in this # script so i assume you use it somewhere else. - ^if !]> { - queue clear } - ^flag player Ach_Blocks:++ - ^if { - inject instantly locally Chop_Event - queue clear } - ^if { - inject instantly locally Mine_Event - queue clear } - ^if { - inject instantly locally Dig_Event - queue clear } Chop_Event: - flag player Ach_Chopped:++ - define WoodCutting ']||0>' - define cT1Oil ']>' - define cT2Oil ']>' - define dropRoll - if ]> { - playsound 'sound:' - - execute as_op "mm items give CD_NaturalOil" + - execute silent as_op "mm items give CD_NaturalOil" - adjust 'action_bar:<&e>You have found a rare crafting material!' # - narrate "You have found a rare crafting material!" } - define dropRoll - if ]> { - playsound 'sound:' - - execute as_op "mm items give CD_EnhancedOil" + - execute silent as_op "mm items give CD_EnhancedOil" - adjust 'action_bar:<&e>You have found a rare crafting material!' # - narrate "You have found a rare crafting material!" } - inject instantly s@CustomDropScript_Achievements p:Chopped_ Mine_Event: - flag player Ach_Mined:++ - define dropRoll - define Mining '].add[1]||0>' - define cT2Flux ']>' - if ]> { - playsound 'sound:' - - execute as_op "mm items give CD_WeakFlux" + - execute silent as_op "mm items give CD_WeakFlux" - adjust 'action_bar:<&e>You have found a rare crafting material!' # - narrate "You have found a rare crafting material!" } - inject instantly s@CustomDropScript_Achievements p:Mined_ Dig_Event: - flag player Ach_Dug:++ - define dropRoll - define Excavation '].add[1]||0>' - if { - define cT1Tannin ']>' - if ]> { - playsound 'sound:' - - execute as_op "mm items give CD_NaturalTannin" + - execute silent as_op "mm items give CD_NaturalTannin" - adjust 'action_bar:<&e>You have found a rare crafting material!' # - narrate "You have found a rare crafting material!" } } else { - define cT2Tannin ']>' - if ]> { - playsound 'sound:' - - execute as_op "mm items give CD_EnhancedTannin" + - execute silent as_op "mm items give CD_EnhancedTannin" - adjust 'action_bar:<&e>You have found a rare crafting material!' # - narrate "You have found a rare crafting material!" } } - inject instantly s@CustomDropScript_Achievements p:Dug_ CustomDropScript_Achievements: type: task speed: 0 debug: false Chopped_100: - announce " has just earned the achievement [Initiate Chopper!]" - playsound 'sound:' - give money qty:25 -# - execute as_server "eco give 25" - - execute as_server "points give 1" +# - execute silent as_server "eco give 25" + - execute silent as_server "points give 1" Chopped_500: - announce " has just earned the achievement [Accomplished Chopper!]" - playsound 'sound:' - give money qty:100 - - execute as_server "points give 3" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 3" + - execute silent as_server "mm items give CK_Tier1_Tools" Chopped_1000: - announce " has just earned the achievement [Master Chopper!]" - playsound 'sound:' - give money qty:250 - - execute as_server "points give 5" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 5" + - execute silent as_server "mm items give CK_Tier1_Tools" Chopped_2500: - announce " has just earned the achievement [Initiate Woodcutter!]" - playsound 'sound:' - give money qty:500 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Chopped_5000: - announce " has just earned the achievement [Accomplished Woodcutter!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Chopped_10000: - announce " has just earned the achievement [Master Woodcutter!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier3_Tools" Chopped_25000: - announce " has just earned the achievement [Initiate Logger!]" - playsound 'sound:' - give money qty:2500 - - execute as_server "points give 9" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 9" + - execute silent as_server "mm items give CK_Tier3_Tools" Chopped_50000: - announce " has just earned the achievement [Accomplished Logger!]" - playsound 'sound:' - give money qty:5000 - - execute as_server "points give 11" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 11" + - execute silent as_server "mm items give CK_Tier4_Tools" Chopped_100000: - announce " has just earned the achievement [Master Logger!]" - playsound 'sound:' - give money qty:10000 - - execute as_server "points give 13" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 13" + - execute silent as_server "mm items give CK_Tier4_Tools" Chopped_250000: - announce " has just earned the achievement [Hogger Logger!]" - playsound 'sound:' - give money qty:25000 - - execute as_server "points give 15" - - execute as_server "mm items give CK_Tier5_Tools" + - execute silent as_server "points give 15" + - execute silent as_server "mm items give CK_Tier5_Tools" Mined_100: - announce " has just earned the achievement [Initiate Miner!]" - playsound 'sound:' - give money qty:25 - - execute as_server "points give 1" + - execute silent as_server "points give 1" Mined_500: - announce " has just earned the achievement [Accomplished Miner!]" - playsound 'sound:' - give money qty:100 - - execute as_server "points give 3" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 3" + - execute silent as_server "mm items give CK_Tier1_Tools" Mined_1000: - announce " has just earned the achievement [Master Miner!]" - playsound 'sound:' - give money qty:250 - - execute as_server "points give 5" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 5" + - execute silent as_server "mm items give CK_Tier1_Tools" Mined_2500: - announce " has just earned the achievement [Initiate Excavator!]" - playsound 'sound:' - give money qty:500 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Mined_5000: - announce " has just earned the achievement [Accomplished Excavator!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Mined_10000: - announce " has just earned the achievement [Master Excavator!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier3_Tools" Mined_25000: - announce " has just earned the achievement [Initiate Prospector!]" - playsound 'sound:' - give money qty:2500 - - execute as_server "points give 9" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 9" + - execute silent as_server "mm items give CK_Tier3_Tools" Mined_50000: - announce " has just earned the achievement [Accomplished Prospector!]" - playsound 'sound:' - give money qty:5000 - - execute as_server "points give 11" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 11" + - execute silent as_server "mm items give CK_Tier4_Tools" Mined_100000: - announce " has just earned the achievement [Master Prospector!]" - playsound 'sound:' - give money qty:10000 - - execute as_server "points give 13" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 13" + - execute silent as_server "mm items give CK_Tier4_Tools" Dug_100: - announce " has just earned the achievement [Initiate Digger!]" - playsound 'sound:' - give money qty:25 - - execute as_server "points give 1" + - execute silent as_server "points give 1" Dug_500: - announce " has just earned the achievement [Accomplished Digger!]" - playsound 'sound:' - give money qty:100 - - execute as_server "points give 3" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 3" + - execute silent as_server "mm items give CK_Tier1_Tools" Dug_1000: - announce " has just earned the achievement [Master Digger!]" - playsound 'sound:' - give money qty:250 - - execute as_server "points give 5" - - execute as_server "mm items give CK_Tier1_Tools" + - execute silent as_server "points give 5" + - execute silent as_server "mm items give CK_Tier1_Tools" Dug_2500: - announce " has just earned the achievement [Initiate Landscaper!]" - playsound 'sound:' - give money qty:500 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Dug_5000: - announce " has just earned the achievement [Accomplished Landscaper!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier2_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier2_Tools" Dug_10000: - announce " has just earned the achievement [Master Landscaper!]" - playsound 'sound:' - give money qty:1000 - - execute as_server "points give 7" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 7" + - execute silent as_server "mm items give CK_Tier3_Tools" Dug_25000: - announce " has just earned the achievement [Initiate Terraformer!]" - playsound 'sound:' - give money qty:2500 - - execute as_server "points give 9" - - execute as_server "mm items give CK_Tier3_Tools" + - execute silent as_server "points give 9" + - execute silent as_server "mm items give CK_Tier3_Tools" Dug_50000: - announce " has just earned the achievement [Accomplished Terraformer!]" - playsound 'sound:' - give money qty:5000 - - execute as_server "points give 11" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 11" + - execute silent as_server "mm items give CK_Tier4_Tools" Dug_100000: - announce " has just earned the achievement [Master Terraformer!]" - playsound 'sound:' - give money qty:10000 - - execute as_server "points give 13" - - execute as_server "mm items give CK_Tier4_Tools" + - execute silent as_server "points give 13" + - execute silent as_server "mm items give CK_Tier4_Tools" # -