Inactive [FUN] MagicSpells - Add magic to your server

MagicSpells is a plugin that creates spells your players can use. Its main purpose is to give your players access to certain abilities that you might not want to give them unlimited access to. Each spell can be assigned customized reagent (item) costs, cooldowns. durations, ranges, and so on. Spells can be cast by using the /cast command, swinging a wand, or both. It's all customizable.

Download

Important: Read before downloading! There is a lot of information in this post. I know, it's a lot to read. However, I spent quite a while writing it all in what I hope is a clear, informative, and understandable manner. So, please, read the entire post before asking a question. Chances are, the answer is already here. I also suggest taking a nice look through the configuration file. Is it a massive file? Yes, it is. But if your question is "can I do this?" then a look through the configuration options would be a good idea.

Spells can be cast either by using the /cast command or by using a wand item. To cast a spell, a player must first know the spell. Server operators know all spells by default. They can teach spells to other players by using the teach spell. For example, to teach bob the blink spell, an operator would type: /cast teach bob blink.

Bob can now use the blink spell. He can either cast it by command, by typing /cast blink, or he can cast it with a wand item. To select the spell, he holds the wand in his hand and right clicks. Right clicking will cycle through any spells assigned to the item he is holding. When he has the one he wants, he left clicks to cast.

If Bob does not have the required reagents for the spell, or if he has cast it recently and it is still on cooldown, he will not be able to cast the spell and will instead receive an error message.

If mana is enabled, a player can use the /mana command to see how much mana they currently have.

The zip file contains a config.yml file that should go into the MagicSpells folder within your plugins directory. The default configuration has appropriate spell costs, durations, and messages for each spell. However, you will most likely want to customize this to fit your server.

You can modify the config.yml file directly, or you can choose to leave it intact and instead create an alternate config file, by default altConfig.yml. Any configuration values in this alternate file will override the values in the main config file.

There are some general configuration options that apply to all spells, as well as options for each individual spell. Important: The default configuration file does NOT contain all config options, it is just an example. Just because a config option isn't in the default doesn't mean it is not available. For example, it's possible to add a duration to any buff spell, even though the default configuration file does not have a duration on all buff spells.

To reload the configuration, simply cast the fake reload spell (/cast reload). Only server operators can do this (it can also be done from the command line).

Please see the plugin manual for information about all of the various configuration options.

Frequently Asked Questions

Help me! Why isn't it working?
If - after reading through this entire post - you can't figure out why it isn't working, please take the time to submit a proper help request. You can post your request either on in this thread or in the MagicSpells forum. You should provide the following information:

The CraftBukkit build you're using.

The MagicSpells version you're using.

Which permissions plugin (if any) you are using.

The error in the console, if there is one.

Your config file(s). Please don't post them directly , use a service like http://pastebin.com and just post the link.

It says I need reagents whenever I cast a spell! Where do I get reagents?
One of the main ideas behind this plugin is to give players cool abilities, but with a cost. The reagents are the spell's cost. This can be configured in the config.yml file individually for every spell. The config option name is "cost". You can also add your name to the list of exceptions in the general.cast-for-free option.

Can I unbind spells from items?
Yes. Simply use the bind spell to bind the spell to your empty hand, and it will no longer be bound to any item.

Why can't my players cast spells? Why does it say "You cannot cast that spell right now" when I try to cast any spell?
If you're using Permissions, please make sure your permissions are all set up correctly. Look in the Configuration: Permissions section for more information. Also double check and make sure your use-permissions config option is set to true.

I can't get my Permissions working! Can you help me?
Remember that all nodes use the "real" spell name, rather than the name you define with the "name" option. If you cannot get your permissions working, feel free to ask for help. Make sure you specify which permissions plugin you are using, and all of the items from the "Help Me!" question above.

Will you add iConomy (or another economy plugin) support?
With the addition of the 'tome' and 'scroll' spells, I currently have no plans to add special support for an economy plugin. You should be able to create tomes and scrolls and sell them using any plugin that allows you to sell items, thus allowing you to sell spells.

I have a great spell idea! Will you add it?
Please tell me about it by submitting a ticket! I can't guarantee that I'll make it, but if it's a feasible idea, I'll definitely consider it. I'm always looking for new spell ideas. Note that I may not respond directly to your idea, but I always read the suggestions.

I've found a bug! What do I do?
Please submit a ticket! Please include your CraftBukkit build number, any error in the console, the situation that caused the error (if known), and if you think it's applicable, the list of plugins you use.

Could you possibly block friendly fire from members of the same group? For example, like this plugin: GroupPvP

It would really help, because then you could have like factions with people casting spells on each other, and no fear of friendly fire, because I can see these spells being heavily abused on my Faction-type server

Click to expand...

This is something I'd like to do, but I'm not sure how to implement it yet. The main problem is it would be annoying trying to support every plugin that has some kind of team PvP feature.

This is an amazing plugin!
Small problem: how do I get rid of the use of wands? I've tried deleting the cast-item line from the config file, changing the number to 0, and laving it blank, but nothing seems to work. Help?

Click to expand...

Two ways: add the can-cast-with-item option to each spell and set it to false, or change the cast-item of each spell to -1.

I edited the config file and created a "nuke" spell, but once I did and put it into my plugins folder, the server stopped loading the mod completely, even when I reinstall the mod it won't work anymore. I didn't change the bukkit version or anything else. Help?

Some method to make it so I can make unlimited spellbooks, but still retain the normal setting for them otherwise.For example:

- Add a spell "charge" that adds X charges to a bookshelf. Or sets it to unlimited.

Or some other way to do it

Click to expand...

