This commit is contained in:
mark 2006-06-15 04:14:30 +00:00
commit 47711d616e
2644 changed files with 479454 additions and 0 deletions

View file

@ -0,0 +1,970 @@
using System;
using Server;
namespace Server.Engines.Quests.Haven
{
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 FindUzeraanBeginObjective() );
}
}
public class UzeraanTitheConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>Uzeraan greets you as you approach...</I><BR><BR>
*
* Greetings traveler!<BR><BR>
*
* I am Uzeraan, the lord of this house and overseer of this fine city, Haven.
* I know we have just met, but time is short and we need to reinforce
* the troops in the mountain pass, so I will not waste your time
* with pleasantries.<BR><BR>
*
* We have been trying to fight back the wicked <I>Horde Minions</I> which
* have recently begun attacking our cities - but to no avail.
* We desperately need help!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Before I send you into battle however, it is time that I teach you a thing
* or two about the way of the Paladin.<BR><BR>
*
* <U>The Paladin</U><BR><BR>
*
* Paladins are the holy warriors of the realm who have dedicated themselves
* as protectors of the virtues and vanquishers of all that is evil.<BR><BR>
*
* Paladins have several <a href = "?ForceTopic111">special abilities</a> that
* are not available to the ordinary warrior. Due to the spiritual nature of
* these abilities, the Paladin requires some amount of mana to activate them.
* In addition to mana, the Paladin is also required to spend a certain amount
* of <a href = "?ForceTopic109">tithing points</a> each time a special ability
* is used.<BR><BR>
*
* Tithing points and mana are automatically consumed when a special Paladin
* ability is activated. All Paladin abilities are activated through the
* <a href = "?ForceTopic114">Book of Chivalry</a><BR><BR>
*
* Go now, to the shrine just East of here, just before the doors and
* <a href = "?ForceTopic109">tithe</a> at least 500 gold.<BR><BR>
*
* Return here when you are done.
*/
return 1060209;
}
}
public UzeraanTitheConversation()
{
}
public override void OnRead()
{
System.AddObjective( new TitheGoldObjective() );
}
}
public class UzeraanFirstTaskConversation : QuestConversation
{
public override object Message
{
get
{
if ( System.From.Profession == 1 ) // warrior
{
/* <I>Uzeraan greets you as you approach...</I><BR><BR>
*
* Greetings traveler!<BR><BR>
*
* I am Uzeraan, the lord of this house and overseer of this fine city, Haven.
* I know we have just met, but time is short and we need to reinforce the troops
* in the mountain pass, so I will not waste your time with pleasantries.<BR><BR>
*
* We have been trying to fight back the wicked <I>Horde Minions</I> which have
* recently begun attacking our cities - but to no avail. We desperately need
* help!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass, and
* help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this
* mansion. Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young warrior.
*/
return 1049088;
}
else if ( System.From.Profession == 2 ) // magician
{
/* <I>Uzeraan greets you as you approach...</I><BR><BR>
*
* Greetings traveler!<BR><BR>
*
* I am Uzeraan, the lord of this house and overseer of this fine city, Haven.
* I know we have just met, but time is short and we need to reinforce
* the troops in the mountain pass, so I will not waste your time with
* pleasantries.<BR><BR>
*
* We have been trying to fight back the wicked <I>Horde Minions</I> which have
* recently begun attacking our cities - but to no avail. We desperately
* need help!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this
* mansion. Before you go into battle, it would be prudent to
* <a href="?ForceTopic35">review your magic skills</a> as well as
* <a href = "?ForceTopic29">information on healing yourself</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young mage.
*/
return 1049386;
}
else
{
/* <I>Uzeraan nods at you with approval and begins to speak...</I><BR><BR>
*
* Now that you are ready, let me give you your first task.<BR><BR>
*
* As I mentioned earlier, we have been trying to fight back the wicked
* <I>Horde Minions</I> which have recently begun attacking our cities
* - but to no avail. Our need is great!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this mansion.
* Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself,
* using your Paladin ability 'Close Wounds'</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young Paladin!
*/
return 1060388;
}
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1023676, 0xE68 ) // glowing rune
};
public override QuestItemInfo[] Info{ get{ return m_Info; } }
public UzeraanFirstTaskConversation()
{
}
public override void OnRead()
{
System.AddObjective( new KillHordeMinionsObjective() );
}
}
public class UzeraanReportConversation : QuestConversation
{
public override object Message
{
get
{
if ( System.From.Profession == 2 ) // magician
{
/* <I>You give your report to Uzeraan and after a while, he begins to
* speak...</I><BR><BR>
*
* Your report is grim, but all hope is not lost! It has become apparent
* that our swords and spells will not drive the evil from Haven.<BR><BR>
*
* The head of my order, the High Mage Schmendrick, arrived here shortly after
* you went into battle with the <I>Horde Minions</I>. He has brought with him a
* scroll of great power, that should aid us greatly in our battle.<BR><BR>
*
* Unfortunately, the entrance to one of our mining caves collapsed recently,
* trapping our miners inside.<BR><BR>
*
* Schmendrick went to install magical teleporters inside the mines so that
* the miners would have a way out. The miners have since returned, but Schmendrick has not.
* Those who have returned, all seem to have lost their minds to madness;
* mumbling strange things of "the souls of the dead seeking revenge".<BR><BR>
*
* No matter. We must find Schmendrick.<BR><BR>
*
* Step onto the teleporter, located against the wall, and seek Schmendrick in the mines.<BR><BR>
*
* I've given you a bag with some <a href="?ForceTopic93">Travel Spells</a>,
* in case you need to make a quick escape. In addition, you may wish to cast
* the <a href="?ForceTopic92">Night Sight</a> spell on yourself before going
* into the cave, as it it's pretty dark in there.<BR><BR>
*
* Now please go. Good luck, friend.
*/
return 1049387;
}
else
{
/* <I>You give your report to Uzeraan and after a while,
* he begins to speak...</I><BR><BR>
*
* Your report is grim, but all hope is not lost! It has become apparent
* that our swords and spells will not drive the evil from Haven.<BR><BR>
*
* The head of my order, the High Mage Schmendrick, arrived here shortly after
* you went into battle with the <I>Horde Minions</I>. He has brought with him a
* scroll of great power, that should aid us greatly in our battle.<BR><BR>
*
* Unfortunately, the entrance to one of our mining caves collapsed recently,
* trapping our miners inside.<BR><BR>
*
* Schmendrick went to install magical teleporters inside the mines so that
* the miners would have a way out. The miners have since returned, but Schmendrick has not.
* Those who have returned, all seem to have lost their minds to madness;
* mumbling strange things of "the souls of the dead seeking revenge".<BR><BR>
*
* No matter. We must find Schmendrick.<BR><BR>
*
* Step onto the teleporter, located against the wall, and seek Schmendrick in the mines.<BR><BR>
*
* I've given you a bag with some <a href="?ForceTopic75">Night Sight</a>
* and <a href="?ForceTopic76">Healing</a> <a href="?ForceTopic74">potions</a>
* to help you out along the way. Good luck.
*/
return 1049119;
}
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1026153, 0x1822 ), // teleporter
new QuestItemInfo( 1048032, 0xE76 ) // a bag
};
public override QuestItemInfo[] Info{ get{ return m_Info; } }
public UzeraanReportConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindSchmendrickObjective() );
}
}
public class SchmendrickConversation : QuestConversation
{
public override object Message
{
get
{
if ( System.From.Profession == 5 ) // paladin
{
/* <I>Schmendrick barely pays you any attention as you approach him.
* His mind seems to be occupied with something else. You explain to him that
* you came for the scroll of power and after a long while he begins to speak,
* but apparently still not giving you his full attention...</I><BR><BR>
*
* Hmmm.. peculiar indeed. Very strange activity here indeed... I wonder...<BR><BR>
*
* Hmmm. Oh yes! Scroll, you say? I don't have it, sorry. My apprentice
* was carrying it, and he ran off to somewhere in this cave. Find him and
* you will find the scroll.<BR><BR>
*
* Be sure to bring the scroll to Uzeraan once you have it. He's the only person
* aside from myself who can read the ancient markings on the scroll.
* I need to figure out what's going on down here before I can leave.
* Strange activity indeed...<BR><BR>
*
* One more thing...<BR><BR>
*
* Be careful of the restless souls wandering about. They seem to be in the habit
* of spontaneously attacking people. Perhaps using your paladin ability
* <a href="?ForceTopic104">Enemy of One</a> might help you overcome the perils
* of these halls.<BR><BR>
*
* <I>Schmendrick goes back to his work and you seem to completely fade from his awareness...
*/
return 1060749;
}
else
{
/* <I>Schmendrick barely pays you any attention as you approach him. His
* mind seems to be occupied with something else. You explain to him that
* you came for the scroll of power and after a long while he begins to speak,
* but apparently still not giving you his full attention...</I><BR><BR>
*
* Hmmm.. peculiar indeed. Very strange activity here indeed... I wonder...<BR><BR>
*
* Hmmm. Oh yes! Scroll, you say? I don't have it, sorry. My apprentice was
* carrying it, and he ran off to somewhere in this cave. Find him and you will
* find the scroll.<BR><BR>Be sure to bring the scroll to Uzeraan once you
* have it. He's the only person aside from myself who can read the ancient
* markings on the scroll. I need to figure out what's going on down here before
* I can leave. Strange activity indeed...<BR><BR>
*
* <I>Schmendrick goes back to his work and you seem to completely fade from his
* awareness...
*/
return 1049322;
}
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1023637, 0xE34 ) // scroll
};
public override QuestItemInfo[] Info{ get{ return m_Info; } }
public SchmendrickConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindApprenticeObjective() );
}
}
public class UzeraanScrollOfPowerConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>Uzeraan carefully unravels the scroll and begins to read...
* after a short while his face lights up with a smile and he speaks to you...</I><BR><BR>
*
* This is wonderful, friend! For your troubles I've given you a treasure map
* I had laying about, along with a shovel to <a href = "?ForceTopic91">dig up the treasure</a>.
* Feel free to find the treasure at your leisure.<BR><BR>
*
* Now let us get back to the business of this scroll. The only trouble,
* is that this scroll calls for some special ingredients that I do
* not have on hand.<BR><BR>
*
* Though it may involve some danger, I will ask of you to find
* these reagents for me. <BR><BR>
*
* There are three reagents I need to complete the spell.<BR><BR>
*
* The first thing I need is some <I>Fertile Dirt</I>.<BR><BR>
*
* There lives a Dryad on this island who I know would have such a thing on hand.
* I have recalibrated the teleporter to transport you to the Dryad's grove,
* which lies <a href = "?ForceTopic13">South-West</a> of this mansion.<BR><BR>
*
* Tell her Uzeraan sent you, and she should cooperate.<BR><BR>
*
* Should you get into trouble out there or should you lose your way, do not worry.
* I have also given you a magical horn - a <I>Horn of Retreat</I>.
* Play the horn at any time to open a magical gateway that leads back to this mansion.<BR><BR>
*
* Should your horn run out of <a href = "?ForceTopic83">charges</a>,
* simply hand me or any of my mansion guards the horn to have it recharged.<BR><BR>
*
* Good luck friend.
*/
return 1049325;
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1048030, 0x14EB ), // a Treasure Map
new QuestItemInfo( 1023969, 0xF81 ), // Fertile Dirt
new QuestItemInfo( 1049117, 0xFC4 ) // Horn of Retreat
};
public override QuestItemInfo[] Info{ get{ return m_Info; } }
public UzeraanScrollOfPowerConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindDryadObjective() );
}
}
public class DryadConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>The Dryad watches hungrily as you approach, giving you an
* uneasy feeling in the pit of your stomach. You explain that
* Uzeraan has sent you for a quantity of fertile dirt. With a wide grin
* and in a slightly hoarse voice she replies...</I><BR><BR>
*
* <I>Fertile Dirt</I>, eh? Well, I have a few patches here...but what have
* you brought me in return? Came empty-handed did you? That's unfortunate
* indeed... but since you were sent by my dear friend Uzeraan, I supposed
* I could oblige you.<BR><BR>
*
* <I>The Dryad digs around in the ground and hands you a patch of Fertile Dirt.<BR><BR>
*
* With a smile she goes back to her work...</I>
*/
return 1049326;
}
}
public DryadConversation()
{
}
public override void OnRead()
{
System.AddObjective( new ReturnFertileDirtObjective() );
}
}
public class UzeraanFertileDirtConversation : QuestConversation
{
public override object Message
{
get
{
if ( System.From.Profession == 2 ) // magician
{
/* <I>Uzeraan takes the dirt from you and smiles...<BR><BR></I>
*
* Wonderful! I knew I could count on you. As a token of my appreciation
* I've given you a bag with some <a href = "?ForceTopic37">reagents</a>
* as well as some <a href="?ForceTopic35">spell scrolls</a>. They should
* help out a bit.<BR><BR>
*
* The next item I need is a <I>Vial of Blood</I>. I know it seems strange,
* but that's what the formula asks for. I have some locked away in a chest
* not far from here. It's only a short distance from the mansion. Let me
* give you directions...<BR><BR>Exit the front door to the East. Then follow
* the path to the North. You will pass by several pedestals with lanterns on
* them. Continue on this path until you run into a small hut. Walk up the
* stairs and through the door. Inside you will find a chest. Open it and
* bring me a <I>Vial of Blood</I> from inside the chest. It's very easy to find.
* Just follow the road and you can't miss it.<BR><BR>
*
* Good luck!
*/
return 1049388;
}
else
{
/* <I>Uzeraan takes the dirt from you and smiles...<BR><BR></I>
*
* Wonderful! I knew I could count on you. As a token of my appreciation
* I've given you a bag with some bandages as well as some healing potions.
* They should help out a bit.<BR><BR>
*
* The next item I need is a <I>Vial of Blood</I>. I know it seems strange,
* but that's what the formula asks for. I have some locked away in a chest
* not far from here. It's only a short distance from the mansion. Let me give
* you directions...<BR><BR>
*
* Exit the front door to the East. Then follow the path to the North.
* You will pass by several pedestals with lanterns on them. Continue on this
* path until you run into a small hut. Walk up the stairs and through the door.
* Inside you will find a chest. Open it and bring me a <I>Vial of Blood</I>
* from inside the chest. It's very easy to find. Just follow the road and you
* can't miss it.<BR><BR>
*
* Good luck!
*/
return 1049329;
}
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1023965, 0xF7D ), // Daemon Blood
new QuestItemInfo( 1022581, 0xA22 ), // lantern
};
public override QuestItemInfo[] Info{ get{ return m_Info; } }
public UzeraanFertileDirtConversation()
{
}
public override void OnRead()
{
System.AddObjective( new GetDaemonBloodObjective() );
}
}
public class UzeraanDaemonBloodConversation : QuestConversation
{
public override object Message
{
get
{
if ( System.From.Profession == 2 ) // magician
{
//return 1049389; // localized message is bugged
return "<I>You hand Uzeraan the Vial of Blood, which he hastily accepts...</I><BR>"
+ "<BR>"
+ "Excellent work! Only one reagent remains and the spell is complete! The final "
+ "requirement is a <I>Daemon Bone</I>, which will not be as easily acquired as the "
+ "previous two components.<BR>"
+ "<BR>"
+ "There is a haunted graveyard on this island, which is the home to many undead "
+ "creatures. Dispose of the undead as you see fit. Be sure to search their remains "
+ "after you have smitten them, to check for a <I>Daemon Bone</I>. I'm quite sure "
+ "that you will find what we seek, if you are thorough enough with your "
+ "extermination.<BR>"
+ "<BR>"
+ "Take these explosion spell scrolls and magical wizard's hat to aid you in your "
+ "battle. The scrolls should help you make short work of the undead.<BR>"
+ "<BR>"
+ "Return here when you have found a <I>Daemon Bone</I>.";
}
else
{
/* <I>You hand Uzeraan the Vial of Blood, which he hastily accepts...</I><BR><BR>
*
* Excellent work! Only one reagent remains and the spell is complete!
* The final requirement is a <I>Daemon Bone</I>, which will not be as easily
* acquired as the previous two components.<BR><BR>
*
* There is a haunted graveyard on this island, which is the home to many
* undead creatures. Dispose of the undead as you see fit. Be sure to search
* their remains after you have smitten them, to check for a <I>Daemon Bone</I>.
* I'm quite sure that you will find what we seek, if you are thorough enough
* with your extermination.<BR><BR>
*
* Take this magical silver sword to aid you in your battle. Silver weapons
* will damage the undead twice as much as your regular weapon.<BR><BR>
*
* Return here when you have found a <I>Daemon Bone</I>.
*/
return 1049333;
}
}
}
private static QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo( 1017412, 0xF80 ), // Daemon Bone
};
private static QuestItemInfo[] m_InfoPaladin = new QuestItemInfo[]
{
new QuestItemInfo( 1017412, 0xF80 ), // Daemon Bone
new QuestItemInfo( 1060577, 0x1F14 ), // Recall Rune
};
public override QuestItemInfo[] Info
{
get
{
if ( System.From.Profession == 5 ) // paladin
return m_InfoPaladin;
else
return m_Info;
}
}
public UzeraanDaemonBloodConversation()
{
}
public override void OnRead()
{
System.AddObjective( new GetDaemonBoneObjective() );
}
}
public class UzeraanDaemonBoneConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>As you hand Uzeraan the final reagent, he nods at you with approval
* and starts searching through the pockets of his robe...<BR><BR>
*
* After a short while he hands you a small pouch...</I><BR><BR>
*
* There you are. Your contract of employment with me has expired and so here
* is your pay. 2000 gold in the form of a check and a magical sextant that
* will help you find <a href = "?ForceTopic47">Moongates</a> and Banks.<BR><BR>
*
* Before you can actually spend the money I have given you, however, you must
* <a href="?ForceTopic86">cash the check</a>.<BR><BR>
*
* I have recalibrated the teleporter to take you to the Haven
* <a href="?ForceTopic38">Bank</a>. Step onto the teleporter to be taken
* to the bank, which lies <a href = "?ForceTopic13">South-East</a> of here.<BR><BR>
*
* Thank you for all your help friend. I hope we shall meet
* each other again in the future.<BR><BR>
*
* Farewell.
*/
return 1049335;
}
}
public UzeraanDaemonBoneConversation()
{
}
public override void OnRead()
{
System.AddObjective( new CashBankCheckObjective() );
}
}
public class BankerConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>The banker smiles at you and greets you in a loud and robust voice...</I><BR><BR>
*
* Well hello there adventurer! I see you've learned how to cash checks. Wonderful!
* Let me tell you a bit about the banks in this world...<BR><BR>
*
* Anything that you place into any bank box, can be retrieved from any other
* bank box in the land. For instance, if you place an item into a bank box in
* Britain, it can be retrieved from your bank box in Moonglow or any other city.<BR><BR>
*
* Bank boxes are very secure. So secure, in fact, that no one can ever get into
* your bank box except for yourself. Security is hard to come by these days,
* but you can trust in the banking system of Britannia! We shall not let you down!<BR><BR>
*
* I hope to be seeing much more of you as your riches grow! May your bank box overflow
* with the spoils of your adventures.<BR><BR>Farewell adventurer, you are now free to
* explore the world on your own.
*/
return 1060137;
}
}
public BankerConversation()
{
}
public override void OnRead()
{
System.Complete();
}
}
public class RadarConversation : QuestConversation
{
public override object Message
{
get
{
/* If you are leaving the mansion, 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 1049660;
}
}
public override bool Logged{ get{ return false; } }
public RadarConversation()
{
}
}
public class LostScrollOfPowerConversation : QuestConversation
{
private bool m_FromUzeraan;
public override object Message
{
get
{
if ( m_FromUzeraan )
{
/* You return without the scroll???<BR><BR>
*
* All hope is lost without it, friend. Return to the mines and talk to
* Schmendrick to see if he can help us out of this predicament.
*/
return 1049377;
}
else
{
/* You've lost the scroll? Argh! I will have to try and re-construct
* the scroll from memory. Bring me a blank scroll, which you can
* <a href = "?ForceTopic33">purchase from the mage shop</a> just
* <a href = "?ForceTopic13">East</a> of Uzeraan's mansion in Haven.<BR><BR>
*
* Return the scroll to me and I will try to make another scroll for you.<BR><BR>
*
* When you return, be sure to hand me the scroll (drag and drop).
*/
return 1049345;
}
}
}
public override bool Logged{ get{ return false; } }
public LostScrollOfPowerConversation( bool fromUzeraan )
{
m_FromUzeraan = fromUzeraan;
}
public LostScrollOfPowerConversation()
{
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_FromUzeraan = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_FromUzeraan );
}
}
public class LostFertileDirtConversation : QuestConversation
{
private bool m_FromUzeraan;
public override object Message
{
get
{
if ( m_FromUzeraan )
{
/* You return without <I>Fertile Dirt</I>? It is imperative that we
* get all of the ingredients friend.<BR><BR>
*
* Seek out the Dryad and ask her to help you again.
*/
return 1049374;
}
else
{
/* You've lost the dirt I gave you?<BR><BR>
*
* My, my, my... What ever shall we do now?<BR><BR>
*
* I can try to make you some more, but I will need something
* that I can transform. Bring me an <I>apple</I>, and I shall
* see what I can do.<BR><BR>
*
* You can <a href = "?ForceTopic33">buy</a> apples from the
* Provisioner's Shop, which is located a ways <a href = "?ForceTopic13">East</a>
* of Uzeraan's mansion.<BR><BR>
*
* Hand me the apple when you have it, and I shall see about transforming
* it for you.<BR><BR>
*
* Good luck.<BR><BR>
*/
return 1049359;
}
}
}
public override bool Logged{ get{ return false; } }
public LostFertileDirtConversation( bool fromUzeraan )
{
m_FromUzeraan = fromUzeraan;
}
public LostFertileDirtConversation()
{
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_FromUzeraan = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_FromUzeraan );
}
}
public class DryadAppleConversation : QuestConversation
{
public override object Message
{
get
{
/* <I>The Dryad sticks the apple into the ground and you watch it
* rot before your eyes.<BR><BR>
*
* She pulls the now fertile dirt out of the ground and hands
* it to you.</I><BR><BR>
*
* There you go friend. Try not to lose it again this time, eh?
*/
return 1049360;
}
}
public override bool Logged{ get{ return false; } }
public DryadAppleConversation()
{
}
}
public class LostDaemonBloodConversation : QuestConversation
{
public override object Message
{
get
{
/* You return without <I>a Vial of Blood</I>? It is imperative that we
* get all of the ingredients friend.<BR><BR>
*
* Go back to the chest and fetch another vial. Please hurry.
*/
return 1049375;
}
}
public override bool Logged{ get{ return false; } }
public LostDaemonBloodConversation()
{
}
}
public class LostDaemonBoneConversation : QuestConversation
{
public override object Message
{
get
{
/* You return without <I>a Daemon Bone</I>? It is imperative that we
* get all of the ingredients friend.<BR><BR>
*
* Go back to the graveyard and continue hunting the undead until you
* find another one. Please hurry.
*/
return 1049376;
}
}
public override bool Logged{ get{ return false; } }
public LostDaemonBoneConversation()
{
}
}
public class FewReagentsConversation : QuestConversation
{
public override object Message
{
get
{
/* I don't feel comfortable sending you into a potentially dangerous situation
* with as few <a href = "?ForceTopic37">reagents</a> as you have in your pack.<BR><BR>
*
* Before going on, please acquire at least 30 of each reagent. You can
* <a href ="?ForceTopic33">purchase</a> reagents from the Mage shop, which is
* located just <a href ="?ForceTopic13">East</a> this mansion.<BR><BR>
*
* Remember that there are eight (8) different reagents: Black Pearl, Mandrake Root,
* Sulfurous Ash, Garlic, Ginseng, Blood Moss, Nightshade and Spider's Silk.<BR><BR>
*
* Come back here when you are ready to go.
*/
return 1049390;
}
}
public override bool Logged{ get{ return false; } }
public FewReagentsConversation()
{
}
}
}

