User Tools

Site Tools


scrollspell

Scroll Spell

Command spell. The scroll spell allows you to create a scroll (piece of paper) that can be used to cast a specific spell. In order to keep scrolls separate, this spell will prevent paper from stacking normally.

Usage: While holding a piece of paper, type /cast scroll <spellname> [uses].

Configuration Options

OptionDescriptionDefault
cast-for-freeIf this is true, using a scroll will not charge reagents. If this is false, the spell reagents will be charged before the scroll can be used.true
ignore-cast-permIf this is false, the player using the scroll must have the magicspells.cast.<spell> node to use the scroll. If this is true, that permission will be ignored.false
bypass-normal-checksIf this is true, normal casting checks will be bypassed. This includes reagents, cooldowns, cast times, no-magic zones, and other restrictions.false
default-usesHow many uses a scroll has if the uses isn't specified in the command.5
max-usesThe maximum number of uses a scroll can have.10
item-idThe item id for scrolls.339
right-click-castWhether a right-click with a scroll will cast the spell.true
left-click-castWhether a left-click with a scroll will cast the spell.false
remove-scroll-when-depletedWhether to remove the scroll from the player's inventory when the charges run out.true
charge-reagents-for-spell-per-chargeIf this is true, the reagents for each use of the spell will be charged up-front when the scroll is created.false
require-teach-permWhether to require the teach permission for a spell to create a scroll with that spell.true
require-scroll-cast-perm-on-useIf this is true, the player using a scroll must have the magicspells.cast.scroll node.true
predefined-scrolls [v2.11]See below.(empty)
str-scroll-overThe text that appears in chat when a scroll is selected in the player's hotbar.Spell Scroll: %s (%u uses remaining)
str-scroll-nameThe name the scroll item is given. Use %s for spell name and %u for uses remaining.Magic Scroll: %s
str-scroll-subtextThe sub text on the scroll item. Use %s for spell name and %u for uses remaining.Uses remaining: %u
str-usageUsage text when the spell is used incorrectly.You must hold a single blank paper and type /cast scroll <spell> <uses>
str-no-spellText that appears if the spell is unknown to the player.You do not know a spell by that name.
str-cant-teachText that appears if require-teach-perm is true and the player doesn't have the required teach permission.You cannot create a scroll with that spell.
str-on-useText that appears when a scroll is used.Spell Scroll: %s used. %u uses remaining.
str-use-failText that appears when unable to use a scroll.Unable to use this scroll right now.

Predefined Scrolls

Predefined scrolls are a way to allow you to create scrolls easily from other plugins. It allows you to set an associated scroll with a data value of paper. For example, you can have a paper with data value of 1 turn into a scroll with blink and 10 uses. This is somewhat similar to how the scroll spell worked prior to version 2.10.

Each predefined scroll must specify a data value, a spell's internal name, and optionally a number of uses (if the uses isn't specified, it will use the default-uses option). Here are some examples:

    predefined-scrolls:
        - 1 blink 10
        - 2 leap 15
        - 3 combust

Example

scroll:
    spell-class: ".command.ScrollSpell"
    name: scroll
    description: Create a limited use spell scroll.
    cast-for-free: true
    default-uses: 5
    max-uses: 10
    item-id: 339
    right-click-cast: true
    left-click-cast: false
    ignore-cast-perm: false
    remove-scroll-when-depleted: true
    charge-reagents-for-spell-per-charge: false
    require-teach-perm: true
    require-scroll-cast-perm-on-use: true
    str-scroll-name: "Magic Scroll: %s"
    str-scroll-subtext: "Uses remaining: %u"
    str-scroll-over: "Spell Scroll: %s (%u uses remaining)"
    str-usage: |
        You must hold a single blank paper 
        and type /cast scroll <spell> <uses>.
    str-no-spell: You do not know a spell by that name.
    str-cant-teach: You cannot create a tome with that spell.
    str-cast-self: You have created a spell scroll for %s.
    str-on-use: "Spell Scroll: %s used. %u uses remaining."
    str-use-fail: Unable to use this scroll right now.
scrollspell.txt · Last modified: 2013/07/24 10:47 by rurikar