You should already be able to do this. Just do /cast spellbook spell -1. Though the post above you suggests this may not be working correctly, so I'll have to look into it. But theoretically that's how it would work.

Spot on it looks like, I checked the server.log and I found this after stopping and starting the server once:

2011-05-23 21:32:05 [SEVERE] Could not load 'plugins\MagicSpells.jar' in folder 'plugins': while scanning for the next tokenfound character '\t' that cannot start any tokenin "<reader>", line 252, column 1:explode=nuke^

I didn't leave it out the very first time I did this however, and it still didn't work.. But maybe if I swap explode=nuke so that it's nuke=explode ?

EDIT: I removed the linebreak from spellcopies: nuke=explode, and the mod worked again. However, my added spell copy doesn't work, it just doesn't exist. There's no trace in the server.log of any error from it, it's just like I never made it. All the modifications I did on other spells work.

I figured you would say that. Afraid that folder is empty even though we're 12 players on the server and we've been using spells without problems. Any idea as to why? :/

Click to expand...

Have the spells been taught (either with teach or spellbook), or were they granted another way (either with a permission or by being op)? If it's the latter, then there's no way to unlearn those spells. If it's the latter, then that's odd. Are everyone's known spells saved between reloads?

Not sure what you're talking about here... this plugin doesn't use the /v command.

Click to expand...

For some reason I try to use voxelsnipe and i do /v 17 then it says /v <bId> then I tried /v spell and it said There is no spell called that or something like that then I deleted this plugin temp. I swear, and the /v command worked for voxelsnipe.

Have the spells been taught (either with teach or spellbook), or were they granted another way (either with a permission or by being op)? If it's the latter, then there's no way to unlearn those spells. If it's the latter, then that's odd. Are everyone's known spells saved between reloads?

Click to expand...

They we're granted via the player being OP and yes, I think their saved.

For some reason I try to use voxelsnipe and i do /v 17 then it says /v <bId> then I tried /v spell and it said There is no spell called that or something like that then I deleted this plugin temp. I swear, and the /v command worked for voxelsnipe.

Click to expand...

Something is wrong with one of your configs because voxelsnipe works fine for me.

I edited the line like so, but the nuke spell still doesn't work, chance that you could edit a config and upload it so that it's correct?

Click to expand...

I am also trying to configure spellcopies, and I was looking through the replies here, and even though I used;

Code:

Spellcopies:
- teleport=blink
- blast=explode
- etc=etc

I have a copy of every spell, because when I tried to edit the details of the default spells, nothing changed, so I went for making my own version of every spell, with some duplicates for more powerful versions, but even still, none of my spells are owrking in game, i'm also using yeti's permissions, but I when using bukkit 766, I had many errors in the window, some saying that it couldn't find my permissions, even though they were working, so I just upgraded to 803 and all the default spells work correctly, though my custom ones still don't show. I've uploaded my config file, so maybe you can tell me where I went wrong? I'm also wondering if the order matters; I preferred to have all my custom seplls at the bottom after the defaults, but I organized them instead in hopes that that was the problem, but alas, no change.

nisovin, this is a great plugin! I was hoping to use Volley as a special attack for archers. Is there any way I could swap the buttons (so that changing the spell doesn't fire an arrow)? Where might I find that in your source code?

I made two test walls, one disappeared, but the other one, I broke a block in it, and the rest of the wall never went away.

Also, is it possible to have Wall check if the caster is allowed to build blocks in the location where the wall would appear?

Any chance to make it so Volley can't hurt players in a non-PVP enabled zone? I know it works with Combust, as that is direct targetting, otherwise I'd like a Volley that requires an entity target, that should make it work then right?

===

Also an error came by:

Code:

23:37:16 [SEVERE] Could not pass event ENTITY_DAMAGE to MagicSpells
java.lang.NullPointerException
at com.nisovin.MagicSpells.BuffSpell.chargeUseCost(BuffSpell.java:113)
at com.nisovin.MagicSpells.Spells.GillsSpell.onEntityDamage(GillsSpell.java:56)
at com.nisovin.MagicSpells.MagicEntityListener.onEntityDamage(MagicEntityListener.java:22)
at org.bukkit.plugin.java.JavaPluginLoader$47.execute(JavaPluginLoader.java:570)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
at net.minecraft.server.EntityLiving.N(EntityLiving.java:164)
at net.minecraft.server.Entity.p_(Entity.java:191)
at net.minecraft.server.EntityLiving.p_(EntityLiving.java:230)
at net.minecraft.server.EntityHuman.p_(EntityHuman.java:90)
at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:169)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:273)
at net.minecraft.server.Packet10Flying.a(SourceFile:126)
at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

errr... I've never got an error for this plugin till today when i tried updating :O
I've updated it before so i know i did it right... what do i need to do?

Code:

00:21:15 [SEVERE] Could not load 'plugins\MagicSpells.jar' in folder 'plugins':
while parsing a block mapping
in "<reader>", line 18, column 5:
list:
^
expected <block end>, but found BlockMappingStart
in "<reader>", line 246, column 6:
telekinesis:
^
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
serImpl.java:576)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
:228)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
:230)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
2)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
tructor.java:124)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
at org.bukkit.util.config.Configuration.load(Configuration.java:73)
at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:158)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:166)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:191)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:115)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:100)
at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:260)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

hello i was wondering if anyone else is expierencing server crashing with the force push spell and if so does anyone know a fix

Click to expand...

I need more information before I can look into this.
1. Any console error?
2. How many players are on your server?
3. How many players are nearby to get pushed back?
4. Does it happen every time, or just sometimes?
5. Have you made any changes to the config, and if so, what are they?