View file

@ -0,0 +1,181 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Haven
{
public enum CannonDirection
{
North,
East,
South,
West
}
public class Cannon : BaseAddon
{
private CannonDirection m_CannonDirection;
private MilitiaCanoneer m_Canoneer;
[CommandProperty( AccessLevel.GameMaster )]
public CannonDirection CannonDirection { get { return m_CannonDirection; } }
[CommandProperty( AccessLevel.GameMaster )]
public MilitiaCanoneer Canoneer { get { return m_Canoneer; } set { m_Canoneer = value; } }
[Constructable]
public Cannon( CannonDirection direction )
{
m_CannonDirection = direction;
switch ( direction )
{
case CannonDirection.North:
{
AddComponent( new CannonComponent( 0xE8D ), 0, 0, 0 );
AddComponent( new CannonComponent( 0xE8C ), 0, 1, 0 );
AddComponent( new CannonComponent( 0xE8B ), 0, 2, 0 );
break;
}
case CannonDirection.East:
{
AddComponent( new CannonComponent( 0xE96 ), 0, 0, 0 );
AddComponent( new CannonComponent( 0xE95 ), -1, 0, 0 );
AddComponent( new CannonComponent( 0xE94 ), -2, 0, 0 );
break;
}
case CannonDirection.South:
{
AddComponent( new CannonComponent( 0xE91 ), 0, 0, 0 );
AddComponent( new CannonComponent( 0xE92 ), 0, -1, 0 );
AddComponent( new CannonComponent( 0xE93 ), 0, -2, 0 );
break;
}
default:
{
AddComponent( new CannonComponent( 0xE8E ), 0, 0, 0 );
AddComponent( new CannonComponent( 0xE8F ), 1, 0, 0 );
AddComponent( new CannonComponent( 0xE90 ), 2, 0, 0 );
break;
}
}
}
public Cannon( Serial serial ) : base( serial )
{
}
public void DoFireEffect( IPoint3D target )
{
Point3D from;
switch ( m_CannonDirection )
{
case CannonDirection.North: from = new Point3D( X, Y - 1, Z ); break;
case CannonDirection.East: from = new Point3D( X + 1, Y, Z ); break;
case CannonDirection.South: from = new Point3D( X, Y + 1, Z ); break;
default: from = new Point3D( X - 1, Y, Z ); break;
}
Effects.SendLocationEffect( from, Map, 0x36B0, 16, 1 );
Effects.PlaySound( from, Map, 0x11D );
Effects.SendLocationEffect( target, Map, 0x36B0, 16, 1 );
Effects.PlaySound( target, Map, 0x11D );
}
public void Fire( Mobile from, Mobile target )
{
DoFireEffect( target );
target.Damage( 9999, from );
}
public override bool HandlesOnMovement { get { return m_Canoneer != null && !m_Canoneer.Deleted && m_Canoneer.Active; } }
public override void OnMovement( Mobile m, Point3D oldLocation )
{
if ( m_Canoneer == null || m_Canoneer.Deleted || !m_Canoneer.Active )
return;
bool canFire;
switch ( m_CannonDirection )
{
case CannonDirection.North:
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y - 7 && oldLocation.Y < Y - 7;
break;
case CannonDirection.East:
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X + 7 && oldLocation.X > X + 7;
break;
case CannonDirection.South:
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y + 7 && oldLocation.Y > Y + 7;
break;
default:
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X - 7 && oldLocation.X < X - 7;
break;
}
if ( canFire && m_Canoneer.WillFire( this, m ) )
Fire( m_Canoneer, m );
}
public override void Serialize( GenericWriter writer )
{
if ( m_Canoneer != null && m_Canoneer.Deleted )
m_Canoneer = null;
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteEncodedInt( (int) m_CannonDirection );
writer.Write( (Mobile) m_Canoneer );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_CannonDirection = (CannonDirection) reader.ReadEncodedInt();
m_Canoneer = (MilitiaCanoneer) reader.ReadMobile();
}
}
public class CannonComponent : AddonComponent
{
[CommandProperty( AccessLevel.GameMaster )]
public MilitiaCanoneer Canoneer
{
get { return Addon is Cannon ? ((Cannon)Addon).Canoneer : null; }
set { if ( Addon is Cannon ) ((Cannon)Addon).Canoneer = value; }
}
public CannonComponent( int itemID ) : base( itemID )
{
}
public CannonComponent( 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,72 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class DaemonBloodChest : MetalChest
{
[Constructable]
public DaemonBloodChest()
{
Movable = false;
}
public DaemonBloodChest( Serial serial ) : base( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null && player.InRange( GetWorldLocation(), 2 ) )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
QuestObjective obj = qs.FindObjective( typeof( GetDaemonBloodObjective ) );
if ( (obj != null && !obj.Completed) || UzeraanTurmoilQuest.HasLostDaemonBlood( player ) )
{
Item vial = new QuestDaemonBlood();
if ( player.PlaceInBackpack( vial ) )
{
player.SendLocalizedMessage( 1049331, "", 0x22 ); // You take a vial of blood from the chest and put it in your pack.
if ( obj != null && !obj.Completed )
obj.Complete();
}
else
{
player.SendLocalizedMessage( 1049338, "", 0x22 ); // You find a vial of blood, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
vial.Delete();
}
return;
}
}
}
base.OnDoubleClick( from );
}
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,45 @@
using System;
using Server;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class QuestDaemonBlood : QuestItem
{
[Constructable]
public QuestDaemonBlood() : base( 0xF7D )
{
Weight = 1.0;
}
public QuestDaemonBlood( Serial serial ) : base( serial )
{
}
public override bool CanDrop( PlayerMobile player )
{
UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;
if ( qs == null )
return true;
/*return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBloodObjective ) );*/
return false;
}
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,45 @@
using System;
using Server;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class QuestDaemonBone : QuestItem
{
[Constructable]
public QuestDaemonBone() : base( 0xF80 )
{
Weight = 1.0;
}
public QuestDaemonBone( Serial serial ) : base( serial )
{
}
public override bool CanDrop( PlayerMobile player )
{
UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;
if ( qs == null )
return true;
//return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBoneObjective ) );
return false;
}
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,45 @@
using System;
using Server;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class QuestFertileDirt : QuestItem
{
[Constructable]
public QuestFertileDirt() : base( 0xF81 )
{
Weight = 1.0;
}
public QuestFertileDirt( Serial serial ) : base( serial )
{
}
public override bool CanDrop( PlayerMobile player )
{
UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;
if ( qs == null )
return true;
//return !qs.IsObjectiveInProgress( typeof( ReturnFertileDirtObjective ) );
return false;
}
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,205 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class SchmendrickApprenticeCorpse : Corpse
{
private static Mobile GetOwner()
{
Mobile apprentice = new Mobile();
apprentice.Hue = Utility.RandomSkinHue();
apprentice.Female = false;
apprentice.Body = 0x190;
apprentice.Name = NameList.RandomName( "male" );
apprentice.Delete();
return apprentice;
}
private static List<Item> GetEquipment()
{
List<Item> list = new List<Item>();
list.Add( new Robe( QuestSystem.RandomBrightHue() ) );
list.Add( new WizardsHat( Utility.RandomNeutralHue() ) );
list.Add( new Shoes( Utility.RandomNeutralHue() ) );
/*
int hairHue = Utility.RandomHairHue();
switch ( Utility.Random( 8 ) )
{
case 0: list.Add( new Afro( hairHue ) ); break;
case 1: list.Add( new KrisnaHair( hairHue ) ); break;
case 2: list.Add( new PageboyHair( hairHue ) ); break;
case 3: list.Add( new PonyTail( hairHue ) ); break;
case 4: list.Add( new ReceedingHair( hairHue ) ); break;
case 5: list.Add( new TwoPigTails( hairHue ) ); break;
case 6: list.Add( new ShortHair( hairHue ) ); break;
case 7: list.Add( new LongHair( hairHue ) ); break;
}
switch ( Utility.Random( 5 ) )
{
case 0: list.Add( new LongBeard( hairHue ) ); break;
case 1: list.Add( new MediumLongBeard( hairHue ) ); break;
case 2: list.Add( new Vandyke( hairHue ) ); break;
case 3: list.Add( new Mustache( hairHue ) ); break;
case 4: list.Add( new Goatee( hairHue ) ); break;
}
* */
list.Add( new Spellbook() );
return list;
}
private static int m_HairHue;
private static HairInfo GetHair()
{
m_HairHue = Race.Human.RandomHairHue();
return new HairInfo( Race.Human.RandomHair( false ), m_HairHue );
}
private static FacialHairInfo GetFacialHair()
{
m_HairHue = Race.Human.RandomHairHue();
return new FacialHairInfo( Race.Human.RandomFacialHair( false ), m_HairHue );
}
private Lantern m_Lantern;
[Constructable]
public SchmendrickApprenticeCorpse() : base( GetOwner(), GetHair(), GetFacialHair(), GetEquipment() )
{
Direction = Direction.West;
foreach ( Item item in EquipItems )
{
DropItem( item );
}
m_Lantern = new Lantern();
m_Lantern.Movable = false;
m_Lantern.Protected = true;
m_Lantern.Ignite();
}
public SchmendrickApprenticeCorpse( Serial serial ) : base( serial )
{
}
public override void AddNameProperty( ObjectPropertyList list )
{
if ( ItemID == 0x2006 ) // Corpse form
{
list.Add( "a human corpse" );
list.Add( 1049144, this.Name ); // the remains of ~1_NAME~ the apprentice
}
else
{
list.Add( 1049145 ); // the remains of a wizard's apprentice
}
}
public override void OnSingleClick( Mobile from )
{
int hue = Notoriety.GetHue( Server.Misc.NotorietyHandlers.CorpseNotoriety( from, this ) );
if ( ItemID == 0x2006 ) // Corpse form
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049144, "", Name ) ); // the remains of ~1_NAME~ the apprentice
else
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049145, "", "" ) ); // the remains of a wizard's apprentice
}
public override void Open( Mobile from, bool checkSelfLoot )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
return;
PlayerMobile player = from as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
QuestObjective obj = qs.FindObjective( typeof( FindApprenticeObjective ) );
if ( obj != null && !obj.Completed )
{
Item scroll = new SchmendrickScrollOfPower();
if ( player.PlaceInBackpack( scroll ) )
{
player.SendLocalizedMessage( 1049147, "", 0x22 ); // You find the scroll and put it in your pack.
obj.Complete();
}
else
{
player.SendLocalizedMessage( 1049146, "", 0x22 ); // You find the scroll, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
scroll.Delete();
}
return;
}
}
}
from.SendLocalizedMessage( 1049143, "", 0x22 ); // This is the corpse of a wizard's apprentice. You can't bring yourself to search it without a good reason.
}
public override void OnLocationChange( Point3D oldLoc )
{
if ( m_Lantern != null && !m_Lantern.Deleted )
m_Lantern.Location = new Point3D( this.X, this.Y + 1, this.Z );
}
public override void OnMapChange()
{
if ( m_Lantern != null && !m_Lantern.Deleted )
m_Lantern.Map = this.Map;
}
public override void OnAfterDelete()
{
base.OnAfterDelete();
if ( m_Lantern != null && !m_Lantern.Deleted )
m_Lantern.Delete();
}
public override void Serialize( GenericWriter writer )
{
if ( m_Lantern != null && m_Lantern.Deleted )
m_Lantern = null;
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Lantern );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Lantern = (Lantern)reader.ReadItem();
}
}
}

