Full Version : expert question
xmlspawner >>Scripting Support >>expert question


<< Prev | Next >>

ArteGordon- 02-17-2006
then modify your dungeonregion.cs like

CODE

public override void OnEnter( Mobile m )
{
 if ( m is PlayerMobile && ((PlayerMobile)m).Young )
  m.SendGump( new YoungDungeonWarning() );

 if(m is PlayerMobile && m.SkillsTotal < 4660) m.MoveToWorld(location, map);
}



where you have to specify the location and map you want to move them to.

You may also have to override the OnMoveInto method for the region, but I think that OnEnter might be enough.

Greypurple- 02-17-2006
QUOTE (ArteGordon @ Feb 17 2006, 05:09 PM)
then modify your dungeonregion.cs like

CODE

public override void OnEnter( Mobile m )
{
 if ( m is PlayerMobile && ((PlayerMobile)m).Young )
  m.SendGump( new YoungDungeonWarning() );

 if(m is PlayerMobile && m.SkillsTotal < 4660) m.MoveToWorld(location, map);
}



where you have to specify the location and map you want to move them to.

You may also have to override the OnMoveInto method for the region, but I think that OnEnter might be enough.

is this true for the location?
CODE

public override void OnEnter( Mobile m )
{
 if ( m is PlayerMobile && ((PlayerMobile)m).Young )
  m.SendGump( new YoungDungeonWarning() );

 if(m is PlayerMobile && m.SkillsTotal < 4660) m.MoveToWorld(1301,1080,0, Map.Felucca);
}

ArteGordon- 02-17-2006
no, it would look like
CODE

if(m is PlayerMobile && m.SkillsTotal < 4660) m.MoveToWorld(new Point3D(1301,1080,0), m.Map);

you need to assign the map argument as well. I just stuck in the players current map, which is probably what you want anyway.