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!

[RunUO 2.0 RC1] Lucid Nagual's <<_All Spells System_>>

scrapy

Wanderer
:(

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Spells.Cleric.ClericBanishEvilSpell.Target(Mobile m)
at Server.Spells.Cleric.ClericBanishEvilSpell.InternalTarget.OnTarget(Mobile from, Object o)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
 
scrapy said:
:(

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Spells.Cleric.ClericBanishEvilSpell.Target(Mobile m)
at Server.Spells.Cleric.ClericBanishEvilSpell.InternalTarget.OnTarget(Mobile from, Object o)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
That crash has already been fixed and the package has been updated.
 
ok lucid.

i have been testing and all seems to work good. i will be losing the net tommorrow for a month, but i will continue to test. thanx for the wonderful scripts.
 

neoneogi

Wanderer
me too. I also encounting same trouble.

imthewizardlord said:
i am encountering a strange problem. i have done all the fixes other people have found in case thoes were causing the problem but still i get the same result. anyways your wanting to know the problem now.

Since i added in your all spell system(which is excellent might i add im glad to have this wonderful tool) all of the higher mages spells dont seem to work they fizzle on attempt. this happens even with me when my magery is at 6555 whatever it is.

Thanks in advance for your assistance.
-Wizardlord

First,Thank you for Great Script dear Lucid.

I also encounting like above trouble Mr.Wizardload.
Can Administrator cast all spells?
One of Player Used TravelGates...why?:confused:
 
neoneogi

neoneogi said:
First,Thank you for Great Script dear Lucid.

I also encounting like above trouble Mr.Wizardload.
Can Administrator cast all spells?
One of Player Used TravelGates...why?:confused:
Update to the current release and let me know if your problems go away.
 

neoneogi

Wanderer
Lucid

Lucid Nagual said:
Update to the current release and let me know if your problems go away.

Thank you for quickly reply:)
I already upgrade your Script.and,
1) I made a New Character "SAMURAI"..It seems work well.
2) I tried a old Character "Mage"..and casted "Recall",so I succeed once of 8times cast.-->1/8 percent.(INT was 120)..this is reason why..

Sorry BAD English because I am Japanese.:eek:
 
neoneogi said:
Thank you for quickly reply:)
I already upgrade your Script.and,
1) I made a New Character "SAMURAI"..It seems work well.
2) I tried a old Character "Mage"..and casted "Recall",so I succeed once of 8times cast.-->1/8 percent.(INT was 120)..this is reason why..

Sorry BAD English because I am Japanese.:eek:
But what was the skill level?
 

neoneogi

Wanderer
Lucid Nagual said:
But what was the skill level?

my skill level is Magery 100.

Oh perhaps I am stupid!
[ASCC Gump switch was all "disabled".
This setting cannot work all system,can this?

and more sorry,when I command "[GOCC",no object room recalled.
only board.how can I control there?

Thank you,Regards.
 
neoneogi said:
my skill level is Magery 100.

Oh perhaps I am stupid!
[ASCC Gump switch was all "disabled".
This setting cannot work all system,can this?

and more sorry,when I command "[GOCC",no object room recalled.
only board.how can I control there?

Thank you,Regards.
Don't use the Control Center. It is to be disabled at this point in time and can cause a crash.
 
also a note on the skill level

if your cap is at 100 - then does not matter skill level - it will only use the cap until rc2 comes out or you use the newest svn (i believe the newest on has the fix in it for obeycap = false)

so to test it out for higher levels - use a power scroll to 120

or [set skills.magery.cap xxx where xxx equals the valuse you want

then set the skill level also
 
neoneogi said:
imthewizardlord said:
Originally Posted by imthewizardlord
i am encountering a strange problem. i have done all the fixes other people have found in case thoes were causing the problem but still i get the same result. anyways your wanting to know the problem now.

Since i added in your all spell system(which is excellent might i add im glad to have this wonderful tool) all of the higher mages spells dont seem to work they fizzle on attempt. this happens even with me when my magery is at 6555 whatever it is.

Thanks in advance for your assistance.
-Wizardlord

First,Thank you for Great Script dear Lucid.

I also encounting like above trouble Mr.Wizardload.
Can Administrator cast all spells?
One of Player Used TravelGates...why?:confused:

first, wow i posted that a long time ago. sorry off topic but i had to say it.

Next, yeah i found out a way to fix the problem which i think lord_greywolf said but still i have to put in my 2 cents worth.

If you set the skill caps to a higher number EX 120+ all the spells work just fine. i havent experimented much beyond that point so i think thats all thats nessissary to get it to work(i basicly just made a gate that set all my skills to as high as they can go AND their caps to so im assuming thats all that needs to be done.)


so just so i can give the solution i used in case some people still cant get it working heres my miracle solution i am using temporaroly.

If you have lokais advanced player gate make one and have it so it only sets skill caps. Then make it so it sets the skill caps to 120 and place it in a spot anyone can access.

and as far as i can tell from testing it doesnt make it so players can cast spells they shouldnt be able to at their current level so this will still make it so they can only cast spells of their current magery level but that once they hit the appropriate level that they WILL actually be able to without it fizzeling endlessly.

On my server i have the gate in my supply room with a sign next to it basicly telling players if their spells are broken to step into the gate and its worked perfectly since.

So if anyone is still having a problem with casting spells thats my 2 cents worth on a nice easy solution to fixing it.
 

Boulder

Sorceror
All Sells System

Put System In All went good
But if you say bank weather your player are staff shard crashes
before putting system in had no problems
here is crash report please help
Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 9/11/2006 2:53:58 PM
Mobiles: 5560
Items: 110036
Clients:
- Count: 1
+ 192.168.15.100: (account = boulder) (mobile = 0x1 'Boulder')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Misc.HearAll.OnSpeech(SpeechEventArgs args)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.EventSink.InvokeSpeech(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 
Boulder

Boulder said:
Put System In All went good
But if you say bank weather your player are staff shard crashes
before putting system in had no problems
here is crash report please help
Code:
Server Crash Report
===================
 
RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 9/11/2006 2:53:58 PM
Mobiles: 5560
Items: 110036
Clients:
- Count: 1
+ 192.168.15.100: (account = boulder) (mobile = 0x1 'Boulder')
 
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Misc.HearAll.OnSpeech(SpeechEventArgs args)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.EventSink.InvokeSpeech(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
Post your HearAll.cs and I will see if I can help you with it.
 

Boulder

Sorceror
All Sells System

This is my hear all script
It was working good before all spell

Code:
using System;
using System.Collections;
using Server;
using Server.Mobiles;
using Server.Commands;


namespace Server.Misc
{
	public class HearAll
	{
		private static bool m_ConsolePrint;
		private static ArrayList m_HearAll = new ArrayList();

		public static void Initialize()
		{
			CommandSystem.Register( "HearAll", AccessLevel.Administrator, new CommandEventHandler( HearAll_OnCommand ) );
			CommandSystem.Register( "ConsoleHearAll", AccessLevel.Administrator, new CommandEventHandler( ConsoleHearAll_OnCommand ) );

			EventSink.Speech += new SpeechEventHandler( OnSpeech );
		}

		private static void OnSpeech( SpeechEventArgs args )
		{
			string msg;
			if ( args.Mobile.Region.Name.Length > 0 )
				msg = String.Format( "{0} ({1}): {2}", args.Mobile.Name, args.Mobile.Region.Name, args.Speech );
			else
				msg = String.Format( "{0}: {1}", args.Mobile.Name, args.Speech );
			if ( m_ConsolePrint )
				Console.WriteLine( msg );

			ArrayList remove = null;
			for(int i=0;i<m_HearAll.Count;i++)
			{
				if ( ((Mobile)m_HearAll[i]).NetState == null )
				{
					if ( remove == null )
						remove = new ArrayList( 1 );
					remove.Add( m_HearAll[i] );
				}
				else
				{
					((Mobile)m_HearAll[i]).SendMessage( msg );
				}
			}

			if ( remove != null )
			{
				for(int i=0;i<remove.Count;i++)
					m_HearAll.Remove( remove[i] );
			}
		}

		private static void HearAll_OnCommand( CommandEventArgs args )
		{
			if ( m_HearAll.Contains( args.Mobile ) )
			{
				m_HearAll.Remove( args.Mobile );
				args.Mobile.SendMessage( "Hear all disabled." );
			}
			else
			{
				m_HearAll.Add( args.Mobile );
				args.Mobile.SendMessage( "Hear all enabled, type [hearall again to disable it." );
			}
		}

		private static void ConsoleHearAll_OnCommand( CommandEventArgs args )
		{
			m_ConsolePrint = !m_ConsolePrint;

			if ( m_ConsolePrint )
				args.Mobile.SendMessage( "Now sending all speech to the console." );
			else
				args.Mobile.SendMessage( "No longer sending speech to the console." );
		}
	}
}
 

RavonTUS

Sorceror
Greetings,

Lucid Nagual may I make a suggestion or a wish?

I like your class system, however, I would prefer a "stone" or "statue" that could be clicked to start the class selection, instead of it automatically starting when you first create your character.

To me, there is always way to much stuff going on when you first join a shard. A delay of a few minutes to find the location of the "stone" would allow players to make a better selection and enjoy them selves a little more.

What code would I need to follow, in order to start your class section?

Code:
        public override void OnDoubleClick(Mobile from)
        {
[COLOR="Red"]            //What code starts the class selection?[/COLOR]
        }

Full script ClassStone.cs
Code:
/*
Special thanks to Ryan.
With RunUO we now have the ability to become our own Richard Garriott.
All Spells System created by x-SirSly-x, Admin of Land of Obsidian.
All Spells System 4.0 created & supported by Lucid Nagual, Admin of The Conjuring.
All Spells System 5.0 created by A_li_N.
    _________________________________
 -=(_)_______________________________)=-
   /   .   .   . ____  . ___      _/
  /~ /    /   / /     / /   )2005 /
 (~ (____(___/ (____ / /___/     (
  \ ----------------------------- \
   \     [email protected]     \
    \_     ===================      \
     \   -Admin of "The Conjuring"-  \
      \_     ===================     ~\
       )       All Spells System       )
      /~      Version [5].0.1        _/
    _/_______________________________/
 -=(_)_______________________________)=-
 */
using System;
using Server.Items;

namespace Server.Items
{
    public class ClassStone : Item
    {
        [Constructable]
        public ClassStone()
            : base(0xED4)
        {
            Movable = false;
            Hue = 0x2D1;
            Name = "a class stone";
        }

        public override void OnDoubleClick(Mobile from)
        {
[COLOR="Red"]            //What code starts the class selection?[/COLOR]
        }

        public ClassStone(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();
        }
    }
}

Thank you,

-Ravon
 
RavonTUS

RavonTUS said:
Greetings,

Lucid Nagual may I make a suggestion or a wish?

I like your class system, however, I would prefer a "stone" or "statue" that could be clicked to start the class selection, instead of it automatically starting when you first create your character.

To me, there is always way to much stuff going on when you first join a shard. A delay of a few minutes to find the location of the "stone" would allow players to make a better selection and enjoy them selves a little more.

What code would I need to follow, in order to start your class section?

Code:
        public override void OnDoubleClick(Mobile from)
        {
[COLOR=red]           //What code starts the class selection?[/COLOR]
        }

Full script ClassStone.cs
Code:
/*
Special thanks to Ryan.
With RunUO we now have the ability to become our own Richard Garriott.
All Spells System created by x-SirSly-x, Admin of Land of Obsidian.
All Spells System 4.0 created & supported by Lucid Nagual, Admin of The Conjuring.
All Spells System 5.0 created by A_li_N.
    _________________________________
 -=(_)_______________________________)=-
   /   .   .   . ____  . ___      _/
  /~ /    /   / /     / /   )2005 /
 (~ (____(___/ (____ / /___/     (
  \ ----------------------------- \
   \     [email protected]     \
    \_     ===================      \
     \   -Admin of "The Conjuring"-  \
      \_     ===================     ~\
       )       All Spells System       )
      /~      Version [5].0.1        _/
    _/_______________________________/
 -=(_)_______________________________)=-
 */
using System;
using Server.Items;
 
namespace Server.Items
{
    public class ClassStone : Item
    {
        [Constructable]
        public ClassStone()
            : base(0xED4)
        {
            Movable = false;
            Hue = 0x2D1;
            Name = "a class stone";
        }
 
        public override void OnDoubleClick(Mobile from)
        {
[COLOR=red]           //What code starts the class selection?[/COLOR]
        }
 
        public ClassStone(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();
        }
    }
}

Thank you,

-Ravon
OK first of all....
If you have the restrictions [class system] in place and a player tries casting his/her first spell the spell check will scroll through a bool and reach this code:
Code:
[B][SIZE=2][COLOR=#0000ff]else if [/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][SIZE=2]ASSettings[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]EnableClassSystem [/SIZE][SIZE=2][COLOR=#006400]&& [/COLOR][/SIZE][SIZE=2]mod [/SIZE][SIZE=2][COLOR=#006400]== [/COLOR][/SIZE][B][SIZE=2]null [/B][/SIZE][SIZE=2][COLOR=#006400]|| [/COLOR][/SIZE][SIZE=2]mod[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]ClassREM [/SIZE][SIZE=2][COLOR=#006400]== [/COLOR][/SIZE][SIZE=2]ClassREM[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]None [/SIZE][SIZE=2][COLOR=#006400])
{
[/COLOR][/SIZE][SIZE=2]caster[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]SendGump[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][SIZE=2][COLOR=#191970]ClassGump[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][SIZE=2]caster [/SIZE][SIZE=2][COLOR=#006400]) );
[/COLOR][/SIZE][SIZE=2][COLOR=#000080]return [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]false[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400];
}
[/COLOR][/SIZE]
This will force the gump on a player til the player selects a class. If a player tries to logout and log back in and use the spell again, the spell check will check the bool again and see that the person doesn't have an existing class and pops the gump up again. This will happen til the stubborn player gives in and selects a class of their choice. Keep in mind that the class system is more than fair and allows a player to choose, Nomad, which relieves them from restrictions to an extent but limits their GM skill points at 100 [not 120].

But if you still feel the need for the stone I have finished it for you.
 

Attachments

  • ClassStone.cs
    1.9 KB · Views: 75
Boulder

Boulder said:
This is my hear all script
It was working good before all spell

Code:
using System;
using System.Collections;
using Server;
using Server.Mobiles;
using Server.Commands;
 
 
namespace Server.Misc
{
    public class HearAll
    {
        private static bool m_ConsolePrint;
        private static ArrayList m_HearAll = new ArrayList();
 
        public static void Initialize()
        {
            CommandSystem.Register( "HearAll", AccessLevel.Administrator, new CommandEventHandler( HearAll_OnCommand ) );
            CommandSystem.Register( "ConsoleHearAll", AccessLevel.Administrator, new CommandEventHandler( ConsoleHearAll_OnCommand ) );
 
            EventSink.Speech += new SpeechEventHandler( OnSpeech );
        }
 
        private static void OnSpeech( SpeechEventArgs args )
        {
            string msg;
            if ( args.Mobile.Region.Name.Length > 0 )
                msg = String.Format( "{0} ({1}): {2}", args.Mobile.Name, args.Mobile.Region.Name, args.Speech );
            else
                msg = String.Format( "{0}: {1}", args.Mobile.Name, args.Speech );
            if ( m_ConsolePrint )
                Console.WriteLine( msg );
 
            ArrayList remove = null;
            for(int i=0;i<m_HearAll.Count;i++)
            {
                if ( ((Mobile)m_HearAll[i]).NetState == null )
                {
                    if ( remove == null )
                        remove = new ArrayList( 1 );
                    remove.Add( m_HearAll[i] );
                }
                else
                {
                    ((Mobile)m_HearAll[i]).SendMessage( msg );
                }
            }
 
            if ( remove != null )
            {
                for(int i=0;i<remove.Count;i++)
                    m_HearAll.Remove( remove[i] );
            }
        }
 
        private static void HearAll_OnCommand( CommandEventArgs args )
        {
            if ( m_HearAll.Contains( args.Mobile ) )
            {
                m_HearAll.Remove( args.Mobile );
                args.Mobile.SendMessage( "Hear all disabled." );
            }
            else
            {
                m_HearAll.Add( args.Mobile );
                args.Mobile.SendMessage( "Hear all enabled, type [hearall again to disable it." );
            }
        }
 
        private static void ConsoleHearAll_OnCommand( CommandEventArgs args )
        {
            m_ConsolePrint = !m_ConsolePrint;
 
            if ( m_ConsolePrint )
                args.Mobile.SendMessage( "Now sending all speech to the console." );
            else
                args.Mobile.SendMessage( "No longer sending speech to the console." );
        }
    }
}
OMG!!! I see a huge problem with the word remove lol. BRB.........

OK try this one and let me know what happens.
 

Attachments

  • HearAll [Lucid Nagual Fix].cs
    2.1 KB · Views: 72
The Scoop:

Hello everyone! ;) I figured I would give you a scoop on the current work I am doing with All Spells. I am adding more classes to the restrictive system! The most current one is "Farming". I am currently revamping the current version of the "Harvest System", and eliminating a lot of unnecessary code. I will also be adding special abilities for the farmers in the form of scrolls and spells [spellbook]. But to do this I will need a custom skill system to make farming an actual skill. The spells will be based on farming skill points [experience]. A reward system will also be put in place so that farmers can be rewarded for their hard work. I am also considering making another class called "Farm Hand" that can harvest crops but not plant them and cannot use the spell system. However, the farmhand would only use up 50 skill points as a laborer. And the farmhand will be paid gold as soon as they turn over the harvested crop to the farmer. I would like to hear your input on what the spells would do or how the system should work. Keep in mind that I have just started revamping the harvest code and will be a while before it is complete. Thank you.
 
Top