View file

@ -0,0 +1,46 @@
using System;
using Server;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class SchmendrickScrollOfPower : QuestItem
{
public override int LabelNumber { get { return 1049118; } } // a scroll with ancient markings
public SchmendrickScrollOfPower() : base( 0xE34 )
{
Weight = 1.0;
Hue = 0x34D;
}
public SchmendrickScrollOfPower( Serial serial ) : base( serial )
{
}
public override bool CanDrop( PlayerMobile player )
{
UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;
if ( qs == null )
return true;
return !qs.IsObjectiveInProgress( typeof( ReturnScrollOfPowerObjective ) );
}
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,43 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class UzeraanTurmoilHorn : HornOfRetreat
{
public override bool ValidateUse( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
return ( pm != null && pm.Quest is UzeraanTurmoilQuest );
}
[Constructable]
public UzeraanTurmoilHorn()
{
DestLoc = new Point3D( 3597, 2582, 0 );
DestMap = Map.Trammel;
}
public UzeraanTurmoilHorn( 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,74 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class UzeraanTurmoilTeleporter : DynamicTeleporter
{
[Constructable]
public UzeraanTurmoilTeleporter()
{
}
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( qs.IsObjectiveInProgress( typeof( FindSchmendrickObjective ) )
|| qs.IsObjectiveInProgress( typeof( FindApprenticeObjective ) )
|| UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
{
loc = new Point3D( 5222, 1858, 0 );
map = Map.Trammel;
return true;
}
else if ( qs.IsObjectiveInProgress( typeof( FindDryadObjective ) )
|| UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
{
loc = new Point3D( 3557, 2690, 2 );
map = Map.Trammel;
return true;
}
else if ( player.Profession != 5 // paladin
&& ( qs.IsObjectiveInProgress( typeof( GetDaemonBoneObjective ) )
|| UzeraanTurmoilQuest.HasLostDaemonBone( player ) ) )
{
loc = new Point3D( 3422, 2653, 48 );
map = Map.Trammel;
return true;
}
else if ( qs.IsObjectiveInProgress( typeof( CashBankCheckObjective ) ) )
{
loc = new Point3D( 3624, 2610, 0 );
map = Map.Trammel;
return true;
}
}
return false;
}
public UzeraanTurmoilTeleporter( 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,202 @@
using System;
using System.Collections;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.ContextMenus;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class Dryad : BaseQuester
{
public override bool IsActiveVendor{ get{ return true; } }
public override bool DisallowAllMoves{ get{ return false; } }
public override bool ClickTitle{ get { return true; } }
public override bool CanTeach{ get{ return true; } }
[Constructable]
public Dryad() : base( "the Dryad" )
{
SetSkill( SkillName.Peacemaking, 80.0, 100.0 );
SetSkill( SkillName.Cooking, 80.0, 100.0 );
SetSkill( SkillName.Provocation, 80.0, 100.0 );
SetSkill( SkillName.Musicianship, 80.0, 100.0 );
SetSkill( SkillName.Poisoning, 80.0, 100.0 );
SetSkill( SkillName.Archery, 80.0, 100.0 );
SetSkill( SkillName.Tailoring, 80.0, 100.0 );
}
public Dryad( Serial serial ) : base( serial )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x85A7;
Female = true;
Body = 0x191;
Name = "Anwin Brenna";
}
public override void InitOutfit()
{
AddItem( new Kilt( 0x301 ) );
AddItem( new FancyShirt( 0x300 ) );
HairItemID = 0x203D; // Pony Tail
HairHue = 0x22;
Bow bow = new Bow();
bow.Movable = false;
AddItem( bow );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBDryad() );
}
public override int GetAutoTalkRange( PlayerMobile pm )
{
return 4;
}
public override bool CanTalkTo( PlayerMobile to )
{
UzeraanTurmoilQuest qs = to.Quest as UzeraanTurmoilQuest;
return ( qs != null && qs.FindObjective( typeof( FindDryadObjective ) ) != null );
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
{
FocusTo( player );
qs.AddConversation( new LostFertileDirtConversation( false ) );
}
else
{
QuestObjective obj = qs.FindObjective( typeof( FindDryadObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
Item fertileDirt = new QuestFertileDirt();
if ( !player.PlaceInBackpack( fertileDirt ) )
{
fertileDirt.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
}
else
{
obj.Complete();
}
}
else if ( contextMenu )
{
FocusTo( player );
SayTo( player, 1049357 ); // I have nothing more for you at this time.
}
}
}
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null )
{
UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;
if ( qs != null && dropped is Apple && UzeraanTurmoilQuest.HasLostFertileDirt( from ) )
{
FocusTo( from );
Item fertileDirt = new QuestFertileDirt();
if ( !player.PlaceInBackpack( fertileDirt ) )
{
fertileDirt.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 false;
}
else
{
dropped.Consume();
qs.AddConversation( new DryadAppleConversation() );
return dropped.Deleted;
}
}
}
return base.OnDragDrop( from, dropped );
}
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();
}
}
public class SBDryad : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBDryad()
{
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( Bandage ), 5, 20, 0xE21, 0 ) );
Add( new GenericBuyInfo( typeof( Ginseng ), 3, 20, 0xF85, 0 ) );
Add( new GenericBuyInfo( typeof( Garlic ), 3, 20, 0xF84, 0 ) );
Add( new GenericBuyInfo( typeof( Bloodmoss ), 5, 20, 0xF7B, 0 ) );
Add( new GenericBuyInfo( typeof( Nightshade ), 3, 20, 0xF88, 0 ) );
Add( new GenericBuyInfo( typeof( SpidersSilk ), 3, 20, 0xF8D, 0 ) );
Add( new GenericBuyInfo( typeof( MandrakeRoot ), 3, 20, 0xF86, 0 ) );
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( Bandage ), 2 );
Add( typeof( Garlic ), 2 );
Add( typeof( Ginseng ), 2 );
Add( typeof( Bloodmoss ), 3 );
Add( typeof( Nightshade ), 2 );
Add( typeof( SpidersSilk ), 2 );
Add( typeof( MandrakeRoot ), 2 );
}
}
}
}

