User Tools

Site Tools


magicspellsshop

MagicSpells Shop

The shop addon allows you to set up sign-based shops that players can use to purchase spells and scrolls.

Download

Installation and Configuration

You must have the following plugins to be able to use this addon:

  • MagicSpells (obviously)
  • Vault (only if using currency)
  • A Vault-compatible economy plugin (only if using currency)

To install, simply put the jar file in your plugins folder. The first time it runs it will generate a config.yml file. These are the available configuration options:

OptionDescriptionDefault
require-known-spellWhether the person placing the sign must know the spell they are creating a shop for.true
require-teach-permWhether the person placing the sign must have the teach permission for the spell they are creating a shop for.true
currenciesA list of currency names and types that can be used. The first one in the list is the default currency, in case one isn't listed on the sign. Valid type values are “vault” for normal currency, “levels” for experience levels, “experience” for experience itself, an item type id (ex: “266”), or an item type and data value combo (ex: “351:3”).
first-lineThe text placed on the first line of a sign that indicates the sign is a shop.[SPELL SHOP]
str-already-knownThe message that appears when a player tries to buy a spell they already know.You already know that spell.
str-cant-affordThe message that appears when a player tries to buy a spell they cannot afford.You cannot afford that spell.
str-purchasedThe message that appears when a player successfully purchases a spell.You have purchased the %s spell.
first-line-scrollThe text placed on the first line of a sign that indicates the sign is a scroll shop.[SCROLL SHOP]
scroll-spell-nameThe internal name of the scroll spell.scroll
scroll-item-typeThe item type of scrolls (paper by default).339
str-cant-afford-scrollThe message that appears when a player tries to buy a scroll they cannot afford.You cannot afford that scroll.
str-purchased-scrollThe message that appears when a player successfully purchases a scroll.You have purchased a scroll for the %s spell (with %u uses).
str-scroll-failThe message that appears when the plugin could not create a scroll (caused by running out of scroll space).You cannot purchase a scroll at this time.

Message variables:

  • %s: Spell name
  • %c: Purchase cost
  • %u: Uses (for scroll shops)

Permissions

You must have the magicspells.createsignshop permission to create a spell shop. This permission node defaults to op-only.

Usage

To create a spell shop, just create a sign with the following text:

  • Line 1: [SPELL SHOP] (or whatever first-line is set to)
  • Line 2: spellname
  • Line 3: cost (this should be in this format - <amt> [currency] - example: 10 gold)
  • Line 4: this line is ignored, put whatever you want here

To create a scroll shop, create a sign with this text:

  • Line 1: [SCROLL SHOP] (or whatever first-line-scroll is set to)
  • Line 2: spellname
  • Line 3: number of uses (ex: “5 uses”) (can be a number followed by any word)
  • Line 4: cost (this should be in this format - <amt> [currency] - example: 10 gold)

Default Config

require-known-spell: true
require-teach-perm: true

currencies:
    money: "vault"
    levels: "levels"
    xp: "experience"
    gold: "266"
    cocoa: "351:3"

first-line: [SPELL SHOP]
str-already-known: You already know that spell.
str-cant-afford: You cannot afford that spell.
str-cant-learn: You are not able to buy that spell.
str-purchased: You have purchased the %s spell.

first-line-scroll: [SCROLL SHOP]
scroll-spell-name: scroll
scroll-item-type: 339
str-cant-afford-scroll: You cannot afford that scroll.
str-purchased-scroll: You have purchased a scroll for the %s spell (with %u uses).
str-scroll-fail: You cannot purchase a scroll at this time.

Change Log

Version 1.5 (November 13) [MagicSpells 2.10]

  • Updated for new scroll features

Version 1.4 (May 21) [MagicSpells 2.7]

  • Added levels and experience as currency type options

Version 1.3 (February 20) [MagicSpells 2.3]

  • Config will now reload with /cast reload
  • Invisible scrolls are fixed
  • Other bug fixes

Version 1.2 (February 9) [MagicSpells 2.3]

  • Added different currencies (you can now use items to buy spells)
  • Shop signs can now only be broken if you have the magicspells.createsignshop permission

Version 1.1 (January 30) [MagicSpells 2.3]

  • Added scroll shops
  • Can use currency names after the cost (but the cost number must come first)
  • Added option to put %c in strings for cost amount

Version 1.0 (January 25) [MagicSpells 2.2]

  • First release

Discussion

If you have questions or comments, please take them to the forum.

magicspellsshop.txt · Last modified: 2012/11/13 20:00 by nisovin