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 theits looks loke aCode:public static bool MobileHasSpell(Mobile m, School school, Type type)
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; } } return false; }
because some spellbooks lays on FirstValid and some other on OneHandedCode: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; }
idk why, but this cure works well for me
ps: its just great spellsystem!
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 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.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)
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.
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)
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
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
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;
}
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
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 oneCode: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; }
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