Sythen
Sorceror
Regions, Custom Maps, and Moongates...
Okay I added the 'Iceland' custom (copy of tram) map and named it map32.mul and all is well... [added this info so Lord Greywolf will know what I did].
I then added a skill-stat moongate to the server and edited the script to teleport whoever goes through to Iceland. Even though I can use the '[go Iceland' command in game and get there that way as an admin.
I got a message saying: Server.Map does not recognize Iceland as a map.
So my suggested fix for this is: (and please tell me if I did this right)
I added this line to show you where I think I need to add the new maps; also I browsed through the other parts of the script and they had no more mention of the map names; trammel, felucca, ilshenar, malas, and tokuno... so I suspect that it didnt need to be touched:
//-------------------------Insert Your Custom Maps Below-------------------------//
I figure by adding the names of the new maps it will register them in the game so we can go to predefined regions and areas within them via moongates or maybe I am wrong. Any Ideas?
I added this to this thread because this has a little to do with regions and travel etc. Plus this is one of those last minute edits I had to do to make a region work. LOL You know, when you start on one big project and it ends up becoming 5 or 6 mini projects that take the same amount of time and energy.
Okay I added the 'Iceland' custom (copy of tram) map and named it map32.mul and all is well... [added this info so Lord Greywolf will know what I did].
I then added a skill-stat moongate to the server and edited the script to teleport whoever goes through to Iceland. Even though I can use the '[go Iceland' command in game and get there that way as an admin.
I got a message saying: Server.Map does not recognize Iceland as a map.
So my suggested fix for this is: (and please tell me if I did this right)
/***************************************************************************
* Map.cs
* -------------------
* begin : May 1, 2002
* copyright : (C) The RunUO Software Team
* email : [email protected]
*
* : Map.cs 159 2007-02-11 22:15:14Z asayre $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Server.Items;
using Server.Network;
using Server.Targeting;
namespace Server
{
[Flags]
public enum MapRules
{
None = 0x0000,
Internal = 0x0001, // Internal map (used for dragging, commodity deeds, etc)
FreeMovement = 0x0002, // Anyone can move over anyone else without taking stamina loss
BeneficialRestrictions = 0x0004, // Disallow performing beneficial actions on criminals/murderers
HarmfulRestrictions = 0x0008, // Disallow performing harmful actions on innocents
TrammelRules = FreeMovement | BeneficialRestrictions | HarmfulRestrictions,
FeluccaRules = None
}
public interface IPooledEnumerable : IEnumerable
{
void Free();
}
public interface IPooledEnumerator : IEnumerator
{
IPooledEnumerable Enumerable{ get; set; }
void Free();
}
[Parsable]
//[CustomEnum( new string[]{ "Felucca", "Trammel", "Ilshenar", "Malas", "Tokuno", "Internal" } )]
public sealed class Map : IComparable, IComparable<Map>
{
public const int SectorSize = 16;
public const int SectorShift = 4;
public static int SectorActiveRange = 2;
private static Map[] m_Maps = new Map[0x100];
public static Map[] Maps { get { return m_Maps; } }
public static Map Felucca { get { return m_Maps[0]; } }
public static Map Trammel { get { return m_Maps[1]; } }
public static Map Ilshenar { get { return m_Maps[2]; } }
public static Map Malas { get { return m_Maps[3]; } }
public static Map Tokuno { get { return m_Maps[4]; } }
//-------------------------Insert Your Custom Maps Below-------------------------//
//i.e, public static Map Iceland { get { return m_Maps[32]; } }//
//-------------------------------------------------------------------------------//
public static Map Internal { get { return m_Maps[0x7F]; } }
private static List<Map> m_AllMaps = new List<Map>();
public static List<Map> AllMaps { get { return m_AllMaps; } }
private int m_MapID, m_MapIndex, m_FileIndex;
private int m_Width, m_Height;
private int m_SectorsWidth, m_SectorsHeight;
private int m_Season;
private Dictionary<string, Region> m_Regions;
private Region m_DefaultRegion;
public int Season { get { return m_Season; } set { m_Season = value; } }
I added this line to show you where I think I need to add the new maps; also I browsed through the other parts of the script and they had no more mention of the map names; trammel, felucca, ilshenar, malas, and tokuno... so I suspect that it didnt need to be touched:
//-------------------------Insert Your Custom Maps Below-------------------------//
I figure by adding the names of the new maps it will register them in the game so we can go to predefined regions and areas within them via moongates or maybe I am wrong. Any Ideas?
I added this to this thread because this has a little to do with regions and travel etc. Plus this is one of those last minute edits I had to do to make a region work. LOL You know, when you start on one big project and it ends up becoming 5 or 6 mini projects that take the same amount of time and energy.