View file

@ -0,0 +1,80 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class MansionGuard : BaseQuester
{
[Constructable]
public MansionGuard() : base( "the Mansion Guard" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = Utility.RandomSkinHue();
Female = false;
Body = 0x190;
Name = NameList.RandomName( "male" );
}
public override void InitOutfit()
{
AddItem( new PlateChest() );
AddItem( new PlateArms() );
AddItem( new PlateGloves() );
AddItem( new PlateLegs() );
Utility.AssignRandomHair( this );
Utility.AssignRandomFacialHair( this, HairHue );
Bardiche weapon = new Bardiche();
weapon.Movable = false;
AddItem( weapon );
}
public override int GetAutoTalkRange( PlayerMobile pm )
{
return 3;
}
public override bool CanTalkTo( PlayerMobile to )
{
return ( to.Quest == null && QuestSystem.CanOfferQuest( to, typeof( UzeraanTurmoilQuest ) ) );
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( UzeraanTurmoilQuest ) ) )
{
Direction = GetDirectionTo( player );
new UzeraanTurmoilQuest( player ).SendOffer();
}
}
public MansionGuard( 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,113 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class MilitiaCanoneer : BaseQuester
{
private bool m_Active;
[CommandProperty( AccessLevel.GameMaster )]
public bool Active
{
get { return m_Active; }
set { m_Active = value; }
}
[Constructable]
public MilitiaCanoneer() : base( "the Militia Canoneer" )
{
m_Active = true;
}
public override void InitBody()
{
InitStats( 100, 125, 25 );
Hue = Utility.RandomSkinHue();
Female = false;
Body = 0x190;
Name = NameList.RandomName( "male" );
}
public override void InitOutfit()
{
Utility.AssignRandomHair( this );
Utility.AssignRandomFacialHair( this, HairHue );
AddItem( new PlateChest() );
AddItem( new PlateArms() );
AddItem( new PlateGloves() );
AddItem( new PlateLegs() );
Torch torch = new Torch();
torch.Movable = false;
AddItem( torch );
torch.Ignite();
}
public override bool CanTalkTo( PlayerMobile to )
{
return false;
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
}
public override bool IsEnemy( Mobile m )
{
if ( m.Player || m is BaseVendor )
return false;
if ( m is BaseCreature )
{
BaseCreature bc = (BaseCreature)m;
Mobile master = bc.GetMaster();
if( master != null )
return IsEnemy( master );
}
return m.Karma < 0;
}
public bool WillFire( Cannon cannon, Mobile target )
{
if ( m_Active && IsEnemy( target ) )
{
Direction = GetDirectionTo( target );
Say( Utility.RandomList( 500651, 1049098, 1049320, 1043149 ) );
return true;
}
return false;
}
public MilitiaCanoneer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (bool) m_Active );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Active = reader.ReadBool();
}
}
}

