bala1412
Member
- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
The above script is the TwistedWealdTeleporters.cs script. The teleporter items in the script above are only allowed to enter after receiving a quest called "DreadhornQuest". What I want is to know how to be able to enter forever when I complete some quest and not while I'm getting a quest. For example, the teleporter B is currently unavailable, but I would like to know how to be able to enter forever once I complete the specific request given by the NPC A.using System;
using Server.Engines.Quests;
using Server.Mobiles;
namespace Server.Items
{
public class TwistedWealdTele : Teleporter
{
[Constructable]
public TwistedWealdTele()
: base(new Point3D(2189, 1253, 0), Map.Ilshenar)
{
}
public TwistedWealdTele(Serial serial)
: base(serial)
{
}
public override bool OnMoveOver(Mobile m)
{
if (m.NetState == null || !m.NetState.SupportsExpansion(Expansion.ML))
{
m.SendLocalizedMessage(1072608); // You must upgrade to the Mondain's Legacy expansion in order to enter here.
return true;
}
else if (!MondainsLegacy.TwistedWeald && (int)m.AccessLevel < (int)AccessLevel.GameMaster)
{
m.SendLocalizedMessage(1042753, "Twisted Weald"); // ~1_SOMETHING~ has been temporarily disabled.
return true;
}
if (m is PlayerMobile)
{
PlayerMobile player = (PlayerMobile)m;
if (QuestHelper.GetQuest(player, typeof(DreadhornQuest)) != null)
return base.OnMoveOver(m);
player.SendLocalizedMessage(1074274); // You dance in the fairy ring, but nothing happens.
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}