#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.

This commit is contained in:
WarrentyExpired 2026-08-06 11:06:05 -04:00
parent b51c58f514
commit 3045c83799
3512 changed files with 627673 additions and 0 deletions

View file

@ -0,0 +1,713 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class AcceptConversation : QuestConversation
{
public override object Message
{
get
{
/* <I><U>Important Quest Information</U></I><BR><BR>
*
* During your quest, any important information that a
* <a href = "?ForceTopic31">NPC</a> gives you, will appear in a window
* such as this one. You can review the information at any time during your
* quest.<BR><BR>
*
* <U>Getting Help</U><BR><BR>
*
* Some of the text you will come across during your quest,
* will be underlined <a href = "?ForceTopic73">links to the codex of wisdom</a>,
* or online help system. You can click on the text to get detailed information
* on the underlined subject. You may also access the Codex Of Wisdom by
* pressing "F1" or by clicking on the "?" on the toolbar at the top of
* your screen.<BR><BR><U>Context Menus</U><BR><BR>
*
* Context menus can be called up by single left-clicking (or Shift + single
* left-click, if you changed it) on most objects or NPCs in the world.
* Nearly everything, including your own avatar will have context menus available.
* Bringing up your avatar's context menu will give you options to cancel your quest
* and review various quest information.<BR><BR>
*/
return 1049092;
}
}
public AcceptConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindHaochiObjective() );
}
}
public class RadarConversation : QuestConversation
{
public override object Message
{
get
{
/* To view the surrounding area, you should learn about the Radar Map.<BR><BR>
*
* The Radar Map (or Overhead View) can be opened by pressing 'ALT-R'
* on your keyboard. It shows your immediate surroundings from a
* bird's eye view.<BR><BR>
*
* Pressing ALT-R twice, will enlarge the Radar Map a little.
* Use the Radar Map often as you travel throughout the world
* to familiarize yourself with your surroundings.
* */
return 1063033;
}
}
public override bool Logged{ get{ return false; } }
public RadarConversation()
{
}
}
public class FirstTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
/* Greetings. I am Daimyo Haochi, the Feudal Lord of this region. <BR><BR>
*
* Since you are here at my side, you must wish to learn the ways of the Samurai.<BR><BR>
*
* Wielding a blade is easy, anyone can grasp a sword’s hilt. Learning how to
* fight properly and skillfully is to become an Armsman.<BR><BR>
*
* Learning how to master weapons, and even more importantly when not to use
* them, is the Way of the Warrior. The Way of the Samurai. The Code of the
* Bushido. That is why you are here. <BR><BR>
*
* You will go through 7 trials to prove your adherence to the Samurai code. <BR><BR>
*
* The first trial will test your decision making skills. You only have to enter
* the area beyond the green passageway. <BR><BR>
*
* Do not attempt to hurry your trials. The guards will only let you through
* to each trial when I have deemed you ready.<br><br>
*
* As a last resort you may use the golden teleporter tiles in each trial area
* but do so at your own risk. You may not be able to return and complete your
* trials once you have chosen to escape.
*/
return 1063029;
}
}
public FirstTrialIntroConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FirstTrialIntroObjective() );
}
}
public class FirstTrialKillConversation : QuestConversation
{
public override object Message
{
get
{
/* Beyond you are two troubled groups.<BR><BR>
*
* The Cursed Souls were once proud warriors that were ensorcelled
* by an evil mage. The mage trapped and killed them later but the spell
* has not lifted from their souls in death. <BR><BR>
*
* The Young Ronin were former Samurai in training who lost their way.
* They are loyal only to those with enough coin in their pocket. <BR><BR>
*
* You must decide who needs to be fought to the death. You may wish to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself</a>. <BR><BR>
*
* Return to Daimyo Haochi after you have finished with your trial.<br><br>
*
* If you should die during any of your trials, visit one of the Ankh Shrines
* and you will be resurrected. You should retrieve your belongings from your
* body before returning to the Daimyo or you may not be able to return to your corpse.
*/
return 1063031;
}
}
public FirstTrialKillConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FirstTrialKillObjective() );
}
}
public class GainKarmaConversation : QuestConversation
{
public override object Message
{
get
{
if ( m_CursedSoul )
{
// You have just gained some <a href="?ForceTopic45">Karma</a> for killing a Cursed Soul.
return 1063040;
}
else
{
// You have just gained some <a href="?ForceTopic45">Karma</a> for killing a Young Ronin.
return 1063041;
}
}
}
public override bool Logged{ get{ return false; } }
private bool m_CursedSoul;
public GainKarmaConversation( bool cursedSoul )
{
m_CursedSoul = cursedSoul;
}
public GainKarmaConversation()
{
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_CursedSoul = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_CursedSoul );
}
}
public class SecondTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
if ( m_CursedSoul )
{
/* It is good that you rid the land of the Cursed Souls so they can
* be at peace in death. They had been cursed for doing what they
* thought was an honorable deed. Now they can have respect in their 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 1063045;
}
else
{
/* 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;
}
}
}
private bool m_CursedSoul;
public SecondTrialIntroConversation( bool cursedSoul )
{
m_CursedSoul = cursedSoul;
}
public SecondTrialIntroConversation()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_CursedSoul );
}
}
public class SecondTrialAttackConversation : QuestConversation
{
public override object Message
{
get
{
/* Beyond the guards is a test of courage. You must face your fear and attack a
* great beast. You must choose which beast to slay for there is more than
* one beyond the courtyard doors. <BR><BR>
*
* The imp entered the courtyard unaware of its surroundings. The dragon came
* knowingly, hunting for the flesh of humans – A feast for the beast. <BR><BR>
*
* You must rid the courtyard of these beasts but you may only choose one to
* attack. Go and choose wisely.
*/
return 1063057;
}
}
public SecondTrialAttackConversation()
{
}
public override void OnRead()
{
System.AddObjective( new SecondTrialAttackObjective() );
}
}
public class ThirdTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
if ( m_Dragon )
{
/* You faced the dragon knowing it would be your certain death.
* That is the courage of a Samurai. <BR><BR>
*
* Your spirit speaks as a Samurai already. <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 1063060;
}
else
{
/* 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;
}
}
}
private bool m_Dragon;
public ThirdTrialIntroConversation( bool dragon )
{
m_Dragon = dragon;
}
public ThirdTrialIntroConversation()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_Dragon );
}
}
public class ThirdTrialKillConversation : QuestConversation
{
public override object Message
{
get
{
/* A pack of wolves circle your feet. They have been injured and are in pain.
* A quick death will end their suffering.<br><br>
*
* Use your Honorable Execution skill or other means to finish off a wounded wolf.
* Do so and return to Daimyo Haochi.
*/
return 1063062;
}
}
public ThirdTrialKillConversation()
{
}
public override void OnRead()
{
System.AddObjective( new ThirdTrialKillObjective() );
}
}
public class FourthTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>Daimyo Haochi smiles as you walk up to him. Quietly he says:</I><BR><BR>
*
* A Samurai understands the need to help others even as he wields a blade against
* them. <BR><BR>
*
* You have shown compassion. A true Samurai is benevolent even to an enemy.
* For this you have been rewarded. <BR><BR>
*
* And now you must prove yourself again. Walk the red path.
* We will talk again later.
*/
return 1063065;
}
}
public FourthTrialIntroConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FourthTrialIntroObjective() );
}
}
public class FourthTrialCatsConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>You approach a disheveled gypsy standing near a small shed.
* You sense that she has not eaten nor bathed in quite some time. <BR><BR>
*
* Around her is a large colony of mangy and diseased cats. It appears
* she has spent what little money she’s earned to feed the cats instead
* of herself. <BR><BR>
*
* You have a decision to make. You can give her gold so she can buy some
* food for her animals and herself. You can also remove the necessity
* of the extra mouths to feed so she may concentrate on saving herself.</i><br><br>
*
* If you elect to give the gypsy money, you can do so by clicking your stack
* of gold and selecting ‘1’. Then dragging it and dropping it on the Gypsy.
*/
return 1063067;
}
}
public FourthTrialCatsConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FourthTrialCatsObjective() );
}
}
public class FifthTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
if ( m_KilledCat )
{
/* Respect comes from allowing another to make their own decisions.
* By denying the gypsy her animals, you negate the respect she is due.
* Perhaps you will have learned something to use next time a similar
* situation arises. <BR><BR>
*
* And now you must prove yourself again. Please retrieve my katana
* from the treasure room and return it to me.
*/
return 1063071;
}
else
{
/* 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– 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;
}
}
}
private bool m_KilledCat;
public FifthTrialIntroConversation( bool killedCat )
{
m_KilledCat = killedCat;
}
public FifthTrialIntroConversation()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_KilledCat );
}
}
public class FifthTrialReturnConversation : QuestConversation
{
public override object Message
{
get
{
/* <i>The guards let you through without question, and pay you no mind as
* you walk into the Daimyo's treasure cache. A vast fortune in gold,
* gemstones, and jewelry is stored here! Surely, the Daimyo wouldn't
* miss a single small item...<br><br>
*
* You spot the sword quickly amongst the cache of gemstones and other valuables.
* In one quick motion you retrieve it and stash it in your pack.</i>
*/
return 1063248;
}
}
public FifthTrialReturnConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FifthTrialReturnObjective() );
}
}
public class LostSwordConversation : QuestConversation
{
public override object Message
{
get
{
// What? You have returned without the sword? Go back and look for it again.
return 1063074;
}
}
public override bool Logged{ get{ return false; } }
public LostSwordConversation()
{
}
}
public class SixthTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
if ( m_StolenTreasure )
{
/* I thank you for returning this sword. However, you should admonished
* for also taking treasure that was not asked for nor given back. <BR><BR>
*
* Think about your actions youngling. <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 1063077;
}
else
{
/* 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;
}
}
}
private bool m_StolenTreasure;
public SixthTrialIntroConversation( bool stolenTreasure )
{
m_StolenTreasure = stolenTreasure;
}
public SixthTrialIntroConversation()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_StolenTreasure );
}
}
public class SeventhTrialIntroConversation : QuestConversation
{
public override object Message
{
get
{
/* You have done well young Samurai. There is but one thing left to do. <BR><BR>
*
* In the final room is the holding cell containing young Ninjas who came to
* take my life. They were caught and placed in my custody. <BR><BR>
*
* Take care of these miscreants and show them where your loyalty lies. <BR><BR>
*
* This is your final act as a Samurai in training.
*/
return 1063079;
}
}
public SeventhTrialIntroConversation()
{
}
public override void OnRead()
{
System.AddObjective( new SeventhTrialIntroObjective() );
}
}
public class EndConversation : QuestConversation
{
public override object Message
{
get
{
/* You have proven yourself young one. You will continue to improve as your skills
* are honed with age. <BR><BR>
*
* Now it is time for you to explore the lands. Beyond this path lies Zento
* City, your future home. On these grounds you will find a golden oval object
* known as a Moongate, step through it and you'll find yourself in Zento.<BR><BR>
*
* You may want to visit Ansella Gryen when you arrive. <BR><BR>
*
* You have learned the ways. You are an honorable warrior, a Samurai in
* the highest regards. <BR><BR>
*
* Please accept the gifts I have placed in your pack. You have earned them.
* Farewell for now.
*/
return 1063125;
}
}
public EndConversation()
{
}
public override void OnRead()
{
System.Complete();
}
}
}

