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!

Catastrophic Hiding

FLuXx()

Sorceror
Catastrophic Hiding

Summary:
Just 2 commands to have a more explosive hide/unhide.

Thanks to ArteGordon and Allmight for helping me with the simple things that I didn't catch on to.

Description:
Command Usage:
[catadis - Disappear
[cataapp - Appear

Only administrators can use these but that's easily fixable if you don't want it that way.

Change

Code:
public static void Initialize()
		{
			Server.Commands.Register( "CataDis", AccessLevel.Administrator, new CommandEventHandler( CataHide_OnCommand ) );
			Server.Commands.Register( "CataApp", AccessLevel.Administrator, new CommandEventHandler( CataUnhide_OnCommand ) );
		}

Where it says AccessLevel to whatever accesslevel you want...(No lower than GameMaster recommended)

*NOTE*
The effects may lag slower computers.
If this is a problem change where

Code:
if( inc >= 5 )
                    this.Stop();

Change 5 to a lower number.

Installation:
Place it within anywhere within Scripts folder. No other editing needed.
 

Attachments

  • CataHide.cs
    3 KB · Views: 688

HadesUO

Wanderer
Ok if I knew how to script i would do this..Can you change the animation to that of noble sanc. and a message "A God has graced you with his presence" when u unhide? and make it and item?
 

nospoon1

Wanderer
HadesUO said:
Ok if I knew how to script i would do this..Can you change the animation to that of noble sanc. and a message "A God has graced you with his presence" when u unhide? and make it and item?


Anythings possible in scripting and im sure thats possible, mess around with it im sure you could do it...Just add in a few things there and there ...ill let you figure it out but yes everythings possible in scripting for uo emu's.
 

Knightshade

Wanderer
Great script! I love the execution! :D
One bug, it seems the sounds only play for the person hiding/unhiding. My GMs couldn't hear the sound fx that play when unhiding/hiding.

[edit]
was looking over the script a bit closer. I'm no scripter, so I could be completely wrong here, but I'm guessing these are the two offending lines of code:
Code:
		m.PlaySound( 520 );
		m.PlaySound( 525 );

I'm guessing that sends the sound fx to the mobile that cast it only. I don't know the code to use, but I'm willing to bet if you replace that with code that plays the sound fx to everyone, that it will work properly. ;)
 

FLuXx()

Sorceror
Knightshade said:
Great script! I love the execution! :D
One bug, it seems the sounds only play for the person hiding/unhiding. My GMs couldn't hear the sound fx that play when unhiding/hiding.

[edit]
was looking over the script a bit closer. I'm no scripter, so I could be completely wrong here, but I'm guessing these are the two offending lines of code:
Code:
		m.PlaySound( 520 );
		m.PlaySound( 525 );

I'm guessing that sends the sound fx to the mobile that cast it only. I don't know the code to use, but I'm willing to bet if you replace that with code that plays the sound fx to everyone, that it will work properly. ;)

Well, the weird thing is, I have tested this because I thought I noticed that myself, but some say they hear the effect...some say they don't.

It's possible I think that if another sound play soon before the 2 sounds I used happen, it won't be heard.

From what I thought, that would play the sound at the location of the target.

If anyone else has this problem let me know, and even more so if you know of a fix.
 

HadesUO

Wanderer
Fluxx I still cant get it to do the noble catahide. If u remember changing the animation of flamestrike to that of noble sanc..the blue flame. If You can please help me get it working and done i would be greatly aprieciative of it. I had 2 people try and couldnt do it. Thank you eitherway.
 

Waverian

Wanderer
Look in the NobleSacrifice script.. The Particle effects are right there...

Now back on topic: I'm really impressed with the actual measures you've gone to to get such a large effect, and was quite honestly surprised to see that. Great job.

-Waverian.
 

HadesUO

Wanderer
Well that wasnt the problem knowing the particale effects, it was the fixed location. but erither way if anyone wants a diff version her eit is. Ty krazy for the help..

Code:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Spells;

namespace Server.Items
{
	public class NobleHideStone : Item
	{
		public EffectTimer m_Timer;

		[Constructable]
		public NobleHideStone() : base( 0xED4 )
		{
			Movable = true;
			Hue = 299;
			Name = "A Noble Hide Staff";
			ItemID = 3569;
			Layer = Layer.OneHanded;
		}

		public override void OnDoubleClick( Mobile m )
		{
		if ( m.AccessLevel > AccessLevel.Seer )
		{		
		
				



				 if( m.Hidden )
				{
					m.Hidden = false;
					World.Broadcast( 2124, true, "A God Has Graced You With His Presence" );
				}
				else
				{
					m.Hidden = true;
				}


					

					Effects.PlaySound( m.Location, m.Map, 0x243 );
					
					
					
                    
					Effects.SendLocationEffect( new Point3D( m.X + 1, m.Y, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
					Effects.SendLocationEffect( new Point3D( m.X - 1, m.Y, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
					Effects.SendLocationEffect( new Point3D( m.X, m.Y + 1, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
					Effects.SendLocationEffect( new Point3D( m.X, m.Y - 1, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
					Effects.SendLocationEffect( new Point3D( m.X, m.Y, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
					
				
					
					DateTime now = DateTime.Now;

					m_Timer = new EffectTimer( now, m );
					m_Timer.Start();
			
			}
			else
			{
				Delete();
				m.SendMessage( 2124, "You must be an admin to use this !!" );
			}
		}

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


		public class EffectTimer : Timer
		{
			public Mobile m;
            		public int inc;

			public EffectTimer( DateTime time, Mobile from ) : base( TimeSpan.FromSeconds( 0.1 ), TimeSpan.FromSeconds( 0.1 ) )
			{
				Priority = TimerPriority.FiftyMS;
				m = from;
				inc = 0;
			}
			
			protected override void OnTick()
			{
				inc++;
				
				Effects.SendLocationEffect( new Point3D( m.X + inc, m.Y, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
				Effects.SendLocationEffect( new Point3D( m.X - inc, m.Y, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
				Effects.SendLocationEffect( new Point3D( m.X, m.Y + inc, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
				Effects.SendLocationEffect( new Point3D( m.X, m.Y - inc, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
				Effects.SendLocationEffect( new Point3D( m.X + inc, m.Y - inc, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );
				Effects.SendLocationEffect( new Point3D( m.X - inc, m.Y + inc, m.Z ), m.Map, 0x3709, 17, 9965, 5, 7 );


                
				if( inc >= 5 )
                    		this.Stop();
			}
		}
	}
 

Radar3

Wanderer
How did you find what effect was the flamestrike effect? Is there some kind of list? I like the script.
 

Rion Locke

Wanderer
Fantastic script man. I'm pretty new to scripting and I have one question, how do I change where the effect goes? I know it goes into these lines:

Effects.SendLocationEffect( new Point3D( m.X + 1, m.Y, m.Z ), m.Map, 0x3709, 17 );

but I don't know how to edit it to do what I want. I understand the x y z, i'm guessing that 0x3709 is the effect itself, but what is 17?

At first I thought it was 17 tiles, but it only goes 5 in any given direction. *me thinks this line does it: " if( inc >= 5 )" but i don't see where inc =5.

here is the x & y of where i'd like the effects to go. This should form a cross of sorts.

+1, +1
+2, +2
+3, +3
+4, +4
+1, -1
+2, -2
+3, -3
-1, +1
-2, +2
-3, +3
-1, -1
-2, -2
-3, -3
-3, -2
-2, -3
-2, -3
-3, -2
+2, -3
+3, -2
+3, +4
+4, +3

could someone either help me find out how to change it, so it would use those xy cords, or do it for me and explain how it was done?
 

FLuXx()

Sorceror
Rion Locke said:
Fantastic script man. I'm pretty new to scripting and I have one question, how do I change where the effect goes? I know it goes into these lines:

Effects.SendLocationEffect( new Point3D( m.X + 1, m.Y, m.Z ), m.Map, 0x3709, 17 );

but I don't know how to edit it to do what I want. I understand the x y z, i'm guessing that 0x3709 is the effect itself, but what is 17?

At first I thought it was 17 tiles, but it only goes 5 in any given direction. *me thinks this line does it: " if( inc >= 5 )" but i don't see where inc =5.

here is the x & y of where i'd like the effects to go. This should form a cross of sorts.

+1, +1
+2, +2
+3, +3
+4, +4
+1, -1
+2, -2
+3, -3
-1, +1
-2, +2
-3, +3
-1, -1
-2, -2
-3, -3
-3, -2
-2, -3
-2, -3
-3, -2
+2, -3
+3, -2
+3, +4
+4, +3

could someone either help me find out how to change it, so it would use those xy cords, or do it for me and explain how it was done?


Once double-clicked a timer is activated, every OnTick() the inc variable is increased by 1. (note: inc++) This way each time inc is used in the effects, it spreads 1 tile farther.

Depending on the direction I want it to go, I add or subtract from the x and y axis.
 

bzk90

Lord
Post in script support...this is an archive so most of the scripts here aren't designed for the current runuo distro. Try not to ressurect archive threads every time a script fails to compile...post in script support where people actualy look.
 
Top