Staff Pick: Misery's End
By
darthriddleCreated: 2015/04/03 17:01:40 UTC-07:00 (9 years and 265 days ago)
Edited: 2015/04/08 18:42:47 UTC-07:00 (9 years and 260 days ago)
Likes: 1
Staff pick as of: 2015/04/08 18:42:55 UTC-07:00 (9 years and 260 days ago)
Denizen Version: 0.9.6
Script Version: 1.0
Description:
A sword was given to a poor peasant by a kindly old traveler in a grey robe. The peasant had been running for his life from all of the mobs of the realm. He had no weapons or means to protect himself. The old traveler told the peasant that this sword would would help him strike down his fearsome followers, but he had to learn to face them and fight. In his darkest hours the sword would call upon the heavens and end their miserable lives in a might lightning storm.
This sword will roll a random number between 1 and 3. If it lands on 2 lightning will strike down on all undead within 20 blocks of your player damaging them and setting them on fire. Your player will not be harmed.
You can change the chance roll and mobs it harms in the script as well as the recipe.
Place the script file in your Denizen/Scripts folder or in a sub-folder you choose. Denizen/Scripts/YourFolder and reload your scripts
Darth
Twitter: darth_riddle
Download script |
View raw scriptmiserys_end:
type: item
debug: true
material: diamond_sword
enchantments:
- DAMAGE_UNDEAD:2
- PROTECTION_EXPLOSIONS:1
display name: Miserys End
lore:
- <&a>Bringer of solace
- <&a>to all undead foes
- <&a>chance of multikill
- <&a>by lightning
recipe:
- i@air|i@ender_pearl|i@air
- i@ender_pearl|i@redstone_block|i@ender_pearl
- i@air|i@ender_pearl|i@air
s_miserys_end_world:
type: world
debug: true
events:
on player picks up miserys_end:
- narrate "<player.name><&2>! You picked up <&9>Miserys End"
- playsound <player> sound:level_up
on player damages entity:
- if <player.item_in_hand.scriptname.is[==].to[miserys_end]||false> && <util.random.int[1].to[3]> == 2 {
- foreach <player.location.find.entities[zombie|creeper|enderman|skeleton|pig_zombie].within[20]> {
- strike <def[value].location>
}
}
on player damaged by lightning:
- if <player.item_in_hand.scriptname.is[==].to[miserys_end]||false> {
- determine cancelled
}
View History