Full Version : Statues in malas doom dungeon
xmlspawner >>Scripting Support >>Statues in malas doom dungeon


<< Prev | Next >>

Erica- 06-28-2006
Hi i am curious by any chance does any of your system have the statues that should be placed in doom to click switches and a rock falls on you then it teleports you to lamp room this is done with 5 players when they stand on the tiles any clue heres 2 images of what im talking about Thank You.

user posted image

user posted image

olsyke- 06-28-2006

hm i guess youre not searching for the actual statue, but for the "mechanism" to react on the 5 people standing in their places

this can actually be pretty easily done with xmlspawner but i doubt there is a premade system for exactly that matter


so my suggestion would be you install the latest xmlspawner on your system and with the help of this community learn to set up a simple task like that.


allong the way youll find out how unlimited the posibillitys of xmlspawners are and how to simply but effectivly put interactivity to your shard.










Erica- 06-28-2006
im already using xml spawner 2 and those statues talk when you get the puzzle wrong with the 5 players one stands in the middle of the tile which would be the thief and the other 4 players start hitting the switch if you hit the switches wrong rocks fall on top of every player get certain damage then you try again on switches the statues gives you hints the statues spread words to give hints out once you hit the switches the right way in order the thief in the middle gets teleport to the lamp room .*PS* i also got and osi account active 6 years and ive done this on osi lots of times.

ArteGordon- 06-28-2006
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.

Erica- 06-28-2006
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.

I tryed that ArteGordon just dont complie with 2.0 svn runuo that im running get lots of errors i do know it complies with 1.0 which i had it on it and works great just like osi.

ArteGordon- 06-28-2006
I'm sure the conversion wouldnt be hard. Just post the errors you are getting.

Erica- 06-28-2006
Ok heres the errors i got its 3 errors
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.





Also if you need me to rar the scripts so you can see it let me know.

Erica- 06-28-2006
Also i fixed the part that says controled dont exist to controlled but still getting 3 errors you will see it say controled dont exist on the errors but that part i fixed.

ArteGordon- 06-29-2006
The way regions are handled has changed significantly in 2.0 so that will require more extensive code modifications. You will have to post those scripts.

Erica- 06-29-2006
ok here are the scripts there are 3 of them.

ArteGordon- 06-29-2006
try adding this change. In doomsecretroom.cs

replace this

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 );
 }


with this


CODE

 public DoomSecretRoom()
  : base("Secret Room", Map.Malas, 80, new Rectangle2D(465, 92, 9, 9))
 {
  Register();
 }


and in this block of code

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;
  }
 }


the references to the Mobiles array should be replaced by GetMobiles()
like this

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;
  }
 }

Erica- 06-29-2006
Ok did what you said and got this error
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.





Heres the script i edited the way you said
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 );
   }
  }
 }
}
}

Erica- 06-29-2006
was 2 took out on thread.

ArteGordon- 06-29-2006
you put this in the wrong place

Register();

look at the earlier post again.

Erica- 06-29-2006
Ok changed to where it goes now i get 3 errors
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.