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


<< Prev | Next >>

ArteGordon- 06-29-2006
add

using System.Collections.Generic;

to the beginning of the script.

also, you are going to need to make this change in poisonroom.cs

CODE

namespace Server.Misc
{
public class PoisonRoom
{
 public PoisonRoomRegion MainRegion;
 public PoisonRoom( int StartX, int StartY, int EndX, int EndY, Map map, string name )
 {
  MainRegion = new PoisonRoomRegion( name, map, this, new Rectangle2D( new Point2D( StartX, StartY ), new Point2D( EndX, EndY ) )  );
 }
}

public class PoisonRoomRegion : Region
{
 public PoisonRoom Room;
 public PoisonRoomRegion( string name, Map map, PoisonRoom room, Rectangle2D area ) : base( name, map, 51, area )
 {
  Room = room;
 }


and in leverpuzzel.cs just get rid of this

CODE

  foreach ( Item tem in ((Hashtable)World.Items.Clone()).Values )
  {
   if ( tem.Map == null )
    World.RemoveItem( tem );
  }




Erica- 06-29-2006
ok we are down 2 to errors now with putting that in the script you told me in doomsecretroom heres the 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 (2 errors, 0 warnings)
Errors:
+ 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.




ArteGordon- 06-29-2006
see previous post for additional changes

Erica- 06-29-2006
Down to one error here it is
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/PoisonRoom.cs:
   CS1513: Line 65: } expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.



ArteGordon- 06-29-2006
there is a syntax error. You will need to post the script.

Erica- 06-29-2006
Ok heres the script
CODE
using System;
using System.Collections;
using Server;
using Server.Regions;
using Server.Spells.Sixth;
using Server.Spells.Seventh;
using System.Collections.Generic;
namespace Server.Misc
{
namespace Server.Misc
     {
     public class PoisonRoom
     {
     public PoisonRoomRegion MainRegion;
     public PoisonRoom( int StartX, int StartY, int EndX, int EndY, Map map, string name )
     {
      MainRegion = new PoisonRoomRegion( name, map, this, new Rectangle2D( new Point2D( StartX, StartY ), new Point2D( EndX, EndY ) )  );
     }
 }

 public class PoisonRoomRegion : Region
 {
  public PoisonRoom Room;
  public PoisonRoomRegion( string name, Map map, PoisonRoom room, Rectangle2D area ) : base( name, map, 51, area )
  {
   Room = room;
  }
       
 public override void OnEnter( Mobile m )
 {
  PoisonRoomRegionTimer t = new PoisonRoomRegionTimer( m );
  t.Start();
 }

 public override void OnExit( Mobile m )
 {
 }

 public override bool OnResurrect( Mobile from )
 {
  return false;
 }

 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 PoisonRoomRegionTimer : Timer
 {
  public PoisonRoomRegionTimer( Mobile from ) : base( TimeSpan.FromSeconds( 1 ) )
  {
  }

  protected override void OnTick()
  {
  }
 }
}
}

ArteGordon- 06-29-2006
CODE

namespace Server.Misc
{
namespace Server.Misc
    {


that is wrong. it should be

CODE

namespace Server.Misc
{

Erica- 06-29-2006
ok its compling ill see if it works .

Erica- 06-29-2006
Wow awesome thanks complies and works thank you ArteGordon for spending time on helping me fix this.