QUOTE (ArteGordon @ June 28, 2006 10:01 am) |
there was an old scripted version of it here http://runuo.com/forums/showthread.php?t=38758 but I dont know how well it worked. I know that people have done it with xmlspawners, but I dont have any links. |
CODE |
RunUO - [www.runuo.com] Version 2.0, Build 2366.971 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...failed (3 errors, 0 warnings) Errors: + doom/doomsecretroom.cs: CS1502: Line 16: The best overloaded method match for 'Server.Region.Region( string, Server.Map, int, params Server.Rectangle2D[])' has some invalid argument s CS1503: Line 16: Argument '2': cannot convert from 'string' to 'Server.Map' CS1503: Line 16: Argument '3': cannot convert from 'Server.Map' to 'int' CS0103: Line 18: The name 'LoadFromXml' does not exist in the current contex t CS0103: Line 19: The name 'Coords' does not exist in the current context CS0103: Line 20: The name 'Coords' does not exist in the current context CS0200: Line 21: Property or indexer 'Server.Region.Map' cannot be assigned to -- it is read only CS0200: Line 22: Property or indexer 'Server.Region.Priority' cannot be assi gned to -- it is read only CS0117: Line 23: 'Server.Region' does not contain a definition for 'AddRegio n' CS0117: Line 35: 'Server.Misc.DoomSecretRoom' does not contain a definition for 'Mobiles' CS0234: Line 44: The type or namespace name 'Count' does not exist in the na mespace 'Server.Mobiles' (are you missing an assembly reference?) CS0118: Line 46: 'Server.Mobiles' is a 'namespace' but is used like a 'varia ble' CS0118: Line 48: 'Server.Mobiles' is a 'namespace' but is used like a 'varia ble' CS0118: Line 48: 'Server.Mobiles' is a 'namespace' but is used like a 'varia ble' CS0117: Line 87: 'Server.Mobiles.BaseCreature' does not contain a definition for 'Controled' + doom/leverpuzzel.cs: CS0117: Line 388: 'System.Collections.Generic.Dictionary<Server.Serial,Serve r.Item>' does not contain a definition for 'Clone' + doom/PoisonRoom.cs: CS0117: Line 16: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS0117: Line 17: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS0117: Line 22: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS1502: Line 29: The best overloaded method match for 'Server.Region.Region( string, Server.Map, int, params Server.Rectangle2D[])' has some invalid argument s CS1503: Line 29: Argument '2': cannot convert from 'string' to 'Server.Map' CS1503: Line 29: Argument '3': cannot convert from 'Server.Map' to 'int' CS0103: Line 32: The name 'LoadFromXml' does not exist in the current contex t CS0200: Line 33: Property or indexer 'Server.Region.Priority' cannot be assi gned to -- it is read only CS0200: Line 34: Property or indexer 'Server.Region.Map' cannot be assigned to -- it is read only Scripts: One or more scripts failed to compile or no script files were found. - Press return to exit, or R to try again. |
CODE |
public DoomSecretRoom() : base( "", "Secret Room", Map.Malas ) { LoadFromXml = false; Coords = new ArrayList(); Coords.Add( new Rectangle2D( 465, 92, 9, 9 ) ); Map = Map.Malas; Priority = 80; Region.AddRegion( this ); } |
CODE |
public DoomSecretRoom() : base("Secret Room", Map.Malas, 80, new Rectangle2D(465, 92, 9, 9)) { Register(); } |
CODE |
public void CheckWanderer() { if ( Wanderer == null ) return; if ( this.Mobiles.Count == 0 ) { if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } for ( int i = 0; i < Mobiles.Count; ++i ) { if ( Mobiles[i] is PlayerMobile ) { if ( ((PlayerMobile)Mobiles[i]).AccessLevel == AccessLevel.Player && ((PlayerMobile)Mobiles[i]).CheckAlive() ) return; } } if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } |
CODE |
public void CheckWanderer() { if ( Wanderer == null ) return; List<Mobile> mobs = GetMobiles(); if (mobs.Count == 0) { if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } for (int i = 0; i < mobs.Count; ++i) { if (mobs[i] is PlayerMobile) { if (((PlayerMobile)mobs[i]).AccessLevel == AccessLevel.Player && ((PlayerMobile)mobs[i]).CheckAlive()) return; } } if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } |
CODE |
RunUO - [www.runuo.com] Version 2.0, Build 2366.971 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...failed (1 errors, 0 warnings) Errors: + doom/doomsecretroom.cs: CS1514: Line 16: { expected CS1513: Line 20: } 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 |
using System; using System.Collections; using Server; using Server.Items; using Server.Mobiles; using Server.Regions; using Server.Spells.Sixth; using Server.Spells.Seventh; namespace Server.Misc { public class DoomSecretRoom : Region { public static DoomSecretRoom MainRegion = new DoomSecretRoom(); public static WandererOfTheVoid Wanderer = null; public DoomSecretRoom(): base("Secret Room", Map.Malas, 80, new Rectangle2D(465, 92, 9, 9))Register(); { } public override bool OnResurrect( Mobile from ) { return false; } public void CheckWanderer() { if ( Wanderer == null ) return; List<Mobile> mobs = GetMobiles(); if (mobs.Count == 0) { if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } for (int i = 0; i < mobs.Count; ++i) { if (mobs[i] is PlayerMobile) { if (((PlayerMobile)mobs[i]).AccessLevel == AccessLevel.Player && ((PlayerMobile)mobs[i]).CheckAlive()) return; } } if ( Wanderer != null ) { if ( !Wanderer.Deleted ) Wanderer.Delete(); Wanderer = null; } } public static void Initialize() { EventSink.Disconnected += new DisconnectedEventHandler( EventSink_Disconnected ); new DoomPorter( new Point3D( 468, 92, -1 ), 6173, 696 ); new DoomPorter( new Point3D( 469, 92, -1 ), 6177, 638 ); new DoomPorter( new Point3D( 470, 92, -1 ), 6175, 133 ); new UnimportantItem(); new DoomBox(); } public static void EventSink_Disconnected( DisconnectedEventArgs e ) //done { if ( e.Mobile.Region == MainRegion && e.Mobile.AccessLevel == AccessLevel.Player ) { e.Mobile.Kill(); } } public static void GassEffect() { Point3D loc = new Point3D( 465 + Utility.Random( 1, 8 ) , 92 + Utility.Random( 1, 8 ) , 6 ); Effects.SendLocationEffect( loc, Map.Malas, 4518, 16, 1, 1166, 0 ); Effects.PlaySound( loc, Map.Malas, 0x231 ); } public override void OnEnter( Mobile m ) { if ( m is PlayerMobile || ( m is BaseCreature && ((BaseCreature)m).Controlled ) ) { DoomSecretRoomTimer t = new DoomSecretRoomTimer( m ); t.Start(); } } public override void OnExit( Mobile m ) { } public override bool OnBeginSpellCast( Mobile m, ISpell s ) { if ( s is MarkSpell || s is GateTravelSpell ) { m.SendMessage( "You can not cast that here" ); return false; } return base.OnBeginSpellCast( m, s ); } private class UnimportantItem : DeleteingItem { public UnimportantItem() : base( 7978 ) { Location = new Point3D( 467, 92, -1 ); Map = Map.Malas; Movable = false; } public UnimportantItem( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); } } private class DoomBox : DeleteingItem { public DoomBox() : base( 3712 ) { this.Map = Map.Malas; this.Location = new Point3D( 469, 96, 5 ); this.Movable = false; } public override void OnDoubleClick( Mobile from ) { if ( from.InRange( this.Location, 1 ) ) { if ( DoomSecretRoom.Wanderer != null ) return; DoomSecretRoom.Wanderer = new WandererOfTheVoid(); DoomSecretRoom.Wanderer.Location = new Point3D( 470, 96, -1 ); DoomSecretRoom.Wanderer.Map = Map.Malas; DoomSecretRoom.Wanderer.Combatant = from; } } public DoomBox( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); } } private class DoomPorter : DeleteingItem { public DoomPorter( Point3D loc, int itemID, int hue ) : base( itemID ) { Hue = hue; Location = loc; Map = Map.Malas; Movable = false; } public override bool OnMoveOver( Mobile from ) { if ( !( from is PlayerMobile ) ) return true; from.Map = Map.Malas; from.Location = new Point3D( 349, 176, 14 ); return false; } public DoomPorter( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); } } private class DoomSecretRoomTimer : Timer { private Mobile from; private int Count; private int DoPoison = 0; public DoomSecretRoomTimer( Mobile m ) : base( TimeSpan.FromSeconds( 0 ), TimeSpan.FromSeconds( 2.5 ) ) { from = m; Count = 0; DoPoison = 0; } protected override void OnTick() { Count++; if ( from == null || from.Region != DoomSecretRoom.MainRegion || !from.CheckAlive() || from.AccessLevel != AccessLevel.Player ) { this.Stop(); DoomSecretRoom.MainRegion.CheckWanderer(); return; } int MainCounts = Count/24; Poison PoisonLevel = null; if ( MainCounts < 1 ) PoisonLevel = Poison.Lesser; else if ( MainCounts < 2 ) PoisonLevel = Poison.Regular; else if ( MainCounts < 3 ) PoisonLevel = Poison.Greater; else if ( MainCounts < 4 ) PoisonLevel = Poison.Deadly; else PoisonLevel = Poison.Lethal; if ( DoPoison == 2 ) { GassEffect(); GassEffect(); GassEffect(); } if ( from != null && ( DoPoison == 4 || Count == 0 ) ) { if ( from.Poison == null || from.Poison.Level < PoisonLevel.Level ) { from.Poison = PoisonLevel; } GassEffect(); GassEffect(); GassEffect(); DoPoison = 0; } DoPoison++; if ( MainCounts >= 5 ) { from.Damage( 8 ); } } } } } |
CODE |
RunUO - [www.runuo.com] Version 2.0, Build 2366.971 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...failed (3 errors, 0 warnings) Errors: + doom/doomsecretroom.cs: CS0246: Line 31: The type or namespace name 'List' could not be found (are y ou missing a using directive or an assembly reference?) CS0021: Line 43: Cannot apply indexing with [] to an expression of type 'Lis t<Server.Mobile>' CS0021: Line 45: Cannot apply indexing with [] to an expression of type 'Lis t<Server.Mobile>' CS0021: Line 45: Cannot apply indexing with [] to an expression of type 'Lis t<Server.Mobile>' + doom/leverpuzzel.cs: CS0117: Line 388: 'System.Collections.Generic.Dictionary<Server.Serial,Serve r.Item>' does not contain a definition for 'Clone' + doom/PoisonRoom.cs: CS0117: Line 16: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS0117: Line 17: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS0117: Line 22: 'Server.Misc.PoisonRoomRegion' does not contain a definitio n for 'Coords' CS1502: Line 29: The best overloaded method match for 'Server.Region.Region( string, Server.Map, int, params Server.Rectangle2D[])' has some invalid argument s CS1503: Line 29: Argument '2': cannot convert from 'string' to 'Server.Map' CS1503: Line 29: Argument '3': cannot convert from 'Server.Map' to 'int' CS0103: Line 32: The name 'LoadFromXml' does not exist in the current contex t CS0200: Line 33: Property or indexer 'Server.Region.Priority' cannot be assi gned to -- it is read only CS0200: Line 34: Property or indexer 'Server.Region.Map' cannot be assigned to -- it is read only Scripts: One or more scripts failed to compile or no script files were found. - Press return to exit, or R to try again. |