fix: Codegens more quest entities (#1538)
This commit is contained in:
parent
0086d674e7
commit
0018901a79
114 changed files with 4087 additions and 4867 deletions
|
|
@ -1,218 +1,154 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ambitious
|
||||
namespace Server.Engines.Quests.Ambitious;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public abstract partial class BaseAmbitiousSolenQueen : BaseQuester
|
||||
{
|
||||
public abstract class BaseAmbitiousSolenQueen : BaseQuester
|
||||
public BaseAmbitiousSolenQueen()
|
||||
{
|
||||
public BaseAmbitiousSolenQueen()
|
||||
}
|
||||
|
||||
public abstract bool RedSolen { get; }
|
||||
public override string DefaultName => "an ambitious solen queen";
|
||||
public override bool DisallowAllMoves => false;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
Body = 0x30F;
|
||||
|
||||
if (!RedSolen)
|
||||
{
|
||||
Hue = 0x453;
|
||||
}
|
||||
|
||||
public BaseAmbitiousSolenQueen(Serial serial) : base(serial)
|
||||
SpeechHue = 0;
|
||||
}
|
||||
|
||||
public override int GetIdleSound() => 0x10D;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
if (player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == RedSolen)
|
||||
{
|
||||
}
|
||||
|
||||
public abstract bool RedSolen { get; }
|
||||
public override string DefaultName => "an ambitious solen queen";
|
||||
public override bool DisallowAllMoves => false;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
Body = 0x30F;
|
||||
|
||||
if (!RedSolen)
|
||||
if (qs.IsObjectiveInProgress(typeof(KillQueensObjective)))
|
||||
{
|
||||
Hue = 0x453;
|
||||
}
|
||||
|
||||
SpeechHue = 0;
|
||||
}
|
||||
|
||||
public override int GetIdleSound() => 0x10D;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
if (player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == RedSolen)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(KillQueensObjective)))
|
||||
{
|
||||
qs.AddConversation(new DuringKillQueensConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnAfterKillsObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(GatherFungiObjective)))
|
||||
{
|
||||
qs.AddConversation(new DuringFungiGatheringConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
var lastObj = qs.FindObjective<GetRewardObjective>();
|
||||
|
||||
if (lastObj?.Completed == false)
|
||||
{
|
||||
var bagOfSending = lastObj.BagOfSending;
|
||||
var powderOfTranslocation = lastObj.PowderOfTranslocation;
|
||||
var gold = lastObj.Gold;
|
||||
|
||||
AmbitiousQueenQuest.GiveRewardTo(player, ref bagOfSending, ref powderOfTranslocation, ref gold);
|
||||
|
||||
lastObj.BagOfSending = bagOfSending;
|
||||
lastObj.PowderOfTranslocation = powderOfTranslocation;
|
||||
lastObj.Gold = gold;
|
||||
|
||||
if (!bagOfSending && !powderOfTranslocation && !gold)
|
||||
{
|
||||
lastObj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(
|
||||
new FullBackpackConversation(
|
||||
false,
|
||||
lastObj.BagOfSending,
|
||||
lastObj.PowderOfTranslocation,
|
||||
lastObj.Gold
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
qs.AddConversation(new DuringKillQueensConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestSystem newQuest = new AmbitiousQueenQuest(player, RedSolen);
|
||||
QuestObjective obj = qs.FindObjective<ReturnAfterKillsObjective>();
|
||||
|
||||
if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(AmbitiousQueenQuest)))
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
newQuest.SendOffer();
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(GatherFungiObjective)))
|
||||
{
|
||||
qs.AddConversation(new DuringFungiGatheringConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
newQuest.AddConversation(new DontOfferConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
var lastObj = qs.FindObjective<GetRewardObjective>();
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
Direction = GetDirectionTo(from);
|
||||
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
if (player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == RedSolen)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<GatherFungiObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (lastObj?.Completed == false)
|
||||
{
|
||||
if (dropped is ZoogiFungus fungi)
|
||||
var bagOfSending = lastObj.BagOfSending;
|
||||
var powderOfTranslocation = lastObj.PowderOfTranslocation;
|
||||
var gold = lastObj.Gold;
|
||||
|
||||
AmbitiousQueenQuest.GiveRewardTo(player, ref bagOfSending, ref powderOfTranslocation, ref gold);
|
||||
|
||||
lastObj.BagOfSending = bagOfSending;
|
||||
lastObj.PowderOfTranslocation = powderOfTranslocation;
|
||||
lastObj.Gold = gold;
|
||||
|
||||
if (!bagOfSending && !powderOfTranslocation && !gold)
|
||||
{
|
||||
if (fungi.Amount >= 50)
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
fungi.Amount -= 50;
|
||||
|
||||
if (fungi.Amount == 0)
|
||||
{
|
||||
fungi.Delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SayTo(
|
||||
player,
|
||||
1054072
|
||||
); // Our arrangement was for 50 of the zoogi fungus. Please return to me when you have that amount.
|
||||
return false;
|
||||
lastObj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(
|
||||
new FullBackpackConversation(
|
||||
false,
|
||||
lastObj.BagOfSending,
|
||||
lastObj.PowderOfTranslocation,
|
||||
lastObj.Gold
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestSystem newQuest = new AmbitiousQueenQuest(player, RedSolen);
|
||||
|
||||
if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(AmbitiousQueenQuest)))
|
||||
{
|
||||
newQuest.SendOffer();
|
||||
}
|
||||
else
|
||||
{
|
||||
newQuest.AddConversation(new DontOfferConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
Direction = GetDirectionTo(from);
|
||||
|
||||
if (from is not PlayerMobile { Quest: AmbitiousQueenQuest qs } player || qs.RedSolen != RedSolen)
|
||||
{
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
QuestObjective obj = qs.FindObjective<GatherFungiObjective>();
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
if (obj?.Completed != false || dropped is not ZoogiFungus fungi)
|
||||
{
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class RedAmbitiousSolenQueen : BaseAmbitiousSolenQueen
|
||||
{
|
||||
[Constructible]
|
||||
public RedAmbitiousSolenQueen()
|
||||
if (fungi.Amount < 50)
|
||||
{
|
||||
// Our arrangement was for 50 of the zoogi fungus. Please return to me when you have that amount.
|
||||
SayTo(player, 1054072);
|
||||
return false;
|
||||
}
|
||||
|
||||
public RedAmbitiousSolenQueen(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
obj.Complete();
|
||||
|
||||
public override bool RedSolen => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BlackAmbitiousSolenQueen : BaseAmbitiousSolenQueen
|
||||
{
|
||||
[Constructible]
|
||||
public BlackAmbitiousSolenQueen()
|
||||
{
|
||||
}
|
||||
|
||||
public BlackAmbitiousSolenQueen(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool RedSolen => false;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
fungi.Consume(50);
|
||||
return fungi.Deleted;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class RedAmbitiousSolenQueen : BaseAmbitiousSolenQueen
|
||||
{
|
||||
[Constructible]
|
||||
public RedAmbitiousSolenQueen()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool RedSolen => true;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BlackAmbitiousSolenQueen : BaseAmbitiousSolenQueen
|
||||
{
|
||||
[Constructible]
|
||||
public BlackAmbitiousSolenQueen()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool RedSolen => false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,141 +1,116 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class EnchantedPaints : QuestItem
|
||||
{
|
||||
public class EnchantedPaints : QuestItem
|
||||
[Constructible]
|
||||
public EnchantedPaints() : base(0xFC1)
|
||||
{
|
||||
[Constructible]
|
||||
public EnchantedPaints() : base(0xFC1)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
Weight = 1.0;
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not CollectorQuest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
player.SendAsciiMessage(0x59, "Target the creature whose image you wish to create.");
|
||||
player.Target = new InternalTarget(this);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EnchantedPaints(Serial serial) : base(serial)
|
||||
from.SendLocalizedMessage(1010085); // You cannot use this.
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly EnchantedPaints m_Paints;
|
||||
|
||||
public InternalTarget(EnchantedPaints paints) : base(-1, false, TargetFlags.None)
|
||||
{
|
||||
CheckLOS = false;
|
||||
m_Paints = paints;
|
||||
}
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not CollectorQuest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Paints.Deleted || !m_Paints.IsChildOf(from.Backpack))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
if (qs is not CollectorQuest)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
player.SendAsciiMessage(0x59, "Target the creature whose image you wish to create.");
|
||||
player.Target = new InternalTarget(this);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
var obj = qs.FindObjective<CaptureImagesObjective>();
|
||||
|
||||
if (obj?.Completed != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targeted is Mobile)
|
||||
{
|
||||
var response = obj.CaptureImage(
|
||||
targeted is GreaterMongbat ? typeof(Mongbat) : targeted.GetType(),
|
||||
out var image
|
||||
);
|
||||
|
||||
switch (response)
|
||||
{
|
||||
case CaptureResponse.Valid:
|
||||
{
|
||||
// The enchanted paints swirl for a moment then an image begins to take shape. *Click*
|
||||
player.SendLocalizedMessage(1055125);
|
||||
player.AddToBackpack(new PaintedImage(image));
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.AlreadyDone:
|
||||
{
|
||||
player.SendAsciiMessage(0x2C, "You have already captured the image of this creature");
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.Invalid:
|
||||
{
|
||||
// You have no interest in capturing the image of this creature.
|
||||
player.SendLocalizedMessage(1055124);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendAsciiMessage(0x35, "You have no interest in that.");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1010085); // You cannot use this.
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly EnchantedPaints m_Paints;
|
||||
|
||||
public InternalTarget(EnchantedPaints paints) : base(-1, false, TargetFlags.None)
|
||||
{
|
||||
CheckLOS = false;
|
||||
m_Paints = paints;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Paints.Deleted || !m_Paints.IsChildOf(from.Backpack))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is not CollectorQuest)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = qs.FindObjective<CaptureImagesObjective>();
|
||||
|
||||
if (obj?.Completed != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targeted is Mobile)
|
||||
{
|
||||
var response = obj.CaptureImage(
|
||||
targeted.GetType().Name == "GreaterMongbat"
|
||||
? new Mongbat().GetType()
|
||||
: targeted.GetType(),
|
||||
out var image
|
||||
);
|
||||
|
||||
switch (response)
|
||||
{
|
||||
case CaptureResponse.Valid:
|
||||
{
|
||||
player.SendLocalizedMessage(
|
||||
1055125
|
||||
); // The enchanted paints swirl for a moment then an image begins to take shape. *Click*
|
||||
player.AddToBackpack(new PaintedImage(image));
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.AlreadyDone:
|
||||
{
|
||||
player.SendAsciiMessage(
|
||||
0x2C,
|
||||
"You have already captured the image of this creature"
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.Invalid:
|
||||
{
|
||||
player.SendLocalizedMessage(
|
||||
1055124
|
||||
); // You have no interest in capturing the image of this creature.
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendAsciiMessage(0x35, "You have no interest in that.");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1010085); // You cannot use this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,104 +1,103 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
public enum ImageType
|
||||
{
|
||||
public enum ImageType
|
||||
{
|
||||
Betrayer,
|
||||
Bogling,
|
||||
BogThing,
|
||||
Gazer,
|
||||
Beetle,
|
||||
GiantBlackWidow,
|
||||
Scorpion,
|
||||
JukaMage,
|
||||
JukaWarrior,
|
||||
Lich,
|
||||
MeerMage,
|
||||
MeerWarrior,
|
||||
Mongbat,
|
||||
Mummy,
|
||||
Pixie,
|
||||
PlagueBeast,
|
||||
SandVortex,
|
||||
StoneGargoyle,
|
||||
SwampDragon,
|
||||
Wisp,
|
||||
Juggernaut
|
||||
}
|
||||
|
||||
public class ImageTypeInfo
|
||||
{
|
||||
private static readonly ImageTypeInfo[] m_Table =
|
||||
{
|
||||
new(9734, typeof(Betrayer), 75, 45),
|
||||
new(9735, typeof(Bogling), 75, 45),
|
||||
new(9736, typeof(BogThing), 60, 47),
|
||||
new(9615, typeof(Gazer), 75, 45),
|
||||
new(9743, typeof(Beetle), 60, 55),
|
||||
new(9667, typeof(GiantBlackWidow), 55, 52),
|
||||
new(9657, typeof(Scorpion), 65, 47),
|
||||
new(9758, typeof(JukaMage), 75, 45),
|
||||
new(9759, typeof(JukaWarrior), 75, 45),
|
||||
new(9636, typeof(Lich), 75, 45),
|
||||
new(9756, typeof(MeerMage), 75, 45),
|
||||
new(9757, typeof(MeerWarrior), 75, 45),
|
||||
new(9638, typeof(Mongbat), 70, 50),
|
||||
new(9639, typeof(Mummy), 75, 45),
|
||||
new(9654, typeof(Pixie), 75, 45),
|
||||
new(9747, typeof(PlagueBeast), 60, 45),
|
||||
new(9750, typeof(SandVortex), 60, 43),
|
||||
new(9614, typeof(StoneGargoyle), 75, 45),
|
||||
new(9753, typeof(SwampDragon), 50, 55),
|
||||
new(8448, typeof(Wisp), 75, 45),
|
||||
new(9746, typeof(Juggernaut), 55, 38)
|
||||
};
|
||||
|
||||
public ImageTypeInfo(int figurine, Type type, int x, int y)
|
||||
{
|
||||
Figurine = figurine;
|
||||
Type = type;
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
|
||||
public int Figurine { get; }
|
||||
|
||||
public Type Type { get; }
|
||||
|
||||
public int Name => Figurine < 0x4000 ? 1020000 + Figurine : 1078872 + Figurine;
|
||||
public int X { get; }
|
||||
public int Y { get; }
|
||||
|
||||
public static ImageTypeInfo Get(ImageType image)
|
||||
{
|
||||
var index = (int)image;
|
||||
return m_Table[index >= 0 && index < m_Table.Length ? index : 0];
|
||||
}
|
||||
|
||||
public static ImageType[] RandomList(int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
{
|
||||
return Array.Empty<ImageType>();
|
||||
}
|
||||
|
||||
var length = m_Table.Length;
|
||||
Span<bool> list = stackalloc bool[length];
|
||||
var imageTypes = new ImageType[count];
|
||||
|
||||
var i = 0;
|
||||
do
|
||||
{
|
||||
var rand = Utility.Random(length);
|
||||
if (!(list[rand] && (list[rand] = true)))
|
||||
{
|
||||
imageTypes[i++] = (ImageType)rand;
|
||||
}
|
||||
} while (i < count);
|
||||
|
||||
return imageTypes;
|
||||
}
|
||||
}
|
||||
Betrayer,
|
||||
Bogling,
|
||||
BogThing,
|
||||
Gazer,
|
||||
Beetle,
|
||||
GiantBlackWidow,
|
||||
Scorpion,
|
||||
JukaMage,
|
||||
JukaWarrior,
|
||||
Lich,
|
||||
MeerMage,
|
||||
MeerWarrior,
|
||||
Mongbat,
|
||||
Mummy,
|
||||
Pixie,
|
||||
PlagueBeast,
|
||||
SandVortex,
|
||||
StoneGargoyle,
|
||||
SwampDragon,
|
||||
Wisp,
|
||||
Juggernaut
|
||||
}
|
||||
|
||||
public class ImageTypeInfo
|
||||
{
|
||||
private static readonly ImageTypeInfo[] m_Table =
|
||||
{
|
||||
new(9734, typeof(Betrayer), 75, 45),
|
||||
new(9735, typeof(Bogling), 75, 45),
|
||||
new(9736, typeof(BogThing), 60, 47),
|
||||
new(9615, typeof(Gazer), 75, 45),
|
||||
new(9743, typeof(Beetle), 60, 55),
|
||||
new(9667, typeof(GiantBlackWidow), 55, 52),
|
||||
new(9657, typeof(Scorpion), 65, 47),
|
||||
new(9758, typeof(JukaMage), 75, 45),
|
||||
new(9759, typeof(JukaWarrior), 75, 45),
|
||||
new(9636, typeof(Lich), 75, 45),
|
||||
new(9756, typeof(MeerMage), 75, 45),
|
||||
new(9757, typeof(MeerWarrior), 75, 45),
|
||||
new(9638, typeof(Mongbat), 70, 50),
|
||||
new(9639, typeof(Mummy), 75, 45),
|
||||
new(9654, typeof(Pixie), 75, 45),
|
||||
new(9747, typeof(PlagueBeast), 60, 45),
|
||||
new(9750, typeof(SandVortex), 60, 43),
|
||||
new(9614, typeof(StoneGargoyle), 75, 45),
|
||||
new(9753, typeof(SwampDragon), 50, 55),
|
||||
new(8448, typeof(Wisp), 75, 45),
|
||||
new(9746, typeof(Juggernaut), 55, 38)
|
||||
};
|
||||
|
||||
public ImageTypeInfo(int figurine, Type type, int x, int y)
|
||||
{
|
||||
Figurine = figurine;
|
||||
Type = type;
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
|
||||
public int Figurine { get; }
|
||||
|
||||
public Type Type { get; }
|
||||
|
||||
public int Name => Figurine < 0x4000 ? 1020000 + Figurine : 1078872 + Figurine;
|
||||
public int X { get; }
|
||||
public int Y { get; }
|
||||
|
||||
public static ImageTypeInfo Get(ImageType image)
|
||||
{
|
||||
var index = (int)image;
|
||||
return m_Table[index >= 0 && index < m_Table.Length ? index : 0];
|
||||
}
|
||||
|
||||
public static ImageType[] RandomList(int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
{
|
||||
return Array.Empty<ImageType>();
|
||||
}
|
||||
|
||||
var length = m_Table.Length;
|
||||
Span<bool> list = stackalloc bool[length];
|
||||
var imageTypes = new ImageType[count];
|
||||
|
||||
var i = 0;
|
||||
do
|
||||
{
|
||||
var rand = Utility.Random(length);
|
||||
if (!(list[rand] && (list[rand] = true)))
|
||||
{
|
||||
imageTypes[i++] = (ImageType)rand;
|
||||
}
|
||||
} while (i < count);
|
||||
|
||||
return imageTypes;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,313 +1,271 @@
|
|||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
using Server.ContextMenus;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Obsidian : Item
|
||||
{
|
||||
public class Obsidian : Item
|
||||
private const int Partial = 2;
|
||||
private const int Completed = 10;
|
||||
|
||||
private static readonly string[] _names =
|
||||
{
|
||||
private const int m_Partial = 2;
|
||||
private const int m_Completed = 10;
|
||||
null,
|
||||
"an aggressive cavalier",
|
||||
"a beguiling rogue",
|
||||
"a benevolent physician",
|
||||
"a brilliant artisan",
|
||||
"a capricious adventurer",
|
||||
"a clever beggar",
|
||||
"a convincing charlatan",
|
||||
"a creative inventor",
|
||||
"a creative tinker",
|
||||
"a cunning knave",
|
||||
"a dauntless explorer",
|
||||
"a despicable ruffian",
|
||||
"an earnest malcontent",
|
||||
"an exultant animal tamer",
|
||||
"a famed adventurer",
|
||||
"a fanatical crusader",
|
||||
"a fastidious clerk",
|
||||
"a fearless hunter",
|
||||
"a festive harlequin",
|
||||
"a fidgety assassin",
|
||||
"a fierce soldier",
|
||||
"a fierce warrior",
|
||||
"a frugal magnate",
|
||||
"a glib pundit",
|
||||
"a gnomic shaman",
|
||||
"a graceful noblewoman",
|
||||
"a idiotic madman",
|
||||
"a imaginative designer",
|
||||
"an inept conjurer",
|
||||
"an innovative architect",
|
||||
"an inventive blacksmith",
|
||||
"a judicious mayor",
|
||||
"a masterful chef",
|
||||
"a masterful woodworker",
|
||||
"a melancholy clown",
|
||||
"a melodic bard",
|
||||
"a merciful guard",
|
||||
"a mirthful jester",
|
||||
"a nervous surgeon",
|
||||
"a peaceful scholar",
|
||||
"a prolific gardener",
|
||||
"a quixotic knight",
|
||||
"a regal aristocrat",
|
||||
"a resourceful smith",
|
||||
"a reticent alchemist",
|
||||
"a sanctified priest",
|
||||
"a scheming patrician",
|
||||
"a shrewd mage",
|
||||
"a singing minstrel",
|
||||
"a skilled tailor",
|
||||
"a squeamish assassin",
|
||||
"a stoic swordsman",
|
||||
"a studious scribe",
|
||||
"a thought provoking writer",
|
||||
"a treacherous scoundrel",
|
||||
"a troubled poet",
|
||||
"an unflappable wizard",
|
||||
"a valiant warrior",
|
||||
"a wayward fool"
|
||||
};
|
||||
|
||||
private static readonly string[] m_Names =
|
||||
[InvalidateProperties]
|
||||
[SerializableField(1)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private string _statueName;
|
||||
|
||||
[Constructible]
|
||||
public Obsidian() : base(0x1EA7)
|
||||
{
|
||||
Hue = 0x497;
|
||||
|
||||
_quantity = 1;
|
||||
_statueName = "";
|
||||
}
|
||||
|
||||
[EncodedInt]
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Quantity
|
||||
{
|
||||
get => _quantity;
|
||||
set
|
||||
{
|
||||
null,
|
||||
"an aggressive cavalier",
|
||||
"a beguiling rogue",
|
||||
"a benevolent physician",
|
||||
"a brilliant artisan",
|
||||
"a capricious adventurer",
|
||||
"a clever beggar",
|
||||
"a convincing charlatan",
|
||||
"a creative inventor",
|
||||
"a creative tinker",
|
||||
"a cunning knave",
|
||||
"a dauntless explorer",
|
||||
"a despicable ruffian",
|
||||
"an earnest malcontent",
|
||||
"an exultant animal tamer",
|
||||
"a famed adventurer",
|
||||
"a fanatical crusader",
|
||||
"a fastidious clerk",
|
||||
"a fearless hunter",
|
||||
"a festive harlequin",
|
||||
"a fidgety assassin",
|
||||
"a fierce soldier",
|
||||
"a fierce warrior",
|
||||
"a frugal magnate",
|
||||
"a glib pundit",
|
||||
"a gnomic shaman",
|
||||
"a graceful noblewoman",
|
||||
"a idiotic madman",
|
||||
"a imaginative designer",
|
||||
"an inept conjurer",
|
||||
"an innovative architect",
|
||||
"an inventive blacksmith",
|
||||
"a judicious mayor",
|
||||
"a masterful chef",
|
||||
"a masterful woodworker",
|
||||
"a melancholy clown",
|
||||
"a melodic bard",
|
||||
"a merciful guard",
|
||||
"a mirthful jester",
|
||||
"a nervous surgeon",
|
||||
"a peaceful scholar",
|
||||
"a prolific gardener",
|
||||
"a quixotic knight",
|
||||
"a regal aristocrat",
|
||||
"a resourceful smith",
|
||||
"a reticent alchemist",
|
||||
"a sanctified priest",
|
||||
"a scheming patrician",
|
||||
"a shrewd mage",
|
||||
"a singing minstrel",
|
||||
"a skilled tailor",
|
||||
"a squeamish assassin",
|
||||
"a stoic swordsman",
|
||||
"a studious scribe",
|
||||
"a thought provoking writer",
|
||||
"a treacherous scoundrel",
|
||||
"a troubled poet",
|
||||
"an unflappable wizard",
|
||||
"a valiant warrior",
|
||||
"a wayward fool"
|
||||
};
|
||||
|
||||
private int m_Quantity;
|
||||
private string m_StatueName;
|
||||
|
||||
[Constructible]
|
||||
public Obsidian() : base(0x1EA7)
|
||||
{
|
||||
Hue = 0x497;
|
||||
|
||||
m_Quantity = 1;
|
||||
m_StatueName = "";
|
||||
}
|
||||
|
||||
public Obsidian(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Quantity
|
||||
{
|
||||
get => m_Quantity;
|
||||
set
|
||||
_quantity = value switch
|
||||
{
|
||||
if (value <= 1)
|
||||
{
|
||||
m_Quantity = 1;
|
||||
}
|
||||
else if (value >= m_Completed)
|
||||
{
|
||||
m_Quantity = m_Completed;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Quantity = value;
|
||||
}
|
||||
<= 1 => 1,
|
||||
>= Completed => Completed,
|
||||
_ => value
|
||||
};
|
||||
|
||||
if (m_Quantity < m_Partial)
|
||||
{
|
||||
ItemID = 0x1EA7;
|
||||
}
|
||||
else if (m_Quantity < m_Completed)
|
||||
{
|
||||
ItemID = 0x1F13;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID = 0x12CB;
|
||||
}
|
||||
ItemID = _quantity switch
|
||||
{
|
||||
< Partial => 0x1EA7,
|
||||
< Completed => 0x1F13,
|
||||
_ => 0x12CB
|
||||
};
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
InvalidateProperties();
|
||||
this.MarkDirty();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string StatueName
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public static string RandomName(Mobile from) => _names.RandomElement() ?? from.Name;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (_quantity < Partial)
|
||||
{
|
||||
get => m_StatueName;
|
||||
set
|
||||
{
|
||||
m_StatueName = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
list.Add(1055137); // a section of an obsidian statue
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public static string RandomName(Mobile from) => m_Names.RandomElement() ?? from.Name;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
else if (_quantity < Completed)
|
||||
{
|
||||
if (m_Quantity < m_Partial)
|
||||
list.Add(1055138); // a partially reconstructed obsidian statue
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1055139, _statueName); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
if (_quantity < Partial)
|
||||
{
|
||||
LabelTo(from, 1055137); // a section of an obsidian statue
|
||||
}
|
||||
else if (_quantity < Completed)
|
||||
{
|
||||
LabelTo(from, 1055138); // a partially reconstructed obsidian statue
|
||||
}
|
||||
else
|
||||
{
|
||||
LabelTo(from, 1055139, _statueName); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive && _quantity is >= Partial and < Completed && IsChildOf(from.Backpack))
|
||||
{
|
||||
list.Add(new DisassembleEntry(this));
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (_quantity < Completed)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
list.Add(1055137); // a section of an obsidian statue
|
||||
}
|
||||
else if (m_Quantity < m_Completed)
|
||||
{
|
||||
list.Add(1055138); // a partially reconstructed obsidian statue
|
||||
// Nothing Happens.
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Regular, 0x2C, 3, 500309);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1055139, m_StatueName); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
if (m_Quantity < m_Partial)
|
||||
{
|
||||
LabelTo(from, 1055137); // a section of an obsidian statue
|
||||
}
|
||||
else if (m_Quantity < m_Completed)
|
||||
{
|
||||
LabelTo(from, 1055138); // a partially reconstructed obsidian statue
|
||||
}
|
||||
else
|
||||
{
|
||||
LabelTo(from, 1055139, m_StatueName); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive && m_Quantity >= m_Partial && m_Quantity < m_Completed && IsChildOf(from.Backpack))
|
||||
{
|
||||
list.Add(new DisassembleEntry(this));
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_Quantity < m_Completed)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.NetState.SendMessageLocalized(
|
||||
Serial,
|
||||
ItemID,
|
||||
MessageType.Regular,
|
||||
0x2C,
|
||||
3,
|
||||
500309
|
||||
); // Nothing Happens.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.WriteEncodedInt(m_Quantity);
|
||||
writer.Write(m_StatueName);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
m_Quantity = reader.ReadEncodedInt();
|
||||
m_StatueName = reader.ReadString().Intern();
|
||||
}
|
||||
|
||||
private class DisassembleEntry : ContextMenuEntry
|
||||
{
|
||||
private readonly Obsidian m_Obsidian;
|
||||
|
||||
public DisassembleEntry(Obsidian obsidian) : base(6142) => m_Obsidian = obsidian;
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
var from = Owner.From;
|
||||
if (!m_Obsidian.Deleted && m_Obsidian.Quantity >= m_Partial && m_Obsidian.Quantity < m_Completed &&
|
||||
m_Obsidian.IsChildOf(from.Backpack) && from.CheckAlive())
|
||||
{
|
||||
for (var i = 0; i < m_Obsidian.Quantity - 1; i++)
|
||||
{
|
||||
from.AddToBackpack(new Obsidian());
|
||||
}
|
||||
|
||||
m_Obsidian.Quantity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly Obsidian m_Obsidian;
|
||||
|
||||
public InternalTarget(Obsidian obsidian) : base(-1, false, TargetFlags.None) => m_Obsidian = obsidian;
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Obsidian.Deleted || m_Obsidian.Quantity >= m_Completed || targeted is not Item targ)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Obsidian.IsChildOf(from.Backpack) && targ.IsChildOf(from.Backpack) && targ is Obsidian targObsidian &&
|
||||
targ != m_Obsidian)
|
||||
{
|
||||
if (targObsidian.Quantity < m_Completed)
|
||||
{
|
||||
if (targObsidian.Quantity + m_Obsidian.Quantity <= m_Completed)
|
||||
{
|
||||
targObsidian.Quantity += m_Obsidian.Quantity;
|
||||
m_Obsidian.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
var delta = m_Completed - targObsidian.Quantity;
|
||||
targObsidian.Quantity += delta;
|
||||
m_Obsidian.Quantity -= delta;
|
||||
}
|
||||
|
||||
if (targObsidian.Quantity >= m_Completed)
|
||||
{
|
||||
targObsidian.StatueName = RandomName(from);
|
||||
}
|
||||
|
||||
from.NetState.SendMessage(
|
||||
targObsidian.Serial,
|
||||
targObsidian.ItemID,
|
||||
MessageType.Regular,
|
||||
0x59,
|
||||
3,
|
||||
true,
|
||||
null,
|
||||
m_Obsidian.Name,
|
||||
"Something Happened."
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.NetState.SendMessageLocalized(
|
||||
m_Obsidian.Serial,
|
||||
m_Obsidian.ItemID,
|
||||
MessageType.Regular,
|
||||
0x2C,
|
||||
3,
|
||||
500309,
|
||||
m_Obsidian.Name
|
||||
); // Nothing Happens.
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
_statueName?.Intern();
|
||||
}
|
||||
|
||||
private class DisassembleEntry : ContextMenuEntry
|
||||
{
|
||||
private readonly Obsidian _obsidian;
|
||||
|
||||
public DisassembleEntry(Obsidian obsidian) : base(6142) => _obsidian = obsidian;
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
var from = Owner.From;
|
||||
if (!_obsidian.Deleted && _obsidian.Quantity >= Partial && _obsidian.Quantity < Completed &&
|
||||
_obsidian.IsChildOf(from.Backpack) && from.CheckAlive())
|
||||
{
|
||||
for (var i = 0; i < _obsidian.Quantity - 1; i++)
|
||||
{
|
||||
from.AddToBackpack(new Obsidian());
|
||||
}
|
||||
|
||||
_obsidian.Quantity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly Obsidian _obsidian;
|
||||
|
||||
public InternalTarget(Obsidian obsidian) : base(-1, false, TargetFlags.None) => _obsidian = obsidian;
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (_obsidian.Deleted || _obsidian.Quantity >= Completed || targeted is not Item targ)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_obsidian.IsChildOf(from.Backpack) && targ.IsChildOf(from.Backpack) && targ is Obsidian targObsidian &&
|
||||
targ != _obsidian)
|
||||
{
|
||||
if (targObsidian.Quantity < Completed)
|
||||
{
|
||||
if (targObsidian.Quantity + _obsidian.Quantity <= Completed)
|
||||
{
|
||||
targObsidian.Quantity += _obsidian.Quantity;
|
||||
_obsidian.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
var delta = Completed - targObsidian.Quantity;
|
||||
targObsidian.Quantity += delta;
|
||||
_obsidian.Quantity -= delta;
|
||||
}
|
||||
|
||||
if (targObsidian.Quantity >= Completed)
|
||||
{
|
||||
targObsidian.StatueName = RandomName(from);
|
||||
}
|
||||
|
||||
from.NetState.SendMessage(
|
||||
targObsidian.Serial,
|
||||
targObsidian.ItemID,
|
||||
MessageType.Regular,
|
||||
0x59,
|
||||
3,
|
||||
true,
|
||||
null,
|
||||
_obsidian.Name,
|
||||
"Something Happened."
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.NetState.SendMessageLocalized(_obsidian.Serial,
|
||||
_obsidian.ItemID,
|
||||
MessageType.Regular,
|
||||
0x2C,
|
||||
3,
|
||||
500309, // Nothing Happens.
|
||||
_obsidian.Name
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,87 +1,58 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class PaintedImage : Item
|
||||
{
|
||||
public class PaintedImage : Item
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private ImageType _image;
|
||||
|
||||
[Constructible]
|
||||
public PaintedImage(ImageType image) : base(0xFF3)
|
||||
{
|
||||
private ImageType m_Image;
|
||||
Weight = 1.0;
|
||||
Hue = 0x8FD;
|
||||
|
||||
[Constructible]
|
||||
public PaintedImage(ImageType image) : base(0xFF3)
|
||||
_image = image;
|
||||
}
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(_image);
|
||||
list.Add(1060847, $"{1055126:#}\t{info.Name:#}"); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(_image);
|
||||
LabelTo(from, 1060847, $"#1055126\t#{info.Name}"); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8FD;
|
||||
|
||||
m_Image = image;
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
public PaintedImage(Serial serial) : base(serial)
|
||||
from.SendGump(new InternalGump(_image));
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
public InternalGump(ImageType image) : base(75, 25)
|
||||
{
|
||||
}
|
||||
var info = ImageTypeInfo.Get(image);
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ImageType Image
|
||||
{
|
||||
get => m_Image;
|
||||
set
|
||||
{
|
||||
m_Image = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
AddBackground(45, 20, 100, 100, 0xA3C);
|
||||
AddBackground(52, 29, 86, 82, 0xBB8);
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(m_Image);
|
||||
list.Add(1060847, $"{1055126:#}\t{info.Name:#}"); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(m_Image);
|
||||
LabelTo(from, 1060847, $"#1055126\t#{info.Name}"); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendGump(new InternalGump(m_Image));
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.WriteEncodedInt((int)m_Image);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
m_Image = (ImageType)reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
public InternalGump(ImageType image) : base(75, 25)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(image);
|
||||
|
||||
AddBackground(45, 20, 100, 100, 0xA3C);
|
||||
AddBackground(52, 29, 86, 82, 0xBB8);
|
||||
|
||||
AddItem(info.X, info.Y, info.Figurine);
|
||||
}
|
||||
AddItem(info.X, info.Y, info.Figurine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,94 +1,77 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class AlbertaGiacco : BaseQuester
|
||||
{
|
||||
public class AlbertaGiacco : BaseQuester
|
||||
[Constructible]
|
||||
public AlbertaGiacco() : base("the respected painter")
|
||||
{
|
||||
[Constructible]
|
||||
public AlbertaGiacco() : base("the respected painter")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Alberta Giacco";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F2;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new Skirt(0x59B));
|
||||
AddItem(new Boots());
|
||||
AddItem(new FeatheredHat(0x59B));
|
||||
AddItem(new FullApron(0x59B));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x457;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public AlbertaGiacco(Serial serial) : base(serial)
|
||||
return qs.IsObjectiveInProgress(typeof(FindAlbertaObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
}
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
public override string DefaultName => "Alberta Giacco";
|
||||
QuestObjective obj = qs.FindObjective<FindAlbertaObjective>();
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F2;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new Skirt(0x59B));
|
||||
AddItem(new Boots());
|
||||
AddItem(new FeatheredHat(0x59B));
|
||||
AddItem(new FullApron(0x59B));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x457;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
return false;
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
return qs.IsObjectiveInProgress(typeof(FindAlbertaObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindAlbertaObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
|
||||
{
|
||||
qs.AddConversation(new AlbertaStoolConversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective)))
|
||||
{
|
||||
qs.AddConversation(new AlbertaAfterPaintingConversation());
|
||||
}
|
||||
qs.AddConversation(new AlbertaStoolConversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective)))
|
||||
{
|
||||
qs.AddConversation(new AlbertaAfterPaintingConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,146 +1,143 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ElwoodMcCarrin : BaseQuester
|
||||
{
|
||||
public class ElwoodMcCarrin : BaseQuester
|
||||
[Constructible]
|
||||
public ElwoodMcCarrin() : base("the well-known collector")
|
||||
{
|
||||
[Constructible]
|
||||
public ElwoodMcCarrin() : base("the well-known collector")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Elwood McCarrin";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83ED;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x544));
|
||||
AddItem(new Shoes(0x454));
|
||||
AddItem(new JesterHat(0x4D2));
|
||||
AddItem(new FullApron(0x4D2));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x47D;
|
||||
|
||||
FacialHairItemID = 0x2040; // Goatee
|
||||
FacialHairHue = 0x47D;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
}
|
||||
|
||||
public ElwoodMcCarrin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Elwood McCarrin";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83ED;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x544));
|
||||
AddItem(new Shoes(0x454));
|
||||
AddItem(new JesterHat(0x4D2));
|
||||
AddItem(new FullApron(0x4D2));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x47D;
|
||||
|
||||
FacialHairItemID = 0x2040; // Goatee
|
||||
FacialHairHue = 0x47D;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(FishPearlsObjective)))
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FishPearlsObjective)))
|
||||
qs.AddConversation(new ElwoodDuringFishConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnPearlsObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringFishConversation());
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindAlbertaObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringPainting1Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringPainting2Conversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnPearlsObjective>();
|
||||
obj = qs.FindObjective<ReturnPaintingObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindAlbertaObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindGabrielObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringPainting1Conversation());
|
||||
qs.AddConversation(new ElwoodDuringAutograph1Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringPainting2Conversation());
|
||||
qs.AddConversation(new ElwoodDuringAutograph2Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnSheetMusicObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringAutograph3Conversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnPaintingObjective>();
|
||||
obj = qs.FindObjective<ReturnAutographObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindGabrielObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindTomasObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringAutograph1Conversation());
|
||||
qs.AddConversation(new ElwoodDuringToys1Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringAutograph2Conversation());
|
||||
qs.AddConversation(new ElwoodDuringToys2Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnSheetMusicObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringAutograph3Conversation());
|
||||
qs.AddConversation(new ElwoodDuringToys3Conversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnAutographObjective>();
|
||||
obj = qs.FindObjective<ReturnToysObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindTomasObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringToys1Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringToys2Conversation());
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new ElwoodDuringToys3Conversation());
|
||||
|
||||
if (GiveReward(player))
|
||||
{
|
||||
qs.AddConversation(new EndConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new FullEndConversation(true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnToysObjective>();
|
||||
obj = qs.FindObjective<MakeRoomObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
if (GiveReward(player))
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddConversation(new EndConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new FullEndConversation(true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<MakeRoomObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
if (GiveReward(player))
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddConversation(new EndConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new FullEndConversation(false));
|
||||
}
|
||||
qs.AddConversation(new FullEndConversation(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -148,96 +145,82 @@ namespace Server.Engines.Quests.Collector
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestSystem newQuest = new CollectorQuest(player);
|
||||
|
||||
if (qs == null && QuestSystem.CanOfferQuest(player, typeof(CollectorQuest)))
|
||||
{
|
||||
newQuest.SendOffer();
|
||||
}
|
||||
else
|
||||
{
|
||||
newQuest.AddConversation(new DontOfferConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool GiveReward(Mobile to)
|
||||
else
|
||||
{
|
||||
var bag = new Bag();
|
||||
QuestSystem newQuest = new CollectorQuest(player);
|
||||
|
||||
bag.DropItem(new Gold(Utility.RandomMinMax(500, 1000)));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
if (qs == null && QuestSystem.CanOfferQuest(player, typeof(CollectorQuest)))
|
||||
{
|
||||
var weapon = Loot.RandomWeapon();
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 2, 20, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 3);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 3);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 3);
|
||||
}
|
||||
|
||||
bag.DropItem(weapon);
|
||||
newQuest.SendOffer();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item item;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
item = Loot.RandomArmorOrShieldOrJewelry();
|
||||
|
||||
if (item is BaseArmor armor)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(armor, 2, 20, 30);
|
||||
}
|
||||
else if (item is BaseJewel jewel)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, 2, 20, 30);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var armor = Loot.RandomArmorOrShield();
|
||||
item = armor;
|
||||
|
||||
armor.ProtectionLevel = (ArmorProtectionLevel)RandomMinMaxScaled(2, 3);
|
||||
armor.Durability = (ArmorDurabilityLevel)RandomMinMaxScaled(2, 3);
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
newQuest.AddConversation(new DontOfferConversation());
|
||||
}
|
||||
|
||||
bag.DropItem(new Obsidian());
|
||||
|
||||
if (to.PlaceInBackpack(bag))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bag.Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public bool GiveReward(Mobile to)
|
||||
{
|
||||
var bag = new Bag();
|
||||
|
||||
bag.DropItem(new Gold(Utility.RandomMinMax(500, 1000)));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
var weapon = Loot.RandomWeapon();
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 2, 20, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 3);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 3);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 3);
|
||||
}
|
||||
|
||||
bag.DropItem(weapon);
|
||||
}
|
||||
else
|
||||
{
|
||||
Item item;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
item = Loot.RandomArmorOrShieldOrJewelry();
|
||||
|
||||
if (item is BaseArmor armor)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(armor, 2, 20, 30);
|
||||
}
|
||||
else if (item is BaseJewel jewel)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, 2, 20, 30);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var armor = Loot.RandomArmorOrShield();
|
||||
item = armor;
|
||||
|
||||
armor.ProtectionLevel = (ArmorProtectionLevel)RandomMinMaxScaled(2, 3);
|
||||
armor.Durability = (ArmorDurabilityLevel)RandomMinMaxScaled(2, 3);
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
}
|
||||
|
||||
bag.DropItem(new Obsidian());
|
||||
|
||||
if (to.PlaceInBackpack(bag))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bag.Delete();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,88 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GabrielPiete : BaseQuester
|
||||
{
|
||||
public class GabrielPiete : BaseQuester
|
||||
[Constructible]
|
||||
public GabrielPiete() : base("the renowned minstrel")
|
||||
{
|
||||
[Constructible]
|
||||
public GabrielPiete() : base("the renowned minstrel")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Gabriel Piete";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83EF;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x5F7));
|
||||
AddItem(new Shoes(0x5F7));
|
||||
|
||||
HairItemID = 0x2049; // Pig Tails
|
||||
HairHue = 0x460;
|
||||
|
||||
FacialHairItemID = 0x2041; // Mustache
|
||||
FacialHairHue = 0x460;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public GabrielPiete(Serial serial) : base(serial)
|
||||
return qs.IsObjectiveInProgress(typeof(FindGabrielObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnSheetMusicObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnAutographObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
}
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
public override string DefaultName => "Gabriel Piete";
|
||||
QuestObjective obj = qs.FindObjective<FindGabrielObjective>();
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83EF;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x5F7));
|
||||
AddItem(new Shoes(0x5F7));
|
||||
|
||||
HairItemID = 0x2049; // Pig Tails
|
||||
HairHue = 0x460;
|
||||
|
||||
FacialHairItemID = 0x2041; // Mustache
|
||||
FacialHairHue = 0x460;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
return false;
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
return qs.IsObjectiveInProgress(typeof(FindGabrielObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnSheetMusicObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnAutographObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective)))
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindGabrielObjective>();
|
||||
qs.AddConversation(new GabrielNoSheetMusicConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnSheetMusicObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective)))
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnAutographObjective)))
|
||||
{
|
||||
qs.AddConversation(new GabrielNoSheetMusicConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnSheetMusicObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(ReturnAutographObjective)))
|
||||
{
|
||||
qs.AddConversation(new GabrielIgnoreConversation());
|
||||
}
|
||||
qs.AddConversation(new GabrielIgnoreConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,175 +1,150 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Impresario : BaseQuester
|
||||
{
|
||||
public class Impresario : BaseQuester
|
||||
[Constructible]
|
||||
public Impresario() : base("the impresario")
|
||||
{
|
||||
[Constructible]
|
||||
public Impresario() : base("the impresario")
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt(Utility.RandomDyedHue()));
|
||||
AddItem(new LongPants(Utility.RandomNondyedHue()));
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Impresario(Serial serial) : base(serial)
|
||||
return qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is not CollectorQuest)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
var obj = qs.FindObjective<FindSheetMusicObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt(Utility.RandomDyedHue()));
|
||||
AddItem(new LongPants(Utility.RandomNondyedHue()));
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
if (obj.IsInRightTheater())
|
||||
{
|
||||
return false;
|
||||
player.CloseGump<SheetMusicOfferGump>();
|
||||
player.SendGump(new SheetMusicOfferGump());
|
||||
}
|
||||
|
||||
return qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is not CollectorQuest)
|
||||
else
|
||||
{
|
||||
return;
|
||||
qs.AddConversation(new NoSheetMusicConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var obj = qs.FindObjective<FindSheetMusicObjective>();
|
||||
public class SheetMusicOfferGump : BaseQuestGump
|
||||
{
|
||||
public SheetMusicOfferGump() : base(75, 25)
|
||||
{
|
||||
Closable = false;
|
||||
|
||||
if (obj?.Completed == false)
|
||||
AddImage(349, 10, 0x24B0);
|
||||
AddImageTiled(349, 130, 100, 120, 0x24B3);
|
||||
AddImageTiled(149, 10, 200, 140, 0x24AF);
|
||||
AddImageTiled(149, 300, 200, 140, 0x24B5);
|
||||
AddImage(349, 300, 0x24B6);
|
||||
AddImage(35, 10, 0x24AE);
|
||||
AddImageTiled(35, 150, 120, 100, 0x24B1);
|
||||
AddImage(35, 300, 0x24B4);
|
||||
|
||||
AddHtmlLocalized(110, 60, 200, 20, 1049069, White); // <STRONG>Conversation Event</STRONG>
|
||||
|
||||
AddImage(65, 14, 0x2776);
|
||||
AddImageTiled(81, 14, 349, 17, 0x2775);
|
||||
AddImage(426, 14, 0x2778);
|
||||
|
||||
AddImageTiled(50, 37, 400, 376, 0xA40);
|
||||
AddAlphaRegion(50, 37, 400, 376);
|
||||
|
||||
AddImage(0, 0, 0x28C8);
|
||||
|
||||
AddImageTiled(75, 90, 200, 1, 0x238D);
|
||||
AddImage(75, 58, 0x2635);
|
||||
AddImage(380, 45, 0xDF);
|
||||
|
||||
// Sure, I have some sheet music for a Gabriel Piete song. I'd be happy to sell you a copy for 10 gold.
|
||||
AddHtmlLocalized(98, 140, 312, 200, 1055107, LightGreen, false, true);
|
||||
|
||||
AddRadio(85, 350, 0x25F8, 0x25FB, true, 1);
|
||||
AddHtmlLocalized(120, 356, 280, 20, 1014088, White); // I accept.
|
||||
|
||||
AddRadio(85, 385, 0x25F8, 0x25FB, false, 0);
|
||||
AddHtmlLocalized(120, 391, 280, 20, 1049012, White); // No thanks, I decline.
|
||||
|
||||
AddButton(340, 390, 0xF7, 0xF8, 1);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1 && info.IsSwitched(1))
|
||||
{
|
||||
if (sender.Mobile is PlayerMobile player)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
var qs = player.Quest;
|
||||
|
||||
if (obj.IsInRightTheater())
|
||||
if (qs is not CollectorQuest)
|
||||
{
|
||||
player.CloseGump<SheetMusicOfferGump>();
|
||||
player.SendGump(new SheetMusicOfferGump());
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = qs.FindObjective<FindSheetMusicObjective>();
|
||||
|
||||
if (obj?.Completed != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.Backpack?.ConsumeTotal(typeof(Gold), 10) == true || Banker.Withdraw(player, 10))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new NoSheetMusicConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SheetMusicOfferGump : BaseQuestGump
|
||||
{
|
||||
public SheetMusicOfferGump() : base(75, 25)
|
||||
{
|
||||
Closable = false;
|
||||
|
||||
AddImage(349, 10, 0x24B0);
|
||||
AddImageTiled(349, 130, 100, 120, 0x24B3);
|
||||
AddImageTiled(149, 10, 200, 140, 0x24AF);
|
||||
AddImageTiled(149, 300, 200, 140, 0x24B5);
|
||||
AddImage(349, 300, 0x24B6);
|
||||
AddImage(35, 10, 0x24AE);
|
||||
AddImageTiled(35, 150, 120, 100, 0x24B1);
|
||||
AddImage(35, 300, 0x24B4);
|
||||
|
||||
AddHtmlLocalized(110, 60, 200, 20, 1049069, White); // <STRONG>Conversation Event</STRONG>
|
||||
|
||||
AddImage(65, 14, 0x2776);
|
||||
AddImageTiled(81, 14, 349, 17, 0x2775);
|
||||
AddImage(426, 14, 0x2778);
|
||||
|
||||
AddImageTiled(50, 37, 400, 376, 0xA40);
|
||||
AddAlphaRegion(50, 37, 400, 376);
|
||||
|
||||
AddImage(0, 0, 0x28C8);
|
||||
|
||||
AddImageTiled(75, 90, 200, 1, 0x238D);
|
||||
AddImage(75, 58, 0x2635);
|
||||
AddImage(380, 45, 0xDF);
|
||||
|
||||
AddHtmlLocalized(
|
||||
98,
|
||||
140,
|
||||
312,
|
||||
200,
|
||||
1055107,
|
||||
LightGreen,
|
||||
false,
|
||||
true
|
||||
); // Sure, I have some sheet music for a Gabriel Piete song. I'd be happy to sell you a copy for 10 gold.
|
||||
|
||||
AddRadio(85, 350, 0x25F8, 0x25FB, true, 1);
|
||||
AddHtmlLocalized(120, 356, 280, 20, 1014088, White); // I accept.
|
||||
|
||||
AddRadio(85, 385, 0x25F8, 0x25FB, false, 0);
|
||||
AddHtmlLocalized(120, 391, 280, 20, 1049012, White); // No thanks, I decline.
|
||||
|
||||
AddButton(340, 390, 0xF7, 0xF8, 1);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1 && info.IsSwitched(1))
|
||||
{
|
||||
if (sender.Mobile is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is not CollectorQuest)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = qs.FindObjective<FindSheetMusicObjective>();
|
||||
|
||||
if (obj?.Completed != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.Backpack?.ConsumeTotal(typeof(Gold), 10) == true || Banker.Withdraw(player, 10))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
// You don't have enough gold to buy the sheet music.
|
||||
player.SendLocalizedMessage(1055108);
|
||||
}
|
||||
// You don't have enough gold to buy the sheet music.
|
||||
player.SendLocalizedMessage(1055108);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,112 +1,94 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
namespace Server.Engines.Quests.Collector;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TomasONeerlan : BaseQuester
|
||||
{
|
||||
public class TomasONeerlan : BaseQuester
|
||||
[Constructible]
|
||||
public TomasONeerlan() : base("the famed toymaker")
|
||||
{
|
||||
[Constructible]
|
||||
public TomasONeerlan() : base("the famed toymaker")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Tomas O'Neerlan";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F8;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x546));
|
||||
AddItem(new Boots(0x452));
|
||||
AddItem(new FullApron(0x455));
|
||||
|
||||
HairItemID = 0x203B; // ShortHair
|
||||
HairHue = 0x455;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public TomasONeerlan(Serial serial) : base(serial)
|
||||
return qs.IsObjectiveInProgress(typeof(FindTomasObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(CaptureImagesObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnImagesObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
}
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
public override string DefaultName => "Tomas O'Neerlan";
|
||||
QuestObjective obj = qs.FindObjective<FindTomasObjective>();
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F8;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new FancyShirt());
|
||||
AddItem(new LongPants(0x546));
|
||||
AddItem(new Boots(0x452));
|
||||
AddItem(new FullApron(0x455));
|
||||
|
||||
HairItemID = 0x203B; // ShortHair
|
||||
HairHue = 0x455;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if (qs == null)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Item paints = new EnchantedPaints();
|
||||
|
||||
return qs.IsObjectiveInProgress(typeof(FindTomasObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(CaptureImagesObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(ReturnImagesObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is CollectorQuest)
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindTomasObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (!player.PlaceInBackpack(paints))
|
||||
{
|
||||
Item paints = new EnchantedPaints();
|
||||
|
||||
if (!player.PlaceInBackpack(paints))
|
||||
{
|
||||
paints.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new TomasDuringCollectingConversation());
|
||||
paints.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnImagesObjective>();
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
|
||||
{
|
||||
qs.AddConversation(new TomasDuringCollectingConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnImagesObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
player.Backpack?.ConsumeUpTo(typeof(EnchantedPaints), 1);
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
player.Backpack?.ConsumeUpTo(typeof(EnchantedPaints), 1);
|
||||
|
||||
obj.Complete();
|
||||
}
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,115 +1,98 @@
|
|||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests
|
||||
namespace Server.Engines.Quests;
|
||||
|
||||
public class TalkEntry : ContextMenuEntry
|
||||
{
|
||||
public class TalkEntry : ContextMenuEntry
|
||||
private readonly BaseQuester _quester;
|
||||
|
||||
public TalkEntry(BaseQuester quester) : base(quester.TalkNumber) => _quester = quester;
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
private readonly BaseQuester m_Quester;
|
||||
var from = Owner.From;
|
||||
|
||||
public TalkEntry(BaseQuester quester) : base(quester.TalkNumber) => m_Quester = quester;
|
||||
|
||||
public override void OnClick()
|
||||
if (from.CheckAlive() && from is PlayerMobile mobile && _quester.CanTalkTo(mobile))
|
||||
{
|
||||
var from = Owner.From;
|
||||
|
||||
if (from.CheckAlive() && from is PlayerMobile mobile && m_Quester.CanTalkTo(mobile))
|
||||
{
|
||||
m_Quester.OnTalk(mobile, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BaseQuester : BaseVendor
|
||||
{
|
||||
protected List<SBInfo> m_SBInfos = new();
|
||||
|
||||
public BaseQuester(string title = null) : base(title)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseQuester(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
public override bool IsInvulnerable => true;
|
||||
public override bool DisallowAllMoves => true;
|
||||
public override bool ClickTitle => false;
|
||||
public override bool CanTeach => false;
|
||||
|
||||
public virtual int TalkNumber // Talk
|
||||
=> 6146;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract void OnTalk(PlayerMobile player, bool contextMenu);
|
||||
|
||||
public virtual bool CanTalkTo(PlayerMobile to) => true;
|
||||
|
||||
public virtual int GetAutoTalkRange(PlayerMobile m) => -1;
|
||||
|
||||
public override bool CanBeDamaged() => false;
|
||||
|
||||
protected Item SetHue(Item item, int hue)
|
||||
{
|
||||
item.Hue = hue;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.AddCustomContextEntries(from, list);
|
||||
|
||||
if (from.Alive && from is PlayerMobile mobile && TalkNumber > 0 && CanTalkTo(mobile))
|
||||
{
|
||||
list.Add(new TalkEntry(this));
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (m.Alive && m is PlayerMobile pm)
|
||||
{
|
||||
var range = GetAutoTalkRange(pm);
|
||||
|
||||
if (pm.Alive && range >= 0 && InRange(m, range) && !InRange(oldLocation, range) && CanTalkTo(pm))
|
||||
{
|
||||
OnTalk(pm, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FocusTo(Mobile to)
|
||||
{
|
||||
QuestSystem.FocusTo(this, to);
|
||||
}
|
||||
|
||||
public static Container GetNewContainer()
|
||||
{
|
||||
var bag = new Bag();
|
||||
bag.Hue = QuestSystem.RandomBrightHue();
|
||||
return bag;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
_quester.OnTalk(mobile, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public abstract partial class BaseQuester : BaseVendor
|
||||
{
|
||||
protected List<SBInfo> _sbInfos = new();
|
||||
|
||||
public BaseQuester(string title = null) : base(title)
|
||||
{
|
||||
}
|
||||
|
||||
protected override List<SBInfo> SBInfos => _sbInfos;
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
public override bool IsInvulnerable => true;
|
||||
public override bool DisallowAllMoves => true;
|
||||
public override bool ClickTitle => false;
|
||||
public override bool CanTeach => false;
|
||||
|
||||
public virtual int TalkNumber => 6146; // Talk
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract void OnTalk(PlayerMobile player, bool contextMenu);
|
||||
|
||||
public virtual bool CanTalkTo(PlayerMobile to) => true;
|
||||
|
||||
public virtual int GetAutoTalkRange(PlayerMobile m) => -1;
|
||||
|
||||
public override bool CanBeDamaged() => false;
|
||||
|
||||
protected Item SetHue(Item item, int hue)
|
||||
{
|
||||
item.Hue = hue;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.AddCustomContextEntries(from, list);
|
||||
|
||||
if (from.Alive && from is PlayerMobile mobile && TalkNumber > 0 && CanTalkTo(mobile))
|
||||
{
|
||||
list.Add(new TalkEntry(this));
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (m.Alive && m is PlayerMobile pm)
|
||||
{
|
||||
var range = GetAutoTalkRange(pm);
|
||||
|
||||
if (pm.Alive && range >= 0 && InRange(m, range) && !InRange(oldLocation, range) && CanTalkTo(pm))
|
||||
{
|
||||
OnTalk(pm, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FocusTo(Mobile to)
|
||||
{
|
||||
QuestSystem.FocusTo(this, to);
|
||||
}
|
||||
|
||||
public static Container GetNewContainer()
|
||||
{
|
||||
return new Bag
|
||||
{
|
||||
Hue = QuestSystem.RandomBrightHue()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +1,43 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests
|
||||
namespace Server.Engines.Quests;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public abstract partial class DynamicTeleporter : Item
|
||||
{
|
||||
public abstract class DynamicTeleporter : Item
|
||||
public DynamicTeleporter(int itemID = 0x1822, int hue = 0x482) : base(itemID)
|
||||
{
|
||||
public DynamicTeleporter(int itemID = 0x1822, int hue = 0x482) : base(itemID)
|
||||
Movable = false;
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049382; // a magical teleporter
|
||||
|
||||
public virtual int NotWorkingMessage => 500309; // Nothing Happens.
|
||||
|
||||
public abstract bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map);
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile pm)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = hue;
|
||||
}
|
||||
var loc = Point3D.Zero;
|
||||
Map map = null;
|
||||
|
||||
public DynamicTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049382; // a magical teleporter
|
||||
|
||||
public virtual int NotWorkingMessage // Nothing Happens.
|
||||
=> 500309;
|
||||
|
||||
public abstract bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map);
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile pm)
|
||||
if (GetDestination(pm, ref loc, ref map))
|
||||
{
|
||||
var loc = Point3D.Zero;
|
||||
Map map = null;
|
||||
BaseCreature.TeleportPets(pm, loc, map);
|
||||
|
||||
if (GetDestination(pm, ref loc, ref map))
|
||||
{
|
||||
BaseCreature.TeleportPets(pm, loc, map);
|
||||
pm.PlaySound(0x1FE);
|
||||
pm.MoveToWorld(loc, map);
|
||||
|
||||
pm.PlaySound(0x1FE);
|
||||
pm.MoveToWorld(loc, map);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
pm.SendLocalizedMessage(NotWorkingMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
pm.SendLocalizedMessage(NotWorkingMessage);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,187 +1,173 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class EnchantedSextant : Item
|
||||
{
|
||||
public class EnchantedSextant : Item
|
||||
private const double LongDistance = 300.0;
|
||||
|
||||
private const double ShortDistance = 5.0;
|
||||
|
||||
// TODO: Use region types/names or types
|
||||
// TODO: Add Tokuno/TerMur?
|
||||
|
||||
// TODO: Trammel/Haven
|
||||
private static readonly Point2D[] _trammelBanks =
|
||||
{
|
||||
private const double m_LongDistance = 300.0;
|
||||
new(652, 820),
|
||||
new(1813, 2825),
|
||||
new(3734, 2149),
|
||||
new(2503, 552),
|
||||
new(3764, 1317),
|
||||
new(587, 2146),
|
||||
new(1655, 1606),
|
||||
new(1425, 1690),
|
||||
new(4471, 1156),
|
||||
new(1317, 3773),
|
||||
new(2881, 684),
|
||||
new(2731, 2192),
|
||||
new(3620, 2617),
|
||||
new(2880, 3472),
|
||||
new(1897, 2684),
|
||||
new(5346, 74),
|
||||
new(5275, 3977),
|
||||
new(5669, 3131)
|
||||
};
|
||||
|
||||
private const double m_ShortDistance = 5.0;
|
||||
private static readonly Point2D[] _feluccaBanks =
|
||||
{
|
||||
new(652, 820),
|
||||
new(1813, 2825),
|
||||
new(3734, 2149),
|
||||
new(2503, 552),
|
||||
new(3764, 1317),
|
||||
new(3695, 2511),
|
||||
new(587, 2146),
|
||||
new(1655, 1606),
|
||||
new(1425, 1690),
|
||||
new(4471, 1156),
|
||||
new(1317, 3773),
|
||||
new(2881, 684),
|
||||
new(2731, 2192),
|
||||
new(2880, 3472),
|
||||
new(1897, 2684),
|
||||
new(5346, 74),
|
||||
new(5275, 3977),
|
||||
new(5669, 3131)
|
||||
};
|
||||
|
||||
// TODO: Trammel/Haven
|
||||
private static readonly Point2D[] m_TrammelBanks =
|
||||
{
|
||||
new(652, 820),
|
||||
new(1813, 2825),
|
||||
new(3734, 2149),
|
||||
new(2503, 552),
|
||||
new(3764, 1317),
|
||||
new(587, 2146),
|
||||
new(1655, 1606),
|
||||
new(1425, 1690),
|
||||
new(4471, 1156),
|
||||
new(1317, 3773),
|
||||
new(2881, 684),
|
||||
new(2731, 2192),
|
||||
new(3620, 2617),
|
||||
new(2880, 3472),
|
||||
new(1897, 2684),
|
||||
new(5346, 74),
|
||||
new(5275, 3977),
|
||||
new(5669, 3131)
|
||||
};
|
||||
|
||||
private static readonly Point2D[] m_FeluccaBanks =
|
||||
{
|
||||
new(652, 820),
|
||||
new(1813, 2825),
|
||||
new(3734, 2149),
|
||||
new(2503, 552),
|
||||
new(3764, 1317),
|
||||
new(3695, 2511),
|
||||
new(587, 2146),
|
||||
new(1655, 1606),
|
||||
new(1425, 1690),
|
||||
new(4471, 1156),
|
||||
new(1317, 3773),
|
||||
new(2881, 684),
|
||||
new(2731, 2192),
|
||||
new(2880, 3472),
|
||||
new(1897, 2684),
|
||||
new(5346, 74),
|
||||
new(5275, 3977),
|
||||
new(5669, 3131)
|
||||
};
|
||||
|
||||
private static readonly Point2D[] m_IlshenarBanks =
|
||||
{
|
||||
new(854, 680),
|
||||
new(855, 603),
|
||||
new(1226, 554),
|
||||
new(1610, 556)
|
||||
};
|
||||
|
||||
private static readonly Point2D[] m_MalasBanks =
|
||||
{
|
||||
new(996, 519),
|
||||
new(2048, 1345)
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public EnchantedSextant() : base(0x1058) => Weight = 2.0;
|
||||
|
||||
public EnchantedSextant(Serial serial) : base(serial)
|
||||
private static readonly Point2D[] _ilshenarBanks =
|
||||
{
|
||||
new(854, 680),
|
||||
new(855, 603),
|
||||
new(1226, 554),
|
||||
new(1610, 556)
|
||||
};
|
||||
|
||||
private static readonly Point2D[] _malasBanks =
|
||||
{
|
||||
new(996, 519),
|
||||
new(2048, 1345)
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public EnchantedSextant() : base(0x1058) => Weight = 2.0;
|
||||
|
||||
public override int LabelNumber => 1046226; // an enchanted sextant
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1046226; // an enchanted sextant
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
Point2D[] banks;
|
||||
PMList moongates;
|
||||
if (from.Map == Map.Trammel)
|
||||
{
|
||||
banks = _trammelBanks;
|
||||
moongates = PMList.Trammel;
|
||||
}
|
||||
else if (from.Map == Map.Felucca)
|
||||
{
|
||||
banks = _feluccaBanks;
|
||||
moongates = PMList.Felucca;
|
||||
}
|
||||
else if (from.Map == Map.Ilshenar)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
Point2D[] banks;
|
||||
PMList moongates;
|
||||
if (from.Map == Map.Trammel)
|
||||
{
|
||||
banks = m_TrammelBanks;
|
||||
moongates = PMList.Trammel;
|
||||
}
|
||||
else if (from.Map == Map.Felucca)
|
||||
{
|
||||
banks = m_FeluccaBanks;
|
||||
moongates = PMList.Felucca;
|
||||
}
|
||||
else if (from.Map == Map.Ilshenar)
|
||||
{
|
||||
#if false
|
||||
banks = m_IlshenarBanks;
|
||||
moongates = PMList.Ilshenar;
|
||||
#else
|
||||
// The magic of the sextant fails...
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, 1061684);
|
||||
// The magic of the sextant fails...
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, 1061684);
|
||||
|
||||
return;
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
else if (from.Map == Map.Malas)
|
||||
{
|
||||
banks = m_MalasBanks;
|
||||
moongates = PMList.Malas;
|
||||
}
|
||||
else
|
||||
{
|
||||
banks = null;
|
||||
moongates = null;
|
||||
}
|
||||
}
|
||||
else if (from.Map == Map.Malas)
|
||||
{
|
||||
banks = _malasBanks;
|
||||
moongates = PMList.Malas;
|
||||
}
|
||||
else
|
||||
{
|
||||
banks = null;
|
||||
moongates = null;
|
||||
}
|
||||
|
||||
var closestMoongate = Point3D.Zero;
|
||||
var moongateDistance = double.MaxValue;
|
||||
if (moongates != null)
|
||||
var closestMoongate = Point3D.Zero;
|
||||
var moongateDistance = double.MaxValue;
|
||||
if (moongates != null)
|
||||
{
|
||||
foreach (var entry in moongates.Entries)
|
||||
{
|
||||
foreach (var entry in moongates.Entries)
|
||||
var dist = from.GetDistanceToSqrt(entry.Location);
|
||||
if (moongateDistance > dist)
|
||||
{
|
||||
var dist = from.GetDistanceToSqrt(entry.Location);
|
||||
if (moongateDistance > dist)
|
||||
{
|
||||
closestMoongate = entry.Location;
|
||||
moongateDistance = dist;
|
||||
}
|
||||
closestMoongate = entry.Location;
|
||||
moongateDistance = dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var closestBank = Point2D.Zero;
|
||||
var bankDistance = double.MaxValue;
|
||||
if (banks != null)
|
||||
var closestBank = Point2D.Zero;
|
||||
var bankDistance = double.MaxValue;
|
||||
if (banks != null)
|
||||
{
|
||||
foreach (var p in banks)
|
||||
{
|
||||
foreach (var p in banks)
|
||||
var dist = from.GetDistanceToSqrt(p);
|
||||
if (bankDistance > dist)
|
||||
{
|
||||
var dist = from.GetDistanceToSqrt(p);
|
||||
if (bankDistance > dist)
|
||||
{
|
||||
closestBank = p;
|
||||
bankDistance = dist;
|
||||
}
|
||||
closestBank = p;
|
||||
bankDistance = dist;
|
||||
}
|
||||
}
|
||||
|
||||
int moonMsg = moongateDistance switch
|
||||
{
|
||||
double.MaxValue => 1048021, // The sextant fails to find a Moongate nearby.
|
||||
> m_LongDistance => 1046449 + (int)from.GetDirectionTo(closestMoongate), // A moongate is * from here
|
||||
> m_ShortDistance => 1048010 + (int)from.GetDirectionTo(closestMoongate), // There is a Moongate * of here.
|
||||
_ => 1048018 // You are next to a Moongate at the moment.
|
||||
};
|
||||
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, moonMsg);
|
||||
|
||||
int bankMsg = bankDistance switch
|
||||
{
|
||||
double.MaxValue => 1048020, // The sextant fails to find a Bank nearby.
|
||||
> m_LongDistance => 1046462 + (int)from.GetDirectionTo(closestBank), // A town is * from here
|
||||
> m_ShortDistance => 1048002 + (int)from.GetDirectionTo(closestBank), // There is a city Bank * of here.
|
||||
_ => 1048019 // You are next to a Bank at the moment.
|
||||
};
|
||||
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x5AA, 3, bankMsg);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
int moonMsg = moongateDistance switch
|
||||
{
|
||||
base.Serialize(writer);
|
||||
double.MaxValue => 1048021, // The sextant fails to find a Moongate nearby.
|
||||
> LongDistance => 1046449 + (int)from.GetDirectionTo(closestMoongate), // A moongate is * from here
|
||||
> ShortDistance => 1048010 + (int)from.GetDirectionTo(closestMoongate), // There is a Moongate * of here.
|
||||
_ => 1048018 // You are next to a Moongate at the moment.
|
||||
};
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x482, 3, moonMsg);
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
int bankMsg = bankDistance switch
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
double.MaxValue => 1048020, // The sextant fails to find a Bank nearby.
|
||||
> LongDistance => 1046462 + (int)from.GetDirectionTo(closestBank), // A town is * from here
|
||||
> ShortDistance => 1048002 + (int)from.GetDirectionTo(closestBank), // There is a city Bank * of here.
|
||||
_ => 1048019 // You are next to a Bank at the moment.
|
||||
};
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x5AA, 3, bankMsg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,192 +1,140 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Engines.Quests
|
||||
namespace Server.Engines.Quests;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HornOfRetreat : Item
|
||||
{
|
||||
public class HornOfRetreat : Item
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Point3D _destLoc;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Map _destMap;
|
||||
|
||||
[InvalidateProperties]
|
||||
[SerializableField(2)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _charges;
|
||||
|
||||
private TimerExecutionToken _timerToken;
|
||||
|
||||
[Constructible]
|
||||
public HornOfRetreat() : base(0xFC4)
|
||||
{
|
||||
private int m_Charges;
|
||||
Hue = 0x482;
|
||||
Weight = 1.0;
|
||||
_charges = 10;
|
||||
}
|
||||
|
||||
private TimerExecutionToken _timerToken;
|
||||
public override int LabelNumber => 1049117; // Horn of Retreat
|
||||
|
||||
[Constructible]
|
||||
public HornOfRetreat() : base(0xFC4)
|
||||
public virtual bool ValidateUse(Mobile from) => true;
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1060741, _charges); // charges: ~1_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
Hue = 0x482;
|
||||
Weight = 1.0;
|
||||
Charges = 10;
|
||||
SendLocalizedMessageTo(from, 1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
public HornOfRetreat(Serial serial) : base(serial)
|
||||
if (!ValidateUse(from))
|
||||
{
|
||||
SendLocalizedMessageTo(from, 500309); // Nothing Happens.
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D DestLoc { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Map DestMap { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
else if (Core.ML && from.Map != Map.Trammel && from.Map != Map.Malas)
|
||||
{
|
||||
get => m_Charges;
|
||||
set
|
||||
{
|
||||
m_Charges = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
from.SendLocalizedMessage(1076154); // You can only use this in Trammel and Malas.
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049117; // Horn of Retreat
|
||||
|
||||
public virtual bool ValidateUse(Mobile from) => true;
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
else if (_timerToken.Running)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1060741, m_Charges); // charges: ~1_val~
|
||||
SendLocalizedMessageTo(from, 1042144); // This is currently in use.
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
else if (Charges > 0)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
if (!ValidateUse(from))
|
||||
{
|
||||
SendLocalizedMessageTo(from, 500309); // Nothing Happens.
|
||||
}
|
||||
else if (Core.ML && from.Map != Map.Trammel && from.Map != Map.Malas)
|
||||
{
|
||||
from.SendLocalizedMessage(1076154); // You can only use this in Trammel and Malas.
|
||||
}
|
||||
else if (_timerToken.Running)
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1042144); // This is currently in use.
|
||||
}
|
||||
else if (Charges > 0)
|
||||
{
|
||||
from.Animate(34, 7, 1, true, false, 0);
|
||||
from.PlaySound(0xFF);
|
||||
from.SendLocalizedMessage(1049115); // You play the horn and a sense of peace overcomes you...
|
||||
from.Animate(34, 7, 1, true, false, 0);
|
||||
from.PlaySound(0xFF);
|
||||
from.SendLocalizedMessage(1049115); // You play the horn and a sense of peace overcomes you...
|
||||
|
||||
--Charges;
|
||||
--Charges;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), () => PlayTimer_Callback(from), out _timerToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1042544); // This item is out of charges.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), () => PlayTimer_Callback(from), out _timerToken);
|
||||
}
|
||||
|
||||
public virtual void PlayTimer_Callback(Mobile from)
|
||||
else
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
|
||||
var gate = new HornOfRetreatMoongate(DestLoc, DestMap, from, Hue);
|
||||
|
||||
gate.MoveToWorld(from.Location, from.Map);
|
||||
|
||||
from.PlaySound(0x20E);
|
||||
|
||||
gate.SendLocalizedMessageTo(from, 1049102, from.Name); // Quickly ~1_NAME~! Onward through the gate!
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(DestLoc);
|
||||
writer.Write(DestMap);
|
||||
writer.Write(m_Charges);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
DestLoc = reader.ReadPoint3D();
|
||||
DestMap = reader.ReadMap();
|
||||
m_Charges = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
SendLocalizedMessageTo(from, 1042544); // This item is out of charges.
|
||||
}
|
||||
}
|
||||
|
||||
public class HornOfRetreatMoongate : Moongate
|
||||
public virtual void PlayTimer_Callback(Mobile from)
|
||||
{
|
||||
private readonly Mobile m_Caster;
|
||||
_timerToken.Cancel();
|
||||
|
||||
public HornOfRetreatMoongate(Point3D destLoc, Map destMap, Mobile caster, int hue)
|
||||
var gate = new HornOfRetreatMoongate(DestLoc, DestMap, from, Hue);
|
||||
|
||||
gate.MoveToWorld(from.Location, from.Map);
|
||||
|
||||
from.PlaySound(0x20E);
|
||||
|
||||
gate.SendLocalizedMessageTo(from, 1049102, from.Name); // Quickly ~1_NAME~! Onward through the gate!
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HornOfRetreatMoongate : Moongate
|
||||
{
|
||||
private readonly Mobile _caster;
|
||||
|
||||
public HornOfRetreatMoongate(Point3D destLoc, Map destMap, Mobile caster, int hue)
|
||||
{
|
||||
_caster = caster;
|
||||
|
||||
Target = destLoc;
|
||||
TargetMap = destMap;
|
||||
|
||||
Hue = hue;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
Dispellable = false;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049114; // Sanctuary Gate
|
||||
|
||||
public override void BeginConfirmation(Mobile from)
|
||||
{
|
||||
EndConfirmation(from);
|
||||
}
|
||||
|
||||
public override void UseGate(Mobile m)
|
||||
{
|
||||
if (m.Region.IsPartOf<JailRegion>())
|
||||
{
|
||||
m_Caster = caster;
|
||||
|
||||
Target = destLoc;
|
||||
TargetMap = destMap;
|
||||
|
||||
Hue = hue;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
Dispellable = false;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
||||
m.SendLocalizedMessage(1114345); // You'll need a better jailbreak plan than that!
|
||||
}
|
||||
|
||||
public HornOfRetreatMoongate(Serial serial) : base(serial)
|
||||
else if (m == _caster)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049114; // Sanctuary Gate
|
||||
|
||||
public override void BeginConfirmation(Mobile from)
|
||||
{
|
||||
EndConfirmation(from);
|
||||
}
|
||||
|
||||
public override void UseGate(Mobile m)
|
||||
{
|
||||
if (m.Region.IsPartOf<JailRegion>())
|
||||
{
|
||||
m.SendLocalizedMessage(1114345); // You'll need a better jailbreak plan than that!
|
||||
}
|
||||
else if (m == m_Caster)
|
||||
{
|
||||
base.UseGate(m);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
base.UseGate(m);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,118 +1,98 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests
|
||||
namespace Server.Engines.Quests;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public abstract partial class QuestItem : Item
|
||||
{
|
||||
public abstract class QuestItem : Item
|
||||
public QuestItem(int itemID) : base(itemID)
|
||||
{
|
||||
public QuestItem(int itemID) : base(itemID)
|
||||
}
|
||||
|
||||
public virtual bool Accepted => Deleted;
|
||||
|
||||
public abstract bool CanDrop(PlayerMobile pm);
|
||||
|
||||
public override bool DropToWorld(Mobile from, Point3D p)
|
||||
{
|
||||
var ret = base.DropToWorld(from, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
{
|
||||
}
|
||||
|
||||
public QuestItem(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool Accepted => Deleted;
|
||||
|
||||
public abstract bool CanDrop(PlayerMobile pm);
|
||||
|
||||
public override bool DropToWorld(Mobile from, Point3D p)
|
||||
{
|
||||
var ret = base.DropToWorld(from, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(from is PlayerMobile) || CanDrop((PlayerMobile)from))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(
|
||||
1049343
|
||||
); // You can only drop quest items into the top-most level of your backpack while you still need them for your quest.
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public override bool DropToMobile(Mobile from, Mobile target, Point3D p)
|
||||
{
|
||||
var ret = base.DropToMobile(from, target, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
if (from is not PlayerMobile playerMobile || CanDrop(playerMobile))
|
||||
{
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(from is PlayerMobile) || CanDrop((PlayerMobile)from))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(
|
||||
1049344
|
||||
); // You decide against trading the item. You still need it for your quest.
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
// You can only drop quest items into the top-most level of your backpack while you still need them for your quest.
|
||||
playerMobile.SendLocalizedMessage(1049343);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool DropToItem(Mobile from, Item target, Point3D p)
|
||||
return ret;
|
||||
}
|
||||
|
||||
public override bool DropToMobile(Mobile from, Mobile target, Point3D p)
|
||||
{
|
||||
var ret = base.DropToMobile(from, target, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
{
|
||||
var ret = base.DropToItem(from, target, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(from is PlayerMobile) || CanDrop((PlayerMobile)from))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(
|
||||
1049343
|
||||
); // You can only drop quest items into the top-most level of your backpack while you still need them for your quest.
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
if (parent is PlayerMobile mobile && !CanDrop(mobile))
|
||||
if (from is not PlayerMobile playerMobile || CanDrop(playerMobile))
|
||||
{
|
||||
return DeathMoveResult.MoveToBackpack;
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnParentDeath(parent);
|
||||
// You decide against trading the item. You still need it for your quest.
|
||||
playerMobile.SendLocalizedMessage(1049344);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
return ret;
|
||||
}
|
||||
|
||||
public override bool DropToItem(Mobile from, Item target, Point3D p)
|
||||
{
|
||||
var ret = base.DropToItem(from, target, p);
|
||||
|
||||
if (ret && !Accepted && Parent != from.Backpack)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
writer.Write(0); // version
|
||||
if (from is not PlayerMobile playerMobile || CanDrop(playerMobile))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// You can only drop quest items into the top-most level of your backpack while you still need them for your quest.
|
||||
playerMobile.SendLocalizedMessage(1049343);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
return ret;
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
if (parent is PlayerMobile mobile && !CanDrop(mobile))
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
return DeathMoveResult.MoveToBackpack;
|
||||
}
|
||||
|
||||
return base.OnParentDeath(parent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,72 +1,51 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class CrystalCaveBarrier : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CrystalCaveBarrier() : base(0x3967) => Movable = false;
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
public CrystalCaveBarrier(Serial serial) : base(serial)
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class CrystalCaveBarrier : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CrystalCaveBarrier() : base(0x3967) => Movable = false;
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
var mob = m;
|
||||
|
||||
if (m is BaseCreature creature)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var mob = m;
|
||||
|
||||
if (m is BaseCreature creature)
|
||||
{
|
||||
mob = creature.ControlMaster;
|
||||
}
|
||||
|
||||
if (mob is not PlayerMobile pm)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == true)
|
||||
{
|
||||
m.SendLocalizedMessage(
|
||||
1060648
|
||||
); // With Horus' permission, you are able to pass through the barrier.
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(
|
||||
1060649,
|
||||
"",
|
||||
0x66D
|
||||
); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
|
||||
mob = creature.ControlMaster;
|
||||
}
|
||||
|
||||
if (mob is not PlayerMobile pm)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
var qs = pm.Quest;
|
||||
|
||||
writer.Write(0); // version
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == true)
|
||||
{
|
||||
// With Horus' permission, you are able to pass through the barrier.
|
||||
m.SendLocalizedMessage(1060648);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
// Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
|
||||
m.SendLocalizedMessage(1060649, "", 0x66D);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,17 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DarkTidesHorn : HornOfRetreat
|
||||
{
|
||||
public class DarkTidesHorn : HornOfRetreat
|
||||
[Constructible]
|
||||
public DarkTidesHorn()
|
||||
{
|
||||
[Constructible]
|
||||
public DarkTidesHorn()
|
||||
{
|
||||
DestLoc = new Point3D(2103, 1319, -68);
|
||||
DestMap = Map.Malas;
|
||||
}
|
||||
|
||||
public DarkTidesHorn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ValidateUse(Mobile from) => from is PlayerMobile pm && pm.Quest is DarkTidesQuest;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
DestLoc = new Point3D(2103, 1319, -68);
|
||||
DestMap = Map.Malas;
|
||||
}
|
||||
|
||||
public override bool ValidateUse(Mobile from) => from is PlayerMobile { Quest: DarkTidesQuest };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,76 +1,59 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DarkTidesTeleporter : DynamicTeleporter
|
||||
{
|
||||
public class DarkTidesTeleporter : DynamicTeleporter
|
||||
[Constructible]
|
||||
public DarkTidesTeleporter()
|
||||
{
|
||||
[Constructible]
|
||||
public DarkTidesTeleporter()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public DarkTidesTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMaabusTombObjective)))
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMaabusTombObjective)))
|
||||
{
|
||||
loc = new Point3D(2038, 1263, -90);
|
||||
map = Map.Malas;
|
||||
qs.AddConversation(new RadarConversation());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCityOfLightObjective)))
|
||||
{
|
||||
loc = new Point3D(1091, 519, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnToCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
loc = new Point3D(2038, 1263, -90);
|
||||
map = Map.Malas;
|
||||
qs.AddConversation(new RadarConversation());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCityOfLightObjective)))
|
||||
{
|
||||
loc = new Point3D(1091, 519, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnToCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,179 +1,150 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class KronusScroll : QuestItem
|
||||
{
|
||||
public class KronusScroll : QuestItem
|
||||
private static readonly Rectangle2D m_WellOfTearsArea = new(2080, 1346, 10, 10);
|
||||
private static readonly Map m_WellOfTearsMap = Map.Malas;
|
||||
|
||||
[Constructible]
|
||||
public KronusScroll() : base(0x227A)
|
||||
{
|
||||
private static readonly Rectangle2D m_WellOfTearsArea = new(2080, 1346, 10, 10);
|
||||
private static readonly Map m_WellOfTearsMap = Map.Malas;
|
||||
Weight = 1.0;
|
||||
Hue = 0x44E;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public KronusScroll() : base(0x227A)
|
||||
public override int LabelNumber => 1060149; // Calling of Kronus
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not DarkTidesQuest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from))
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x44E;
|
||||
return;
|
||||
}
|
||||
|
||||
public KronusScroll(Serial serial) : base(serial)
|
||||
if (from is not PlayerMobile pm)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1060149; // Calling of Kronus
|
||||
var qs = pm.Quest;
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not DarkTidesQuest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (!IsChildOf(from))
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)))
|
||||
{
|
||||
return;
|
||||
// You read the scroll, but decide against performing the calling until you are instructed to do so by Mardoth.
|
||||
pm.SendLocalizedMessage(1060151, "", 0x41);
|
||||
}
|
||||
|
||||
if (from is not PlayerMobile pm)
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)))
|
||||
{
|
||||
return;
|
||||
// You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
pm.SendLocalizedMessage(1060152, "", 0x41);
|
||||
}
|
||||
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
else if (qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)))
|
||||
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm.Location))
|
||||
{
|
||||
pm.SendLocalizedMessage(
|
||||
1060151,
|
||||
"",
|
||||
0x41
|
||||
); // You read the scroll, but decide against performing the calling until you are instructed to do so by Mardoth.
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)))
|
||||
{
|
||||
pm.SendLocalizedMessage(
|
||||
1060152,
|
||||
"",
|
||||
0x41
|
||||
); // You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
|
||||
{
|
||||
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm.Location))
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<UseCallingScrollObjective>();
|
||||
QuestObjective obj = qs.FindObjective<UseCallingScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
Delete();
|
||||
new CallingTimer(pm).Start();
|
||||
}
|
||||
else
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
pm.SendLocalizedMessage(
|
||||
1060152,
|
||||
"",
|
||||
0x41
|
||||
); // You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
Delete();
|
||||
new CallingTimer(pm).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(
|
||||
1060150,
|
||||
"",
|
||||
0x41
|
||||
); // A strange terror grips your heart as you attempt to read the scroll. You decide it would be a bad idea to read it out loud.
|
||||
// You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
pm.SendLocalizedMessage(1060152, "", 0x41);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class CallingTimer : Timer
|
||||
{
|
||||
private readonly PlayerMobile m_Player;
|
||||
private int m_Step;
|
||||
|
||||
public CallingTimer(PlayerMobile player) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), 6)
|
||||
else
|
||||
{
|
||||
|
||||
m_Player = player;
|
||||
m_Step = 0;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Player.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_Player.Mounted)
|
||||
{
|
||||
m_Player.Animate(Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0);
|
||||
}
|
||||
|
||||
if (m_Step == 4)
|
||||
{
|
||||
var baseX = m_WellOfTearsArea.X;
|
||||
var baseY = m_WellOfTearsArea.Y;
|
||||
var width = m_WellOfTearsArea.Width;
|
||||
var height = m_WellOfTearsArea.Height;
|
||||
var map = m_WellOfTearsMap;
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(m_Player.Location, m_Player.Map, TimeSpan.FromSeconds(1.0)),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x13C4
|
||||
);
|
||||
Effects.PlaySound(m_Player.Location, m_Player.Map, 0x243);
|
||||
|
||||
for (var i = 0; i < 15; i++)
|
||||
{
|
||||
var x = baseX + Utility.Random(width);
|
||||
var y = baseY + Utility.Random(height);
|
||||
var z = map.GetAverageZ(x, y);
|
||||
|
||||
var from = new Point3D(x, y, z + Utility.RandomMinMax(5, 20));
|
||||
var to = new Point3D(x, y, z);
|
||||
|
||||
var hue = Utility.RandomList(0x481, 0x482, 0x489, 0x497, 0x66D);
|
||||
|
||||
Effects.SendMovingEffect(map, 0x36D4, from, to,0, 0, false, true, hue);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Step < 5)
|
||||
{
|
||||
m_Player.Frozen = true;
|
||||
}
|
||||
else // Cast completed
|
||||
{
|
||||
m_Player.Frozen = false;
|
||||
|
||||
SummonedPaladin.BeginSummon(m_Player);
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
// A strange terror grips your heart as you attempt to read the scroll. You decide it would be a bad idea to read it out loud.
|
||||
pm.SendLocalizedMessage(1060150, "", 0x41);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class CallingTimer : Timer
|
||||
{
|
||||
private readonly PlayerMobile _player;
|
||||
private int m_Step;
|
||||
|
||||
public CallingTimer(PlayerMobile player) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), 6)
|
||||
{
|
||||
|
||||
_player = player;
|
||||
m_Step = 0;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (_player.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player.Mounted)
|
||||
{
|
||||
_player.Animate(Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0);
|
||||
}
|
||||
|
||||
if (m_Step == 4)
|
||||
{
|
||||
var baseX = m_WellOfTearsArea.X;
|
||||
var baseY = m_WellOfTearsArea.Y;
|
||||
var width = m_WellOfTearsArea.Width;
|
||||
var height = m_WellOfTearsArea.Height;
|
||||
var map = m_WellOfTearsMap;
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(_player.Location, _player.Map, TimeSpan.FromSeconds(1.0)),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x13C4
|
||||
);
|
||||
Effects.PlaySound(_player.Location, _player.Map, 0x243);
|
||||
|
||||
for (var i = 0; i < 15; i++)
|
||||
{
|
||||
var x = baseX + Utility.Random(width);
|
||||
var y = baseY + Utility.Random(height);
|
||||
var z = map.GetAverageZ(x, y);
|
||||
|
||||
var from = new Point3D(x, y, z + Utility.RandomMinMax(5, 20));
|
||||
var to = new Point3D(x, y, z);
|
||||
|
||||
var hue = Utility.RandomList(0x481, 0x482, 0x489, 0x497, 0x66D);
|
||||
|
||||
Effects.SendMovingEffect(map, 0x36D4, from, to,0, 0, false, true, hue);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Step < 5)
|
||||
{
|
||||
_player.Frozen = true;
|
||||
}
|
||||
else // Cast completed
|
||||
{
|
||||
_player.Frozen = false;
|
||||
|
||||
SummonedPaladin.BeginSummon(_player);
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1,59 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class KronusScrollBox : MetalBox
|
||||
{
|
||||
public class KronusScrollBox : MetalBox
|
||||
[Constructible]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
[Constructible]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
|
||||
for (var i = 0; i < 40; i++)
|
||||
{
|
||||
Item scroll = Loot.RandomScroll(0, 15, SpellbookType.Necromancer);
|
||||
scroll.Movable = false;
|
||||
DropItem(scroll);
|
||||
}
|
||||
for (var i = 0; i < 40; i++)
|
||||
{
|
||||
Item scroll = Loot.RandomScroll(0, 15, SpellbookType.Necromancer);
|
||||
scroll.Movable = false;
|
||||
DropItem(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
public KronusScrollBox(Serial serial) : base(serial)
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
}
|
||||
var qs = pm.Quest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.InRange(GetWorldLocation(), 2))
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
QuestObjective obj = qs.FindObjective<FindCallingScrollObjective>();
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindCallingScrollObjective>();
|
||||
Item scroll = new KronusScroll();
|
||||
|
||||
if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
|
||||
if (pm.PlaceInBackpack(scroll))
|
||||
{
|
||||
Item scroll = new KronusScroll();
|
||||
// You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
|
||||
pm.SendLocalizedMessage(1060120, "", 0x41);
|
||||
|
||||
if (pm.PlaceInBackpack(scroll))
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
pm.SendLocalizedMessage(
|
||||
1060120,
|
||||
"",
|
||||
0x41
|
||||
); // You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,172 +1,135 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class MaabusCoffin : BaseAddon
|
||||
{
|
||||
public class MaabusCoffin : BaseAddon
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
[SerializableField(0, setter: "private")]
|
||||
private Maabus _maabus;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Point3D _spawnLocation;
|
||||
|
||||
[Constructible]
|
||||
public MaabusCoffin()
|
||||
{
|
||||
[Constructible]
|
||||
public MaabusCoffin()
|
||||
AddComponent(new MaabusCoffinComponent(0x1C2B, 0x1C2B), -1, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D16, 0x1C2C), 0, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D17, 0x1C2D), 1, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D51, 0x1C2E), 2, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4E, 0x1C2A), 0, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4D, 0x1C29), 1, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4C, 0x1C28), 2, 0, 0);
|
||||
}
|
||||
|
||||
public void Awake(Mobile caller)
|
||||
{
|
||||
if (_maabus != null || _spawnLocation == Point3D.Zero)
|
||||
{
|
||||
AddComponent(new MaabusCoffinComponent(0x1C2B, 0x1C2B), -1, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D16, 0x1C2C), 0, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D17, 0x1C2D), 1, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D51, 0x1C2E), 2, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4E, 0x1C2A), 0, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4D, 0x1C29), 1, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4C, 0x1C28), 2, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
public MaabusCoffin(Serial serial) : base(serial)
|
||||
foreach (var c in Components)
|
||||
{
|
||||
(c as MaabusCoffinComponent)?.TurnToEmpty();
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Maabus Maabus { get; private set; }
|
||||
Maabus = new Maabus { Location = _spawnLocation, Map = Map };
|
||||
Maabus.Direction = Maabus.GetDirectionTo(caller);
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D SpawnLocation { get; set; }
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(7.5), BeginSleep);
|
||||
}
|
||||
|
||||
public void Awake(Mobile caller)
|
||||
public void BeginSleep()
|
||||
{
|
||||
if (_maabus == null)
|
||||
{
|
||||
if (Maabus != null || SpawnLocation == Point3D.Zero)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var c in Components)
|
||||
{
|
||||
(c as MaabusCoffinComponent)?.TurnToEmpty();
|
||||
}
|
||||
|
||||
Maabus = new Maabus { Location = SpawnLocation, Map = Map };
|
||||
Maabus.Direction = Maabus.GetDirectionTo(caller);
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(7.5), BeginSleep);
|
||||
return;
|
||||
}
|
||||
|
||||
public void BeginSleep()
|
||||
Effects.PlaySound(_maabus.Location, _maabus.Map, 0x48E);
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(2.5), Sleep);
|
||||
}
|
||||
|
||||
public void Sleep()
|
||||
{
|
||||
if (_maabus == null)
|
||||
{
|
||||
if (Maabus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x48E);
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(2.5), Sleep);
|
||||
return;
|
||||
}
|
||||
|
||||
public void Sleep()
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(_maabus.Location, _maabus.Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
0x7E7
|
||||
);
|
||||
Effects.PlaySound(_maabus.Location, _maabus.Map, 0x1FE);
|
||||
|
||||
Maabus.Delete();
|
||||
Maabus = null;
|
||||
|
||||
foreach (var c in Components)
|
||||
{
|
||||
if (Maabus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(Maabus.Location, Maabus.Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
0x7E7
|
||||
);
|
||||
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x1FE);
|
||||
|
||||
Maabus.Delete();
|
||||
Maabus = null;
|
||||
|
||||
foreach (var c in Components)
|
||||
{
|
||||
(c as MaabusCoffinComponent)?.TurnToFull();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(Maabus);
|
||||
writer.Write(SpawnLocation);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
Maabus = reader.ReadEntity<Maabus>();
|
||||
SpawnLocation = reader.ReadPoint3D();
|
||||
|
||||
Sleep();
|
||||
(c as MaabusCoffinComponent)?.TurnToFull();
|
||||
}
|
||||
}
|
||||
|
||||
public class MaabusCoffinComponent : AddonComponent
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
private int m_EmptyItemID;
|
||||
private int m_FullItemID;
|
||||
|
||||
public MaabusCoffinComponent(int itemID) : this(itemID, itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent(int fullItemID, int emptyItemID) : base(fullItemID)
|
||||
{
|
||||
m_FullItemID = fullItemID;
|
||||
m_EmptyItemID = emptyItemID;
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D SpawnLocation
|
||||
{
|
||||
get => Addon is MaabusCoffin coffin ? coffin.SpawnLocation : Point3D.Zero;
|
||||
set
|
||||
{
|
||||
if (Addon is MaabusCoffin coffin)
|
||||
{
|
||||
coffin.SpawnLocation = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TurnToEmpty()
|
||||
{
|
||||
ItemID = m_EmptyItemID;
|
||||
}
|
||||
|
||||
public void TurnToFull()
|
||||
{
|
||||
ItemID = m_FullItemID;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_FullItemID);
|
||||
writer.Write(m_EmptyItemID);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
m_FullItemID = reader.ReadInt();
|
||||
m_EmptyItemID = reader.ReadInt();
|
||||
}
|
||||
Sleep();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class MaabusCoffinComponent : AddonComponent
|
||||
{
|
||||
[SerializableField(0)]
|
||||
private int _fullItemID;
|
||||
|
||||
[SerializableField(1)]
|
||||
private int _emptyItemID;
|
||||
|
||||
public MaabusCoffinComponent(int itemID) : this(itemID, itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent(int fullItemID, int emptyItemID) : base(fullItemID)
|
||||
{
|
||||
_fullItemID = fullItemID;
|
||||
_emptyItemID = emptyItemID;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D SpawnLocation
|
||||
{
|
||||
get => Addon is MaabusCoffin coffin ? coffin.SpawnLocation : Point3D.Zero;
|
||||
set
|
||||
{
|
||||
if (Addon is MaabusCoffin coffin)
|
||||
{
|
||||
coffin.SpawnLocation = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TurnToEmpty()
|
||||
{
|
||||
ItemID = _emptyItemID;
|
||||
}
|
||||
|
||||
public void TurnToFull()
|
||||
{
|
||||
ItemID = _fullItemID;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,52 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ScrollOfAbraxus : QuestItem
|
||||
{
|
||||
public class ScrollOfAbraxus : QuestItem
|
||||
[Constructible]
|
||||
public ScrollOfAbraxus() : base(0x227B) => Weight = 1.0;
|
||||
|
||||
public override int LabelNumber => 1028827; // Scroll of Abraxus
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not DarkTidesQuest;
|
||||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
[Constructible]
|
||||
public ScrollOfAbraxus() : base(0x227B) => Weight = 1.0;
|
||||
base.OnAdded(parent);
|
||||
|
||||
public ScrollOfAbraxus(Serial serial) : base(serial)
|
||||
if (RootParent is PlayerMobile pm)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<RetrieveAbraxusScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1028827; // Scroll of Abraxus
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not DarkTidesQuest;
|
||||
|
||||
public override void OnAdded(IEntity parent)
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
base.OnAdded(parent);
|
||||
from.SendGump(new ScrollOfAbraxusGump());
|
||||
|
||||
if (RootParent is PlayerMobile pm)
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<RetrieveAbraxusScrollObjective>();
|
||||
QuestObjective obj = qs.FindObjective<ReadAbraxusScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
|
|
@ -35,95 +55,58 @@ namespace Server.Engines.Quests.Necro
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
else
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendGump(new ScrollOfAbraxusGump());
|
||||
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReadAbraxusScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ScrollOfAbraxusGump : Gump
|
||||
{
|
||||
public ScrollOfAbraxusGump() : base(150, 50)
|
||||
{
|
||||
AddPage(0);
|
||||
|
||||
AddImage(0, 0, 1228);
|
||||
AddImage(340, 255, 9005);
|
||||
|
||||
/* Security at the Crystal Cave<BR><BR>
|
||||
*
|
||||
* We have taken great measuresto ensure the safety of the
|
||||
* Scroll of Calling, which we have so valiantly taken from
|
||||
* the Necromancer Maabus during the battle of the wood
|
||||
* nearly 200 years ago.<BR><BR>
|
||||
*
|
||||
* The scroll must never fall into the hands of the
|
||||
* Necromancers again, lest they use it to summon the ancient
|
||||
* daemon Kronus. The scroll of calling is a necessity in the
|
||||
* series of dark rites the Necromancers must perform to once again
|
||||
* re-awaken Kronus.<BR><BR>
|
||||
*
|
||||
* Should Kronus ever rise again, the days of the Paladins, and
|
||||
* indeed humanity as we know it will be numbered.<BR><BR>
|
||||
*
|
||||
* For this reason, we have posted the honorable Horus, former
|
||||
* General of the Northern Legions to guard the entrance of the
|
||||
* Crystal Cave where we keep the Scroll of Calling. Horus was
|
||||
* infused with magical life from the tree Urywen during his last
|
||||
* battle. The power gave him eternal life, but it also,
|
||||
* unfortunately, took his eye sight.<BR><BR>
|
||||
*
|
||||
* Since Horus cannot see those he admits to the Crystal Cave,
|
||||
* he will only allow those that know the secret password to enter.
|
||||
* Speak the following word to Horus and he shall grant you passage
|
||||
* to the Crystal Cave:<BR><BR>
|
||||
*
|
||||
* <I>Urywen</I><BR><BR>
|
||||
*
|
||||
* Do not speak this password anywhere except when seeking passage
|
||||
* into the Crystal Cave, as our adversaries are lurking in the
|
||||
* shadows ' they are everywhere.<BR><BR>Go with the light, friend.<BR><BR>
|
||||
*
|
||||
* <I>- Frater Melkeer</I>
|
||||
*/
|
||||
AddHtmlLocalized(25, 36, 350, 210, 1060116, 1, false, true);
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ScrollOfAbraxusGump : Gump
|
||||
{
|
||||
public ScrollOfAbraxusGump() : base(150, 50)
|
||||
{
|
||||
AddPage(0);
|
||||
|
||||
AddImage(0, 0, 1228);
|
||||
AddImage(340, 255, 9005);
|
||||
|
||||
/* Security at the Crystal Cave<BR><BR>
|
||||
*
|
||||
* We have taken great measuresto ensure the safety of the
|
||||
* Scroll of Calling, which we have so valiantly taken from
|
||||
* the Necromancer Maabus during the battle of the wood
|
||||
* nearly 200 years ago.<BR><BR>
|
||||
*
|
||||
* The scroll must never fall into the hands of the
|
||||
* Necromancers again, lest they use it to summon the ancient
|
||||
* daemon Kronus. The scroll of calling is a necessity in the
|
||||
* series of dark rites the Necromancers must perform to once again
|
||||
* re-awaken Kronus.<BR><BR>
|
||||
*
|
||||
* Should Kronus ever rise again, the days of the Paladins, and
|
||||
* indeed humanity as we know it will be numbered.<BR><BR>
|
||||
*
|
||||
* For this reason, we have posted the honorable Horus, former
|
||||
* General of the Northern Legions to guard the entrance of the
|
||||
* Crystal Cave where we keep the Scroll of Calling. Horus was
|
||||
* infused with magical life from the tree Urywen during his last
|
||||
* battle. The power gave him eternal life, but it also,
|
||||
* unfortunately, took his eye sight.<BR><BR>
|
||||
*
|
||||
* Since Horus cannot see those he admits to the Crystal Cave,
|
||||
* he will only allow those that know the secret password to enter.
|
||||
* Speak the following word to Horus and he shall grant you passage
|
||||
* to the Crystal Cave:<BR><BR>
|
||||
*
|
||||
* <I>Urywen</I><BR><BR>
|
||||
*
|
||||
* Do not speak this password anywhere except when seeking passage
|
||||
* into the Crystal Cave, as our adversaries are lurking in the
|
||||
* shadows ' they are everywhere.<BR><BR>Go with the light, friend.<BR><BR>
|
||||
*
|
||||
* <I>- Frater Melkeer</I>
|
||||
*/
|
||||
AddHtmlLocalized(25, 36, 350, 210, 1060116, 1, false, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,48 +1,31 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class VaultOfSecretsBarrier : Item
|
||||
{
|
||||
public class VaultOfSecretsBarrier : Item
|
||||
[Constructible]
|
||||
public VaultOfSecretsBarrier() : base(0x49E)
|
||||
{
|
||||
[Constructible]
|
||||
public VaultOfSecretsBarrier() : base(0x49E)
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public VaultOfSecretsBarrier(Serial serial) : base(serial)
|
||||
if (m is PlayerMobile pm && pm.Profession == 4)
|
||||
{
|
||||
m.SendLocalizedMessage(1060188, "", 0x24); // The wicked may not enter!
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m is PlayerMobile pm && pm.Profession == 4)
|
||||
{
|
||||
m.SendLocalizedMessage(1060188, "", 0x24); // The wicked may not enter!
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,200 +1,182 @@
|
|||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Horus : BaseQuester
|
||||
{
|
||||
public class Horus : BaseQuester
|
||||
[Constructible]
|
||||
public Horus() : base("the Guardian")
|
||||
{
|
||||
[Constructible]
|
||||
public Horus() : base("the Guardian")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Horus";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F3;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(SetHue(new PlateLegs(), 0x849));
|
||||
AddItem(SetHue(new PlateChest(), 0x849));
|
||||
AddItem(SetHue(new PlateArms(), 0x849));
|
||||
AddItem(SetHue(new PlateGloves(), 0x849));
|
||||
AddItem(SetHue(new PlateGorget(), 0x849));
|
||||
|
||||
AddItem(SetHue(new Bardiche(), 0x482));
|
||||
|
||||
AddItem(SetHue(new Boots(), 0x001));
|
||||
AddItem(SetHue(new Cloak(), 0x482));
|
||||
|
||||
Utility.AssignRandomHair(this, false);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m) => 3;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
var qs = to.Quest;
|
||||
|
||||
return qs is DarkTidesQuest && qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindCrystalCaveObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Horus(Serial serial) : base(serial)
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (InRange(m.Location, 2) && !InRange(oldLocation, 2) && m is PlayerMobile pm)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Horus";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F3;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(SetHue(new PlateLegs(), 0x849));
|
||||
AddItem(SetHue(new PlateChest(), 0x849));
|
||||
AddItem(SetHue(new PlateArms(), 0x849));
|
||||
AddItem(SetHue(new PlateGloves(), 0x849));
|
||||
AddItem(SetHue(new PlateGorget(), 0x849));
|
||||
|
||||
AddItem(SetHue(new Bardiche(), 0x482));
|
||||
|
||||
AddItem(SetHue(new Boots(), 0x001));
|
||||
AddItem(SetHue(new Cloak(), 0x482));
|
||||
|
||||
Utility.AssignRandomHair(this, false);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m) => 3;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
var qs = to.Quest;
|
||||
|
||||
return qs is DarkTidesQuest && qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindCrystalCaveObjective>();
|
||||
QuestObjective obj = qs.FindObjective<ReturnToCrystalCaveObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (InRange(m.Location, 2) && !InRange(oldLocation, 2) && m is PlayerMobile pm)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnToCrystalCaveObjective>();
|
||||
obj = qs.FindObjective<FindHorusAboutRewardObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindHorusAboutRewardObjective>();
|
||||
var cont = GetNewContainer();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
cont.DropItem(new Gold(500));
|
||||
|
||||
BaseJewel jewel = new GoldBracelet();
|
||||
if (Core.AOS)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, 3, 20, 40);
|
||||
}
|
||||
|
||||
cont.DropItem(new Gold(500));
|
||||
cont.DropItem(jewel);
|
||||
|
||||
BaseJewel jewel = new GoldBracelet();
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, 3, 20, 40);
|
||||
}
|
||||
|
||||
cont.DropItem(jewel);
|
||||
|
||||
if (!pm.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
pm.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
if (!pm.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
pm.SendLocalizedMessage(1046260);
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive)
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
if (from is PlayerMobile pm)
|
||||
var qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
var qs = pm.Quest;
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
var enabled = obj?.Completed == false;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
var enabled = obj?.Completed == false;
|
||||
|
||||
list.Add(new SpeakPasswordEntry(this, pm, enabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnPasswordSpoken(PlayerMobile from)
|
||||
{
|
||||
var qs = from.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1060185); // Horus ignores you.
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class SpeakPasswordEntry : ContextMenuEntry
|
||||
{
|
||||
private readonly PlayerMobile m_From;
|
||||
private readonly Horus m_Horus;
|
||||
|
||||
public SpeakPasswordEntry(Horus horus, PlayerMobile from, bool enabled) : base(6193, 3)
|
||||
{
|
||||
m_Horus = horus;
|
||||
m_From = from;
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
Flags |= CMEFlags.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (m_From.Alive)
|
||||
{
|
||||
m_Horus.OnPasswordSpoken(m_From);
|
||||
list.Add(new SpeakPasswordEntry(this, pm, enabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnPasswordSpoken(PlayerMobile from)
|
||||
{
|
||||
var qs = from.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1060185); // Horus ignores you.
|
||||
}
|
||||
|
||||
private class SpeakPasswordEntry : ContextMenuEntry
|
||||
{
|
||||
private readonly PlayerMobile _from;
|
||||
private readonly Horus _horus;
|
||||
|
||||
public SpeakPasswordEntry(Horus horus, PlayerMobile from, bool enabled) : base(6193, 3)
|
||||
{
|
||||
_horus = horus;
|
||||
_from = from;
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
Flags |= CMEFlags.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (_from.Alive)
|
||||
{
|
||||
_horus.OnPasswordSpoken(_from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,25 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Maabus : BaseQuester
|
||||
{
|
||||
public class Maabus : BaseQuester
|
||||
public Maabus()
|
||||
{
|
||||
public Maabus()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public Maabus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override string DefaultName => "Maabus";
|
||||
|
||||
public override string DefaultName => "Maabus";
|
||||
public override void InitBody()
|
||||
{
|
||||
Body = 0x94;
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
Body = 0x94;
|
||||
}
|
||||
public override bool CanTalkTo(PlayerMobile to) => false;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to) => false;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,112 +1,111 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Mardoth : BaseQuester
|
||||
{
|
||||
public class Mardoth : BaseQuester
|
||||
[Constructible]
|
||||
public Mardoth() : base("the Ancient Necromancer")
|
||||
{
|
||||
[Constructible]
|
||||
public Mardoth() : base("the Ancient Necromancer")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Mardoth";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8849;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is not DarkTidesHorn horn || from is not PlayerMobile { Quest: DarkTidesQuest } player)
|
||||
{
|
||||
}
|
||||
|
||||
public Mardoth(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Mardoth";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8849;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (dropped is DarkTidesHorn horn)
|
||||
{
|
||||
if (player.Young)
|
||||
{
|
||||
if (horn.Charges < 10)
|
||||
{
|
||||
SayTo(from, 1049384); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049385); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); // You must be young to have this item recharged.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
if (player.Young)
|
||||
{
|
||||
AddItem(new Sandals(0x1));
|
||||
AddItem(new Robe(0x66D));
|
||||
AddItem(new BlackStaff());
|
||||
AddItem(new WizardsHat(0x1));
|
||||
|
||||
FacialHairItemID = 0x2041;
|
||||
FacialHairHue = 0x482;
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x482;
|
||||
|
||||
Item gloves = new BoneGloves();
|
||||
gloves.Hue = 0x66D;
|
||||
AddItem(gloves);
|
||||
|
||||
Item gorget = new PlateGorget();
|
||||
gorget.Hue = 0x1;
|
||||
AddItem(gorget);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m) => 3;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
if (to.Quest is not DarkTidesQuest qs)
|
||||
if (horn.Charges < 10)
|
||||
{
|
||||
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(DarkTidesQuest));
|
||||
SayTo(from, 1049384); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
|
||||
return qs.FindObjective<FindMardothAboutVaultObjective>() != null;
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049385); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); // You must be young to have this item recharged.
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
return false;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Sandals(0x1));
|
||||
AddItem(new Robe(0x66D));
|
||||
AddItem(new BlackStaff());
|
||||
AddItem(new WizardsHat(0x1));
|
||||
|
||||
FacialHairItemID = 0x2041;
|
||||
FacialHairHue = 0x482;
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x482;
|
||||
|
||||
Item gloves = new BoneGloves();
|
||||
gloves.Hue = 0x66D;
|
||||
AddItem(gloves);
|
||||
|
||||
Item gorget = new PlateGorget();
|
||||
gorget.Hue = 0x1;
|
||||
AddItem(gorget);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m) => 3;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
if (to.Quest is not DarkTidesQuest qs)
|
||||
{
|
||||
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(DarkTidesQuest));
|
||||
}
|
||||
|
||||
return qs.FindObjective<FindMardothAboutVaultObjective>() != null;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
{
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
qs.AddConversation(new LostCallingScrollConversation(true));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindMardothAboutVaultObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
qs.AddConversation(new LostCallingScrollConversation(true));
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindMardothAboutVaultObjective>();
|
||||
obj = qs.FindObjective<FindMardothAboutKronusObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
|
|
@ -114,108 +113,85 @@ namespace Server.Engines.Quests.Necro
|
|||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindMardothAboutKronusObjective>();
|
||||
obj = qs.FindObjective<FindMardothEndObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
var cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new PigIron(20));
|
||||
cont.DropItem(new NoxCrystal(20));
|
||||
cont.DropItem(new BatWing(25));
|
||||
cont.DropItem(new DaemonBlood(20));
|
||||
cont.DropItem(new GraveDust(20));
|
||||
|
||||
BaseWeapon weapon = new BoneHarvester();
|
||||
|
||||
weapon.Slayer = SlayerName.OrcSlaying;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 4);
|
||||
}
|
||||
|
||||
cont.DropItem(weapon);
|
||||
|
||||
cont.DropItem(new BankCheck(2000));
|
||||
cont.DropItem(new EnchantedSextant());
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (contextMenu)
|
||||
{
|
||||
obj = qs.FindObjective<FindMardothEndObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new PigIron(20));
|
||||
cont.DropItem(new NoxCrystal(20));
|
||||
cont.DropItem(new BatWing(25));
|
||||
cont.DropItem(new DaemonBlood(20));
|
||||
cont.DropItem(new GraveDust(20));
|
||||
|
||||
BaseWeapon weapon = new BoneHarvester();
|
||||
|
||||
weapon.Slayer = SlayerName.OrcSlaying;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 4);
|
||||
}
|
||||
|
||||
cont.DropItem(weapon);
|
||||
|
||||
cont.DropItem(new BankCheck(2000));
|
||||
cont.DropItem(new EnchantedSextant());
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
player.SendLocalizedMessage(1061821); // Mardoth has nothing more for you at this time.
|
||||
}
|
||||
FocusTo(player);
|
||||
player.SendLocalizedMessage(1061821); // Mardoth has nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (qs == null && QuestSystem.CanOfferQuest(player, typeof(DarkTidesQuest)))
|
||||
}
|
||||
else if (qs == null && QuestSystem.CanOfferQuest(player, typeof(DarkTidesQuest)))
|
||||
{
|
||||
new DarkTidesQuest(player).SendOffer();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
new DarkTidesQuest(player).SendOffer();
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
else
|
||||
{
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,265 +1,222 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
namespace Server.Engines.Quests.Necro;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SummonedPaladin : BaseCreature
|
||||
{
|
||||
public class SummonedPaladin : BaseCreature
|
||||
[SerializableField(0)]
|
||||
private PlayerMobile _necromancer;
|
||||
|
||||
[SerializableField(1)]
|
||||
private bool _toDelete;
|
||||
|
||||
public SummonedPaladin(PlayerMobile necromancer) : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
private PlayerMobile m_Necromancer;
|
||||
private bool m_ToDelete;
|
||||
_necromancer = necromancer;
|
||||
|
||||
public SummonedPaladin(PlayerMobile necromancer) : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
InitStats(45, 30, 5);
|
||||
Title = "the Paladin";
|
||||
|
||||
Hue = 0x83F3;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
|
||||
FacialHairHue = HairHue;
|
||||
|
||||
AddItem(new Boots(0x1));
|
||||
AddItem(new ChainChest());
|
||||
AddItem(new ChainLegs());
|
||||
AddItem(new RingmailArms());
|
||||
AddItem(new PlateHelm());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateGorget());
|
||||
|
||||
AddItem(new Cloak(0xCF));
|
||||
|
||||
AddItem(new ThinLongsword());
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
|
||||
PackGold(500);
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override bool PlayerRangeSensitive => false;
|
||||
|
||||
public override bool IsHarmfulCriminal(Mobile target) => target != _necromancer && base.IsHarmfulCriminal(target);
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (!_toDelete && !Frozen)
|
||||
{
|
||||
m_Necromancer = necromancer;
|
||||
|
||||
InitStats(45, 30, 5);
|
||||
Title = "the Paladin";
|
||||
|
||||
Hue = 0x83F3;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
|
||||
FacialHairHue = HairHue;
|
||||
|
||||
AddItem(new Boots(0x1));
|
||||
AddItem(new ChainChest());
|
||||
AddItem(new ChainLegs());
|
||||
AddItem(new RingmailArms());
|
||||
AddItem(new PlateHelm());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateGorget());
|
||||
|
||||
AddItem(new Cloak(0xCF));
|
||||
|
||||
AddItem(new ThinLongsword());
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
|
||||
PackGold(500);
|
||||
}
|
||||
|
||||
public SummonedPaladin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override bool PlayerRangeSensitive => false;
|
||||
|
||||
public override bool IsHarmfulCriminal(Mobile target)
|
||||
{
|
||||
if (target == m_Necromancer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.IsHarmfulCriminal(target);
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (!m_ToDelete && !Frozen)
|
||||
{
|
||||
if (m_Necromancer?.Deleted != false || m_Necromancer.Map == Map.Internal)
|
||||
{
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Combatant != m_Necromancer)
|
||||
{
|
||||
Combatant = m_Necromancer;
|
||||
}
|
||||
|
||||
if (!m_Necromancer.Alive)
|
||||
{
|
||||
var qs = m_Necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
{
|
||||
qs.AddObjective(new FindMardothEndObjective(false));
|
||||
}
|
||||
|
||||
Say(1060139, m_Necromancer.Name); // You have made my work easy for me, ~1_NAME~. My task here is done.
|
||||
|
||||
m_ToDelete = true;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), Delete);
|
||||
}
|
||||
else if (m_Necromancer.Map != Map || GetDistanceToSqrt(m_Necromancer) > RangePerception + 1)
|
||||
{
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(Location, Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
2023
|
||||
);
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(m_Necromancer.Location, m_Necromancer.Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
5023
|
||||
);
|
||||
|
||||
Map = m_Necromancer.Map;
|
||||
Location = m_Necromancer.Location;
|
||||
|
||||
PlaySound(0x1FE);
|
||||
|
||||
Say(1060140); // You cannot escape me, knave of evil!
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
var qs = m_Necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
{
|
||||
qs.AddObjective(new FindMardothEndObjective(true));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Necromancer);
|
||||
writer.Write(m_ToDelete);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
m_Necromancer = reader.ReadEntity<PlayerMobile>();
|
||||
m_ToDelete = reader.ReadBool();
|
||||
|
||||
if (m_ToDelete)
|
||||
if (_necromancer?.Deleted != false || _necromancer.Map == Map.Internal)
|
||||
{
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Combatant != _necromancer)
|
||||
{
|
||||
Combatant = _necromancer;
|
||||
}
|
||||
|
||||
if (!_necromancer.Alive)
|
||||
{
|
||||
var qs = _necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
{
|
||||
qs.AddObjective(new FindMardothEndObjective(false));
|
||||
}
|
||||
|
||||
Say(1060139, _necromancer.Name); // You have made my work easy for me, ~1_NAME~. My task here is done.
|
||||
|
||||
_toDelete = true;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), Delete);
|
||||
}
|
||||
else if (_necromancer.Map != Map || GetDistanceToSqrt(_necromancer) > RangePerception + 1)
|
||||
{
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(Location, Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
2023
|
||||
);
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(_necromancer.Location, _necromancer.Map, EffectItem.DefaultDuration),
|
||||
0x3728,
|
||||
10,
|
||||
10,
|
||||
5023
|
||||
);
|
||||
|
||||
Map = _necromancer.Map;
|
||||
Location = _necromancer.Location;
|
||||
|
||||
PlaySound(0x1FE);
|
||||
|
||||
Say(1060140); // You cannot escape me, knave of evil!
|
||||
}
|
||||
}
|
||||
|
||||
public static void BeginSummon(PlayerMobile player)
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
var qs = _necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
{
|
||||
new SummonTimer(player).Start();
|
||||
}
|
||||
|
||||
private class SummonTimer : Timer
|
||||
{
|
||||
private readonly PlayerMobile m_Player;
|
||||
private SummonedPaladin m_Paladin;
|
||||
private int m_Step;
|
||||
|
||||
public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0))
|
||||
{
|
||||
|
||||
m_Player = player;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Player.Deleted)
|
||||
{
|
||||
if (m_Step > 0)
|
||||
{
|
||||
m_Paladin.Delete();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Step > 0 && m_Paladin.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Step == 0)
|
||||
{
|
||||
var moongate = new SummonedPaladinMoongate();
|
||||
moongate.MoveToWorld(new Point3D(2091, 1348, -90), Map.Malas);
|
||||
|
||||
Effects.PlaySound(moongate.Location, moongate.Map, 0x20E);
|
||||
|
||||
m_Paladin = new SummonedPaladin(m_Player);
|
||||
m_Paladin.Frozen = true;
|
||||
|
||||
m_Paladin.Location = moongate.Location;
|
||||
m_Paladin.Map = moongate.Map;
|
||||
|
||||
Delay = TimeSpan.FromSeconds(2.0);
|
||||
Start();
|
||||
}
|
||||
else if (m_Step == 1)
|
||||
{
|
||||
m_Paladin.Direction = m_Paladin.GetDirectionTo(m_Player);
|
||||
m_Paladin.Say(1060122); // STOP WICKED ONE!
|
||||
|
||||
Delay = TimeSpan.FromSeconds(3.0);
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Paladin.Frozen = false;
|
||||
|
||||
m_Paladin.Say(1060123); // I will slay you before I allow you to complete your evil rites!
|
||||
|
||||
m_Paladin.Combatant = m_Player;
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
qs.AddObjective(new FindMardothEndObjective(true));
|
||||
}
|
||||
}
|
||||
|
||||
public class SummonedPaladinMoongate : Item
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
public SummonedPaladinMoongate() : base(0xF6C)
|
||||
if (_toDelete)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 0x482;
|
||||
Light = LightType.Circle300;
|
||||
Timer.DelayCall(Delete);
|
||||
}
|
||||
}
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
||||
public static void BeginSummon(PlayerMobile player)
|
||||
{
|
||||
new SummonTimer(player).Start();
|
||||
}
|
||||
|
||||
private class SummonTimer : Timer
|
||||
{
|
||||
private readonly PlayerMobile _player;
|
||||
private SummonedPaladin _paladin;
|
||||
private int m_Step;
|
||||
|
||||
public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0))
|
||||
{
|
||||
|
||||
_player = player;
|
||||
}
|
||||
|
||||
public SummonedPaladinMoongate(Serial serial) : base(serial)
|
||||
protected override void OnTick()
|
||||
{
|
||||
}
|
||||
if (_player.Deleted)
|
||||
{
|
||||
if (m_Step > 0)
|
||||
{
|
||||
_paladin.Delete();
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
return;
|
||||
}
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
if (m_Step > 0 && _paladin.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
if (m_Step == 0)
|
||||
{
|
||||
var moongate = new SummonedPaladinMoongate();
|
||||
moongate.MoveToWorld(new Point3D(2091, 1348, -90), Map.Malas);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
Effects.PlaySound(moongate.Location, moongate.Map, 0x20E);
|
||||
|
||||
Delete();
|
||||
_paladin = new SummonedPaladin(_player);
|
||||
_paladin.Frozen = true;
|
||||
|
||||
_paladin.Location = moongate.Location;
|
||||
_paladin.Map = moongate.Map;
|
||||
|
||||
Delay = TimeSpan.FromSeconds(2.0);
|
||||
Start();
|
||||
}
|
||||
else if (m_Step == 1)
|
||||
{
|
||||
_paladin.Direction = _paladin.GetDirectionTo(_player);
|
||||
_paladin.Say(1060122); // STOP WICKED ONE!
|
||||
|
||||
Delay = TimeSpan.FromSeconds(3.0);
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
_paladin.Frozen = false;
|
||||
|
||||
_paladin.Say(1060123); // I will slay you before I allow you to complete your evil rites!
|
||||
|
||||
_paladin.Combatant = _player;
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SummonedPaladinMoongate : Item
|
||||
{
|
||||
public SummonedPaladinMoongate() : base(0xF6C)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 0x482;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,32 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlueNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
public class BlueNinjaQuestTeleporter : DynamicTeleporter
|
||||
[Constructible]
|
||||
public BlueNinjaQuestTeleporter() : base(0x51C, 0x2)
|
||||
{
|
||||
[Constructible]
|
||||
public BlueNinjaQuestTeleporter() : base(0x51C, 0x2)
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<GainInnInformationObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(411, 1116, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public BlueNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<GainInnInformationObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(411, 1116, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,15 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class EminosKatana : QuestItem
|
||||
{
|
||||
public class EminosKatana : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public EminosKatana() : base(0x13FF) => Weight = 1.0;
|
||||
[Constructible]
|
||||
public EminosKatana() : base(0x13FF) => Weight = 1.0;
|
||||
|
||||
public EminosKatana(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1063214; // Daimyo Emino's Katana
|
||||
|
||||
public override int LabelNumber => 1063214; // Daimyo Emino's Katana
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not EminosUndertakingQuest;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not EminosUndertakingQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,148 +1,128 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class EminosKatanaChest : WoodenChest
|
||||
{
|
||||
public class EminosKatanaChest : WoodenChest
|
||||
[Constructible]
|
||||
public EminosKatanaChest()
|
||||
{
|
||||
[Constructible]
|
||||
public EminosKatanaChest()
|
||||
{
|
||||
Movable = false;
|
||||
ItemID = 0xE42;
|
||||
Movable = false;
|
||||
ItemID = 0xE42;
|
||||
|
||||
GenerateTreasure();
|
||||
GenerateTreasure();
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Items[i].Delete();
|
||||
}
|
||||
|
||||
public EminosKatanaChest(Serial serial) : base(serial)
|
||||
for (var i = 0; i < 75; i++)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Items[i].Delete();
|
||||
}
|
||||
|
||||
for (var i = 0; i < 75; i++)
|
||||
{
|
||||
DropItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
0 => new GoldBracelet(),
|
||||
1 => new GoldRing(),
|
||||
_ => Loot.RandomGem() // 2
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile player && player.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
DropItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
if (EminosUndertakingQuest.HasLostEminosKatana(from))
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
katana.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
GenerateTreasure();
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
katana.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
}
|
||||
0 => new GoldBracelet(),
|
||||
1 => new GoldRing(),
|
||||
_ => Loot.RandomGem() // 2
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) =>
|
||||
false;
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item) => item == this;
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile player && player.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
var qs = player.Quest;
|
||||
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj?.StolenTreasure == true)
|
||||
if (EminosUndertakingQuest.HasLostEminosKatana(from))
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1063247
|
||||
); // The guard is watching you carefully! It would be unwise to remove another item from here.
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
katana.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
QuestObjective obj = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
GenerateTreasure();
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
katana.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) =>
|
||||
false;
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item) => item == this;
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj?.StolenTreasure == true)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
// The guard is watching you carefully! It would be unwise to remove another item from here.
|
||||
from.SendLocalizedMessage(1063247);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
var obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,32 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GreenNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
public class GreenNinjaQuestTeleporter : DynamicTeleporter
|
||||
[Constructible]
|
||||
public GreenNinjaQuestTeleporter() : base(0x51C, 0x17E)
|
||||
{
|
||||
[Constructible]
|
||||
public GreenNinjaQuestTeleporter() : base(0x51C, 0x17E)
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<UseTeleporterObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(410, 1125, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public GreenNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<UseTeleporterObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(410, 1125, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,74 +1,57 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GuardianBarrier : Item
|
||||
{
|
||||
public class GuardianBarrier : Item
|
||||
[Constructible]
|
||||
public GuardianBarrier() : base(0x3967)
|
||||
{
|
||||
[Constructible]
|
||||
public GuardianBarrier() : base(0x3967)
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public GuardianBarrier(Serial serial) : base(serial)
|
||||
// If the mobile is to the north of the barrier, allow him to pass
|
||||
if (Y >= m.Y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
if (m is BaseCreature creature)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
var master = creature.GetMaster();
|
||||
|
||||
// If the mobile is to the north of the barrier, allow him to pass
|
||||
if (Y >= m.Y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Allow creatures to cross from the south to the north only if their master is near to the north
|
||||
return master != null && Y >= master.Y && master.InRange(this, 4);
|
||||
}
|
||||
|
||||
if (m is BaseCreature creature)
|
||||
if (m is PlayerMobile pm && pm.Quest is EminosUndertakingQuest qs)
|
||||
{
|
||||
var obj = qs.FindObjective<SneakPastGuardiansObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
var master = creature.GetMaster();
|
||||
|
||||
// Allow creatures to cross from the south to the north only if their master is near to the north
|
||||
return master != null && Y >= master.Y && master.InRange(this, 4);
|
||||
}
|
||||
|
||||
if (m is PlayerMobile pm && pm.Quest is EminosUndertakingQuest qs)
|
||||
{
|
||||
var obj = qs.FindObjective<SneakPastGuardiansObjective>();
|
||||
if (obj != null)
|
||||
if (m.Hidden)
|
||||
{
|
||||
if (m.Hidden)
|
||||
{
|
||||
return true; // Hidden ninjas can pass
|
||||
}
|
||||
return true; // Hidden ninjas can pass
|
||||
}
|
||||
|
||||
if (!obj.TaughtHowToUseSkills)
|
||||
{
|
||||
obj.TaughtHowToUseSkills = true;
|
||||
qs.AddConversation(new NeedToHideConversation());
|
||||
}
|
||||
if (!obj.TaughtHowToUseSkills)
|
||||
{
|
||||
obj.TaughtHowToUseSkills = true;
|
||||
qs.AddConversation(new NeedToHideConversation());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,19 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class NoteForZoel : QuestItem
|
||||
{
|
||||
public class NoteForZoel : QuestItem
|
||||
[Constructible]
|
||||
public NoteForZoel() : base(0x14EF)
|
||||
{
|
||||
[Constructible]
|
||||
public NoteForZoel() : base(0x14EF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x6B9;
|
||||
}
|
||||
|
||||
public NoteForZoel(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1063186; // A Note for Zoel
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not EminosUndertakingQuest;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Weight = 1.0;
|
||||
Hue = 0x6B9;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1063186; // A Note for Zoel
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not EminosUndertakingQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,59 +1,42 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class WhiteNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
public class WhiteNinjaQuestTeleporter : DynamicTeleporter
|
||||
[Constructible]
|
||||
public WhiteNinjaQuestTeleporter() : base(0x51C, 0x47E)
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteNinjaQuestTeleporter() : base(0x51C, 0x47E)
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
}
|
||||
QuestObjective obj = qs.FindObjective<SearchForSwordObjective>();
|
||||
|
||||
public WhiteNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
if (obj != null)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SearchForSwordObjective>();
|
||||
|
||||
if (obj != null)
|
||||
if (!obj.Completed)
|
||||
{
|
||||
if (!obj.Completed)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
loc = new Point3D(411, 1085, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
loc = new Point3D(411, 1085, 0);
|
||||
map = Map.Malas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,246 +1,227 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Emino : BaseQuester
|
||||
{
|
||||
public class Emino : BaseQuester
|
||||
[Constructible]
|
||||
public Emino() : base("the Notorious")
|
||||
{
|
||||
[Constructible]
|
||||
public Emino() : base("the Notorious")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Daimyo Emino";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new MaleKimono());
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new PlateHaidate());
|
||||
AddItem(new PlateDo());
|
||||
AddItem(new PlateHiroSode());
|
||||
|
||||
var nunchaku = new Nunchaku();
|
||||
nunchaku.Movable = false;
|
||||
AddItem(nunchaku);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is not EminosUndertakingQuest)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public Emino(Serial serial) : base(serial)
|
||||
if (EminosUndertakingQuest.HasLostNoteForZoel(player))
|
||||
{
|
||||
}
|
||||
Item note = new NoteForZoel();
|
||||
|
||||
public override string DefaultName => "Daimyo Emino";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new MaleKimono());
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new PlateHaidate());
|
||||
AddItem(new PlateDo());
|
||||
AddItem(new PlateHiroSode());
|
||||
|
||||
var nunchaku = new Nunchaku();
|
||||
nunchaku.Movable = false;
|
||||
AddItem(nunchaku);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
if (EminosUndertakingQuest.HasLostNoteForZoel(player))
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
qs.AddConversation(new LostNoteConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
qs.AddConversation(new LostNoteConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
else if (EminosUndertakingQuest.HasLostEminosKatana(player))
|
||||
return;
|
||||
}
|
||||
|
||||
if (EminosUndertakingQuest.HasLostEminosKatana(player))
|
||||
{
|
||||
qs.AddConversation(new LostSwordConversation());
|
||||
return;
|
||||
}
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindEminoBeginObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<UseTeleporterObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
player.AddToBackpack(new LeatherNinjaPants());
|
||||
player.AddToBackpack(new LeatherNinjaMitts());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<ReturnFromInnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
|
||||
cont.DropItem(new LeatherNinjaHood());
|
||||
cont.DropItem(new LeatherNinjaJacket());
|
||||
|
||||
if (player.PlaceInBackpack(cont))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(SlayHenchmenObjective)))
|
||||
{
|
||||
qs.AddConversation(new ContinueSlayHenchmenConversation());
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<GiveEminoSwordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = null;
|
||||
|
||||
if (player.Backpack != null)
|
||||
{
|
||||
katana = player.Backpack.FindItemByType<EminosKatana>();
|
||||
}
|
||||
|
||||
if (katana != null)
|
||||
{
|
||||
var stolenTreasure = false;
|
||||
|
||||
var walk = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (walk != null)
|
||||
{
|
||||
qs.AddConversation(new LostSwordConversation());
|
||||
stolenTreasure = walk.StolenTreasure;
|
||||
}
|
||||
|
||||
var kama = new Kama();
|
||||
|
||||
if (stolenTreasure)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindEminoBeginObjective>();
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 30);
|
||||
}
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (player.PlaceInBackpack(kama))
|
||||
{
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
if (stolenTreasure)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddConversation(new EarnLessGiftsConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<UseTeleporterObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
player.AddToBackpack(new LeatherNinjaPants());
|
||||
player.AddToBackpack(new LeatherNinjaMitts());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnFromInnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
|
||||
cont.DropItem(new LeatherNinjaHood());
|
||||
cont.DropItem(new LeatherNinjaJacket());
|
||||
|
||||
if (player.PlaceInBackpack(cont))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(SlayHenchmenObjective)))
|
||||
{
|
||||
qs.AddConversation(new ContinueSlayHenchmenConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<GiveEminoSwordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = null;
|
||||
|
||||
if (player.Backpack != null)
|
||||
{
|
||||
katana = player.Backpack.FindItemByType<EminosKatana>();
|
||||
}
|
||||
|
||||
if (katana != null)
|
||||
{
|
||||
var stolenTreasure = false;
|
||||
|
||||
var walk = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (walk != null)
|
||||
{
|
||||
stolenTreasure = walk.StolenTreasure;
|
||||
}
|
||||
|
||||
var kama = new Kama();
|
||||
|
||||
if (stolenTreasure)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 30);
|
||||
}
|
||||
|
||||
if (player.PlaceInBackpack(kama))
|
||||
{
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
if (stolenTreasure)
|
||||
{
|
||||
qs.AddConversation(new EarnLessGiftsConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new EarnGiftsConversation());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kama.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
qs.AddConversation(new EarnGiftsConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
kama.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
base.Serialize(writer);
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +1,37 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class EnshroudedFigure : BaseQuester
|
||||
{
|
||||
public class EnshroudedFigure : BaseQuester
|
||||
[Constructible]
|
||||
public EnshroudedFigure()
|
||||
{
|
||||
[Constructible]
|
||||
public EnshroudedFigure()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public EnshroudedFigure(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override string DefaultName => "an enshrouded figure";
|
||||
|
||||
public override string DefaultName => "an enshrouded figure";
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Hue = 0x8401;
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
Hue = 0x8401;
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new DeathShroud());
|
||||
AddItem(new ThighBoots());
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new DeathShroud());
|
||||
AddItem(new ThighBoots());
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,41 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class Henchman : BaseCreature
|
||||
{
|
||||
public class Henchman : BaseCreature
|
||||
[Constructible]
|
||||
public Henchman() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public Henchman() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
InitStats(45, 30, 5);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new NinjaTabi());
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new NinjaTabi());
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
AddItem(new Kama());
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(new Tessen());
|
||||
}
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
AddItem(new Kama());
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(new Tessen());
|
||||
}
|
||||
|
||||
public Henchman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "a henchman";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public override string DefaultName => "a henchman";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,89 +1,69 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HiddenFigure : BaseQuester
|
||||
{
|
||||
public class HiddenFigure : BaseQuester
|
||||
private static int[] _messages =
|
||||
{
|
||||
public static int[] Messages =
|
||||
{
|
||||
1063191, // They won't find me here.
|
||||
1063192 // Ah, a quiet hideout.
|
||||
};
|
||||
1063191, // They won't find me here.
|
||||
1063192 // Ah, a quiet hideout.
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public HiddenFigure() => Message = Messages.RandomElement();
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _message;
|
||||
|
||||
public HiddenFigure(Serial serial) : base(serial)
|
||||
[Constructible]
|
||||
public HiddenFigure() => Message = _messages.RandomElement();
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = Utility.RandomBool();
|
||||
|
||||
if (Female)
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Message { get; set; }
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
else
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = Utility.RandomBool();
|
||||
|
||||
if (Female)
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new TattsukeHakama(GetRandomHue()));
|
||||
AddItem(new Kasa());
|
||||
AddItem(new HakamaShita(GetRandomHue()));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
AddItem(new Shoes(GetShoeHue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(new Sandals(GetShoeHue()));
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 3;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, Message, player.NetState);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(Message);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
Message = reader.ReadInt();
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new TattsukeHakama(GetRandomHue()));
|
||||
AddItem(new Kasa());
|
||||
AddItem(new HakamaShita(GetRandomHue()));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
AddItem(new Shoes(GetShoeHue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(new Sandals(GetShoeHue()));
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 3;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, Message, player.NetState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,41 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class JedahEntille : BaseQuester
|
||||
{
|
||||
public class JedahEntille : BaseQuester
|
||||
[Constructible]
|
||||
public JedahEntille() : base("the Silent")
|
||||
{
|
||||
[Constructible]
|
||||
public JedahEntille() : base("the Silent")
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public JedahEntille(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override string DefaultName => "Jedah Entille";
|
||||
|
||||
public override string DefaultName => "Jedah Entille";
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Hue = 0x83FE;
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
Hue = 0x83FE;
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x6BE;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x6BE;
|
||||
AddItem(new PlainDress(0x528));
|
||||
AddItem(new ThighBoots());
|
||||
AddItem(new FloppyHat());
|
||||
}
|
||||
|
||||
AddItem(new PlainDress(0x528));
|
||||
AddItem(new ThighBoots());
|
||||
AddItem(new FloppyHat());
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,130 +1,113 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
namespace Server.Engines.Quests.Ninja;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Zoel : BaseQuester
|
||||
{
|
||||
public class Zoel : BaseQuester
|
||||
[Constructible]
|
||||
public Zoel() : base("the Masterful Tactician")
|
||||
{
|
||||
[Constructible]
|
||||
public Zoel() : base("the Masterful Tactician")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Elite Ninja Zoel";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new HakamaShita(0x1));
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new TattsukeHakama());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
|
||||
var tekagi = new Tekagi();
|
||||
tekagi.Movable = false;
|
||||
AddItem(tekagi);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to) => to.Quest is EminosUndertakingQuest;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindZoelObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Zoel(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Elite Ninja Zoel";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new HakamaShita(0x1));
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new TattsukeHakama());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
|
||||
var tekagi = new Tekagi();
|
||||
tekagi.Movable = false;
|
||||
AddItem(tekagi);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to) => to.Quest is EminosUndertakingQuest;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindZoelObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (dropped is NoteForZoel)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
QuestObjective obj = qs.FindObjective<GiveZoelNoteObjective>();
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
if (dropped is NoteForZoel)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<GiveZoelNoteObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
if (!m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
if (m.Map?.CanFit(m.Location, 16, false, false) != true)
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,15 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaochisKatana : QuestItem
|
||||
{
|
||||
public class HaochisKatana : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisKatana() : base(0x13FF) => Weight = 1.0;
|
||||
[Constructible]
|
||||
public HaochisKatana() : base(0x13FF) => Weight = 1.0;
|
||||
|
||||
public HaochisKatana(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1063165; // Daimyo Haochi's Katana
|
||||
|
||||
public override int LabelNumber => 1063165; // Daimyo Haochi's Katana
|
||||
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not HaochisTrialsQuest;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override bool CanDrop(PlayerMobile player) => player.Quest is not HaochisTrialsQuest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,81 +1,66 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaochisKatanaGenerator : Item
|
||||
{
|
||||
public class HaochisKatanaGenerator : Item
|
||||
[Constructible]
|
||||
public HaochisKatanaGenerator() : base(0x1B7B)
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisKatanaGenerator() : base(0x1B7B)
|
||||
Visible = false;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override string DefaultName => "Haochi's katana generator";
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is not PlayerMobile player)
|
||||
{
|
||||
Visible = false;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public HaochisKatanaGenerator(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Haochi's katana generator";
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile player)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
if (HaochisTrialsQuest.HasLostHaochisKatana(player))
|
||||
{
|
||||
Item katana = new HaochisKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
katana.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FifthTrialIntroObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new HaochisKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
katana.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260
|
||||
); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
var qs = player.Quest;
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
if (qs is not HaochisTrialsQuest)
|
||||
{
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
if (HaochisTrialsQuest.HasLostHaochisKatana(player))
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
Item katana = new HaochisKatana();
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
katana.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FifthTrialIntroObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new HaochisKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
katana.Delete();
|
||||
// You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
player.SendLocalizedMessage(1046260);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,104 +1,84 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaochisTreasureChest : WoodenFootLocker
|
||||
{
|
||||
public class HaochisTreasureChest : WoodenFootLocker
|
||||
[Constructible]
|
||||
public HaochisTreasureChest()
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisTreasureChest()
|
||||
{
|
||||
Movable = false;
|
||||
Movable = false;
|
||||
|
||||
GenerateTreasure();
|
||||
GenerateTreasure();
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Items[i].Delete();
|
||||
}
|
||||
|
||||
public HaochisTreasureChest(Serial serial) : base(serial)
|
||||
for (var i = 0; i < 75; i++)
|
||||
{
|
||||
DropItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
0 => new GoldBracelet(),
|
||||
1 => new GoldRing(),
|
||||
_ => Loot.RandomGem() // 2
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) =>
|
||||
false;
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item) => item == this;
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0; i--)
|
||||
var obj = player.Quest.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj?.StolenTreasure == true)
|
||||
{
|
||||
Items[i].Delete();
|
||||
// The guard is watching you carefully! It would be unwise to remove another item from here.
|
||||
from.SendLocalizedMessage(1063247);
|
||||
}
|
||||
|
||||
for (var i = 0; i < 75; i++)
|
||||
{
|
||||
DropItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
0 => new GoldBracelet(),
|
||||
1 => new GoldRing(),
|
||||
_ => Loot.RandomGem() // 2
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) =>
|
||||
false;
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item) => item == this;
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj?.StolenTreasure == true)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1063247
|
||||
); // The guard is watching you carefully! It would be unwise to remove another item from here.
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
{
|
||||
var obj = player.Quest.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
}
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(2.0), GenerateTreasure);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
Timer.StartTimer(GenerateTreasure);
|
||||
}
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(2.0), GenerateTreasure);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,80 +1,63 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HonorCandle : CandleLong
|
||||
{
|
||||
public class HonorCandle : CandleLong
|
||||
private static readonly TimeSpan LitDuration = TimeSpan.FromSeconds(20.0);
|
||||
|
||||
[Constructible]
|
||||
public HonorCandle()
|
||||
{
|
||||
private static readonly TimeSpan LitDuration = TimeSpan.FromSeconds(20.0);
|
||||
Movable = false;
|
||||
Duration = LitDuration;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HonorCandle()
|
||||
public override int LitSound => 0;
|
||||
public override int UnlitSound => 0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
var wasBurning = Burning;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
||||
if (!wasBurning && Burning)
|
||||
{
|
||||
Movable = false;
|
||||
Duration = LitDuration;
|
||||
}
|
||||
|
||||
public HonorCandle(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LitSound => 0;
|
||||
public override int UnlitSound => 0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
var wasBurning = Burning;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
||||
if (!wasBurning && Burning)
|
||||
if (from is not PlayerMobile player)
|
||||
{
|
||||
if (from is not PlayerMobile player)
|
||||
return;
|
||||
}
|
||||
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SixthTrialIntroObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
return;
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SixthTrialIntroObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
SendLocalizedMessageTo(from, 1063251); // You light a candle in honor.
|
||||
}
|
||||
SendLocalizedMessageTo(from, 1063251); // You light a candle in honor.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Burn()
|
||||
{
|
||||
Douse();
|
||||
}
|
||||
public override void Burn()
|
||||
{
|
||||
Douse();
|
||||
}
|
||||
|
||||
public override void Douse()
|
||||
{
|
||||
base.Douse();
|
||||
public override void Douse()
|
||||
{
|
||||
base.Douse();
|
||||
|
||||
Duration = LitDuration;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
Duration = LitDuration;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,69 +1,52 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CursedSoul : BaseCreature
|
||||
{
|
||||
public class CursedSoul : BaseCreature
|
||||
[Constructible]
|
||||
public CursedSoul() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public CursedSoul() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
Body = 3;
|
||||
BaseSoundID = 471;
|
||||
Body = 3;
|
||||
BaseSoundID = 471;
|
||||
|
||||
SetStr(20, 40);
|
||||
SetDex(40, 60);
|
||||
SetInt(15, 25);
|
||||
SetStr(20, 40);
|
||||
SetDex(40, 60);
|
||||
SetInt(15, 25);
|
||||
|
||||
SetHits(10, 20);
|
||||
SetHits(10, 20);
|
||||
|
||||
SetDamage(3, 7);
|
||||
SetDamage(3, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 8, 12);
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 8, 12);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 35.0, 39.0);
|
||||
SetSkill(SkillName.Tactics, 5.0, 15.0);
|
||||
SetSkill(SkillName.MagicResist, 10.0);
|
||||
SetSkill(SkillName.Wrestling, 35.0, 39.0);
|
||||
SetSkill(SkillName.Tactics, 5.0, 15.0);
|
||||
SetSkill(SkillName.MagicResist, 10.0);
|
||||
|
||||
Fame = 200;
|
||||
Karma = -200;
|
||||
Fame = 200;
|
||||
Karma = -200;
|
||||
|
||||
PackItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
0 => new LeftArm(),
|
||||
1 => new RightArm(),
|
||||
2 => new Torso(),
|
||||
3 => new Bone(),
|
||||
4 => new RibCage(),
|
||||
5 => new RibCage(),
|
||||
_ => new BonePile() // 6-9
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public CursedSoul(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a cursed soul corpse";
|
||||
public override string DefaultName => "a cursed soul";
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
PackItem(
|
||||
Utility.Random(10) switch
|
||||
{
|
||||
0 => new LeftArm(),
|
||||
1 => new RightArm(),
|
||||
2 => new Torso(),
|
||||
3 => new Bone(),
|
||||
4 => new RibCage(),
|
||||
5 => new RibCage(),
|
||||
_ => new BonePile() // 6-9
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public override string CorpseName => "a cursed soul corpse";
|
||||
public override string DefaultName => "a cursed soul";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1,62 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DeadlyImp : BaseCreature
|
||||
{
|
||||
public class DeadlyImp : BaseCreature
|
||||
[Constructible]
|
||||
public DeadlyImp() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public DeadlyImp() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
Body = 74;
|
||||
BaseSoundID = 422;
|
||||
Hue = 0x66A;
|
||||
|
||||
SetStr(91, 115);
|
||||
SetDex(61, 80);
|
||||
SetInt(86, 105);
|
||||
|
||||
SetHits(1000);
|
||||
|
||||
SetDamage(50, 80);
|
||||
|
||||
SetDamageType(ResistanceType.Fire, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 95, 98);
|
||||
SetResistance(ResistanceType.Fire, 95, 98);
|
||||
SetResistance(ResistanceType.Cold, 95, 98);
|
||||
SetResistance(ResistanceType.Poison, 95, 98);
|
||||
SetResistance(ResistanceType.Energy, 95, 98);
|
||||
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
SetSkill(SkillName.Tactics, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public override string DefaultName => "a deadly imp";
|
||||
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
if (aggressor is PlayerMobile player)
|
||||
{
|
||||
Body = 74;
|
||||
BaseSoundID = 422;
|
||||
Hue = 0x66A;
|
||||
|
||||
SetStr(91, 115);
|
||||
SetDex(61, 80);
|
||||
SetInt(86, 105);
|
||||
|
||||
SetHits(1000);
|
||||
|
||||
SetDamage(50, 80);
|
||||
|
||||
SetDamageType(ResistanceType.Fire, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 95, 98);
|
||||
SetResistance(ResistanceType.Fire, 95, 98);
|
||||
SetResistance(ResistanceType.Cold, 95, 98);
|
||||
SetResistance(ResistanceType.Poison, 95, 98);
|
||||
SetResistance(ResistanceType.Energy, 95, 98);
|
||||
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
SetSkill(SkillName.Tactics, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public DeadlyImp(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "a deadly imp";
|
||||
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
if (aggressor is PlayerMobile player)
|
||||
var qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(false));
|
||||
}
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,56 +1,39 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DiseasedCat : BaseCreature
|
||||
{
|
||||
public class DiseasedCat : BaseCreature
|
||||
[Constructible]
|
||||
public DiseasedCat() : base(AIType.AI_Animal, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public DiseasedCat() : base(AIType.AI_Animal, FightMode.Aggressor)
|
||||
{
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x69;
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr(9);
|
||||
SetDex(35);
|
||||
SetInt(5);
|
||||
SetStr(9);
|
||||
SetDex(35);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1);
|
||||
SetDamage(1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 4.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 4.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
VirtualArmor = 8;
|
||||
}
|
||||
|
||||
public DiseasedCat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "a diseased cat";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
VirtualArmor = 8;
|
||||
}
|
||||
|
||||
public override string DefaultName => "a diseased cat";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,69 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class FierceDragon : BaseCreature
|
||||
{
|
||||
public class FierceDragon : BaseCreature
|
||||
[Constructible]
|
||||
public FierceDragon() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public FierceDragon() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
Body = 103;
|
||||
BaseSoundID = 362;
|
||||
|
||||
SetStr(6000, 6020);
|
||||
SetDex(0);
|
||||
SetInt(850, 870);
|
||||
|
||||
SetDamage(50, 80);
|
||||
|
||||
SetDamageType(ResistanceType.Fire, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 95, 98);
|
||||
SetResistance(ResistanceType.Fire, 95, 98);
|
||||
SetResistance(ResistanceType.Cold, 95, 98);
|
||||
SetResistance(ResistanceType.Poison, 95, 98);
|
||||
SetResistance(ResistanceType.Energy, 95, 98);
|
||||
|
||||
SetSkill(SkillName.Tactics, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0);
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = 15000;
|
||||
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public override string DefaultName => "a fierce dragon";
|
||||
|
||||
public override int GetIdleSound() => 0x2C4;
|
||||
|
||||
public override int GetAttackSound() => 0x2C0;
|
||||
|
||||
public override int GetDeathSound() => 0x2C1;
|
||||
|
||||
public override int GetAngerSound() => 0x2C4;
|
||||
|
||||
public override int GetHurtSound() => 0x2C3;
|
||||
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
if (aggressor is PlayerMobile player)
|
||||
{
|
||||
Body = 103;
|
||||
BaseSoundID = 362;
|
||||
|
||||
SetStr(6000, 6020);
|
||||
SetDex(0);
|
||||
SetInt(850, 870);
|
||||
|
||||
SetDamage(50, 80);
|
||||
|
||||
SetDamageType(ResistanceType.Fire, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 95, 98);
|
||||
SetResistance(ResistanceType.Fire, 95, 98);
|
||||
SetResistance(ResistanceType.Cold, 95, 98);
|
||||
SetResistance(ResistanceType.Poison, 95, 98);
|
||||
SetResistance(ResistanceType.Energy, 95, 98);
|
||||
|
||||
SetSkill(SkillName.Tactics, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0);
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = 15000;
|
||||
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public FierceDragon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "a fierce dragon";
|
||||
|
||||
public override int GetIdleSound() => 0x2C4;
|
||||
|
||||
public override int GetAttackSound() => 0x2C0;
|
||||
|
||||
public override int GetDeathSound() => 0x2C1;
|
||||
|
||||
public override int GetAngerSound() => 0x2C4;
|
||||
|
||||
public override int GetHurtSound() => 0x2C3;
|
||||
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
if (aggressor is PlayerMobile player)
|
||||
var qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(true));
|
||||
}
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,178 +1,161 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Haochi : BaseQuester
|
||||
{
|
||||
public class Haochi : BaseQuester
|
||||
[Constructible]
|
||||
public Haochi() : base("the Honorable Samurai Legend")
|
||||
{
|
||||
[Constructible]
|
||||
public Haochi() : base("the Honorable Samurai Legend")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Daimyo Haochi";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8403;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x204A;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new JinBaori());
|
||||
|
||||
AddItem(new PlateHaidate());
|
||||
AddItem(new StandardPlateKabuto());
|
||||
AddItem(new PlateMempo());
|
||||
AddItem(new PlateDo());
|
||||
AddItem(new PlateHiroSode());
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
}
|
||||
|
||||
public Haochi(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Daimyo Haochi";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8403;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x204A;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new JinBaori());
|
||||
|
||||
AddItem(new PlateHaidate());
|
||||
AddItem(new StandardPlateKabuto());
|
||||
AddItem(new PlateMempo());
|
||||
AddItem(new PlateDo());
|
||||
AddItem(new PlateHiroSode());
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 2;
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
if (HaochisTrialsQuest.HasLostHaochisKatana(player))
|
||||
{
|
||||
if (HaochisTrialsQuest.HasLostHaochisKatana(player))
|
||||
qs.AddConversation(new LostSwordConversation());
|
||||
return;
|
||||
}
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindHaochiObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FirstTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
player.AddToBackpack(new LeatherDo());
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<SecondTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
if (((SecondTrialReturnObjective)obj).Dragon)
|
||||
{
|
||||
player.AddToBackpack(new LeatherSuneate());
|
||||
}
|
||||
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<ThirdTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
player.AddToBackpack(new LeatherHiroSode());
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FourthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
if (!((FourthTrialReturnObjective)obj).KilledCat)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
cont.DropItem(new LeatherHiroSode());
|
||||
cont.DropItem(new JinBaori());
|
||||
player.AddToBackpack(cont);
|
||||
}
|
||||
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FifthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
var katana = player.Backpack?.FindItemByType<HaochisKatana>();
|
||||
if (katana == null)
|
||||
{
|
||||
qs.AddConversation(new LostSwordConversation());
|
||||
return;
|
||||
}
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindHaochiObjective>();
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj = qs.FindObjective<FifthTrialIntroObjective>();
|
||||
if (((FifthTrialIntroObjective)obj)?.StolenTreasure == true)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
qs.AddConversation(new SixthTrialIntroConversation(true));
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FirstTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
else
|
||||
{
|
||||
player.AddToBackpack(new LeatherDo());
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<SecondTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
if (((SecondTrialReturnObjective)obj).Dragon)
|
||||
{
|
||||
player.AddToBackpack(new LeatherSuneate());
|
||||
}
|
||||
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<ThirdTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
player.AddToBackpack(new LeatherHiroSode());
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FourthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
if (!((FourthTrialReturnObjective)obj).KilledCat)
|
||||
{
|
||||
var cont = GetNewContainer();
|
||||
cont.DropItem(new LeatherHiroSode());
|
||||
cont.DropItem(new JinBaori());
|
||||
player.AddToBackpack(cont);
|
||||
}
|
||||
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FifthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
var katana = player.Backpack?.FindItemByType<HaochisKatana>();
|
||||
if (katana == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
obj = qs.FindObjective<FifthTrialIntroObjective>();
|
||||
if (((FifthTrialIntroObjective)obj)?.StolenTreasure == true)
|
||||
{
|
||||
qs.AddConversation(new SixthTrialIntroConversation(true));
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation(new SixthTrialIntroConversation(false));
|
||||
}
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<SixthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<SeventhTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
BaseWeapon weapon = new Daisho();
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, Utility.Random(1, 3), 10, 30);
|
||||
player.AddToBackpack(weapon);
|
||||
|
||||
BaseArmor armor = new LeatherDo();
|
||||
BaseRunicTool.ApplyAttributesTo(armor, Utility.Random(1, 3), 10, 20);
|
||||
player.AddToBackpack(armor);
|
||||
|
||||
obj.Complete();
|
||||
qs.AddConversation(new SixthTrialIntroConversation(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
obj = qs.FindObjective<SixthTrialReturnObjective>();
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
obj = qs.FindObjective<SeventhTrialReturnObjective>();
|
||||
|
||||
var version = reader.ReadInt();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
BaseWeapon weapon = new Daisho();
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, Utility.Random(1, 3), 10, 30);
|
||||
player.AddToBackpack(weapon);
|
||||
|
||||
BaseArmor armor = new LeatherDo();
|
||||
BaseRunicTool.ApplyAttributesTo(armor, Utility.Random(1, 3), 10, 20);
|
||||
player.AddToBackpack(armor);
|
||||
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,85 +1,68 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaochisGuardsman : BaseQuester
|
||||
{
|
||||
public class HaochisGuardsman : BaseQuester
|
||||
[Constructible]
|
||||
public HaochisGuardsman() : base("the Guardsman of Daimyo Haochi")
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisGuardsman() : base("the Guardsman of Daimyo Haochi")
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public HaochisGuardsman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi(Utility.RandomNondyedHue()));
|
||||
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi(Utility.RandomNondyedHue()));
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new StuddedHaidate(),
|
||||
1 => new PlateSuneate(),
|
||||
_ => new LeatherSuneate()
|
||||
}
|
||||
);
|
||||
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new StuddedHaidate(),
|
||||
1 => new PlateSuneate(),
|
||||
_ => new LeatherSuneate()
|
||||
}
|
||||
);
|
||||
AddItem(
|
||||
Utility.Random(4) switch
|
||||
{
|
||||
0 => new DecorativePlateKabuto(),
|
||||
1 => new ChainHatsuburi(),
|
||||
2 => new LightPlateJingasa(),
|
||||
_ => new LeatherJingasa()
|
||||
}
|
||||
);
|
||||
|
||||
AddItem(
|
||||
Utility.Random(4) switch
|
||||
{
|
||||
0 => new DecorativePlateKabuto(),
|
||||
1 => new ChainHatsuburi(),
|
||||
2 => new LightPlateJingasa(),
|
||||
_ => new LeatherJingasa()
|
||||
}
|
||||
);
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new NoDachi { Movable = false },
|
||||
1 => new Lajatang { Movable = false },
|
||||
_ => new Wakizashi { Movable = false }
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new NoDachi { Movable = false },
|
||||
1 => new Lajatang { Movable = false },
|
||||
_ => new Wakizashi { Movable = false }
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,56 +1,39 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class InjuredWolf : BaseCreature
|
||||
{
|
||||
public class InjuredWolf : BaseCreature
|
||||
[Constructible]
|
||||
public InjuredWolf() : base(AIType.AI_Animal, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public InjuredWolf() : base(AIType.AI_Animal, FightMode.Aggressor)
|
||||
{
|
||||
Body = 0xE1;
|
||||
BaseSoundID = 0xE5;
|
||||
Body = 0xE1;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
|
||||
SetStr(10, 20);
|
||||
SetDex(45, 65);
|
||||
SetInt(10, 15);
|
||||
SetStr(10, 20);
|
||||
SetDex(45, 65);
|
||||
SetInt(10, 15);
|
||||
|
||||
SetHits(1);
|
||||
SetHits(1);
|
||||
|
||||
SetDamage(1, 3);
|
||||
SetDamage(1, 3);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Physical, 15);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 10.0);
|
||||
SetSkill(SkillName.Tactics, 0.0, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 20.0, 30.0);
|
||||
}
|
||||
|
||||
public InjuredWolf(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an injured wolf corpse";
|
||||
public override string DefaultName => "an injured wolf";
|
||||
|
||||
public override int GetIdleSound() => 0xE9;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
SetSkill(SkillName.MagicResist, 10.0);
|
||||
SetSkill(SkillName.Tactics, 0.0, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 20.0, 30.0);
|
||||
}
|
||||
|
||||
public override string CorpseName => "an injured wolf corpse";
|
||||
public override string DefaultName => "an injured wolf";
|
||||
|
||||
public override int GetIdleSound() => 0xE9;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,89 +1,72 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class Relnia : BaseQuester
|
||||
{
|
||||
public class Relnia : BaseQuester
|
||||
[Constructible]
|
||||
public Relnia() : base("the Gypsy")
|
||||
{
|
||||
[Constructible]
|
||||
public Relnia() : base("the Gypsy")
|
||||
}
|
||||
|
||||
public override string DefaultName => "Disheveled Relnia";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FF;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x654;
|
||||
|
||||
AddItem(new ThighBoots(0x901));
|
||||
AddItem(new FancyShirt(0x5F3));
|
||||
AddItem(new SkullCap(0x6A7));
|
||||
AddItem(new Skirt(0x544));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
}
|
||||
var qs = player.Quest;
|
||||
|
||||
public Relnia(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Disheveled Relnia";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FF;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x654;
|
||||
|
||||
AddItem(new ThighBoots(0x901));
|
||||
AddItem(new FancyShirt(0x5F3));
|
||||
AddItem(new SkullCap(0x6A7));
|
||||
AddItem(new Skirt(0x544));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
QuestObjective obj = qs.FindObjective<FourthTrialCatsObjective>();
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FourthTrialCatsObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (dropped is Gold gold)
|
||||
{
|
||||
if (dropped is Gold gold)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new FourthTrialReturnObjective(false));
|
||||
obj.Complete();
|
||||
qs.AddObjective(new FourthTrialReturnObjective(false));
|
||||
|
||||
SayTo(from, 1063241); // I thank thee. This gold will be a great help to me and mine!
|
||||
SayTo(from, 1063241); // I thank thee. This gold will be a great help to me and mine!
|
||||
|
||||
gold.Consume(); // Intentional difference from OSI: don't take all the gold of poor newbies!
|
||||
return gold.Deleted;
|
||||
}
|
||||
gold.Consume(); // Intentional difference from OSI: don't take all the gold of poor newbies!
|
||||
return gold.Deleted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,63 +1,46 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class YoungNinja : BaseCreature
|
||||
{
|
||||
public class YoungNinja : BaseCreature
|
||||
[Constructible]
|
||||
public YoungNinja() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public YoungNinja() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(20, 30);
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(20, 30);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new Tessen(),
|
||||
1 => new Kama(),
|
||||
_ => new Lajatang()
|
||||
}
|
||||
);
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new Tessen(),
|
||||
1 => new Kama(),
|
||||
_ => new Lajatang()
|
||||
}
|
||||
);
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public YoungNinja(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a young ninja's corpse";
|
||||
public override string DefaultName => "a young ninja";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public override string CorpseName => "a young ninja's corpse";
|
||||
public override string DefaultName => "a young ninja";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,71 +1,54 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
namespace Server.Engines.Quests.Samurai;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class YoungRonin : BaseCreature
|
||||
{
|
||||
public class YoungRonin : BaseCreature
|
||||
[Constructible]
|
||||
public YoungRonin() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
[Constructible]
|
||||
public YoungRonin() : base(AIType.AI_Melee, FightMode.Aggressor)
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(10, 20);
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(10, 20);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi());
|
||||
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new StuddedHaidate(),
|
||||
1 => new PlateSuneate(),
|
||||
_ => new LeatherSuneate()
|
||||
}
|
||||
);
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new StuddedHaidate(),
|
||||
1 => new PlateSuneate(),
|
||||
_ => new LeatherSuneate()
|
||||
}
|
||||
);
|
||||
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new NoDachi(),
|
||||
1 => new Lajatang(),
|
||||
_ => new Wakizashi()
|
||||
}
|
||||
);
|
||||
AddItem(
|
||||
Utility.Random(3) switch
|
||||
{
|
||||
0 => new NoDachi(),
|
||||
1 => new Lajatang(),
|
||||
_ => new Wakizashi()
|
||||
}
|
||||
);
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public YoungRonin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a young ronin's corpse";
|
||||
public override string DefaultName => "a young ronin";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public override string CorpseName => "a young ronin's corpse";
|
||||
public override string DefaultName => "a young ronin";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Server.Engines.Quests.Doom
|
|||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBMage());
|
||||
_sbInfos.Add(new SBMage());
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Server.Engines.Quests.Haven
|
|||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBDryad());
|
||||
_sbInfos.Add(new SBDryad());
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm) => 4;
|
||||
|
|
|
|||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.BaseAmbitiousSolenQueen.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.BaseAmbitiousSolenQueen.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ambitious.BaseAmbitiousSolenQueen"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.BlackAmbitiousSolenQueen.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.BlackAmbitiousSolenQueen.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ambitious.BlackAmbitiousSolenQueen"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.RedAmbitiousSolenQueen.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ambitious.RedAmbitiousSolenQueen.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ambitious.RedAmbitiousSolenQueen"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.BaseQuester.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.BaseQuester.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.BaseQuester"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.AlbertaGiacco.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.AlbertaGiacco.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.AlbertaGiacco"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.ElwoodMcCarrin.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.ElwoodMcCarrin.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.ElwoodMcCarrin"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.EnchantedPaints.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.EnchantedPaints.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.EnchantedPaints"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.GabrielPiete.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.GabrielPiete.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.GabrielPiete"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.Impresario.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.Impresario.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.Impresario"
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.Obsidian.v0.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.Obsidian.v0.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.Obsidian",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Quantity",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
"EncodedInt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StatueName",
|
||||
"type": "string",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.PaintedImage.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.PaintedImage.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.PaintedImage",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Image",
|
||||
"type": "Server.Engines.Quests.Collector.ImageType",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.TomasONeerlan.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Collector.TomasONeerlan.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Collector.TomasONeerlan"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.DynamicTeleporter.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.DynamicTeleporter.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.DynamicTeleporter"
|
||||
}
|
||||
30
Projects/UOContent/Migrations/Server.Engines.Quests.HornOfRetreat.v0.json
generated
Normal file
30
Projects/UOContent/Migrations/Server.Engines.Quests.HornOfRetreat.v0.json
generated
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.HornOfRetreat",
|
||||
"properties": [
|
||||
{
|
||||
"name": "DestLoc",
|
||||
"type": "Server.Point3D",
|
||||
"rule": "PrimitiveUOTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
"Point3D"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DestMap",
|
||||
"type": "Server.Map",
|
||||
"rule": "PrimitiveUOTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
"Map"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Charges",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.HornOfRetreatMoongate.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.HornOfRetreatMoongate.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.HornOfRetreatMoongate"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.CrystalCaveBarrier.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.CrystalCaveBarrier.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.CrystalCaveBarrier"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.DarkTidesHorn.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.DarkTidesHorn.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.DarkTidesHorn"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.DarkTidesTeleporter.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.DarkTidesTeleporter.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.DarkTidesTeleporter"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Horus.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Horus.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.Horus"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.KronusScroll.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.KronusScroll.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.KronusScroll"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.KronusScrollBox.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.KronusScrollBox.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.KronusScrollBox"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Maabus.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Maabus.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.Maabus"
|
||||
}
|
||||
19
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.MaabusCoffin.v0.json
generated
Normal file
19
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.MaabusCoffin.v0.json
generated
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.MaabusCoffin",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Maabus",
|
||||
"type": "Server.Engines.Quests.Necro.Maabus",
|
||||
"rule": "SerializableInterfaceMigrationRule"
|
||||
},
|
||||
{
|
||||
"name": "SpawnLocation",
|
||||
"type": "Server.Point3D",
|
||||
"rule": "PrimitiveUOTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
"Point3D"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.MaabusCoffinComponent.v0.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.MaabusCoffinComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.MaabusCoffinComponent",
|
||||
"properties": [
|
||||
{
|
||||
"name": "FullItemID",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "EmptyItemID",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Mardoth.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.Mardoth.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.Mardoth"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.ScrollOfAbraxus.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.ScrollOfAbraxus.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.ScrollOfAbraxus"
|
||||
}
|
||||
19
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.SummonedPaladin.v0.json
generated
Normal file
19
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.SummonedPaladin.v0.json
generated
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.SummonedPaladin",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Necromancer",
|
||||
"type": "Server.Mobiles.PlayerMobile",
|
||||
"rule": "SerializableInterfaceMigrationRule"
|
||||
},
|
||||
{
|
||||
"name": "ToDelete",
|
||||
"type": "bool",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.SummonedPaladinMoongate.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.SummonedPaladinMoongate.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.SummonedPaladinMoongate"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.VaultOfSecretsBarrier.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Necro.VaultOfSecretsBarrier.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Necro.VaultOfSecretsBarrier"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.BlueNinjaQuestTeleporter.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.BlueNinjaQuestTeleporter.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.BlueNinjaQuestTeleporter"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Emino.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Emino.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.Emino"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EminosKatana.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EminosKatana.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.EminosKatana"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EminosKatanaChest.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EminosKatanaChest.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.EminosKatanaChest"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EnshroudedFigure.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.EnshroudedFigure.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.EnshroudedFigure"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.GreenNinjaQuestTeleporter.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.GreenNinjaQuestTeleporter.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.GreenNinjaQuestTeleporter"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.GuardianBarrier.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.GuardianBarrier.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.GuardianBarrier"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Henchman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Henchman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.Henchman"
|
||||
}
|
||||
14
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.HiddenFigure.v0.json
generated
Normal file
14
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.HiddenFigure.v0.json
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.HiddenFigure",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Message",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.JedahEntille.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.JedahEntille.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.JedahEntille"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.NoteForZoel.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.NoteForZoel.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.NoteForZoel"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.WhiteNinjaQuestTeleporter.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.WhiteNinjaQuestTeleporter.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.WhiteNinjaQuestTeleporter"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Zoel.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Ninja.Zoel.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Ninja.Zoel"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.QuestItem.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.QuestItem.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.QuestItem"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Engines.Quests.Samurai.CursedSoul.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.Quests.Samurai.CursedSoul.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Engines.Quests.Samurai.CursedSoul"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue