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
Update - 2009-05-14

2009-05-14
-Added Ancient (Ultima VII) spell system.
-Fixed a paging issue in the spellbook gump.

Files Updated
CSS Core\CSpellbookGump.cs
CSS Changing\School.cs

To Update
Overwrite current files with files from rar.
 

jokik

Sorceror
A_Li_N;800620 said:
2009-05-14
-Added Ancient (Ultima VII) spell system.
-Fixed a paging issue in the spellbook gump.

Files Updated
CSS Core\CSpellbookGump.cs

To Update
Overwrite current files with files from rar.

wahoo , but im having a problem. i get the error:

Code:
server.acc.css.school does not contain a definiton for 'Ancient'
:(
 

A_Li_N

Knight
jokik;800652 said:
wahoo , but im having a problem. i get the error:

Code:
server.acc.css.school does not contain a definiton for 'Ancient'
:(

My bad, forgot a file that was modified. Check the update post again and re-download the 2.0 package if you are using 2.0.
 
A

AvariceShard

Guest
Anybody have any luck adding these to their CharacterCreation.cs script?
As they are not Items, they wont work, any ideas on how to give these spell books to new characters?

Thanks!
 

A_Li_N

Knight
AvariceShard;800946 said:
Anybody have any luck adding these to their CharacterCreation.cs script?
As they are not Items, they wont work, any ideas on how to give these spell books to new characters?

Thanks!

They are items:
AncientSpellbook
AvatarSpellbook
BardSpellbook
ClericSpellbook
ChivalrySpellbook
MageSpellbook
NecroSpellbook
DruidSpellbook
RangerSpellbook
RogueSpellbook


AddItem(new AncientSpellbook());
AddItem(new AncientSpellbook(true/false)); //Select one, false = empty book, true = full
 
A

AvariceShard

Guest
A_Li_N;800949 said:
They are items:
AncientSpellbook
AvatarSpellbook
BardSpellbook
ClericSpellbook
ChivalrySpellbook
MageSpellbook
NecroSpellbook
DruidSpellbook
RangerSpellbook
RogueSpellbook


AddItem(new AncientSpellbook());
AddItem(new AncientSpellbook(true/false)); //Select one, false = empty book, true = full

Nah i wish, i get the same error:
Code:
Errors:
 + Misc/CharacterCreation.cs:
    CS0103: Line 1578: The name 'AddItem' does not exist in the current context
    CS0246: Line 1578: The type or namespace name 'AncientSpellbook' could not b
e found (are you missing a using directive or an assembly reference?)
 

A_Li_N

Knight
AvariceShard;800959 said:
Nah i wish, i get the same error:
Code:
Errors:
 + Misc/CharacterCreation.cs:
    CS0103: Line 1578: The name 'AddItem' does not exist in the current context
    CS0246: Line 1578: The type or namespace name 'AncientSpellbook' could not b
e found (are you missing a using directive or an assembly reference?)

You need to reference the namespace:
Try this first...
Code:
using Server.ACC.CSS;
If that doesn't work, try:
Code:
using Server.ACC.CSS.Systems;
If that still doesn't work, use the individual ones:
Code:
using Server.ACC.CSS.Systems.Ancient;
using Server.ACC.CSS.Systems.Avatar;
...etc etc
Try PackItem instead of AddItem (like all of the other ones in CharacterCreation.cs).
 
A

AvariceShard

Guest
Thanks, it works if you add them individually.

If that still doesn't work, use the individual ones:
Code:
using Server.ACC.CSS.Systems.Ancient;
using Server.ACC.CSS.Systems.Avatar;
...etc etc
Try PackItem instead of AddItem (like all of the other ones in CharacterCreation.cs).[/QUOTE]
 

jokik

Sorceror
A_Li_N;800661 said:
My bad, forgot a file that was modified. Check the update post again and re-download the 2.0 package if you are using 2.0.

ok done that had a problem with reagents , fixed that and now i have another .

Code:
'server.commands.dupe.copyproperties<server.item, server.item>' is inaccessible due to its protection level

:(
 

A_Li_N

Knight
jokik;800972 said:
ok done that had a problem with reagents , fixed that and now i have another .

Code:
'server.commands.dupe.copyproperties<server.item, server.item>' is inaccessible due to its protection level

:(

Apologies...I'm guessing I tried uploading that file when my internet sucked. The 2.0 package is in the first post now.
http://www.runuo.com/forums/custom-script-releases/95653-acc-complete-spell-system.html#post795105
Download the 2.0 package and extract it, replacing all files.
 

A_Li_N

Knight
jokik;801068 said:
all works perfectly now, well i think so , how long is a player supposed to stay asleep?
Looks like Caster.Magery * 1.2 seconds for Sleep and 3 + Caster.Magery * .4 seconds fo Sleep Field.
So if you have 100 magery, 2 minutes for sleep and 43 seconds for sleep field.
You can adjust that by going to line 75 of SleepSpell.cs and 83 of SleepField.cs.
 

jokik

Sorceror
A_Li_N;801076 said:
Looks like Caster.Magery * 1.2 seconds for Sleep and 3 + Caster.Magery * .4 seconds fo Sleep Field.
So if you have 100 magery, 2 minutes for sleep and 43 seconds for sleep field.
You can adjust that by going to line 75 of SleepSpell.cs and 83 of SleepField.cs.


ah well i tested with 6555.5 magery so that probs why i wasnt waking up haha , was there for an hour :p my bad:eek:
 

Thilgon

Sorceror
i've noticed that of the ancient spells, ignite, great ignite and firering are not damaging blue players and npc's, while instead they damages me (on my admin char, so perma-grey)... before saying anything, all my maps are set to felucca rules...
probably they are not supposed to work like that... how to repair them?
 

A_Li_N

Knight
Thilgon;801962 said:
i've noticed that of the ancient spells, ignite, great ignite and firering are not damaging blue players and npc's, while instead they damages me (on my admin char, so perma-grey)... before saying anything, all my maps are set to felucca rules...
probably they are not supposed to work like that... how to repair them?

Lines:
165 - FireRingSpell.cs
53 - GreaterNaturalFire.cs
53 - NatrualFire.cs

Those lines decide what mobiles get damaged.
If the item is visible and the caster is not null and the mobile walking over the flame is a ValidIndirectTarget to the caster and the caster CanBeHarmful to the mobile walking over the flame.

I'll leave it up to you to dig deeper and find what the correct sequence should be for your shard...I do not know for sure what each of those two methods do, so I couldn't tell you what to change to make it work how you want.
 

A_Li_N

Knight
Admin_Shaka;801254 said:
Hello Allin,

Very nice package of scripts you are doing...

Maybe it would be interesting adding a no-precasting option...

Just like the sphere way of casting spells, that is something very unique since nobody was able to do it,...

I started, but never finished...

http://www.runuo.com/forums/custom-...here-like-spell-system-aka-no-precasting.html


Thanks man ! I hope this can inspire you.... :D
Interesting, yes. Something I am going to do, no. From the looks of the changes needed, it would require a lot of changes to almost every spell in the systems and I do not feel like doing such things :)
(Not that each spell shouldn't be gone through and 'fixed' to be more balanced, work better and to follow the latest changes of the base spell system...I just don't have the energy or time to do that right now) You or anyone else may feel free to take and do so, though.
 

Goury

Sorceror
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!
 
Top