##########################################@TERRAINCONTROL USERS@######################################## # Do not Modify anything unless indicated otherwise! # The contents of this file provide the following functions: # - AncientDungeonsArrow script ( This is a part of the dispenser script. removing this will break the dispenser script ) # - Dispenser Script ( Controls Traps & Special mob spawns of NLBlackEagle's Realms ) # - Sapling Fix ( Fixes a problem with trees growing constainly ) # - ChestScript ( Populates the chest generated by TerrainControl & Repopulate them after 300 minutes # This function is player-bound so no global repopulate timings! ) # Check the lootcrates.yml file for all loot items! # # Note: After changing values type /denizen reload -a ingame! Otherwise there wont be any diffrence. No need to restart! # # This is a YAML formatted file, make sure you check for YAML errors after updating this script! ##################################### # Created by NLBlackEagle # # Website: www.craftrealms.org # # TeamSpeak: ts3.craftrealms.org # ##################################### DungeonGhost: # This script creates a item which functions as boss spawn check. type: item debug: false material: i@Bone display name: <&3>Restless Bone lore: - This bone gives of a strange confusing aura no_id: false bound: false DungeonBoss: # This script creates a item which functions as boss spawn check. type: item debug: false material: i@Bone display name: <&3>Evil Bone lore: - You feel slightly unconfortable when holding this bone. no_id: false bound: false DungeonGuardian: # This script creates a item which functions as boss spawn check. type: item debug: false material: i@Bone display name: <&3>Heavy Bone lore: - This bone feels heavier then it should be, almosth as if something resides within no_id: false bound: false AncientDungeonsArrow: # This is a part of the dispenser script. removing this will break the dispenser script type: item debug: false material: i@arrow display name: <&3>Magical Ancient Arrow lore: - This arrow only works with the Ancient Dispensers no_id: false bound: false DungeonsMobSlowEffect: type: task debug: false script: - ^narrate "You legs have been broken by your oppoment!" - random { - playeffect effect:SLOW target: quantity:2 - playeffect effect:SLOW target: quantity:3 - playeffect effect:SLOW target: quantity:4 } DungeonsMobPoisonEffect: type: task debug: false script: - ^narrate "You have been poisoned by your oppoment!" - random { - potion POISON duration:3 - potion POISON duration:2 - potion POISON duration:4 } DungeonsMobWitherEffect: type: task debug: false script: - ^narrate "You are poisoned by your oppoment!" - random { - potion WITHER duration:3 - potion WITHER duration:2 - potion WITHER duration:1 } DungeonsMobFlameEffect: type: task debug: false script: - ^narrate "You have been cursed by your oppoment!" - random { - burn duration:4 - burn duration:3 - burn duration:2 } DispenserScript: # This script manages all dispensers placed by TerrainControl. To open the boss dispensers you'll need to have operator permissions! type: world debug: true events: on entity killed: - if contains { - explode power:10 l@ - if == 1 { - random { - drop i@GOLDEN_APPLE qty:1 - drop i@DIAMOND qty:1 - drop i@EXP_BOTTLE qty:1 - drop i@GOLD_BARDING qty:1 - drop i@GOLD_BLOCK qty:1 - drop i@GOLD_SWORD qty:1 - drop i@GOLD_HELMET qty:1 - drop i@GOLD_LEGGINGS qty:1 - drop i@GOLDEN_CARROT qty:1 } } } on entity damages player: - announce "" - if contains { - announce "hello" - if == 1 { - random { - run s@DungeonsMobWitherEffect as : - run s@DungeonsMobFlameEffect as: - run s@DungeonsMobPoisonEffect as: - run s@DungeonsMobSlowEffect as: } } - random { - determine | - determine | - determine | - determine | - determine | } } on player opens inventory: - if { - if ! { - narrate "This dispenser has been locked with a ancient powerfull spell" - DETERMINE CANCELLED } } on block dispenses item: - if !]||false> { - if contains { - if ! { - playsound sound:ENTITY_ENDERDRAGON_GROWL pitch:-100 - ^spawn skeleton save:DungeonBoss - ^flag server "DungeonSpawns:|:" - ^health 30 - ^heal - ^adjust "custom_name:DungeonBoss" - flag server dungeonboss duration:5m - DETERMINE CANCELLED } } - if contains { - if ! { - playsound sound:ENTITY_LIGHTNING_THUNDER pitch:-100 - ^spawn skeleton save:DungeonGuardian - ^flag server "DungeonSpawns:|:" - ^health 30 - ^heal - ^adjust "custom_name:DungeonGuardian" - flag server DungeonGuardian duration:1m - DETERMINE CANCELLED } } - if contains { - if ! { - playsound sound:ENTITY_LIGHTNING_IMPACT pitch:-100 - ^spawn skeleton save:DungeonGhost - ^flag server "DungeonSpawns:|:" - ^health 30 - ^heal - ^adjust "custom_name:DungeonGhost" - flag server DungeonGhost duration:1m - DETERMINE CANCELLED } } - if contains { - if == true { - if == false { - random { - DETERMINE i@lingering_potion[potion_effects=li@POISON,false,false] - DETERMINE i@lingering_potion[potion_effects=li@INSTANT_DAMAGE,true,false] - DETERMINE i@lingering_potion[potion_effects=li@SLOWNESS,false,true] - DETERMINE i@AncientDungeonsArrow } - DETERMINE CANCELLED - flag server LaggOFix duration:20 } } else if == false { - random { - spawn zombie - spawn pig_zombie - spawn creeper - spawn spider - DETERMINE CANCELLED } - random { - flag server Entity duration:5m - spawn zombie - spawn pig_zombie - spawn spider - DETERMINE CANCELLED } - DETERMINE CANCELLED } } } - if { - DETERMINE CANCELLED } Sapling100Script: #This script makes sure that the saplings which remain on the ground after growing a tree gets deleted, removing this script can make the server have a increase generation time. type: world debug: false events: on structure grows: - determine passively cancelled - modifyblock m@AIR Chest100Script: type: world default constants: #The RepopulateCooldown value is in minutes and determines the amount of time before a re-population #should be executed. This causes no server load since the re-population is player-bound. #Change the value "300m" to any number you'd like. 300m equals 5 hours. RepopulateCooldown: 300m #PopulateAttemts, lower this number to decrease the amount of items in a chest. PopulateAttempts: 10 #PopulateMinimalItems, Minimal items in a chest upon populating. 0 Makes items more rare but not impossibile to populate. PopulateMinimalItems: 1 #PopulateRarity, this parameter sets the rarity of the rare loot table. Adjust the rarity from 1 to 100. 1 = common. 100 is extremely rare. PopulateRarity: 5 #RarePopulateAttempts, Minimal items in a chest upon populating from the rare item loot table. 0 Makes items more rare but not impossibile to populate. RarePopulateAttempts: 1 debug: false events: on server start: - yaml load:lootcrates.yml id:lootcrates on player opens chest: - if !]> { - flag player :true duration: - if ]> { - queue clear } - repeat { - inventory add d: o: slot: } - repeat { - if == 5 { - inventory add d: o: slot: } } - repeat { - if ]> == 1 { - inventory add d: o: slot: } } } on player places block: # This is part of the ChestScript Script and detects if the chest was placed by TerrainControl - if li@chest|trapped_chest contains { - flag server chest:->: } # This is part of the DispenserScript Script and detects if the Dispenser was placed by TerrainControl - if dispenser contains { - flag server dispenser:->: }