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!

Ultima VII Spell project (Updated 15th Jan 2004) - v5.1

Status
Not open for further replies.

Swaileh

Wanderer
Hey, bleis.. here's your problem, I think..

You didn't initialize like he said, go to \Scripts\Spells\Initializer.cs and do this..

Installation:
Open Initializer.cs
After:
[code:1]
Register( 209, typeof( Chivalry.SacredJourneySpell ) );
}
[/code:1]

Add:
[code:1]
// Cardinal
Register( 340, typeof( Linear.FireworksSpell ) );
Register( 341, typeof( Linear.GlimmerSpell ) );
Register( 342, typeof( Linear.AwakenSpell ) );
Register( 350, typeof( First.LocateSpell ) );
Register( 400, typeof( Second.EnchantSpell ) );
Register( 401, typeof( Second.FalseCoinSpell ) );
Register( 402, typeof( Third.SleepSpell ) );
Register( 450, typeof( Fifth.DanceSpell ) );
Register( 451, typeof( Fifth.MassSleepSpell ) );
Register( 460, typeof( Sixth.CloneSpell ) );
Register( 480, typeof( Eighth.ArmageddonSpell ) );
Register( 481, typeof( Eighth.DeathVortexSpell ) );
Register( 482, typeof( Eighth.InvisibilityAllSpell ) );
[/code:1]

Place spell files in your custom folder.
USING LINEAR:
Tom use the linear circle, replace the core scripts with those in the zip.
NOT USING LINEAR:
Change all instances of Linear in Glimmer and Fireworks to "First"

If you still have problems, let me know.. you got my ICQ :p

[Edit] Eek may have spoke too soon, using the Druid spells? Then you'll have to change each number to ensure no spells are using the same number in the initialization statement, unless they've updated.. hell I dunno I'm at work can't be arsed to download it here.. :? [/Edit]
 

bleis