View file

@ -0,0 +1,151 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Engines.Quests.Haven
{
public class MilitiaFighter : BaseCreature
{
[Constructable]
public MilitiaFighter() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
InitStats( 40, 30, 5 );
Title = "the Militia Fighter";
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
Female = false;
Body = 0x190;
Name = NameList.RandomName( "male" );
Utility.AssignRandomHair( this );
Utility.AssignRandomFacialHair( this, HairHue );
AddItem( new ThighBoots( 0x1BB ) );
AddItem( new LeatherChest() );
AddItem( new LeatherArms() );
AddItem( new LeatherLegs() );
AddItem( new LeatherCap() );
AddItem( new LeatherGloves() );
AddItem( new LeatherGorget() );
Item weapon;
switch ( Utility.Random( 6 ) )
{
case 0: weapon = new Broadsword(); break;
case 1: weapon = new Cutlass(); break;
case 2: weapon = new Katana(); break;
case 3: weapon = new Longsword(); break;
case 4: weapon = new Scimitar(); break;
default: weapon = new VikingSword(); break;
}
weapon.Movable = false;
AddItem( weapon );
Item shield = new BronzeShield();
shield.Movable = false;
AddItem( shield );
SetSkill( SkillName.Swords, 20.0 );
}
public override bool ClickTitle { get { return false; } }
public override bool IsEnemy( Mobile m )
{
if ( m.Player || m is BaseVendor )
return false;
if ( m is BaseCreature )
{
BaseCreature bc = (BaseCreature)m;
Mobile master = bc.GetMaster();
if( master != null )
return IsEnemy( master );
}
return m.Karma < 0;
}
public MilitiaFighter( 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();
}
}
public class MilitiaFighterCorpse : Corpse
{
public MilitiaFighterCorpse( Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> equipItems ) : base( owner, hair, facialhair, equipItems )
{
}
public override void AddNameProperty( ObjectPropertyList list )
{
if ( ItemID == 0x2006 ) // Corpse form
{
list.Add( "a human corpse" );
list.Add( 1049318, this.Name ); // the remains of ~1_NAME~ the militia fighter
}
else
{
list.Add( 1049319 ); // the remains of a militia fighter
}
}
public override void OnSingleClick( Mobile from )
{
int hue = Notoriety.GetHue( Server.Misc.NotorietyHandlers.CorpseNotoriety( from, this ) );
if ( ItemID == 0x2006 ) // Corpse form
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049318, "", Name ) ); // the remains of ~1_NAME~ the militia fighter
else
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049319, "", "" ) ); // the remains of a militia fighter
}
public override void Open( Mobile from, bool checkSelfLoot )
{
if ( from.InRange( this.GetWorldLocation(), 2 ) )
{
from.SendLocalizedMessage( 1049661, "", 0x22 ); // Thinking about his sacrifice, you can't bring yourself to loot the body of this militia fighter.
}
}
public MilitiaFighterCorpse( 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,156 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class Schmendrick : BaseQuester
{
[Constructable]
public Schmendrick() : base( "the High Mage" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x83F3;
Female = false;
Body = 0x190;
Name = "Schmendrick";
}
public override void InitOutfit()
{
AddItem( new Robe( 0x4DD ) );
AddItem( new WizardsHat( 0x482 ) );
AddItem( new Shoes( 0x482 ) );
HairItemID = 0x203C;
HairHue = 0x455;
FacialHairItemID = 0x203E;
FacialHairHue = 0x455;
GlacialStaff staff = new GlacialStaff();
staff.Movable = false;
AddItem( staff );
Backpack pack = new Backpack();
pack.Movable = false;
AddItem( pack );
}
public override int GetAutoTalkRange( PlayerMobile pm )
{
return 7;
}
public override bool CanTalkTo( PlayerMobile to )
{
UzeraanTurmoilQuest qs = to.Quest as UzeraanTurmoilQuest;
return ( qs != null && qs.FindObjective( typeof( FindSchmendrickObjective ) ) != null );
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
{
FocusTo( player );
qs.AddConversation( new LostScrollOfPowerConversation( false ) );
}
else
{
QuestObjective obj = qs.FindObjective( typeof( FindSchmendrickObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
obj.Complete();
}
else if ( contextMenu )
{
FocusTo( player );
SayTo( player, 1049357 ); // I have nothing more for you at this time.
}
}
}
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower( from ) )
{
FocusTo( from );
Item scroll = new SchmendrickScrollOfPower();
if ( !from.PlaceInBackpack( scroll ) )
{
scroll.Delete();
from.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 false;
}
else
{
dropped.Consume();
from.SendLocalizedMessage( 1049346 ); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
return dropped.Deleted;
}
}
return base.OnDragDrop( from, dropped );
}
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if ( m is PlayerMobile && !m.Frozen && !m.Alive && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
{
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
{
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
}
else
{
Direction = GetDirectionTo( m );
m.PlaySound( 0x214 );
m.FixedEffect( 0x376A, 10, 16 );
m.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
}
}
}
public Schmendrick( 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,434 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
using Server.Engines.Quests;
namespace Server.Engines.Quests.Haven
{
public class Uzeraan : BaseQuester
{
[Constructable]
public Uzeraan() : base( "the Conjurer" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x83F3;
Female = false;
Body = 0x190;
Name = "Uzeraan";
}
public override void InitOutfit()
{
AddItem( new Robe( 0x4DD ) );
AddItem( new WizardsHat( 0x8A5 ) );
AddItem( new Shoes( 0x8A5 ) );
HairItemID = 0x203C;
HairHue = 0x455;
FacialHairItemID = 0x203E;
FacialHairHue = 0x455;
BlackStaff staff = new BlackStaff();
staff.Movable = false;
AddItem( staff );
}
public override int GetAutoTalkRange( PlayerMobile pm )
{
return 3;
}
public override bool CanTalkTo( PlayerMobile to )
{
return to.Quest is UzeraanTurmoilQuest;
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
{
qs.AddConversation( new LostScrollOfPowerConversation( true ) );
}
else if ( UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
{
qs.AddConversation( new LostFertileDirtConversation( true ) );
}
else if ( UzeraanTurmoilQuest.HasLostDaemonBlood( player ) )
{
qs.AddConversation( new LostDaemonBloodConversation() );
}
else if ( UzeraanTurmoilQuest.HasLostDaemonBone( player ) )
{
qs.AddConversation( new LostDaemonBoneConversation() );
}
else
{
if ( player.Profession == 2 ) // magician
{
Container backpack = player.Backpack;
if ( backpack == null
|| backpack.GetAmount( typeof( BlackPearl ) ) < 30
|| backpack.GetAmount( typeof( Bloodmoss ) ) < 30
|| backpack.GetAmount( typeof( Garlic ) ) < 30
|| backpack.GetAmount( typeof( Ginseng ) ) < 30
|| backpack.GetAmount( typeof( MandrakeRoot ) ) < 30
|| backpack.GetAmount( typeof( Nightshade ) ) < 30
|| backpack.GetAmount( typeof( SulfurousAsh ) ) < 30
|| backpack.GetAmount( typeof( SpidersSilk ) ) < 30 )
{
qs.AddConversation( new FewReagentsConversation() );
}
}
QuestObjective obj = qs.FindObjective( typeof( FindUzeraanBeginObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindUzeraanFirstTaskObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindUzeraanAboutReportObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
if ( player.Profession == 2 ) // magician
{
cont.DropItem( new MarkScroll( 5 ) );
cont.DropItem( new RecallScroll( 5 ) );
for ( int i = 0; i < 5; i++ )
{
cont.DropItem( new RecallRune() );
}
}
else
{
cont.DropItem( new Gold( 300 ) );
for ( int i = 0; i < 6; i++ )
{
cont.DropItem( new NightSightPotion() );
cont.DropItem( new LesserHealPotion() );
}
}
if ( !player.PlaceInBackpack( cont ) )
{
cont.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
}
else
{
obj.Complete();
}
}
else
{
obj = qs.FindObjective( typeof( ReturnScrollOfPowerObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
SayTo( player, 1049378 ); // Hand me the scroll, if you have it.
}
else
{
obj = qs.FindObjective( typeof( ReturnFertileDirtObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
SayTo( player, 1049381 ); // Hand me the Fertile Dirt, if you have it.
}
else
{
obj = qs.FindObjective( typeof( ReturnDaemonBloodObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
SayTo( player, 1049379 ); // Hand me the Vial of Blood, if you have it.
}
else
{
obj = qs.FindObjective( typeof( ReturnDaemonBoneObjective ) );
if ( obj != null && !obj.Completed )
{
FocusTo( player );
SayTo( player, 1049380 ); // Hand me the Daemon Bone, if you have it.
}
else
{
SayTo( player, 1049357 ); // I have nothing more for you at this time.
}
}
}
}
}
}
}
}
}
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( dropped is UzeraanTurmoilHorn )
{
if ( player.Young )
{
UzeraanTurmoilHorn horn = (UzeraanTurmoilHorn)dropped;
if ( horn.Charges < 10 )
{
SayTo( from, 1049384 ); // I have recharged the item for you.
horn.Charges = 10;
}
else
{
SayTo( from, 1049385 ); // That doesn't need recharging yet.
}
}
else
{
player.SendMessage( "You must be young to have this item recharged." );
}
return false;
}
if ( dropped is SchmendrickScrollOfPower )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnScrollOfPowerObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
cont.DropItem( new TreasureMap( player.Young ? 0 : 1, Map.Trammel ) );
cont.DropItem( new Shovel() );
cont.DropItem( new UzeraanTurmoilHorn() );
if ( !player.PlaceInBackpack( cont ) )
{
cont.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
return false;
}
else
{
dropped.Delete();
obj.Complete();
return true;
}
}
}
else if ( dropped is QuestFertileDirt )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnFertileDirtObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
if ( player.Profession == 2 ) // magician
{
cont.DropItem( new BlackPearl( 20 ) );
cont.DropItem( new Bloodmoss( 20 ) );
cont.DropItem( new Garlic( 20 ) );
cont.DropItem( new Ginseng( 20 ) );
cont.DropItem( new MandrakeRoot( 20 ) );
cont.DropItem( new Nightshade( 20 ) );
cont.DropItem( new SulfurousAsh( 20 ) );
cont.DropItem( new SpidersSilk( 20 ) );
for ( int i = 0; i < 3; i++ )
cont.DropItem( Loot.RandomScroll( 0, 23, SpellbookType.Regular ) );
}
else
{
cont.DropItem( new Gold( 300 ) );
cont.DropItem( new Bandage( 25 ) );
for ( int i = 0; i < 5; i++ )
cont.DropItem( new LesserHealPotion() );
}
if ( !player.PlaceInBackpack( cont ) )
{
cont.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
return false;
}
else
{
dropped.Delete();
obj.Complete();
return true;
}
}
}
else if ( dropped is QuestDaemonBlood )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnDaemonBloodObjective ) );
if ( obj != null && !obj.Completed )
{
Item reward;
if ( player.Profession == 2 ) // magician
{
Container cont = GetNewContainer();
cont.DropItem( new ExplosionScroll( 4 ) );
cont.DropItem( new MagicWizardsHat() );
reward = cont;
}
else
{
BaseWeapon weapon;
switch ( Utility.Random( 6 ) )
{
case 0: weapon = new Broadsword(); break;
case 1: weapon = new Cutlass(); break;
case 2: weapon = new Katana(); break;
case 3: weapon = new Longsword(); break;
case 4: weapon = new Scimitar(); break;
default: weapon = new VikingSword(); break;
}
if ( Core.AOS )
{
BaseRunicTool.ApplyAttributesTo( weapon, 3, 20, 40 );
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
}
weapon.Slayer = SlayerName.Silver;
reward = weapon;
}
if ( !player.PlaceInBackpack( reward ) )
{
reward.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 false;
}
else
{
dropped.Delete();
obj.Complete();
return true;
}
}
}
else if ( dropped is QuestDaemonBone )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnDaemonBoneObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
cont.DropItem( new BankCheck( 2000 ) );
cont.DropItem( new EnchantedSextant() );
if ( !player.PlaceInBackpack( cont ) )
{
cont.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
return false;
}
else
{
dropped.Delete();
obj.Complete();
return true;
}
}
}
}
}
return base.OnDragDrop( from, dropped );
}
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if ( m is PlayerMobile && !m.Frozen && !m.Alive && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
{
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
{
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
}
else
{
Direction = GetDirectionTo( m );
m.PlaySound( 0x214 );
m.FixedEffect( 0x376A, 10, 16 );
m.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
}
}
}
public Uzeraan( 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,638 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Network;
namespace Server.Engines.Quests.Haven
{
public class FindUzeraanBeginObjective : QuestObjective
{
public override object Message
{
get
{
// Find Uzeraan. Uzeraan will explain what you need to do next.
return 1046039;
}
}
public FindUzeraanBeginObjective()
{
}
public override void OnComplete()
{
if ( System.From.Profession == 5 ) // paladin
System.AddConversation( new UzeraanTitheConversation() );
else
System.AddConversation( new UzeraanFirstTaskConversation() );
}
}
public class TitheGoldObjective : QuestObjective
{
public override object Message
{
get
{
/* Go to the shrine inside of Uzeraan's Mansion, near the front doors and
* <a href = "?ForceTopic109">tithe</a> at least 500 gold.<BR><BR>
*
* Return to Uzeraan when you are done.
*/
return 1060386;
}
}
private int m_OldTithingPoints;
public TitheGoldObjective()
{
m_OldTithingPoints = -1;
}
public override void CheckProgress()
{
PlayerMobile pm = System.From;
int curTithingPoints = pm.TithingPoints;
if ( curTithingPoints >= 500 )
Complete();
else if ( curTithingPoints > m_OldTithingPoints && m_OldTithingPoints >= 0 )
pm.SendLocalizedMessage( 1060240, "", 0x41 ); // You must have at least 500 tithing points before you can continue in your quest.
m_OldTithingPoints = curTithingPoints;
}
public override void OnComplete()
{
System.AddObjective( new FindUzeraanFirstTaskObjective() );
}
}
public class FindUzeraanFirstTaskObjective : QuestObjective
{
public override object Message
{
get
{
// Return to Uzeraan, now that you have enough tithing points to continue your quest.
return 1060387;
}
}
public FindUzeraanFirstTaskObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanFirstTaskConversation() );
}
}
public enum KillHordeMinionsStep
{
First,
LearnKarma,
Others
}
public class KillHordeMinionsObjective : QuestObjective
{
private KillHordeMinionsStep m_Step;
public KillHordeMinionsStep Step { get { return m_Step; } }
public override object Message
{
get
{
switch ( m_Step )
{
case KillHordeMinionsStep.First:
/* Find the mountain pass beyond the house which lies at the
* end of the runic road.<BR><BR>
*
* Assist the city Militia by slaying <I>Horde Minions</I>
*/
return 1049089;
case KillHordeMinionsStep.LearnKarma:
/* You have just gained some <a href="?ForceTopic45">Karma</a>
* for killing the horde minion. <a href="?ForceTopic134">Learn</a>
* how this affects your Paladin abilities.
*/
return 1060389;
default:
// Continue driving back the Horde Minions, as Uzeraan instructed you to do.
return 1060507;
}
}
}
public override int MaxProgress
{
get
{
if ( System.From.Profession == 5 ) // paladin
{
switch ( m_Step )
{
case KillHordeMinionsStep.First: return 1;
case KillHordeMinionsStep.LearnKarma: return 2;
default: return 5;
}
}
else
{
return 5;
}
}
}
public override bool Completed
{
get
{
if ( m_Step == KillHordeMinionsStep.LearnKarma && HasBeenRead )
return true;
else
return base.Completed;
}
}
public KillHordeMinionsObjective()
{
}
public KillHordeMinionsObjective( KillHordeMinionsStep step )
{
m_Step = step;
}
public override void RenderProgress( BaseQuestGump gump )
{
if ( !Completed )
{
gump.AddHtmlObject( 70, 260, 270, 100, 1049090, BaseQuestGump.Blue, false, false ); // Horde Minions killed:
gump.AddLabel( 70, 280, 0x64, CurProgress.ToString() );
}
else
{
base.RenderProgress( gump );
}
}
public override void OnRead()
{
CheckCompletionStatus();
}
public override bool IgnoreYoungProtection( Mobile from )
{
// This restriction continues until the quest is ended
if ( from is HordeMinion && from.Map == Map.Trammel && from.X >= 3314 && from.X <= 3814 && from.Y >= 2345 && from.Y <= 3095 ) // Haven island
return true;
return false;
}
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is HordeMinion && corpse.Map == Map.Trammel && corpse.X >= 3314 && corpse.X <= 3814 && corpse.Y >= 2345 && corpse.Y <= 3095 ) // Haven island
{
if ( CurProgress == 0 )
System.From.Send( new DisplayHelpTopic( 29, false ) ); // HEALING
CurProgress++;
}
}
public override void OnComplete()
{
if ( System.From.Profession == 5 )
{
switch ( m_Step )
{
case KillHordeMinionsStep.First:
{
QuestObjective obj = new KillHordeMinionsObjective( KillHordeMinionsStep.LearnKarma );
System.AddObjective( obj );
obj.CurProgress = CurProgress;
break;
}
case KillHordeMinionsStep.LearnKarma:
{
QuestObjective obj = new KillHordeMinionsObjective( KillHordeMinionsStep.Others );
System.AddObjective( obj );
obj.CurProgress = CurProgress;
break;
}
default:
{
System.AddObjective( new FindUzeraanAboutReportObjective() );
break;
}
}
}
else
{
System.AddObjective( new FindUzeraanAboutReportObjective() );
}
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_Step = (KillHordeMinionsStep) reader.ReadEncodedInt();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.WriteEncodedInt( (int) m_Step );
}
}
public class FindUzeraanAboutReportObjective : QuestObjective
{
public override object Message
{
get
{
/* It's no use... The <I>Horde Minions</I> are too many.
* They are appearing out of nowhere.<BR><BR>
*
* Return to Uzeraan and report your findings.
*/
return 1049091;
}
}
public FindUzeraanAboutReportObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanReportConversation() );
}
}
public class FindSchmendrickObjective : QuestObjective
{
public override object Message
{
get
{
/* Prepare for battle and step onto the teleporter,
* located against the wall in the main hall of Uzeraan's mansion.<BR><BR>
*
* Find Schmendrick within the mines.
*/
return 1049120;
}
}
public FindSchmendrickObjective()
{
}
public override bool IgnoreYoungProtection( Mobile from )
{
// This restriction begins when this objective is completed, and continues until the quest is ended
if ( Completed && from is RestlessSoul && from.Map == Map.Trammel && from.X >= 5199 && from.X <= 5271 && from.Y >= 1812 && from.Y <= 1865 ) // Schmendrick's cave
return true;
return false;
}
public override void OnComplete()
{
System.AddConversation( new SchmendrickConversation() );
}
}
public class FindApprenticeObjective : QuestObjective
{
public override object Message
{
get
{
/* Find Schmendrick's apprentice who is somewhere in the mining cave.
* The apprentice has the scroll of power needed by Uzeraan.
*/
return 1049323;
}
}
public FindApprenticeObjective()
{
}
public override void OnComplete()
{
System.AddObjective( new ReturnScrollOfPowerObjective() );
}
}
public class ReturnScrollOfPowerObjective : QuestObjective
{
public override object Message
{
get
{
/* You have obtained the scroll of power! Find your way out of the cave.<BR><BR>
*
* Hand the scroll to Uzeraan (drag and drop) once you arrive in his mansion.
*/
return 1049324;
}
}
public ReturnScrollOfPowerObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanScrollOfPowerConversation() );
}
}
public class FindDryadObjective : QuestObjective
{
public override object Message
{
get
{
/* Find the Dryad in the woods of Haven and get a patch
* of fertile dirt from her.<BR><BR>
*
* Use Uzeraan's teleporter to get there if necessary.
*/
return 1049358;
}
}
public FindDryadObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new DryadConversation() );
}
}
public class ReturnFertileDirtObjective : QuestObjective
{
public override object Message
{
get
{
/* You have acquired the <I>Fertile Dirt</I>!<BR><BR>
*
* Return to the mansion (<a href = "?ForceTopic13">North-East</a>
* of the Dryad's Grove) and hand it to Uzeraan.
*/
return 1049327;
}
}
public ReturnFertileDirtObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanFertileDirtConversation() );
}
}
public class GetDaemonBloodObjective : QuestObjective
{
public override object Message
{
get
{
/* Bring back a vial of blood.<BR><BR>
*
* Follow the road leading north from the mansion and walk into the hut
* to find the chest that contains the vial
*/
return 1049361;
}
}
private bool m_Ambushed;
public GetDaemonBloodObjective()
{
}
public override void CheckProgress()
{
PlayerMobile player = System.From;
if ( !m_Ambushed && player.Map == Map.Trammel && player.InRange( new Point3D( 3456, 2558, 50 ), 30 ) )
{
int x = player.X - 1;
int y = player.Y - 2;
int z = Map.Trammel.GetAverageZ( x, y );
if ( Map.Trammel.CanSpawnMobile( x, y, z ) )
{
m_Ambushed = true;
player.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1049330 ); // You have been ambushed! Fight for your honor!!!
BaseCreature creature = new HordeMinion();
creature.MoveToWorld( new Point3D( x, y, z ), Map.Trammel );
creature.Combatant = player;
}
}
}
public override void OnComplete()
{
System.AddObjective( new ReturnDaemonBloodObjective() );
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_Ambushed = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_Ambushed );
}
}
public class ReturnDaemonBloodObjective : QuestObjective
{
public override object Message
{
get
{
/* You have the vial of blood!<BR><BR>
*
* Return to Uzeraan's mansion and hand him the vial.
*/
return 1049332;
}
}
public ReturnDaemonBloodObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanDaemonBloodConversation() );
}
}
public class GetDaemonBoneObjective : QuestObjective
{
private Container m_CorpseWithBone;
public Container CorpseWithBone
{
get { return m_CorpseWithBone; }
set { m_CorpseWithBone = value; }
}
public override object Message
{
get
{
if ( System.From.Profession == 5 )
{
/* Use your <a href="?ForceTopic108">Sacred Journey</a>
* ability on the rune to the <a href="?ForceTopic13">North</a>
* of Uzeraan to travel to the graveyard.
*/
return 1060755;
}
else
{
/* Use Uzeraan's teleporter to get to the Haunted graveyard.<BR><BR>
*
* Slay the undead until you find a <I>Daemon Bone</I>.
*/
return 1049362;
}
}
}
public GetDaemonBoneObjective()
{
}
public override void OnComplete()
{
System.AddObjective( new ReturnDaemonBoneObjective() );
}
public override bool IgnoreYoungProtection( Mobile from )
{
// This restriction continues until the end of the quest
if ( ( from is Zombie || from is Skeleton ) && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 && from.Y >= 2639 && from.Y <= 2664 ) // Haven graveyard
return true;
return false;
}
public override bool GetKillEvent( BaseCreature creature, Container corpse )
{
if ( base.GetKillEvent( creature, corpse ) )
return true;
return UzeraanTurmoilQuest.HasLostDaemonBone( System.From );
}
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( ( creature is Zombie || creature is Skeleton ) && corpse.Map == Map.Trammel && corpse.X >= 3391 && corpse.X <= 3424 && corpse.Y >= 2639 && corpse.Y <= 2664 ) // Haven graveyard
{
if ( Utility.RandomDouble() < 0.25 )
m_CorpseWithBone = corpse;
}
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_CorpseWithBone = (Container) reader.ReadItem();
}
public override void ChildSerialize( GenericWriter writer )
{
if ( m_CorpseWithBone != null && m_CorpseWithBone.Deleted )
m_CorpseWithBone = null;
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (Item) m_CorpseWithBone );
}
}
public class ReturnDaemonBoneObjective : QuestObjective
{
public override object Message
{
get
{
/* Head <a href = "?ForceTopic13">East</a> of here (or use the Horn of Retreat)
* to return to Uzeraan's Mansion and deliver the bone to Uzeraan.
*/
return 1049334;
}
}
public ReturnDaemonBoneObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new UzeraanDaemonBoneConversation() );
}
}
public class CashBankCheckObjective : QuestObjective
{
public override object Message
{
get
{
/* Locate the Haven Bank (use the teleporter in Uzeraan's Mansion
* if necessary), which lies <a href = "?ForceTopic13">South-East</a>
* of Uzeraan's Mansion. Once there, <a href="?ForceTopic86">cash your check</a>.
*/
return 1049336;
}
}
public CashBankCheckObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new BankerConversation() );
}
}
}

View file

@ -0,0 +1,232 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Haven
{
public class UzeraanTurmoilQuest : QuestSystem
{
private static Type[] m_TypeReferenceTable = new Type[]
{
typeof( Haven.AcceptConversation ),
typeof( Haven.UzeraanTitheConversation ),
typeof( Haven.UzeraanFirstTaskConversation ),
typeof( Haven.UzeraanReportConversation ),
typeof( Haven.SchmendrickConversation ),
typeof( Haven.UzeraanScrollOfPowerConversation ),
typeof( Haven.DryadConversation ),
typeof( Haven.UzeraanFertileDirtConversation ),
typeof( Haven.UzeraanDaemonBloodConversation ),
typeof( Haven.UzeraanDaemonBoneConversation ),
typeof( Haven.BankerConversation ),
typeof( Haven.RadarConversation ),
typeof( Haven.LostScrollOfPowerConversation ),
typeof( Haven.LostFertileDirtConversation ),
typeof( Haven.DryadAppleConversation ),
typeof( Haven.LostDaemonBloodConversation ),
typeof( Haven.LostDaemonBoneConversation ),
typeof( Haven.FindUzeraanBeginObjective ),
typeof( Haven.TitheGoldObjective ),
typeof( Haven.FindUzeraanFirstTaskObjective ),
typeof( Haven.KillHordeMinionsObjective ),
typeof( Haven.FindUzeraanAboutReportObjective ),
typeof( Haven.FindSchmendrickObjective ),
typeof( Haven.FindApprenticeObjective ),
typeof( Haven.ReturnScrollOfPowerObjective ),
typeof( Haven.FindDryadObjective ),
typeof( Haven.ReturnFertileDirtObjective ),
typeof( Haven.GetDaemonBloodObjective ),
typeof( Haven.ReturnDaemonBloodObjective ),
typeof( Haven.GetDaemonBoneObjective ),
typeof( Haven.ReturnDaemonBoneObjective ),
typeof( Haven.CashBankCheckObjective ),
typeof( Haven.FewReagentsConversation )
};
public override Type[] TypeReferenceTable{ get{ return m_TypeReferenceTable; } }
public override object Name
{
get
{
// "Uzeraan's Turmoil"
return 1049007;
}
}
public override object OfferMessage
{
get
{
/* <I>The guard speaks to you as you come closer... </I><BR><BR>
*
* Greetings traveler! <BR><BR>
*
* Uzeraan, the lord of this house and overseer of this city -
* <a href="?ForceTopic72">Haven</a>, has requested an audience with you. <BR><BR>
*
* Hordes of gruesome hell spawn are beginning to overrun the
* city and terrorize the inhabitants. No one seems to be able
* to stop them.<BR><BR>
*
* Our fine city militia is falling to the evil creatures
* one battalion after the other.<BR><BR>
*
* Uzeraan, whom you can find through these doors, is looking to
* hire mercenaries to aid in the battle. <BR><BR>
*
* Will you assist us?
*/
return 1049008;
}
}
public override TimeSpan RestartDelay{ get{ return TimeSpan.MaxValue; } }
public override bool IsTutorial{ get{ return true; } }
public override int Picture
{
get
{
switch ( From.Profession )
{
case 1: return 0x15C9; // warrior
case 2: return 0x15C1; // magician
default: return 0x15D3; // paladin
}
}
}
private bool m_HasLeftTheMansion;
public override void Slice()
{
if ( !m_HasLeftTheMansion && ( From.Map != Map.Trammel || From.X < 3573 || From.X > 3611 || From.Y < 2568 || From.Y > 2606 ) )
{
m_HasLeftTheMansion = true;
AddConversation( new RadarConversation() );
}
base.Slice();
}
public UzeraanTurmoilQuest( PlayerMobile from ) : base( from )
{
}
// Serialization
public UzeraanTurmoilQuest()
{
}
public override void Accept()
{
base.Accept();
AddConversation( new AcceptConversation() );
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
m_HasLeftTheMansion = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_HasLeftTheMansion );
}
public static bool HasLostScrollOfPower( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm == null )
return false;
QuestSystem qs = pm.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( qs.IsObjectiveInProgress( typeof( ReturnScrollOfPowerObjective ) ) )
{
Container pack = from.Backpack;
return ( pack == null || pack.FindItemByType( typeof( SchmendrickScrollOfPower ) ) == null );
}
}
return false;
}
public static bool HasLostFertileDirt( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm == null )
return false;
QuestSystem qs = pm.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( qs.IsObjectiveInProgress( typeof( ReturnFertileDirtObjective ) ) )
{
Container pack = from.Backpack;
return ( pack == null || pack.FindItemByType( typeof( QuestFertileDirt ) ) == null );
}
}
return false;
}
public static bool HasLostDaemonBlood( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm == null )
return false;
QuestSystem qs = pm.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( qs.IsObjectiveInProgress( typeof( ReturnDaemonBloodObjective ) ) )
{
Container pack = from.Backpack;
return ( pack == null || pack.FindItemByType( typeof( QuestDaemonBlood ) ) == null );
}
}
return false;
}
public static bool HasLostDaemonBone( Mobile from )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm == null )
return false;
QuestSystem qs = pm.Quest;
if ( qs is UzeraanTurmoilQuest )
{
if ( qs.IsObjectiveInProgress( typeof( ReturnDaemonBoneObjective ) ) )
{
Container pack = from.Backpack;
return ( pack == null || pack.FindItemByType( typeof( QuestDaemonBone ) ) == null );
}
}
return false;
}
}
}