View file

@ -0,0 +1,151 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class HaochisTrialsQuest : QuestSystem
{
private static Type[] m_TypeReferenceTable = new Type[]
{
typeof( Samurai.AcceptConversation ),
typeof( Samurai.RadarConversation ),
typeof( Samurai.FirstTrialIntroConversation ),
typeof( Samurai.FirstTrialKillConversation ),
typeof( Samurai.GainKarmaConversation ),
typeof( Samurai.SecondTrialIntroConversation ),
typeof( Samurai.SecondTrialAttackConversation ),
typeof( Samurai.ThirdTrialIntroConversation ),
typeof( Samurai.ThirdTrialKillConversation ),
typeof( Samurai.FourthTrialIntroConversation ),
typeof( Samurai.FourthTrialCatsConversation ),
typeof( Samurai.FifthTrialIntroConversation ),
typeof( Samurai.FifthTrialReturnConversation ),
typeof( Samurai.LostSwordConversation ),
typeof( Samurai.SixthTrialIntroConversation ),
typeof( Samurai.SeventhTrialIntroConversation ),
typeof( Samurai.EndConversation ),
typeof( Samurai.FindHaochiObjective ),
typeof( Samurai.FirstTrialIntroObjective ),
typeof( Samurai.FirstTrialKillObjective ),
typeof( Samurai.FirstTrialReturnObjective ),
typeof( Samurai.SecondTrialIntroObjective ),
typeof( Samurai.SecondTrialAttackObjective ),
typeof( Samurai.SecondTrialReturnObjective ),
typeof( Samurai.ThirdTrialIntroObjective ),
typeof( Samurai.ThirdTrialKillObjective ),
typeof( Samurai.ThirdTrialReturnObjective ),
typeof( Samurai.FourthTrialIntroObjective ),
typeof( Samurai.FourthTrialCatsObjective ),
typeof( Samurai.FourthTrialReturnObjective ),
typeof( Samurai.FifthTrialIntroObjective ),
typeof( Samurai.FifthTrialReturnObjective ),
typeof( Samurai.SixthTrialIntroObjective ),
typeof( Samurai.SixthTrialReturnObjective ),
typeof( Samurai.SeventhTrialIntroObjective ),
typeof( Samurai.SeventhTrialReturnObjective )
};
public override Type[] TypeReferenceTable{ get{ return m_TypeReferenceTable; } }
public override object Name
{
get
{
// Haochi's Trials
return 1063022;
}
}
public override object OfferMessage
{
get
{
/* <i>As you enter the courtyard you notice a faded sign.
* It reads: </i><br><br>
*
* Welcome to your new home, Samurai.<br><br>
*
* Though your skills are only a shadow of what they can be some day,
* you must prove your adherence to the code of the Bushido.<br><br>
*
* Seek Daimyo Haochi for guidance.<br><br>
*
* <i>Will you accept the challenge?</i>
*/
return 1063023;
}
}
public override TimeSpan RestartDelay{ get{ return TimeSpan.MaxValue; } }
public override bool IsTutorial{ get{ return true; } }
public override int Picture{ get{ return 0x15D7; } }
public HaochisTrialsQuest( PlayerMobile from ) : base( from )
{
}
// Serialization
public HaochisTrialsQuest()
{
}
public override void Accept()
{
base.Accept();
AddConversation( new AcceptConversation() );
}
private bool m_SentRadarConversion;
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( (bool) m_SentRadarConversion );
}
public static bool HasLostHaochisKatana( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm == null )
return false;
QuestSystem qs = pm.Quest;
if ( qs is HaochisTrialsQuest )
{
if ( qs.IsObjectiveInProgress( typeof( FifthTrialReturnObjective ) ) )
{
Container pack = from.Backpack;
return ( pack == null || pack.FindItemByType( typeof( HaochisKatana ) ) == null );
}
}
return false;
}
}
}

