- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleDiff note for paste #13735
TypeDiff
Date2015/02/08 10:02:57 UTC-08:00
ByGuest
Other
Paste
 ################################################################################
 #
 #                     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:<c.location>
 
   ProcessEvent:
     #- log "<player.name> <c.location.material.name> <player.flag[Ach_Chopped]> <player.flag[Ach_Dug]> <player.flag[Ach_Mined]> <player.flag[Ach_Total]>"  type:fine file:/p
lugins/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 !<el@val[Towny|wilderness|world].as_list.contains[<def[1].world.name>]> {
       - queue clear
       }
     - ^flag player Ach_Blocks:++
     - ^if <def[1].material.name.contains[log]> {
       - inject instantly locally Chop_Event
       - queue clear
       }
     - ^if <def[1].material.name.contains_any[stone|ore]> {
       - inject instantly locally Mine_Event
       - queue clear
       }
     - ^if <def[1].material.name.contains_any[grass|dirt|sand|clay]> {
       - inject instantly locally Dig_Event
       - queue clear
       }
 
   Chop_Event:
     - flag player Ach_Chopped:++
     - define WoodCutting '<player.mcmmo.level[woodcutting].div[<s@CustomDropScript.yaml_key[WoodcuttingFactor].add[1]>]||0>'
     - define cT1Oil '<s@CustomDropScript.yaml_key[cT1Oil].mul[<def[WoodCutting]>]>'
     - define cT2Oil '<s@CustomDropScript.yaml_key[cT2Oil].mul[<def[WoodCutting]>]>'
     - define dropRoll <util.random.int[0].to[1000000]>
 
     - if <def[dropRoll].is[OR_LESS].than[<def[cT1Oil]>]> {
       - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_RareDrop_Chopped]||level_up>'
-      - execute as_op "mm items give <player.name> CD_NaturalOil"
+      - execute silent as_op "mm items give <player.name> CD_NaturalOil"
       - adjust <player> 'action_bar:<&e>You have found a rare crafting material!'
 #      - narrate "<yellow>You have found a rare crafting material!"
       }
 
     - define dropRoll <util.random.int[0].to[1000000]>
     - if <def[dropRoll].is[OR_LESS].than[<def[cT2Oil]>]> {
       - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_RareDrop_Chopped]||level_up>'
-      - execute as_op "mm items give <player.name> CD_EnhancedOil"
+      - execute silent as_op "mm items give <player.name> CD_EnhancedOil"
       - adjust <player> 'action_bar:<&e>You have found a rare crafting material!'
 #      - narrate "<yellow>You have found a rare crafting material!"
       }
     - inject instantly s@CustomDropScript_Achievements p:Chopped_<player.flag[Ach_Chopped].as_int||null>
 
   Mine_Event:
     - flag player Ach_Mined:++
     - define dropRoll <util.random.int[0].to[1000000]>
     - define Mining '<player.mcmmo.level[mining].div[<s@CustomDropScript.yaml_key[MiningFactor]>].add[1]||0>'
     - define cT2Flux '<s@CustomDropScript.yaml_key[cT2Flux].mul[<def[Mining]>]>'
 
     - if <def[dropRoll].is[OR_LESS].than[<def[cT2Flux]>]> {
       - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_RareDrop_Mined]||level_up>'
-      - execute as_op "mm items give <player.name> CD_WeakFlux"
+      - execute silent as_op "mm items give <player.name> CD_WeakFlux"
       - adjust <player> 'action_bar:<&e>You have found a rare crafting material!'
 #      - narrate "<yellow>You have found a rare crafting material!"
       }
     - inject instantly s@CustomDropScript_Achievements p:Mined_<player.flag[Ach_Mined].as_int||null>
 
   Dig_Event:
     - flag player Ach_Dug:++
     - define dropRoll <util.random.int[0].to[1000000]>
     - define Excavation '<player.mcmmo.level[excavation].div[<s@CustomDropScript.yaml_key[ExcavationFactor]>].add[1]||0>'
 
     - if <def[1].y.is[OR_MORE].than[40]> {
       - define cT1Tannin '<s@CustomDropScript.yaml_key[cT1Tannin].mul[<def[Excavation]>]>'
       - if <def[dropRoll].is[OR_LESS].than[<def[cT1Tannin]>]> {
         - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_RareDrop_Dug]||level_up>'
-        - execute as_op "mm items give <player.name> CD_NaturalTannin"
+        - execute silent as_op "mm items give <player.name> CD_NaturalTannin"
         - adjust <player> 'action_bar:<&e>You have found a rare crafting material!'
 #        - narrate "<yellow>You have found a rare crafting material!"
         }
       }
       else {
       - define cT2Tannin '<s@CustomDropScript.yaml_key[cT2Tannin].mul[<def[Excavation]>]>'
       - if <def[dropRoll].is[OR_LESS].than[<def[cT2Tannin]>]> {
         - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_RareDrop_Dug]||level_up>'
-        - execute as_op "mm items give <player.name> CD_EnhancedTannin"
+        - execute silent as_op "mm items give <player.name> CD_EnhancedTannin"
         - adjust <player> 'action_bar:<&e>You have found a rare crafting material!'
 #        - narrate "<yellow>You have found a rare crafting material!"
         }
       }
     - inject instantly s@CustomDropScript_Achievements p:Dug_<player.flag[Ach_Dug].as_int||null>
 
 
 CustomDropScript_Achievements:
   type: task
   speed: 0
   debug: false
 
   Chopped_100:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Chopper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Chopped_Sound]||level_up>'
     - give money qty:25
-#    - execute as_server "eco give <player.name> 25"
-    - execute as_server "points give <player.name> 1"
+#    - execute silent as_server "eco give <player.name> 25"
+    - execute silent as_server "points give <player.name> 1"
 
   Chopped_500:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Chopper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:100
-    - execute as_server "points give <player.name> 3"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 3"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Chopped_1000:
     - announce "<player.name> has just earned the achievement  <green>[Master Chopper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:250
-    - execute as_server "points give <player.name> 5"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 5"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Chopped_2500:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Woodcutter!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:500
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Chopped_5000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Woodcutter!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Chopped_10000:
     - announce "<player.name> has just earned the achievement  <green>[Master Woodcutter!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Chopped_25000:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Logger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:2500
-    - execute as_server "points give <player.name> 9"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 9"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Chopped_50000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Logger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:5000
-    - execute as_server "points give <player.name> 11"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 11"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
   Chopped_100000:
     - announce "<player.name> has just earned the achievement  <green>[Master Logger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:10000
-    - execute as_server "points give <player.name> 13"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 13"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
   Chopped_250000:
     - announce "<player.name> has just earned the achievement  <green>[Hogger Logger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Chopped]||level_up>'
     - give money qty:25000
-    - execute as_server "points give <player.name> 15"
-    - execute as_server "mm items give <player.name> CK_Tier5_Tools"
+    - execute silent as_server "points give <player.name> 15"
+    - execute silent as_server "mm items give <player.name> CK_Tier5_Tools"
 
 
   Mined_100:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Miner!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:25
-    - execute as_server "points give <player.name> 1"
+    - execute silent as_server "points give <player.name> 1"
 
   Mined_500:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Miner!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:100
-    - execute as_server "points give <player.name> 3"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 3"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Mined_1000:
     - announce "<player.name> has just earned the achievement  <green>[Master Miner!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:250
-    - execute as_server "points give <player.name> 5"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 5"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Mined_2500:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Excavator!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:500
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Mined_5000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Excavator!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Mined_10000:
     - announce "<player.name> has just earned the achievement  <green>[Master Excavator!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Mined_25000:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Prospector!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:2500
-    - execute as_server "points give <player.name> 9"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 9"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Mined_50000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Prospector!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:5000
-    - execute as_server "points give <player.name> 11"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 11"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
   Mined_100000:
     - announce "<player.name> has just earned the achievement  <green>[Master Prospector!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Mined]||level_up>'
     - give money qty:10000
-    - execute as_server "points give <player.name> 13"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 13"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
 
   Dug_100:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Digger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:25
-    - execute as_server "points give <player.name> 1"
+    - execute silent as_server "points give <player.name> 1"
 
   Dug_500:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Digger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:100
-    - execute as_server "points give <player.name> 3"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 3"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Dug_1000:
     - announce "<player.name> has just earned the achievement  <green>[Master Digger!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:250
-    - execute as_server "points give <player.name> 5"
-    - execute as_server "mm items give <player.name> CK_Tier1_Tools"
+    - execute silent as_server "points give <player.name> 5"
+    - execute silent as_server "mm items give <player.name> CK_Tier1_Tools"
 
   Dug_2500:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Landscaper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:500
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Dug_5000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Landscaper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier2_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier2_Tools"
 
   Dug_10000:
     - announce "<player.name> has just earned the achievement  <green>[Master Landscaper!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:1000
-    - execute as_server "points give <player.name> 7"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 7"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Dug_25000:
     - announce "<player.name> has just earned the achievement  <green>[Initiate Terraformer!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:2500
-    - execute as_server "points give <player.name> 9"
-    - execute as_server "mm items give <player.name> CK_Tier3_Tools"
+    - execute silent as_server "points give <player.name> 9"
+    - execute silent as_server "mm items give <player.name> CK_Tier3_Tools"
 
   Dug_50000:
     - announce "<player.name> has just earned the achievement  <green>[Accomplished Terraformer!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:5000
-    - execute as_server "points give <player.name> 11"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 11"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
   Dug_100000:
     - announce "<player.name> has just earned the achievement  <green>[Master Terraformer!]"
     - playsound <player> 'sound:<s@CustomDropScript.yaml_key[Sound_Ach_Dug]||level_up>'
     - give money qty:10000
-    - execute as_server "points give <player.name> 13"
-    - execute as_server "mm items give <player.name> CK_Tier4_Tools"
+    - execute silent as_server "points give <player.name> 13"
+    - execute silent as_server "mm items give <player.name> CK_Tier4_Tools"
 
 
 
 #
-
 
 



RawRaw



Pastes made: 58443