Sorceror
Hey Swa :D nice to hear from ya` I miss you, I have gotten all I need from Crazy, but try and get the files from his download and look at his problem I´m sure you can solve it........ ;)
 
K

Krazy_zack

Guest
Alright I got it this time...

and YES it is the little things....

Original post edited (redownload the script package for the fixes)
 
K

Krazy_zack

Guest
Ya and make the gump beter....

This was just a temp solution....
 
K

Krazy_zack

Guest
Ok all Issues fixed and now it ONE spellbook for the Ancient Spells and ONE spellbook for the Drud Spells

http://middleearth.sempai-net.com/NewSpells.rar
 

Tork

Wanderer
*DOH* ok i DLed the last Rar file. i went in and backed up all my files like spellreg and what not. then i installed the rar file and fiered it up. this is what i got.

[code:1]Scripts: Compiling C# scripts...failed (108 errors, 0 warnings)
- Error: Scripts\Custom\Spells\NewSpells\Druid\DruidicSpell.cs: CS0246: (line 6, column 41) The type or names
pace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\DeathVortex.cs: CS0246: (line 8, column 34) The typ
e or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\InvisibilityAll.cs: CS0246: (line 9, column 38) The
type or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference
?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Dance.cs: CS0246: (line 10, column 28) The type or
namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Fireworks.cs: CS0246: (line 8, column 32) The type
or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Glimmer.cs: CS0246: (line 9, column 30) The type or
namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Locate.cs: CS0246: (line 9, column 29) The type or
namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Awaken.cs: CS0246: (line 13, column 29) The type or
namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\FalseCoin.cs: CS0246: (line 13, column 32) The type
or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Enchant.cs: CS0246: (line 13, column 30) The type o
r namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Clone.cs: CS0246: (line 9, column 28) The type or n
amespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\Sleep.cs: CS0246: (line 9, column 28) The type or n
amespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\MassSleep.cs: CS0246: (line 9, column 32) The type
or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\UltimaVII\Spells\ArmageddonSpell.cs: CS0246: (line 9, column 33) The
type or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference
?)
- Error: Scripts\Mobiles\Animals\Mounts\Ethereals.cs: CS0246: (line 220, column 33) The type or namespace nam
e 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Skills\SpiritSpeak.cs: CS0246: (line 69, column 36) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Chivalry\PaladinSpell.cs: CS0246: (line 8, column 39) The type or namespace name 'Spe
ll' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\AirElemental.cs: CS0246: (line 8, column 35) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\EarthElemental.cs: CS0246: (line 8, column 37) The type or namespace name 'Spe
ll' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\Earthquake.cs: CS0246: (line 9, column 33) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\EnergyVortex.cs: CS0246: (line 8, column 35) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\FireElemental.cs: CS0246: (line 8, column 36) The type or namespace name 'Spel
l' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\Resurrection.cs: CS0246: (line 8, column 35) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\SummonDaemon.cs: CS0246: (line 8, column 35) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Eighth\WaterElemental.cs: CS0246: (line 8, column 37) The type or namespace name 'Spe
ll' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\BladeSpirits.cs: CS0246: (line 8, column 35) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\DispelField.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\Incognito.cs: CS0246: (line 13, column 32) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\MagicReflect.cs: CS0246: (line 9, column 35) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\MindBlast.cs: CS0246: (line 7, column 32) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\Paralyze.cs: CS0246: (line 7, column 31) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\PoisonField.cs: CS0246: (line 10, column 34) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fifth\SummonCreature.cs: CS0246: (line 8, column 37) The type or namespace name 'Spel
l' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\Clumsy.cs: CS0246: (line 7, column 29) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\CreateFood.cs: CS0246: (line 6, column 33) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\Feeblemind.cs: CS0246: (line 7, column 33) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\Heal.cs: CS0246: (line 9, column 27) The type or namespace name 'Spell' could n
ot be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\MagicArrow.cs: CS0246: (line 7, column 33) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\NightSight.cs: CS0246: (line 8, column 33) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\ReactiveArmor.cs: CS0246: (line 8, column 36) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\Weaken.cs: CS0246: (line 7, column 29) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\ArchCure.cs: CS0246: (line 9, column 31) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\ArchProtection.cs: CS0246: (line 10, column 37) The type or namespace name 'Sp
ell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\Curse.cs: CS0246: (line 8, column 28) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\FireField.cs: CS0246: (line 10, column 32) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\GreaterHeal.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\Lightning.cs: CS0246: (line 7, column 32) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\ManaDrain.cs: CS0246: (line 8, column 32) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Fourth\Recall.cs: CS0246: (line 11, column 29) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Necromancy\NecromancerSpell.cs: CS0246: (line 6, column 43) The type or namespace nam
e 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Agility.cs: CS0246: (line 7, column 30) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Cunning.cs: CS0246: (line 7, column 30) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Cure.cs: CS0246: (line 7, column 27) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Harm.cs: CS0246: (line 7, column 27) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\MagicTrap.cs: CS0246: (line 8, column 32) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Protection.cs: CS0246: (line 8, column 33) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\RemoveTrap.cs: CS0246: (line 8, column 33) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Second\Strength.cs: CS0246: (line 7, column 31) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\ChainLightning.cs: CS0246: (line 9, column 37) The type or namespace name 'Sp
ell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\EnergyField.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\FlameStrike.cs: CS0246: (line 7, column 34) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\GateTravel.cs: CS0246: (line 11, column 33) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\ManaVampire.cs: CS0246: (line 7, column 34) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\MassDispel.cs: CS0246: (line 11, column 33) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\MeteorSwarm.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Seventh\Polymorph.cs: CS0246: (line 11, column 32) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Dispel.cs: CS0246: (line 10, column 29) The type or namespace name 'Spell' coul
d not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\EnergyBolt.cs: CS0246: (line 7, column 33) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Explosion.cs: CS0246: (line 7, column 32) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Invisibility.cs: CS0246: (line 9, column 35) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Mark.cs: CS0246: (line 9, column 27) The type or namespace name 'Spell' could n
ot be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\MassCurse.cs: CS0246: (line 9, column 32) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\ParalyzeField.cs: CS0246: (line 9, column 36) The type or namespace name 'Spell
' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Reveal.cs: CS0246: (line 9, column 29) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Bless.cs: CS0246: (line 7, column 28) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Fireball.cs: CS0246: (line 7, column 31) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\MagicLock.cs: CS0246: (line 8, column 32) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Poison.cs: CS0246: (line 7, column 29) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Telekinesis.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Teleport.cs: CS0246: (line 9, column 31) The type or namespace name 'Spell' cou
ld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\Unlock.cs: CS0246: (line 8, column 29) The type or namespace name 'Spell' could
not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Third\WallOfStone.cs: CS0246: (line 9, column 34) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Explosion.cs: CS0246: (line 52, column 12) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Sixth\Explosion.cs: CS0246: (line 56, column 26) The type or namespace name 'Spell' c
ould not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\NightSight.cs: CS0246: (line 30, column 12) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\First\NightSight.cs: CS0246: (line 32, column 29) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 10, column 11) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 17, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 21, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 25, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 29, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 33, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 37, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 41, column 49) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellInfo.cs: CS0246: (line 62, column 10) The type or namespace name 'SpellCirc
le' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellHelper.cs: CS0246: (line 655, column 30) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellHelper.cs: CS0246: (line 683, column 30) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Spells\Base\SpellHelper.cs: CS0246: (line 695, column 30) The type or namespace name 'Spell'
could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Engines\AI\AI\MageAI.cs: CS0246: (line 178, column 18) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Engines\AI\AI\MageAI.cs: CS0246: (line 195, column 18) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Engines\AI\AI\MageAI.cs: CS0246: (line 228, column 18) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Engines\AI\AI\MageAI.cs: CS0246: (line 309, column 18) The type or namespace name 'Spell' co
uld not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\Edited Files\SpellRegistry.cs: CS0246: (line 51, column 21) The type
or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Spells\NewSpells\Edited Files\SpellRegistry.cs: CS0246: (line 82, column 21) The type
or namespace name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Modified\Items\Wands\BaseWand.cs: CS0246: (line 231, column 21) The type or namespace
name 'Spell' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Modified\Engines\AI\Creature\BaseCreature.cs: CS0118: (line 2245, column 10) 'Server.
Mobile.Spell' denotes a 'property' where a 'class' was expected
- Error: Scripts\Custom\Modified\Engines\AI\Creature\BaseCreature.cs: CS0118: (line 2260, column 10) 'Server.
Mobile.Spell' denotes a 'property' where a 'class' was expected
- Error: Scripts\Custom\Modified\Engines\AI\Creature\BaseCreature.cs: CS0118: (line 2275, column 10) 'Server.
Mobile.Spell' denotes a 'property' where a 'class' was expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
[/code:1]

man that hurt my eyes ;)
 

Tork

Wanderer
Ok thx ill give it a try. :) LoL now its only 107 errors :) ill see whats up i think ( not sure but i think i may know) will see.
 

Tork

Wanderer
Im getting tired but i was wondering, did u edit your SpellCircle.cs file to read

[code:1]
using System;

namespace Server.Spells
{
public enum SpellCircle
{
First,
Second,
Third,
Fourth,
Fifth,
Sixth,
Seventh,
Eighth,
Ninth,
UltimaVII,
Druid
}
}
[/code:1]

Because mine reads.

[code:1]using System;

namespace Server.Spells
{
public enum SpellCircle
{
First,
Second,
Third,
Fourth,
Fifth,
Sixth,
Seventh,
Eighth,
Ninth,
Linear,
Druid
}
}
[/code:1]

could that be the prob, like i said im getting tired, and im haveing trouble remembering where i have thing on my system *Tork falls face down on KB* anyway, ill check in the morn, great work man. looking forward to haveing these :)
 
Krazy/Tru/Voran,

I swore i would never play at work. you bastards made me break my vow. i was just dieing to see what was up with your projects. oh god i cant wait to get home and try these.
 

Tork

Wanderer
Ok Krazy i got it. you didnt release your updated version of the Spell.cs file that comes with the UVII org release. i had to go in and edit/change all the instances or linear to UltimaVII. so it works fine now :) GREAT job man, they work great :) i need to finish checking them. Make sure i did it right on my end ;) before i implement them into my shard. Everyone that has worked so hard on these. im JEALOUUUS!!!!
God i wish i could code like you guys. great job to all.

Recap..

1) i had to edit the SpellCicle.cs Change Linear to UltimaVII
2) I had to edit/change all the instances of Linear to UltimaVII in the
Spell.cs File.
 
K

Krazy_zack

Guest
Edited for the package:

Spells.cs

[code:1]using System;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.Mobiles;
using Server.Spells.Second;
using Server.Spells.Necromancy;

namespace Server.Spells
{
public abstract class Spell : ISpell
{
private Mobile m_Caster;
private Item m_Scroll;
private SpellInfo m_Info;
private SpellState m_State;

public SpellState State{ get{ return m_State; } set{ m_State = value; } }
public Mobile Caster{ get{ return m_Caster; } }
public SpellInfo Info{ get{ return m_Info; } }
public string Name{ get{ return m_Info.Name; } }
public string Mantra{ get{ return m_Info.Mantra; } }
public SpellCircle Circle{ get{ return m_Info.Circle; } }
public Type[] Reagents{ get{ return m_Info.Reagents; } }
public Item Scroll{ get{ return m_Scroll; } }

//private static TimeSpan NextSpellDelay = TimeSpan.FromSeconds( 1.25 );
private static TimeSpan NextSpellDelay = TimeSpan.FromSeconds( 10.0 );
private static TimeSpan AnimateDelay = TimeSpan.FromSeconds( 5.0 );
//private static TimeSpan AnimateDelay = TimeSpan.FromSeconds( 1.5 );

public virtual SkillName CastSkill{ get{ return SkillName.Magery; } }
public virtual SkillName DamageSkill{ get{ return SkillName.EvalInt; } }

public virtual bool RevealOnCast{ get{ return true; } }
public virtual bool ClearHandsOnCast{ get{ return true; } }

public virtual bool DelayedDamage{ get{ return true; } }
//public virtual bool DelayedDamage{ get{ return false; } }

public Spell( Mobile caster, Item scroll, SpellInfo info )
{
m_Caster = caster;
m_Scroll = scroll;
m_Info = info;
}

public virtual double GetAosDamage( int min, int random, double div )
{
double scale = 1.0;

scale += GetInscribeSkill( m_Caster ) * 0.001;

if ( Caster.Player )
{
scale += Caster.Int * 0.001;
scale += AosAttributes.GetValue( m_Caster, AosAttribute.SpellDamage ) * 0.01;
}

int baseDamage = min + (int)(GetDamageSkill( m_Caster ) / div);

double damage = Utility.RandomMinMax( baseDamage, baseDamage + random );

return damage * scale;
}

public virtual bool IsCasting{ get{ return m_State == SpellState.Casting; } }

public virtual void OnCasterHurt()
{
if ( IsCasting )
{
object o = ProtectionSpell.Registry[m_Caster];
bool disturb = true;

if ( o != null && o is double )
{
if ( ((double)o) > Utility.RandomDouble()*100.0 )
disturb = false;
}

if ( disturb )
Disturb( DisturbType.Hurt, false, true );
}
}

public virtual void OnCasterKilled()
{
Disturb( DisturbType.Kill );
}

public virtual void OnConnectionChanged()
{
FinishSequence();
}

public virtual bool OnCasterMoving( Direction d )
{
if ( IsCasting && BlocksMovement )
{
m_Caster.SendLocalizedMessage( 500111 ); // You are frozen and can not move.
return false;
}

return true;
}

public virtual bool OnCasterEquiping( Item item )
{
if ( IsCasting )
Disturb( DisturbType.EquipRequest );

return true;
}

public virtual bool OnCasterUsingObject( object o )
{
if ( m_State == SpellState.Sequencing )
Disturb( DisturbType.UseRequest );

return true;
}

public virtual bool OnCastInTown( Region r )
{
return m_Info.AllowTown;
}

public virtual bool ConsumeReagents()
{
if ( m_Scroll != null || !m_Caster.Player )
return true;

if ( AosAttributes.GetValue( m_Caster, AosAttribute.LowerRegCost ) > Utility.Random( 100 ) )
return true;

Container pack = m_Caster.Backpack;

if ( pack == null )
return false;

if ( pack.ConsumeTotal( m_Info.Reagents, m_Info.Amounts ) == -1 )
return true;

if ( GetType().BaseType == typeof( Spell ) )
{
if ( ArcaneGem.ConsumeCharges( m_Caster, 1 + (int)Circle ) )
return true;
}

return false;
}

public virtual bool CheckResisted( Mobile target )
{
double n = GetResistPercent( target );

n /= 100.0;

if ( n <= 0.0 )
return false;

if ( n >= 1.0 )
return true;

int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;

if ( target.Skills[SkillName.MagicResist].Value < maxSkill )
target.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );

return ( n >= Utility.RandomDouble() );
}

public virtual double GetInscribeSkill( Mobile m )
{
// There is no chance to gain
// m.CheckSkill( SkillName.Inscribe, 0.0, 120.0 );

return m.Skills[SkillName.Inscribe].Value;
}

public virtual double GetDamageSkill( Mobile m )
{
m.CheckSkill( DamageSkill, 0.0, 120.0 );

return m.Skills[DamageSkill].Value;
}

public virtual double GetResistSkill( Mobile m )
{
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;

if ( m.Skills[SkillName.MagicResist].Value < maxSkill )
m.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );

return m.Skills[SkillName.MagicResist].Value;
}

public virtual double GetResistPercentForCircle( Mobile target, SpellCircle circle )
{
double firstPercent = target.Skills[SkillName.MagicResist].Value / 5.0;
double secondPercent = target.Skills[SkillName.MagicResist].Value - (((m_Caster.Skills[CastSkill].Value - 20.0) / 5.0) + (1 + (int)circle) * 5.0);

return ( firstPercent > secondPercent ? firstPercent : secondPercent ) / 2.0; // Seems should be about half of what stratics says.
}

public virtual double GetResistPercent( Mobile target )
{
return GetResistPercentForCircle( target, m_Info.Circle );
}

public virtual double GetDamageScalar( Mobile target )
{
double casterEI = m_Caster.Skills[DamageSkill].Value;
double targetRS = target.Skills[SkillName.MagicResist].Value;
double scalar;

if ( Core.AOS )
targetRS = 0;

m_Caster.CheckSkill( DamageSkill, 0.0, 120.0 );

if ( casterEI > targetRS )
scalar = (1.0 + ((casterEI - targetRS) / 500.0));
else
scalar = (1.0 + ((casterEI - targetRS) / 200.0));

// magery damage bonus, -25% at 0 skill, +0% at 100 skill, +5% at 120 skill
scalar += ( m_Caster.Skills[CastSkill].Value - 100.0 ) / 400.0;

if ( !target.Player && !target.Body.IsHuman && !Core.AOS )
scalar *= 2.0; // Double magery damage to monsters/animals if not AOS

if ( target is BaseCreature )
((BaseCreature)target).AlterDamageScalarFrom( m_Caster, ref scalar );

if ( m_Caster is BaseCreature )
((BaseCreature)m_Caster).AlterDamageScalarTo( target, ref scalar );

target.Region.SpellDamageScalar( m_Caster, target, ref scalar );

return scalar;
}

public virtual void DoFizzle()
{
m_Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502632 ); // The spell fizzles.

if ( m_Caster.Player )
{
if ( Core.AOS )
m_Caster.FixedParticles( 0x3735, 1, 30, 9503, EffectLayer.Waist );
else
m_Caster.FixedEffect( 0x3735, 6, 30 );

m_Caster.PlaySound( 0x5C );
}
}

private CastTimer m_CastTimer;
private AnimTimer m_AnimTimer;

public void Disturb( DisturbType type )
{
Disturb( type, true, false );
}

public virtual bool CheckDisturb( DisturbType type, bool firstCircle, bool resistable )
{
if ( resistable && m_Scroll is BaseWand )
return false;

return true;
}

public void Disturb( DisturbType type, bool firstCircle, bool resistable )
{
if ( !CheckDisturb( type, firstCircle, resistable ) )
return;

if ( m_State == SpellState.Casting )
{
if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
return;

m_State = SpellState.None;
m_Caster.Spell = null;

OnDisturb( type, true );

if ( m_CastTimer != null )
m_CastTimer.Stop();

if ( m_AnimTimer != null )
m_AnimTimer.Stop();

if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
DoHurtFizzle();
}
else if ( m_State == SpellState.Sequencing )
{
if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
return;

m_State = SpellState.None;
m_Caster.Spell = null;

OnDisturb( type, false );

Targeting.Target.Cancel( m_Caster );

if ( Core.AOS && m_Caster.Player && type == DisturbType.Hurt )
DoHurtFizzle();
}
}

public virtual void DoHurtFizzle()
{
m_Caster.FixedEffect( 0x3735, 6, 30 );
m_Caster.PlaySound( 0x5C );
}

public virtual void OnDisturb( DisturbType type, bool message )
{
if ( message )
m_Caster.SendLocalizedMessage( 500641 ); // Your concentration is disturbed, thus ruining thy spell.
}

public virtual bool CheckCast()
{
return true;
}

public virtual void SayMantra()
{
if ( m_Scroll is BaseWand )
return;

if ( m_Info.Mantra != null && m_Info.Mantra.Length > 0 && (m_Caster.Player || m_Caster.Body.IsHuman) )
m_Caster.PublicOverheadMessage( MessageType.Spell, m_Caster.SpeechHue, true, m_Info.Mantra, false );
}

public virtual bool BlockedByHorrificBeast{ get{ return true; } }
public virtual bool BlocksMovement{ get{ return true; } }

public bool Cast()
{
if ( Core.AOS && m_Caster.Spell is Spell && ((Spell)m_Caster.Spell).State == SpellState.Sequencing )
((Spell)m_Caster.Spell).Disturb( DisturbType.NewCast );

if ( !m_Caster.CheckAlive() )
{
return false;
}
else if ( m_Caster.Spell != null && m_Caster.Spell.IsCasting )
{
m_Caster.SendLocalizedMessage( 502642 ); // You are already casting a spell.
}
else if ( BlockedByHorrificBeast && TransformationSpell.UnderTransformation( m_Caster, typeof( HorrificBeastSpell ) ) )
{
m_Caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
}
else if ( !(m_Scroll is BaseWand) && (m_Caster.Paralyzed || m_Caster.Frozen) )
{
m_Caster.SendLocalizedMessage( 502643 ); // You can not cast a spell while frozen.
}
else if ( !(m_Scroll is BaseWand) && DateTime.Now < m_Caster.NextSpellTime )
{
m_Caster.SendLocalizedMessage( 502644 ); // You must wait for that spell to have an effect.
}
else if ( m_Caster.Mana >= ScaleMana( GetMana() ) )
{
if ( m_Caster.Spell == null && m_Caster.CheckSpellCast( this ) && CheckCast() && m_Caster.Region.OnBeginSpellCast( m_Caster, this ) )
{
m_State = SpellState.Casting;
m_Caster.Spell = this;

if ( RevealOnCast )
m_Caster.RevealingAction();

SayMantra();

TimeSpan castDelay = this.GetCastDelay();

if ( m_Caster.Body.IsHuman )
{
int count = (int)Math.Ceiling( castDelay.TotalSeconds / AnimateDelay.TotalSeconds );

if ( count != 0 )
{
m_AnimTimer = new AnimTimer( this, count );
m_AnimTimer.Start();
}

if ( m_Info.LeftHandEffect > 0 )
Caster.FixedParticles( 0, 10, 5, m_Info.LeftHandEffect, EffectLayer.LeftHand );

if ( m_Info.RightHandEffect > 0 )
Caster.FixedParticles( 0, 10, 5, m_Info.RightHandEffect, EffectLayer.RightHand );
}

if ( ClearHandsOnCast )
m_Caster.ClearHands();

m_CastTimer = new CastTimer( this, castDelay );
m_CastTimer.Start();

OnBeginCast();

return true;
}
else
{
return false;
}
}
else
{
m_Caster.LocalOverheadMessage( MessageType.Regular, 0x22, 502625 ); // Insufficient mana
}

return false;
}

public abstract void OnCast();

public virtual void OnBeginCast()
{
}

private const double ChanceOffset = 20.0, ChanceLength = 100.0 / 7.0;

public virtual void GetCastSkills( out double min, out double max )
{
int circle = (int)m_Info.Circle;

if ( m_Scroll != null )
circle -= 2;

double avg = ChanceLength * circle;

min = avg - ChanceOffset;
max = avg + ChanceOffset;
}

public virtual bool CheckFizzle()
{
if ( m_Scroll is BaseWand )
return true;

double minSkill, maxSkill;

GetCastSkills( out minSkill, out maxSkill );

return Caster.CheckSkill( CastSkill, minSkill, maxSkill );
}

private static int[] m_ManaTable = new int[]{ 30, 40, 50, 60, 70, 80, 90, 100 };
//private static int[] m_ManaTable = new int[]{ 4, 6, 9, 11, 14, 20, 40, 50 };

public virtual int GetMana()
{
if ( m_Scroll is BaseWand )
return 0;

return m_ManaTable[(int)Circle];
}

public virtual int ScaleMana( int mana )
{
double scalar = 1.0;

if ( !Necromancy.MindRotSpell.GetMindRotScalar( Caster, ref scalar ) )
scalar = 1.0;

scalar -= (double)AosAttributes.GetValue( m_Caster, AosAttribute.LowerManaCost ) / 100;

return (int)(mana * scalar);
}

public virtual int CastRecoveryBase{ get{ return 6; } }
public virtual int CastRecoveryCircleScalar{ get{ return 0; } }
public virtual int CastRecoveryFastScalar{ get{ return 1; } }
public virtual int CastRecoveryPerSecond{ get{ return 4; } }
public virtual int CastRecoveryMinimum{ get{ return 0; } }

public virtual TimeSpan GetCastRecovery()
{
if ( !Core.AOS )
return NextSpellDelay;

int fcr = AosAttributes.GetValue( m_Caster, AosAttribute.CastRecovery );

int circleDelay = CastRecoveryCircleScalar * (1 + (int)Circle); // Note: Circle is 0-based so we must offset
int fcrDelay = -(CastRecoveryFastScalar * fcr);

int delay = CastRecoveryBase + circleDelay + fcrDelay;

if ( delay < CastRecoveryMinimum )
delay = CastRecoveryMinimum;

return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
}

public virtual int CastDelayBase{ get{ return 3; } }
public virtual int CastDelayCircleScalar{ get{ return 1; } }
public virtual int CastDelayFastScalar{ get{ return 1; } }
public virtual int CastDelayPerSecond{ get{ return 4; } }
public virtual int CastDelayMinimum{ get{ return 1; } }

public virtual TimeSpan GetCastDelay()
{
if ( m_Scroll is BaseWand )
return TimeSpan.Zero;

if ( !Core.AOS )
return TimeSpan.FromSeconds( 0.5 + (0.25 * (int)Circle) );

int fc = AosAttributes.GetValue( m_Caster, AosAttribute.CastSpeed );

if ( ProtectionSpell.Registry.Contains( m_Caster ) )
fc -= 2;

int circleDelay = CastDelayCircleScalar * (1 + (int)Circle); // Note: Circle is 0-based so we must offset
int fcDelay = -(CastDelayFastScalar * fc);

int delay = CastDelayBase + circleDelay + fcDelay;

if ( delay < CastDelayMinimum )
delay = CastDelayMinimum;

return TimeSpan.FromSeconds( (double)delay / CastDelayPerSecond );
}

public virtual void FinishSequence()
{
m_State = SpellState.None;

if ( m_Caster.Spell == this )
m_Caster.Spell = null;
}

public virtual bool CheckSequence()
{
int mana = ScaleMana( GetMana() );

if ( m_Caster.Deleted || !m_Caster.Alive || m_Caster.Spell != this || m_State != SpellState.Sequencing )
{
DoFizzle();
}
else if ( m_Scroll != null && !(m_Scroll is Runebook) && (m_Scroll.Amount <= 0 || m_Scroll.Deleted || m_Scroll.RootParent != m_Caster || (m_Scroll is BaseWand && (((BaseWand)m_Scroll).Charges <= 0 || m_Scroll.Parent != m_Caster))) )
{
DoFizzle();
}
else if ( !ConsumeReagents() )
{
m_Caster.LocalOverheadMessage( MessageType.Regular, 0x22, 502630 ); // More reagents are needed for this spell.
}
else if ( m_Caster.Mana < mana )
{
m_Caster.LocalOverheadMessage( MessageType.Regular, 0x22, 502625 ); // Insufficient mana for this spell.
}
else if ( Core.AOS && (m_Caster.Frozen || m_Caster.Paralyzed) )
{
m_Caster.SendLocalizedMessage( 502646 ); // You cannot cast a spell while frozen.
DoFizzle();
}
else if ( CheckFizzle() )
{
m_Caster.Mana -= mana;

if ( m_Scroll is SpellScroll )
m_Scroll.Consume();
else if ( m_Scroll is BaseWand )
((BaseWand)m_Scroll).ConsumeCharge( m_Caster );

if ( m_Scroll is BaseWand )
{
bool m = m_Scroll.Movable;

m_Scroll.Movable = false;

if ( ClearHandsOnCast )
m_Caster.ClearHands();

m_Scroll.Movable = m;
}
else
{
if ( ClearHandsOnCast )
m_Caster.ClearHands();
}

if ( TransformationSpell.UnderTransformation( m_Caster, typeof( VampiricEmbraceSpell ) ) )
{
bool garlic = false;

for ( int i = 0; !garlic && i < m_Info.Reagents.Length; ++i )
garlic = ( m_Info.Reagents == Reagent.Garlic );

if ( garlic )
{
m_Caster.SendLocalizedMessage( 1061651 ); // The garlic burns you!
AOS.Damage( m_Caster, Utility.RandomMinMax( 17, 23 ), 100, 0, 0, 0, 0 );
}
}

return true;
}
else
{
DoFizzle();
}

return false;
}

public bool CheckBSequence( Mobile target )
{
return CheckBSequence( target, false );
}

public bool CheckBSequence( Mobile target, bool allowDead )
{
if ( !target.Alive && !allowDead )
{
m_Caster.SendLocalizedMessage( 501857 ); // This spell won't work on that!
return false;
}
else if ( Caster.CanBeBeneficial( target, true, allowDead ) && CheckSequence() )
{
Caster.DoBeneficial( target );
return true;
}
else
{
return false;
}
}

public bool CheckHSequence( Mobile target )
{
if ( !target.Alive )
{
m_Caster.SendLocalizedMessage( 501857 ); // This spell won't work on that!
return false;
}
else if ( Caster.CanBeHarmful( target ) && CheckSequence() )
{
Caster.DoHarmful( target );
return true;
}
else
{
return false;
}
}

private class AnimTimer : Timer
{
private Spell m_Spell;

public AnimTimer( Spell spell, int count ) : base( TimeSpan.Zero, AnimateDelay, count )
{
m_Spell = spell;

Priority = TimerPriority.FiftyMS;
}

protected override void OnTick()
{
if ( m_Spell.State != SpellState.Casting || m_Spell.m_Caster.Spell != m_Spell )
{
Stop();
return;
}

if ( !m_Spell.Caster.Mounted && m_Spell.Caster.Body.IsHuman && m_Spell.m_Info.Action >= 0 )
m_Spell.Caster.Animate( m_Spell.m_Info.Action, 7, 1, true, false, 0 );

if ( !Running )
m_Spell.m_AnimTimer = null;
}
}

private class CastTimer : Timer
{
private Spell m_Spell;

public CastTimer( Spell spell, TimeSpan castDelay ) : base( castDelay )
{
m_Spell = spell;

Priority = TimerPriority.TwentyFiveMS;
}

protected override void OnTick()
{
if ( m_Spell.m_State == SpellState.Casting && m_Spell.m_Caster.Spell == m_Spell )
{
m_Spell.m_State = SpellState.Sequencing;
m_Spell.m_CastTimer = null;
m_Spell.m_Caster.OnSpellCast( m_Spell );
m_Spell.m_Caster.Region.OnSpellCast( m_Spell.m_Caster, m_Spell );
m_Spell.m_Caster.NextSpellTime = DateTime.Now + m_Spell.GetCastRecovery();// Spell.NextSpellDelay;

Target originalTarget = m_Spell.m_Caster.Target;

m_Spell.OnCast();

if ( m_Spell.m_Caster.Player && m_Spell.m_Caster.Target != originalTarget )
m_Spell.m_Caster.Target.BeginTimeout( m_Spell.m_Caster, TimeSpan.FromSeconds( 30.0 ) );

m_Spell.m_CastTimer = null;
}
}
}
}
}[/code:1]
 
K

Krazy_zack

Guest
ya sure could...

I just edited out the Linear stuff to save Core Script Changes but I guess the point is moot now ;)
 
Status
Not open for further replies.
Top