RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

ACC - Complete Spell System

A_Li_N

Knight
ACC - Complete Spell System

Description
This system was created to help implement custom spell systems to a shard without all of the hassle. It can be dropped in your custom folder (along with the other required system explained under Installation) and it's ready to go; as with the rest of my systems, distro files are not touched, and this system should be compatible with any other custom system out there (not tested, don't quote me) including Lucid's All Spells system (although I have no idea why you would do that).
This system uses my Central Memory system to keep track of Spell Icon locations on your screen. This means you can open up your druid book, click on a spell name, click on the icon, position the icon where you want it and it will stay there, always open (through casting and logging) until you click the red button on it to delete it. The distro spell systems are included to use the Icon placement; they, in no way, interfere with distro spells.

Notes
Please see the notes in ACC Core post. Link below.
This spell system is ... old. The systems contained within it have been done and redone by various people. I will not vouch for the balance of these systems when added to a shard.
Testing done was limited to loading server, adding books, opening books, placing spell icon, casting from book/icon, saving, loading.
For the systems marked "(Compiled, not Cast tested)", I've done exactly that for testing...I compiled the server. I haven't casted every spell to make sure it works/doesn't crash/does what it's supposed to. I know for a fact that there's a lot of old code in these spells that isn't the same as the new spell code, so I don't know if the spells will work like they used to. (Transform spells and the Charm spell are big ones that are very different between old and new)
Use at your own risk at this point, and for the love of God, don't put on a live server.
If there are crashes due to this system, please post here or PM me with a debug crash log.

Installation
Download and install ACC Core.
Download and install ACC Central Memory.
Download package: (SVN) (2.0)
Extract to your Customs folder (replace if updating)
Load server

Instructions on Use
To come...

Systems Included
  • Magery
  • Chivalry
  • Necromancy
  • Druid (Compiled, not Cast tested)
  • Avatar (Compiled, not Cast tested)
  • Bard (Compiled, not Cast tested)
  • Cleric (Compiled, Cast tested)
  • Ranger (Compiled, Cast tested)
  • Rogue (Compiled, Cast tested)
  • Ancient (Compiled, Cast tested)
Updates
2010-02-10 - Fixed paging issue with spellbook gumps.
2010-02-08 - Fixed paging issue with spellbook gumps.
2010-02-07 - Updated to latest SVN. Fixed issue with settings not working correctly to create empty books.
2009-12-22 - Updated to latest SVN.
2009-10-28 - Cleaned up warnings. Updated to 2.0 Final and latest SVN. Please read notes in update post.
2009-07-11 - Fixed problem with spellbook being equipped. Fixed AngelicFaith going past caps.
2009-05-14 - Added Ancient system. Fixed paging issue with CSpellbookGump.cs
2009-05-11 - Added 2.0 package for use in the released RunUO 2.0.
2009-04-17 - Cast tested Ranger spells, all work to the specifications I can see they are supposed to. Cast tested Rogue spells. Re-wrote some code on a few of the Rogue spells to fix some exploits.
2009-04-17 - Added [csscast command to cast spells. Each spell a person has can be assigned any command text to cast it with this command. Fixed system to not allow casting while in customization of a house. See update post for more info.
2009-03-28 - Fixed Banish Evil spell in Cleric school to not allow targeting of players. Fixed a crash due to null reference in Banish Evil. Cast all other spells on myself, no crashes.
2009-03-27 - Got all systems compilable. Please note that the systems have not been tested for casting!
2009-03-27 - Updated to latest SVN (313). Fixing spells due to RunUO changes between last time I updated and now.

ACC Collection Links
ACC Core
ACC Central Memory
ACC Yard and Garden System
ACC Public Gates
ACC Spellweaving, Bushido, Mysticism and Ninjitsu (tass23)
 

Attachments

  • Complete Spell System - 2.0 - 20100210-142540.rar
    227.5 KB · Views: 927
  • Complete Spell System - 20100210-142603.rar
    227.6 KB · Views: 567

mikeymaze

Wanderer
Cleric (Compiled, not Cast tested)

Vanish evil crashes shard
agelic faith is over powered goes about the cap you can have 1000 str ext

Ranger book- the bow is over powered 50% fireball on some
 

A_Li_N

Knight
mikeymaze;795218 said:
Cleric (Compiled, not Cast tested)

Vanish evil crashes shard
agelic faith is over powered goes about the cap you can have 1000 str ext

Ranger book- the bow is over powered 50% fireball on some

I will fix errors in the system, but I won't try to mess with balancing...these systems throw the balance of any shard out of whack, period.
I will look into Banish Evil crashing on cast.

For future reference for you and anyone else, if you crash, POST A DEBUG CRASH LOG.
 

A_Li_N

Knight
Looking into Banish Evil...the spell is fundamentally flawed in its current coding (at least on the latest SVN code). I got it to cast...cast it on myself and it deleted my player character.

Must I stress more that these spells are not balanced?

I'll see what I can do to ... fix this spell, if I can figure out what the actual use of the spell was supposed to be.

*EDIT*
Updated:
2009-03-28 - Fixed Banish Evil spell in Cleric school to not allow targeting of players. Fixed a crash due to null reference in Banish Evil. Cast all other spells on myself, no crashes.
 

Bujinsho

Page
Rc2

I know this is designed for the latest SVN, but I've been trying to get it working with RC2, because I had an older version of ACC and Public Gates and I really wanted to use the Spell System but couldn't find it (only mentions of it in old posts)

I've installed the ACC Core and Central Memory with no problems at all (on a clean RC2 install) and also Public Gates - all without any mods - so far so good. The spell system however is proving a little trickier, as it throws this error which I just can't fathom.

Code:
RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...ScriptCompiler: CS0122: 'Server.Commands.Dupe.Co
pyProperties(Server.Item, Server.Item)' is inaccessible due to its protection le
vel
done (0 errors, 0 warnings)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

The only thing I've changed is to comment out this line in the Druid regs code:

Code:
using System;
using Server;

namespace Server.Items
{
	public class SpringWater : BaseReagent, ICommodity
	{
		string ICommodity.Description
		{
			get
			{
				return String.Format( "{0} spring water", Amount );
			}
		}

        [COLOR="Red"]//int ICommodity.DescriptionNumber { get { return LabelNumber; } }[/COLOR]

		[Constructable]
		public SpringWater() : this( 1 )
		{
		}

		[Constructable]
		public SpringWater( int amount ) : base( 0xE24, amount )
		{
			Hue = 0x47F;
			Name = "spring water";
		}

		public SpringWater( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}
}

Is there anything I can do to get this system to work with RC2?
 

A_Li_N

Knight
Bujinsho;795444 said:
I know this is designed for the latest SVN, but I've been trying to get it working with RC2, because I had an older version of ACC and Public Gates and I really wanted to use the Spell System but couldn't find it (only mentions of it in old posts)

I've installed the ACC Core and Central Memory with no problems at all (on a clean RC2 install) and also Public Gates - all without any mods - so far so good. The spell system however is proving a little trickier, as it throws this error which I just can't fathom.

Code:
RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...ScriptCompiler: CS0122: 'Server.Commands.Dupe.Co
pyProperties(Server.Item, Server.Item)' is inaccessible due to its protection le
vel
done (0 errors, 0 warnings)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

The only thing I've changed is to comment out this line in the Druid regs code:

Is there anything I can do to get this system to work with RC2?
You will have to comment that line out on the other two reagents as well.
The issue you are having is due to RC2's code of the Dupe command and the CopyProperties method being marked private instead of public (fixed in later SVN)
But to fix your problem you are displaying, do the following:
Go to Complete Spell System - Systems - Rogue - Spells - Charm.cs
Go to line 307...it should look like this:
Code:
Dupe.CopyProperties(newItem, oldItem);//copy.Dupe( item, copy.Amount );
Comment out that line and/or replace it with this:
Code:
                           PropertyInfo[] props = oldItem.GetType().GetProperties();

                            for (int i = 0; i < props.Length; i++)
                            {
                                try
                                {
                                    if (props[i].CanRead && props[i].CanWrite)
                                    {
                                        //Console.WriteLine( "Setting {0} = {1}", props[i].Name, props[i].GetValue( src, null ) );
                                        props[i].SetValue(newItem, props[i].GetValue(oldItem, null), null);
                                    }
                                }
                                catch
                                {
                                    //Console.WriteLine( "Denied" );
                                }
                            }
The entire CopyFromLayer method should look like this after you're done:
Code:
private void CopyFromLayer(Mobile from, Mobile mimic, Layer layer)
        {
            Item newItem;
            Item oldItem = from.FindItemOnLayer(layer);
            if (oldItem != null)
            {
                Type t = oldItem.GetType();
                ConstructorInfo c = t.GetConstructor(Type.EmptyTypes);
                if (c != null)
                {
                    try
                    {
                        object o = c.Invoke(null);

                        if (o != null && o is Item)
                        {
                            newItem = (Item)o;
                            PropertyInfo[] props = oldItem.GetType().GetProperties();

                            for (int i = 0; i < props.Length; i++)
                            {
                                try
                                {
                                    if (props[i].CanRead && props[i].CanWrite)
                                    {
                                        //Console.WriteLine( "Setting {0} = {1}", props[i].Name, props[i].GetValue( src, null ) );
                                        props[i].SetValue(newItem, props[i].GetValue(oldItem, null), null);
                                    }
                                }
                                catch
                                {
                                    //Console.WriteLine( "Denied" );
                                }
                            }
                            //Dupe.CopyProperties(newItem, oldItem);//copy.Dupe( item, copy.Amount );
                            mimic.AddItem(newItem);
                            newItem.LootType = LootType.Newbied;
                        }
                    }
                    catch
                    {
                        from.SendMessage("Error!  Please check Charm.cs!");
                        return;
                    }
                }
            }
        }
I compiled RC2 with all of my systems in and these changes and it compiled and loaded.

Let me know if you have more issues and I'll see what I can do.
 

Bujinsho

Page
That's superb ... and of course worked perfectly ... thanks very much for the quick reply.

Now all I have to do is try and extract all the old spell systems from my test server without breaking it again :p
 

A_Li_N

Knight
Bujinsho;795446 said:
That's superb ... and of course worked perfectly ... thanks very much for the quick reply.

Now all I have to do is try and extract all the old spell systems from my test server without breaking it again :p
What old systems? As far as I know this system contains all of the spell systems out there.

If you have more and want to share them, let me know and I'll add them to this pack.
 

hellalex

Sorceror
Errors:
+ New Custom Scripts/Scrips Avril 2009/Complete Spell System/-=+ 01 Core/CSS.c
s:
CS0246: Line 42: The type or namespace name 'ACCGumpParams' could not be fou
nd (are you missing a using directive or an assembly reference?)
CS0246: Line 50: The type or namespace name 'ACCGumpParams' could not be fou
nd (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.

Can anyone help me out with this error?
 

A_Li_N

Knight
hellalex;797048 said:
Errors:
+ New Custom Scripts/Scrips Avril 2009/Complete Spell System/-=+ 01 Core/CSS.c
s:
CS0246: Line 42: The type or namespace name 'ACCGumpParams' could not be fou
nd (are you missing a using directive or an assembly reference?)
CS0246: Line 50: The type or namespace name 'ACCGumpParams' could not be fou
nd (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.

Can anyone help me out with this error?

Did you forget step one?
Download and install the ACC Core.
 

kucukasker

Wanderer
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2968.26078
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...ScriptCompiler: CS0539: Açık arabirim bildirimin
deki 'ICommodity.DescriptionNumber' arabirimin üyesi değil
ScriptCompiler: CS0539: Açık arabirim bildirimindeki 'ICommodity.DescriptionNumb
er' arabirimin üyesi değil
ScriptCompiler: CS0539: Açık arabirim bildirimindeki 'ICommodity.DescriptionNumb
er' arabirimin üyesi değil
done (0 errors, 1 warnings)
Warnings:
 + benim sicriplerim/Yeni Klasör/LegacyTokenGump.cs:
    CS0105: Line 4: 'System' ile ilgili using yönergesi bu ad alanında daha önce
 göründü
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

help me plz.
 

A_Li_N

Knight
kucukasker;797093 said:
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2968.26078
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...ScriptCompiler: CS0539: Açık arabirim bildirimin
deki 'ICommodity.DescriptionNumber' arabirimin üyesi değil
ScriptCompiler: CS0539: Açık arabirim bildirimindeki 'ICommodity.DescriptionNumb
er' arabirimin üyesi değil
ScriptCompiler: CS0539: Açık arabirim bildirimindeki 'ICommodity.DescriptionNumb
er' arabirimin üyesi değil
done (0 errors, 1 warnings)
Warnings:
 + benim sicriplerim/Yeni Klasör/LegacyTokenGump.cs:
    CS0105: Line 4: 'System' ile ilgili using yönergesi bu ad alanında daha önce
 göründü
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

help me plz.
1: I can only read English...
2: The only thing I see wrong in the above is the single warning for the LegacyTokenGump.cs, which I have no idea what it is and it is not part of any of my systems. Post in the general Scripting Support forum for further help. Thanks.
 

KnitePrince

Sorceror
A_LI_N;
does this have a cast command so that you can cast with a command, like [cs flamestrike" ?
i am about to start removing a cleric spell system i have in order to install Lucid's all spell system because i want that command.. if this has it I may just give this a go instead..
Good to see your still around after all these years A_LI_N
 

Thilgon

Sorceror
KnitePrince;797150 said:
A_LI_N;
does this have a cast command so that you can cast with a command, like [cs flamestrike" ?
i am about to start removing a cleric spell system i have in order to install Lucid's all spell system because i want that command.. if this has it I may just give this a go instead..
Good to see your still around after all these years A_LI_N

no this hasn't the [cast or [cs command...
but instead of the command, why don't use the Spellchanting by Lokai?
instead of saying the command, you say the mantra of a spell you have, and it casts...

Anyhow, if you get the Lucid's All Spell to work on SVN, it would be nice if you release the update :p

@A_li_n:
actually, some rogue and all rangers spell won't work in game...
 

KnitePrince

Sorceror
I have the spellchanting, but it does not work with Cleric spells, if it did i would just install the druid spells and use it as is. it works great with chivalry, necro and magery. :)
 

A_Li_N

Knight
KnitePrince;797150 said:
A_LI_N;
does this have a cast command so that you can cast with a command, like [cs flamestrike" ?
i am about to start removing a cleric spell system i have in order to install Lucid's all spell system because i want that command.. if this has it I may just give this a go instead..
Good to see your still around after all these years A_LI_N
There is currently no command as such. But I could add one...maybe after work today?

Thilgon;797155 said:
no this hasn't the [cast or [cs command...
but instead of the command, why don't use the Spellchanting by Lokai?
instead of saying the command, you say the mantra of a spell you have, and it casts...

Anyhow, if you get the Lucid's All Spell to work on SVN, it would be nice if you release the update :p

@A_li_n:
actually, some rogue and all rangers spell won't work in game...
Any specifics on how they "don't" work? Like what are they supposed to do? Do they crash? Just not do anything? I will look into them after work as well.
(From the look of those systems, they were a 'rush' job and the original coding was not all that great)
 

Bujinsho

Page
KnitePrince;797170 said:
I have the spellchanting, but it does not work with Cleric spells, if it did i would just install the druid spells and use it as is. it works great with chivalry, necro and magery. :)

Sure it does :)

Change Lokai's edit to this:

Code:
if (!string.IsNullOrEmpty(Mantra) && !m_Spoken && !(m_Scroll is SpellScroll) && !(m_Scroll is BaseWand) && !(this is ClericSpell) ) return false;// added for mantra casting

and add

Code:
using Server.Spells.Custom;

at the top of the file (assuming you use the same Cleric system I do ... namespace could be different I guess )

*embarassed cough* Sorry to hi-jack your thread A_Li_N :eek:
 

Thilgon

Sorceror
A_Li_N;797180 said:
There is currently no command as such. But I could add one...maybe after work today?


Any specifics on how they "don't" work? Like what are they supposed to do? Do they crash? Just not do anything? I will look into them after work as well.
(From the look of those systems, they were a 'rush' job and the original coding was not all that great)

Actually, they do nothing, but if i remember correctly, after using them, a message appeared on my RunUO console... can't remember what it said tho, i'll check on this later...
 
Top