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

Strech

Sorceror
Alien did u fix angelic form in 2.0?

as said as above im having problems with angelic form going over cap
 

mahajin

Wanderer
Angelic Form Fix

ive made the simplest fix for this form ever. to prevent being able to cast form over and over to give unlimited skills and stats. just add this piece of code:

after:
public override void OnCast()
{
TransformationSpellHelper.OnCast(Caster, this);

if ( CheckSequence() )
{


add:
RemoveEffect(Caster );



works great by removing all the mods from any previous cast. your welcome.lol
 

Goury

Sorceror
open source matters =)
i have another problem here:
- cant find way to make icons not autoclosable in some situations (player can always close icon themself if he need)
 

A_Li_N

Knight
Goury;804875 said:
here is a bug:
spell icon says that player havent this spell if spellbook is equipped
here is easy indian cure:

in file /01 Core/CSpellBook.cs
find the
Code:
public static bool MobileHasSpell(Mobile m, School school, Type type)
its looks loke a
Code:
        public static bool MobileHasSpell(Mobile m, School school, Type type)
        {
            if (m == null || m.Deleted || m.Backpack == null || school == School.Invalid || type == null)
                return false;

            foreach (Item i in m.Backpack.Items)
            {
                if (i is CSpellbook)
                {
                    CSpellbook book = (CSpellbook)i;
                    if (book.School == school && book.HasSpell(type))
                        return true;
                }
            }
            return false;
        }
here is cured verison:
Code:
        public static bool MobileHasSpell(Mobile m, School school, Type type)
        {
            if (m == null || m.Deleted || m.Backpack == null || school == School.Invalid || type == null)
                return false;

            foreach (Item i in m.Backpack.Items)
            {
                if (i is CSpellbook)
                {
                    CSpellbook book = (CSpellbook)i;
                    if (book.School == school && book.HasSpell(type))
                        return true;
                }
            }

[COLOR=Red]        Item ii = m.FindItemOnLayer(Layer.OneHanded);
                if (ii is CSpellbook)
                {
                    CSpellbook book = (CSpellbook)ii;
                    if (book.School == school && book.HasSpell(type))
                        return true;
                }

        Item iii = m.FindItemOnLayer(Layer.FirstValid);
                if (iii is CSpellbook)
                {
                    CSpellbook book = (CSpellbook)iii;
                    if (book.School == school && book.HasSpell(type))
                        return true;
                }

[/COLOR]            return false;
        }
because some spellbooks lays on FirstValid and some other on OneHanded
idk why, but this cure works well for me

ps: its just great spellsystem!

Thanks for the quick fix. I'll make note and see about getting the code in the next update.

Strech;805431 said:
as said as above im having problems with angelic form going over cap

mahajin;805483 said:
ive made the simplest fix for this form ever. to prevent being able to cast form over and over to give unlimited skills and stats. just add this piece of code:

after:
public override void OnCast()
{
TransformationSpellHelper.OnCast(Caster, this);

if ( CheckSequence() )
{


add:
RemoveEffect(Caster );



works great by removing all the mods from any previous cast. your welcome.lol

I will make note of this as well and see about fixing it.


Goury;805541 said:
open source matters =)
i have another problem here:
- cant find way to make icons not autoclosable in some situations (player can always close icon themself if he need)
I don't understand what the issue is here...Spell Icons will stay open and in place until a player clicks the small red button to delete the icon. They do this by re-opening themselves when a person clicks on them.
Can you give an example of what the problem is?
 

Judge12

Wanderer
is there a way...

is there any way someone could help me to add the druid spells to the runebooks? im running the all spells system with rc2 thanks in advance. hopefully i posted in the right place.
 

A_Li_N

Knight
Judge12;805713 said:
is there any way someone could help me to add the druid spells to the runebooks? im running the all spells system with rc2 thanks in advance. hopefully i posted in the right place.

What do you mean 'with the runebooks'? (It's been a while since I've been in the game and don't remember anything)
 

Greystar

Wanderer
A_Li_N;805878 said:
What do you mean 'with the runebooks'? (It's been a while since I've been in the game and don't remember anything)

Do the druids have a Recall or Portal type spell? That's what I'd assume they are referring to. That you can have it set to use the spell off of a runebook (if I remember correctly).
 

A_Li_N

Knight
Update 2009-07-11

2009-07-11
-Fixed problem with Spellbook being equipped. (Thanks Goury)
-Fixed AngelicFaith going over caps. (Thanks mahajin)

Files Updated
CSS Core\CSpellbook.cs
Systems\Cleric\Spells\AngelicFaith.cs

To Update
Overwrite current files with files from rar.
 

Goury

Sorceror
mm..
my cure is lesser cure
it does not cures problems when spellbook is in bag-in-backpack
i think there is very easy way to fix that bug but i am too noob =)

also i fount another bug: inscription does not works at all
also lastspell macro does not works too
i think problem is new spellbooks
anybody can fix it ?

because itll take too much time for me

also sorry for my english
 

A_Li_N

Knight
Goury;805948 said:
mm..
my cure is lesser cure
it does not cures problems when spellbook is in bag-in-backpack
i think there is very easy way to fix that bug but i am too noob =)

also i fount another bug: inscription does not works at all
also lastspell macro does not works too
i think problem is new spellbooks
anybody can fix it ?

because itll take too much time for me

also sorry for my english

English is fine :)
I'll take a look at it and see what I can find out. Thanks for reporting!
 

Goury

Sorceror
even if my english os fine i cant be sure of it
because i speaks english very rarely
also i watch all the english movies with original audio
so i can understand everything but cant say anything =)

now working on definscritpiton.cs
ill let u no if i have some success with it
 

Judge12

Wanderer
runebooks

the runebook allows the use of recall, gate travel and sacred journey, i would like to add in the druid spells mushroom gateway and natures passage any help would be greatly appreciated. thanks in advance.
 

Goury

Sorceror
i think i cant find a way to mod definscription for checking spell aviability in acc books
i am not enough smart at c#
need help
 

A_Li_N

Knight
Goury;806223 said:
i think i cant find a way to mod definscription for checking spell aviability in acc books
i am not enough smart at c#
need help

Adding it to DefInscription might be a lot more work that you would want to do. I will work on getting inscription into the custom spellbooks. (The button is there already, but points to displaying the details of the spell)

I'll look into it this evening if I find time.

I will also look into a runebook.
 

Goury

Sorceror
another bug for u:
context menu item "add to spellbook" on scroll does not works with your custom books

also i requesting u to find way to modify definscription
i belive that its not too hard to make some changes in this part of defincription
Code:
        public override int CanCraft( Mobile from, BaseTool tool, Type typeItem )
        {
            if( tool == null || tool.Deleted || tool.UsesRemaining < 0 )
                return 1044038; // You have worn out your tool!
            else if ( !BaseTool.CheckAccessible( tool, from ) )
                return 1044263; // The tool must be on your person to use.
             
            if ( typeItem != null )
            {
                object o = Activator.CreateInstance( typeItem ); 
             
                if ( o is SpellScroll ) 
                {
                    SpellScroll scroll = (SpellScroll)o;
                    Spellbook book = Spellbook.Find( from, scroll.SpellID );

                    bool hasSpell = ( book != null && book.HasSpell( scroll.SpellID ) );

                    scroll.Delete();

                    return ( hasSpell ? 0 : 1042404 ); // null : You don't have that spell!
                }
                else if ( o is Item )
                {
                    ((Item)o).Delete();
                }
            }

            return 0;
        }
book.HasSpell( scroll.SpellID ) is same to hasspell in custom book but Spellbook.Find( from, scroll.SpellID ) must be replaced to something to find custom one

i am sure that it is not too hard
i am just not very good at c# and runuo scripting so finding way is very hard to me
 

A_Li_N

Knight
Goury;806242 said:
another bug for u:
context menu item "add to spellbook" on scroll does not works with your custom books

also i requesting u to find way to modify definscription
i belive that its not too hard to make some changes in this part of defincription
Code:
        public override int CanCraft( Mobile from, BaseTool tool, Type typeItem )
        {
            if( tool == null || tool.Deleted || tool.UsesRemaining < 0 )
                return 1044038; // You have worn out your tool!
            else if ( !BaseTool.CheckAccessible( tool, from ) )
                return 1044263; // The tool must be on your person to use.
             
            if ( typeItem != null )
            {
                object o = Activator.CreateInstance( typeItem ); 
             
                if ( o is SpellScroll ) 
                {
                    SpellScroll scroll = (SpellScroll)o;
                    Spellbook book = Spellbook.Find( from, scroll.SpellID );

                    bool hasSpell = ( book != null && book.HasSpell( scroll.SpellID ) );

                    scroll.Delete();

                    return ( hasSpell ? 0 : 1042404 ); // null : You don't have that spell!
                }
                else if ( o is Item )
                {
                    ((Item)o).Delete();
                }
            }

            return 0;
        }
book.HasSpell( scroll.SpellID ) is same to hasspell in custom book but Spellbook.Find( from, scroll.SpellID ) must be replaced to something to find custom one

i am sure that it is not too hard
i am just not very good at c# and runuo scripting so finding way is very hard to me

I only did a quick look. That was the place I started, but I also looked down the line...they are listing every single spell that can be inscribed. That's where the ton of work will come from...

(Also, as comes with my systems, all of my files will be ... "Completely Custom", meaning no distro mods. Give me a day or so and I'll know more either way :)
 

M_0_h

Page
First, thank you for this great system! Makes it a whole lot easier to add custom spells without all that spellbook gump crap ;)

I wonder if you could add something for SpecialMoves, too, like it appears in some of the Bushido and Ninjitsu spells? this would be simply great!
 

jacquesc1

Sorceror
small eror in game

:confused:wen i try to cast out of eny of the books i get (you do not have this spell) can sumone please tell me what im doing wrong:confused:
 
Top