User Tools

Site Tools


examplecustomspells

Table of Contents

Example Custom Spells

MagicSpells can do all sorts of things once you understand how spells can work together. There are some spells, called “meta” spells, that can trigger other spells as well. This allows you to create complex and awesome spells. This page will have some examples of things you can do.

Turret

This spell spawns a block that shoots fire at anyone that approaches.

turret:
    spell-class: ".targeted.PulserSpell"
    total-pulses: 50
    interval: 30
    max-distance: 30
    cap-per-player: 1
    block-type: diamond_block
    unbreakable: false
    only-count-on-success: false
    spells:
        - turret_aoe
    str-cast-self: You have summoned a turret!
    str-at-cap: You have too many turrets already.
    
turret_aoe:
    spell-class: ".targeted.AreaEffectSpell"
    horizontal-radius: 10
    vertical-radius: 5
    point-blank: true
    target-players: true
    fail-if-no-targets: false
    max-targets: 1
    spell-source-in-center: true
    spells:
        - turret_missile

turret_missile:
    spell-class: ".targeted.HomingMissileSpell"
    projectile-velocity: 4
    projectile-inertia: 0
    particle-name: flame
    particle-speed: 0
    particle-count: 25
    particle-horizontal-spread: 0.1
    particle-vertical-spread: 0.1
    y-offset: 1.2
    max-duration: 8
    target-players: true
    spell: turret_pain
    effects:
        - caster spawn
        - target particles flame 0.3 10 0 100 0
    
turret_pain:
    spell-class: ".targeted.PainSpell"
    damage: 1
    range: 100
    ignore-armor: false
    obey-los: true
    target-players: true
    check-plugins: true

Burst

This spell fires a slow-moving projectile, which upon landing, hits all nearby targets. It also uses a cool effect.

burst:
    spell-class: ".instant.ParticleProjectileSpell"
    projectile-velocity: 6
    projectile-gravity: 0.25
    particle-name: magicCrit
    particle-speed: 0
    particle-count: 40
    particle-horizontal-spread: 0.2
    particle-vertical-spread: 0.2
    max-distance: 20
    hit-players: false
    hit-non-players: false
    hit-ground: true
    spell: burst_aoe
    
burst_aoe:
    spell-class: ".targeted.AreaEffectSpell"
    horizontal-radius: 10
    vertical-radius: 5
    point-blank: true
    target-players: true
    fail-if-no-targets: false
    max-targets: 10
    spell-source-in-center: true
    spells:
        - burst_pain
    effects:
        - special spawn
        - line particleline 0.5 magicCrit 0.1 0.1 0 20 0.8

burst_pain:
    spell-class: ".targeted.PainSpell"
    damage: 1
    range: 100
    ignore-armor: false
    obey-los: true
    target-players: true
    check-plugins: true
examplecustomspells.txt · Last modified: 2013/07/31 18:30 by nisovin