View file

@ -0,0 +1,46 @@
using System;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
public class HaochisKatana : QuestItem
{
public override int LabelNumber{ get{ return 1063165; } } // Daimyo Haochi's Katana
[Constructable]
public HaochisKatana() : base( 0x13FF )
{
Weight = 1.0;
}
public HaochisKatana( Serial serial ) : base( serial )
{
}
public override bool CanDrop( PlayerMobile player )
{
HaochisTrialsQuest qs = player.Quest as HaochisTrialsQuest;
if ( qs == null )
return true;
//return !qs.IsObjectiveInProgress( typeof( FifthTrialReturnObjective ) );
return 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();
}
}
}

View file

@ -0,0 +1,80 @@
using System;
using Server;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class HaochisKatanaGenerator : Item
{
[Constructable]
public HaochisKatanaGenerator() : base( 0x1B7B )
{
Visible = false;
Name = "Haochi's katana generator";
Movable = false;
}
public override bool OnMoveOver( Mobile m )
{
PlayerMobile player = m as PlayerMobile;
if ( player != null )
{
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( typeof( FifthTrialIntroObjective ) );
if ( obj != null && !obj.Completed )
{
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 HaochisKatanaGenerator( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,105 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Engines.Quests.Samurai
{
public class HaochisTreasureChest : WoodenFootLocker
{
[Constructable]
public HaochisTreasureChest()
{
Movable = false;
GenerateTreasure();
}
public HaochisTreasureChest( Serial serial ) : base( serial )
{
}
public override bool IsDecoContainer{ get{ return false; } }
private void GenerateTreasure()
{
for ( int i = this.Items.Count - 1; i >= 0; i-- )
this.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;
PlayerMobile player = from as PlayerMobile;
if ( player != null && player.Quest is HaochisTrialsQuest )
{
FifthTrialIntroObjective obj = player.Quest.FindObjective( typeof( FifthTrialIntroObjective ) ) as FifthTrialIntroObjective;
if ( obj != null )
{
if ( obj.StolenTreasure )
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 )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null && player.Quest is HaochisTrialsQuest )
{
FifthTrialIntroObjective obj = player.Quest.FindObjective( typeof( FifthTrialIntroObjective ) ) as FifthTrialIntroObjective;
if ( obj != null )
obj.StolenTreasure = true;
}
Timer.DelayCall( TimeSpan.FromMinutes( 2.0 ), new TimerCallback( 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, new TimerCallback( GenerateTreasure ) );
}
}
}

View file

@ -0,0 +1,79 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class HonorCandle : CandleLong
{
private static readonly TimeSpan LitDuration = TimeSpan.FromSeconds( 20.0 );
public override int LitSound{ get{ return 0; } }
public override int UnlitSound{ get{ return 0; } }
[Constructable]
public HonorCandle()
{
Movable = false;
Duration = LitDuration;
}
public HonorCandle( Serial serial ) : base( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
bool wasBurning = Burning;
base.OnDoubleClick( from );
if ( !wasBurning && Burning )
{
PlayerMobile player = from as PlayerMobile;
if ( player == null )
return;
QuestSystem qs = player.Quest;
if ( qs != null && qs is HaochisTrialsQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SixthTrialIntroObjective ) );
if ( obj != null && !obj.Completed )
obj.Complete();
this.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();
}
}
}

View file

@ -0,0 +1,70 @@
using System;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
[CorpseName( "a cursed soul corpse" )]
public class CursedSoul : BaseCreature
{
[Constructable]
public CursedSoul() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a cursed soul";
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 void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,80 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class DeadlyImp : BaseCreature
{
[Constructable]
public DeadlyImp() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a deadly imp";
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 void AggressiveAction( Mobile aggressor, bool criminal )
{
base.AggressiveAction( aggressor, criminal );
PlayerMobile player = aggressor as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is HaochisTrialsQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SecondTrialAttackObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
qs.AddObjective( new SecondTrialReturnObjective( false ) );
}
}
}
}
public DeadlyImp( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,59 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class DiseasedCat : BaseCreature
{
[Constructable]
public DiseasedCat() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a diseased cat";
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 override bool AlwaysMurderer{ get{ return true; } }
public DiseasedCat( Serial serial ) : base( serial )
{
}
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();
if( Name == "a deseased cat" )
Name = "a diseased cat";
}
}
}

View file

@ -0,0 +1,102 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class FierceDragon : BaseCreature
{
[Constructable]
public FierceDragon() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = "a fierce dragon";
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 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 );
PlayerMobile player = aggressor as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is HaochisTrialsQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SecondTrialAttackObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
qs.AddObjective( new SecondTrialReturnObjective( true ) );
}
}
}
}
public FierceDragon( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,182 @@
using System;
using Server;
using Server.Mobiles;
using Server.Gumps;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
public class Haochi : BaseQuester
{
[Constructable]
public Haochi() : base( "the Honorable Samurai Legend" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x8403;
Female = false;
Body = 0x190;
Name = "Daimyo Haochi";
}
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 int TalkNumber{ get { return -1; } }
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( typeof( FindHaochiObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( FirstTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
player.AddToBackpack( new LeatherDo() );
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( SecondTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
if ( ((SecondTrialReturnObjective)obj).Dragon )
player.AddToBackpack( new LeatherSuneate() );
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( ThirdTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
player.AddToBackpack( new LeatherHiroSode() );
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( FourthTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
if ( !((FourthTrialReturnObjective)obj).KilledCat )
{
Container cont = GetNewContainer();
cont.DropItem( new LeatherHiroSode() );
cont.DropItem( new JinBaori() );
player.AddToBackpack( cont );
}
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( FifthTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
Container pack = player.Backpack;
if ( pack != null )
{
Item katana = pack.FindItemByType( typeof( HaochisKatana ) );
if ( katana != null )
{
katana.Delete();
obj.Complete();
obj = qs.FindObjective( typeof( FifthTrialIntroObjective ) );
if ( obj != null && ((FifthTrialIntroObjective)obj).StolenTreasure )
qs.AddConversation( new SixthTrialIntroConversation( true ) );
else
qs.AddConversation( new SixthTrialIntroConversation( false ) );
}
}
return;
}
obj = qs.FindObjective( typeof( SixthTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
return;
}
obj = qs.FindObjective( typeof( SeventhTrialReturnObjective ) );
if ( obj != null && !obj.Completed )
{
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();
return;
}
}
}
public Haochi( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,85 @@
using System;
using Server;
using Server.Mobiles;
using Server.Gumps;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
public class HaochisGuardsman : BaseQuester
{
[Constructable]
public HaochisGuardsman() : base( "the Guardsman of Daimyo Haochi" )
{
}
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 int TalkNumber{ get { return -1; } }
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
}
public HaochisGuardsman( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,59 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
[CorpseName( "an injured wolf corpse" )]
public class InjuredWolf : BaseCreature
{
[Constructable]
public InjuredWolf() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Body = 0xE1;
Name = "an injured wolf";
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 override int GetIdleSound()
{
return 0xE9;
}
public InjuredWolf( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,96 @@
using System;
using Server;
using Server.Mobiles;
using Server.Gumps;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
public class Relnia : BaseQuester
{
[Constructable]
public Relnia() : base( "the Gypsy" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x83FF;
Female = true;
Body = 0x191;
Name = "Disheveled Relnia";
}
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 int TalkNumber{ get { return -1; } }
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is HaochisTrialsQuest )
{
QuestObjective obj = qs.FindObjective( typeof( FourthTrialCatsObjective ) );
if ( obj != null && !obj.Completed )
{
Gold gold = dropped as Gold;
if ( gold != null )
{
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 Relnia( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,62 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
[CorpseName( "a young ninja's corpse" )]
public class YoungNinja : BaseCreature
{
[Constructable]
public YoungNinja() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
InitStats( 45, 30, 5 );
SetHits( 20, 30 );
Hue = Utility.RandomSkinHue();
Body = 0x190;
Name = "a young ninja";
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 override bool AlwaysMurderer{ get{ return true; } }
public YoungNinja( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,68 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Samurai
{
[CorpseName( "a young ronin's corpse" )]
public class YoungRonin : BaseCreature
{
[Constructable]
public YoungRonin() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
InitStats( 45, 30, 5 );
SetHits( 10, 20 );
Hue = Utility.RandomSkinHue();
Body = 0x190;
Name = "a young ronin";
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 override bool AlwaysMurderer{ get{ return true; } }
public YoungRonin( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,555 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class FindHaochiObjective : QuestObjective
{
public override object Message
{
get
{
// Speak to Daimyo Haochi.
return 1063026;
}
}
public FindHaochiObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FirstTrialIntroConversation() );
}
}
public class FirstTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
// Follow the green path. The guards will now let you through.
return 1063030;
}
}
public FirstTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FirstTrialKillConversation() );
}
}
public class FirstTrialKillObjective : QuestObjective
{
public override object Message
{
get
{
// Kill 3 Young Ronin or 3 Cursed Souls. Return to Daimyo Haochi when you have finished.
return 1063032;
}
}
public FirstTrialKillObjective()
{
}
private int m_CursedSoulsKilled;
private int m_YoungRoninKilled;
public override int MaxProgress{ get{ return 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( (int) 0 ); // version
writer.WriteEncodedInt( m_CursedSoulsKilled );
writer.WriteEncodedInt( m_YoungRoninKilled );
}
}
public class FirstTrialReturnObjective : QuestObjective
{
public override object Message
{
get
{
// The first trial is complete. Return to Daimyo Haochi.
return 1063044;
}
}
bool m_CursedSoul;
public FirstTrialReturnObjective( bool cursedSoul )
{
m_CursedSoul = cursedSoul;
}
public FirstTrialReturnObjective()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_CursedSoul );
}
}
public class SecondTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
// Follow the yellow path. The guards will now let you through.
return 1063047;
}
}
public SecondTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new SecondTrialAttackConversation() );
}
}
public class SecondTrialAttackObjective : QuestObjective
{
public override object Message
{
get
{
// Choose your opponent and attack one with all your skill.
return 1063058;
}
}
public SecondTrialAttackObjective()
{
}
}
public class SecondTrialReturnObjective : QuestObjective
{
public override object Message
{
get
{
// The second trial is complete. Return to Daimyo Haochi.
return 1063229;
}
}
private bool m_Dragon;
public bool Dragon{ get{ return m_Dragon; } }
public SecondTrialReturnObjective( bool dragon )
{
m_Dragon = dragon;
}
public SecondTrialReturnObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new ThirdTrialIntroConversation( m_Dragon ) );
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_Dragon = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_Dragon );
}
}
public class ThirdTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
/* The next trial will test your benevolence. Follow the blue path.
* The guards will now let you through.
*/
return 1063061;
}
}
public ThirdTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new ThirdTrialKillConversation() );
}
}
public class ThirdTrialKillObjective : QuestObjective
{
public override object Message
{
get
{
/* Use your Honorable Execution skill to finish off the wounded wolf.
* Double click the icon in your Book of Bushido to activate the skill.
* When you are done, return to Daimyo Haochi.
*/
return 1063063;
}
}
public ThirdTrialKillObjective()
{
}
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
{
get
{
// Return to Daimyo Haochi.
return 1063064;
}
}
public ThirdTrialReturnObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FourthTrialIntroConversation() );
}
}
public class FourthTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
// Follow the red path and pass through the guards to the entrance of the fourth trial.
return 1063066;
}
}
public FourthTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FourthTrialCatsConversation() );
}
}
public class FourthTrialCatsObjective : QuestObjective
{
public override object Message
{
get
{
/* Give the gypsy gold or hunt one of the cats to eliminate the undue
* need it has placed on the gypsy.
*/
return 1063068;
}
}
public FourthTrialCatsObjective()
{
}
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is DiseasedCat )
{
Complete();
System.AddObjective( new FourthTrialReturnObjective( true ) );
}
}
}
public class FourthTrialReturnObjective : QuestObjective
{
public override object Message
{
get
{
// You have made your choice. Return now to Daimyo Haochi.
return 1063242;
}
}
private bool m_KilledCat;
public bool KilledCat{ get{ return m_KilledCat; } }
public FourthTrialReturnObjective( bool killedCat )
{
m_KilledCat = killedCat;
}
public FourthTrialReturnObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FifthTrialIntroConversation( m_KilledCat ) );
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_KilledCat = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_KilledCat );
}
}
public class FifthTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
// Retrieve Daimyo Haochi’s katana from the treasure room.
return 1063072;
}
}
private bool m_StolenTreasure;
public bool StolenTreasure{ get{ return m_StolenTreasure; } set{ m_StolenTreasure = value; } }
public FifthTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new FifthTrialReturnConversation() );
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_StolenTreasure = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_StolenTreasure );
}
}
public class FifthTrialReturnObjective : QuestObjective
{
public override object Message
{
get
{
// Give the sword to Daimyo Haochi.
return 1063073;
}
}
public FifthTrialReturnObjective()
{
}
}
public class SixthTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
// Light one of the candles near the altar and return to Daimyo Haochi.
return 1063078;
}
}
public SixthTrialIntroObjective()
{
}
public override void OnComplete()
{
System.AddObjective( new SixthTrialReturnObjective() );
}
}
public class SixthTrialReturnObjective : QuestObjective
{
public override object Message
{
get
{
// You have done as requested. Return to Daimyo Haochi.
return 1063252;
}
}
public SixthTrialReturnObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new SeventhTrialIntroConversation() );
}
}
public class SeventhTrialIntroObjective : QuestObjective
{
public override object Message
{
get
{
/* Three young Ninja must be dealt with. Your job is to kill them.
* When you have done so, return to Daimyo Haochi.
*/
return 1063080;
}
}
public override int MaxProgress{ get{ return 3; } }
public SeventhTrialIntroObjective()
{
}
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
{
get
{
// The executions are complete. Return to the Daimyo.
return 1063253;
}
}
public SeventhTrialReturnObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new EndConversation() );
}
}
}