- 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








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: Misery's End


By darthriddle
Created: 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 script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
3700

miserys_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