Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
374
Projects/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs
Normal file
374
Projects/Scripts/Engines/Quests/Haochi's Trials/Conversations.cs
Normal file
|
|
@ -0,0 +1,374 @@
|
|||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class AcceptConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1049092;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindHaochiObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class RadarConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063033;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class FirstTrialIntroConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063029;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FirstTrialIntroObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FirstTrialKillConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063031;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FirstTrialKillObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class GainKarmaConversation : QuestConversation
|
||||
{
|
||||
private bool m_CursedSoul;
|
||||
|
||||
public GainKarmaConversation(bool cursedSoul)
|
||||
{
|
||||
m_CursedSoul = cursedSoul;
|
||||
}
|
||||
|
||||
public GainKarmaConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_CursedSoul) return 1063040;
|
||||
|
||||
// You have just gained some <a href="?ForceTopic45">Karma</a> for killing a Young Ronin.
|
||||
return 1063041;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged => false;
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_CursedSoul = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_CursedSoul);
|
||||
}
|
||||
}
|
||||
|
||||
public class SecondTrialIntroConversation : QuestConversation
|
||||
{
|
||||
private bool m_CursedSoul;
|
||||
|
||||
public SecondTrialIntroConversation(bool cursedSoul)
|
||||
{
|
||||
m_CursedSoul = cursedSoul;
|
||||
}
|
||||
|
||||
public SecondTrialIntroConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_CursedSoul) return 1063045;
|
||||
|
||||
/* It is good that you rid the land of those dishonorable Samurai.
|
||||
* Perhaps they will learn a greater lesson in death.<BR><BR>
|
||||
*
|
||||
* I have placed a reward in your pack.<BR><BR>
|
||||
*
|
||||
* The second trial will test your courage. You only have to follow
|
||||
* the yellow path to see what awaits you.
|
||||
*/
|
||||
return 1063046;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SecondTrialIntroObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_CursedSoul = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_CursedSoul);
|
||||
}
|
||||
}
|
||||
|
||||
public class SecondTrialAttackConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063057;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SecondTrialAttackObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ThirdTrialIntroConversation : QuestConversation
|
||||
{
|
||||
private bool m_Dragon;
|
||||
|
||||
public ThirdTrialIntroConversation(bool dragon)
|
||||
{
|
||||
m_Dragon = dragon;
|
||||
}
|
||||
|
||||
public ThirdTrialIntroConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Dragon) return 1063060;
|
||||
|
||||
/* Fear remains in your eyes but you have learned that not all is
|
||||
* what it appears to be. <BR><BR>
|
||||
*
|
||||
* You must have known the dragon would slay you instantly.
|
||||
* You elected the weaker opponent though the imp did not come
|
||||
* here to destroy. You have much to learn. <BR><BR>
|
||||
*
|
||||
* In these lands, death is not forever. The shrines can make you whole
|
||||
* again as can a helpful mage or healer. <BR><BR>
|
||||
*
|
||||
* Seek them out when you have been mortally wounded. <BR><BR>
|
||||
*
|
||||
* The next trial will test your benevolence. You only have to walk the blue path.
|
||||
*/
|
||||
return 1063059;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new ThirdTrialIntroObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Dragon = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_Dragon);
|
||||
}
|
||||
}
|
||||
|
||||
public class ThirdTrialKillConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063062;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new ThirdTrialKillObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FourthTrialIntroConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063065;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FourthTrialIntroObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FourthTrialCatsConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063067;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FourthTrialCatsObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FifthTrialIntroConversation : QuestConversation
|
||||
{
|
||||
private bool m_KilledCat;
|
||||
|
||||
public FifthTrialIntroConversation(bool killedCat)
|
||||
{
|
||||
m_KilledCat = killedCat;
|
||||
}
|
||||
|
||||
public FifthTrialIntroConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_KilledCat) return 1063071;
|
||||
|
||||
/* You showed respect by helping another out while allowing the gypsy
|
||||
* what little dignity she has left. <BR><BR>
|
||||
*
|
||||
* Now she will be able to feed herself and gain enough energy to walk
|
||||
* to her camp. <BR><BR>
|
||||
*
|
||||
* The cats are her family members<EFBFBD> cursed by an evil mage. <BR><BR>
|
||||
*
|
||||
* Once she has enough strength to walk back to the camp, she will be
|
||||
* able to undo the spell. <BR><BR>
|
||||
*
|
||||
* You have been rewarded for completing your trial. And now you must
|
||||
* prove yourself again. <BR><BR>Please retrieve my katana from the
|
||||
* treasure room and return it to me.
|
||||
*/
|
||||
return 1063070;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FifthTrialIntroObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_KilledCat = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_KilledCat);
|
||||
}
|
||||
}
|
||||
|
||||
public class FifthTrialReturnConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063248;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FifthTrialReturnObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class LostSwordConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063074;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class SixthTrialIntroConversation : QuestConversation
|
||||
{
|
||||
private bool m_StolenTreasure;
|
||||
|
||||
public SixthTrialIntroConversation(bool stolenTreasure)
|
||||
{
|
||||
m_StolenTreasure = stolenTreasure;
|
||||
}
|
||||
|
||||
public SixthTrialIntroConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_StolenTreasure) return 1063077;
|
||||
|
||||
/* Thank you for returning this sword to me and leaving the remaining
|
||||
* treasure alone. <BR><BR>
|
||||
*
|
||||
* Your training is nearly complete. Before you have your final trial,
|
||||
* you should pay homage to Samurai who came before you. <BR><BR>
|
||||
*
|
||||
* Go into the Altar Room and light a candle for them. Afterwards, return to me.
|
||||
*/
|
||||
return 1063076;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SixthTrialIntroObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_StolenTreasure = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_StolenTreasure);
|
||||
}
|
||||
}
|
||||
|
||||
public class SeventhTrialIntroConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063079;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SeventhTrialIntroObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class EndConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063125;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HaochisTrialsQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable =
|
||||
{
|
||||
typeof(AcceptConversation),
|
||||
typeof(RadarConversation),
|
||||
typeof(FirstTrialIntroConversation),
|
||||
typeof(FirstTrialKillConversation),
|
||||
typeof(GainKarmaConversation),
|
||||
typeof(SecondTrialIntroConversation),
|
||||
typeof(SecondTrialAttackConversation),
|
||||
typeof(ThirdTrialIntroConversation),
|
||||
typeof(ThirdTrialKillConversation),
|
||||
typeof(FourthTrialIntroConversation),
|
||||
typeof(FourthTrialCatsConversation),
|
||||
typeof(FifthTrialIntroConversation),
|
||||
typeof(FifthTrialReturnConversation),
|
||||
typeof(LostSwordConversation),
|
||||
typeof(SixthTrialIntroConversation),
|
||||
typeof(SeventhTrialIntroConversation),
|
||||
typeof(EndConversation),
|
||||
typeof(FindHaochiObjective),
|
||||
typeof(FirstTrialIntroObjective),
|
||||
typeof(FirstTrialKillObjective),
|
||||
typeof(FirstTrialReturnObjective),
|
||||
typeof(SecondTrialIntroObjective),
|
||||
typeof(SecondTrialAttackObjective),
|
||||
typeof(SecondTrialReturnObjective),
|
||||
typeof(ThirdTrialIntroObjective),
|
||||
typeof(ThirdTrialKillObjective),
|
||||
typeof(ThirdTrialReturnObjective),
|
||||
typeof(FourthTrialIntroObjective),
|
||||
typeof(FourthTrialCatsObjective),
|
||||
typeof(FourthTrialReturnObjective),
|
||||
typeof(FifthTrialIntroObjective),
|
||||
typeof(FifthTrialReturnObjective),
|
||||
typeof(SixthTrialIntroObjective),
|
||||
typeof(SixthTrialReturnObjective),
|
||||
typeof(SeventhTrialIntroObjective),
|
||||
typeof(SeventhTrialReturnObjective)
|
||||
};
|
||||
|
||||
private bool m_SentRadarConversion;
|
||||
|
||||
public HaochisTrialsQuest(PlayerMobile from) : base(from)
|
||||
{
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public HaochisTrialsQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
|
||||
|
||||
public override object Name => 1063022;
|
||||
|
||||
public override object OfferMessage => 1063023;
|
||||
|
||||
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
|
||||
public override bool IsTutorial => true;
|
||||
|
||||
public override int Picture => 0x15D7;
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation(new AcceptConversation());
|
||||
}
|
||||
|
||||
public override void Slice()
|
||||
{
|
||||
if (!m_SentRadarConversion &&
|
||||
(From.Map != Map.Malas || From.X < 360 || From.X > 400 || From.Y < 760 || From.Y > 780))
|
||||
{
|
||||
m_SentRadarConversion = true;
|
||||
AddConversation(new RadarConversation());
|
||||
}
|
||||
|
||||
base.Slice();
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_SentRadarConversion = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_SentRadarConversion);
|
||||
}
|
||||
|
||||
public static bool HasLostHaochisKatana(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(FifthTrialReturnObjective)))
|
||||
return from.Backpack?.FindItemByType<HaochisKatana>() == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HaochisKatana : QuestItem
|
||||
{
|
||||
[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 bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is HaochisTrialsQuest);
|
||||
|
||||
//return !qs.IsObjectiveInProgress( typeof( FifthTrialReturnObjective ) );
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HaochisKatanaGenerator : Item
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisKatanaGenerator() : base(0x1B7B)
|
||||
{
|
||||
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)
|
||||
{
|
||||
QuestSystem 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(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HaochisTreasureChest : WoodenFootLocker
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisTreasureChest()
|
||||
{
|
||||
Movable = false;
|
||||
|
||||
GenerateTreasure();
|
||||
}
|
||||
|
||||
public HaochisTreasureChest(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
{
|
||||
for (int i = Items.Count - 1; i >= 0; i--)
|
||||
Items[i].Delete();
|
||||
|
||||
for (int i = 0; i < 75; i++)
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
DropItem(new GoldBracelet());
|
||||
break;
|
||||
case 1:
|
||||
DropItem(new GoldRing());
|
||||
break;
|
||||
case 2:
|
||||
DropItem(Loot.RandomGem());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item)
|
||||
{
|
||||
return item == this;
|
||||
}
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
{
|
||||
FifthTrialIntroObjective 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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is HaochisTrialsQuest)
|
||||
{
|
||||
FifthTrialIntroObjective obj = player.Quest.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj != null)
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(2.0), GenerateTreasure);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
Timer.DelayCall(TimeSpan.Zero, GenerateTreasure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HonorCandle : CandleLong
|
||||
{
|
||||
private static readonly TimeSpan LitDuration = TimeSpan.FromSeconds(20.0);
|
||||
|
||||
[Constructible]
|
||||
public HonorCandle()
|
||||
{
|
||||
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)
|
||||
{
|
||||
bool wasBurning = Burning;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
||||
if (!wasBurning && Burning)
|
||||
{
|
||||
if (!(from is PlayerMobile player))
|
||||
return;
|
||||
|
||||
QuestSystem 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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Burn()
|
||||
{
|
||||
Douse();
|
||||
}
|
||||
|
||||
public override void Douse()
|
||||
{
|
||||
base.Douse();
|
||||
|
||||
Duration = LitDuration;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class CursedSoul : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public CursedSoul() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 3;
|
||||
BaseSoundID = 471;
|
||||
|
||||
SetStr(20, 40);
|
||||
SetDex(40, 60);
|
||||
SetInt(15, 25);
|
||||
|
||||
SetHits(10, 20);
|
||||
|
||||
SetDamage(3, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
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);
|
||||
|
||||
Fame = 200;
|
||||
Karma = -200;
|
||||
|
||||
switch (Utility.Random(10))
|
||||
{
|
||||
case 0:
|
||||
PackItem(new LeftArm());
|
||||
break;
|
||||
case 1:
|
||||
PackItem(new RightArm());
|
||||
break;
|
||||
case 2:
|
||||
PackItem(new Torso());
|
||||
break;
|
||||
case 3:
|
||||
PackItem(new Bone());
|
||||
break;
|
||||
case 4:
|
||||
PackItem(new RibCage());
|
||||
break;
|
||||
case 5:
|
||||
PackItem(new RibCage());
|
||||
break;
|
||||
case 6:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 7:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 8:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 9:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class DeadlyImp : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public DeadlyImp() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
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)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class DiseasedCat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public DiseasedCat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr(9);
|
||||
SetDex(35);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
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(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class FierceDragon : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public FierceDragon() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
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()
|
||||
{
|
||||
return 0x2C4;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x2C0;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2C1;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x2C4;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2C3;
|
||||
}
|
||||
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
if (aggressor is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SecondTrialAttackObjective>();
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new SecondTrialReturnObjective(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class Haochi : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Haochi() : base("the Honorable Samurai Legend")
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
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)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
cont.DropItem(new LeatherHiroSode());
|
||||
cont.DropItem(new JinBaori());
|
||||
player.AddToBackpack(cont);
|
||||
}
|
||||
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
|
||||
obj = qs.FindObjective<FifthTrialReturnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
HaochisKatana katana = player.Backpack?.FindItemByType<HaochisKatana>();
|
||||
if (katana == null)
|
||||
return;
|
||||
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
obj = qs.FindObjective<FifthTrialIntroObjective>();
|
||||
if (obj != null && ((FifthTrialIntroObjective)obj).StolenTreasure)
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class HaochisGuardsman : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public HaochisGuardsman() : base("the Guardsman of Daimyo Haochi")
|
||||
{
|
||||
}
|
||||
|
||||
public HaochisGuardsman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi(Utility.RandomNondyedHue()));
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new StuddedHaidate());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new PlateSuneate());
|
||||
break;
|
||||
default:
|
||||
AddItem(new LeatherSuneate());
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new DecorativePlateKabuto());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new ChainHatsuburi());
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new LightPlateJingasa());
|
||||
break;
|
||||
default:
|
||||
AddItem(new LeatherJingasa());
|
||||
break;
|
||||
}
|
||||
|
||||
Item weapon;
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
weapon = new NoDachi();
|
||||
break;
|
||||
case 1:
|
||||
weapon = new Lajatang();
|
||||
break;
|
||||
default:
|
||||
weapon = new Wakizashi();
|
||||
break;
|
||||
}
|
||||
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class InjuredWolf : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public InjuredWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xE1;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
|
||||
SetStr(10, 20);
|
||||
SetDex(45, 65);
|
||||
SetInt(10, 15);
|
||||
|
||||
SetHits(1);
|
||||
|
||||
SetDamage(1, 3);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
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()
|
||||
{
|
||||
return 0xE9;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class Relnia : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Relnia() : base("the Gypsy")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is HaochisTrialsQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FourthTrialCatsObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
if (dropped is Gold gold)
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddObjective(new FourthTrialReturnObjective(false));
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class YoungNinja : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public YoungNinja() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(20, 30);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Tessen());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Kama());
|
||||
break;
|
||||
default:
|
||||
AddItem(new Lajatang());
|
||||
break;
|
||||
}
|
||||
|
||||
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(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class YoungRonin : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public YoungRonin() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
SetHits(10, 20);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new LeatherDo());
|
||||
AddItem(new LeatherHiroSode());
|
||||
AddItem(new SamuraiTabi());
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new StuddedHaidate());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new PlateSuneate());
|
||||
break;
|
||||
default:
|
||||
AddItem(new LeatherSuneate());
|
||||
break;
|
||||
}
|
||||
|
||||
AddItem(new Bandana(Utility.RandomNondyedHue()));
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new NoDachi());
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Lajatang());
|
||||
break;
|
||||
default:
|
||||
AddItem(new Wakizashi());
|
||||
break;
|
||||
}
|
||||
|
||||
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(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
342
Projects/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs
Normal file
342
Projects/Scripts/Engines/Quests/Haochi's Trials/Objectives.cs
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Samurai
|
||||
{
|
||||
public class FindHaochiObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063026;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FirstTrialIntroConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FirstTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063030;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FirstTrialKillConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FirstTrialKillObjective : QuestObjective
|
||||
{
|
||||
private int m_CursedSoulsKilled;
|
||||
private int m_YoungRoninKilled;
|
||||
|
||||
public override object Message => 1063032;
|
||||
|
||||
public override int MaxProgress => 3;
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is CursedSoul)
|
||||
{
|
||||
if (m_CursedSoulsKilled == 0)
|
||||
System.AddConversation(new GainKarmaConversation(true));
|
||||
|
||||
m_CursedSoulsKilled++;
|
||||
|
||||
// Cursed Souls killed: ~1_COUNT~
|
||||
System.From.SendLocalizedMessage(1063038, m_CursedSoulsKilled.ToString());
|
||||
}
|
||||
else if (creature is YoungRonin)
|
||||
{
|
||||
if (m_YoungRoninKilled == 0)
|
||||
System.AddConversation(new GainKarmaConversation(false));
|
||||
|
||||
m_YoungRoninKilled++;
|
||||
|
||||
// Young Ronin killed: ~1_COUNT~
|
||||
System.From.SendLocalizedMessage(1063039, m_YoungRoninKilled.ToString());
|
||||
}
|
||||
|
||||
CurProgress = Math.Max(m_CursedSoulsKilled, m_YoungRoninKilled);
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new FirstTrialReturnObjective(m_CursedSoulsKilled > m_YoungRoninKilled));
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_CursedSoulsKilled = reader.ReadEncodedInt();
|
||||
m_YoungRoninKilled = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.WriteEncodedInt(m_CursedSoulsKilled);
|
||||
writer.WriteEncodedInt(m_YoungRoninKilled);
|
||||
}
|
||||
}
|
||||
|
||||
public class FirstTrialReturnObjective : QuestObjective
|
||||
{
|
||||
private bool m_CursedSoul;
|
||||
|
||||
public FirstTrialReturnObjective(bool cursedSoul)
|
||||
{
|
||||
m_CursedSoul = cursedSoul;
|
||||
}
|
||||
|
||||
public FirstTrialReturnObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message => 1063044;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SecondTrialIntroConversation(m_CursedSoul));
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_CursedSoul = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_CursedSoul);
|
||||
}
|
||||
}
|
||||
|
||||
public class SecondTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063047;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SecondTrialAttackConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class SecondTrialAttackObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063058;
|
||||
}
|
||||
|
||||
public class SecondTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public SecondTrialReturnObjective(bool dragon)
|
||||
{
|
||||
Dragon = dragon;
|
||||
}
|
||||
|
||||
public SecondTrialReturnObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message => 1063229;
|
||||
|
||||
public bool Dragon{ get; private set; }
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new ThirdTrialIntroConversation(Dragon));
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
Dragon = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(Dragon);
|
||||
}
|
||||
}
|
||||
|
||||
public class ThirdTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063061;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new ThirdTrialKillConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class ThirdTrialKillObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063063;
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is InjuredWolf)
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new ThirdTrialReturnObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ThirdTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063064;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FourthTrialIntroConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FourthTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063066;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FourthTrialCatsConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FourthTrialCatsObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063068;
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is DiseasedCat)
|
||||
{
|
||||
Complete();
|
||||
System.AddObjective(new FourthTrialReturnObjective(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class FourthTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public FourthTrialReturnObjective(bool killedCat)
|
||||
{
|
||||
KilledCat = killedCat;
|
||||
}
|
||||
|
||||
public FourthTrialReturnObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message => 1063242;
|
||||
|
||||
public bool KilledCat{ get; private set; }
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FifthTrialIntroConversation(KilledCat));
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
KilledCat = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(KilledCat);
|
||||
}
|
||||
}
|
||||
|
||||
public class FifthTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063072;
|
||||
|
||||
public bool StolenTreasure{ get; set; }
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FifthTrialReturnConversation());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
StolenTreasure = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(StolenTreasure);
|
||||
}
|
||||
}
|
||||
|
||||
public class FifthTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063073;
|
||||
}
|
||||
|
||||
public class SixthTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063078;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new SixthTrialReturnObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SixthTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063252;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SeventhTrialIntroConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class SeventhTrialIntroObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063080;
|
||||
|
||||
public override int MaxProgress => 3;
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is YoungNinja)
|
||||
CurProgress++;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new SeventhTrialReturnObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SeventhTrialReturnObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063253;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new EndConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue