#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
122
Scripts/Engines/Quests/Collector/CollectorQuest.cs
Normal file
122
Scripts/Engines/Quests/Collector/CollectorQuest.cs
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class CollectorQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable = new Type[]
|
||||
{
|
||||
typeof( Collector.DontOfferConversation ),
|
||||
typeof( Collector.DeclineConversation ),
|
||||
typeof( Collector.AcceptConversation ),
|
||||
typeof( Collector.ElwoodDuringFishConversation ),
|
||||
typeof( Collector.ReturnPearlsConversation ),
|
||||
typeof( Collector.AlbertaPaintingConversation ),
|
||||
typeof( Collector.AlbertaStoolConversation ),
|
||||
typeof( Collector.AlbertaEndPaintingConversation ),
|
||||
typeof( Collector.AlbertaAfterPaintingConversation ),
|
||||
typeof( Collector.ElwoodDuringPainting1Conversation ),
|
||||
typeof( Collector.ElwoodDuringPainting2Conversation ),
|
||||
typeof( Collector.ReturnPaintingConversation ),
|
||||
typeof( Collector.GabrielAutographConversation ),
|
||||
typeof( Collector.GabrielNoSheetMusicConversation ),
|
||||
typeof( Collector.NoSheetMusicConversation ),
|
||||
typeof( Collector.GetSheetMusicConversation ),
|
||||
typeof( Collector.GabrielSheetMusicConversation ),
|
||||
typeof( Collector.GabrielIgnoreConversation ),
|
||||
typeof( Collector.ElwoodDuringAutograph1Conversation ),
|
||||
typeof( Collector.ElwoodDuringAutograph2Conversation ),
|
||||
typeof( Collector.ElwoodDuringAutograph3Conversation ),
|
||||
typeof( Collector.ReturnAutographConversation ),
|
||||
typeof( Collector.TomasToysConversation ),
|
||||
typeof( Collector.TomasDuringCollectingConversation ),
|
||||
typeof( Collector.ReturnImagesConversation ),
|
||||
typeof( Collector.ElwoodDuringToys1Conversation ),
|
||||
typeof( Collector.ElwoodDuringToys2Conversation ),
|
||||
typeof( Collector.ElwoodDuringToys3Conversation ),
|
||||
typeof( Collector.FullEndConversation ),
|
||||
typeof( Collector.FishPearlsObjective ),
|
||||
typeof( Collector.ReturnPearlsObjective ),
|
||||
typeof( Collector.FindAlbertaObjective ),
|
||||
typeof( Collector.SitOnTheStoolObjective ),
|
||||
typeof( Collector.ReturnPaintingObjective ),
|
||||
typeof( Collector.FindGabrielObjective ),
|
||||
typeof( Collector.FindSheetMusicObjective ),
|
||||
typeof( Collector.ReturnSheetMusicObjective ),
|
||||
typeof( Collector.ReturnAutographObjective ),
|
||||
typeof( Collector.FindTomasObjective ),
|
||||
typeof( Collector.CaptureImagesObjective ),
|
||||
typeof( Collector.ReturnImagesObjective ),
|
||||
typeof( Collector.ReturnToysObjective ),
|
||||
typeof( Collector.MakeRoomObjective )
|
||||
};
|
||||
|
||||
public override Type[] TypeReferenceTable{ get{ return m_TypeReferenceTable; } }
|
||||
|
||||
public override object Name
|
||||
{
|
||||
get
|
||||
{
|
||||
//return 1020549; // This localized message seems broken...
|
||||
return "Collector's Quest";
|
||||
}
|
||||
}
|
||||
|
||||
public override object OfferMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood greets you warmly, like an old friend he's not
|
||||
* quite sure he ever had.</I><BR><BR>
|
||||
*
|
||||
* Hello. Yes. Sit down. Please. Good. Okay, stand. Up to you.<BR><BR>
|
||||
*
|
||||
* So, what brings you to these parts... hey, wait. Just had a thought.
|
||||
* Would you like to do me a favor? Yes, really. You know, for old
|
||||
* times sake. The good ole days. You were always one of my best
|
||||
* suppliers. Or maybe you weren't, who knows any more. Anyway,
|
||||
* could use some help supplementing my stock. You know me. Always
|
||||
* looking for something new to add to the collection. Or sometimes
|
||||
* not so new - just more of the same. But don't have to tell you that.
|
||||
* You know, don't you. Yes. Just like old times. That's what it'll be.
|
||||
* You and me - together again. Ah, it's been too long.<BR><BR>
|
||||
*
|
||||
* So what do you think? The fee will be the same as always. I'm a fair
|
||||
* man. You know that. So what do you say?
|
||||
*/
|
||||
return 1055081;
|
||||
}
|
||||
}
|
||||
|
||||
public override TimeSpan RestartDelay{ get{ return TimeSpan.Zero; } }
|
||||
public override bool IsTutorial{ get{ return false; } }
|
||||
|
||||
public override int Picture{ get{ return 0x15A9; } }
|
||||
|
||||
public CollectorQuest( PlayerMobile from ) : base( from )
|
||||
{
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public CollectorQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation( new AcceptConversation() );
|
||||
}
|
||||
|
||||
public override void Decline()
|
||||
{
|
||||
base.Decline();
|
||||
|
||||
AddConversation( new DeclineConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
874
Scripts/Engines/Quests/Collector/Conversations.cs
Normal file
874
Scripts/Engines/Quests/Collector/Conversations.cs
Normal file
|
|
@ -0,0 +1,874 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class DontOfferConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood looks up from his ale as you greet him.</I><BR><BR>
|
||||
*
|
||||
* What's that? Who me? No, no. You must be looking for someone else.
|
||||
*/
|
||||
return 1055080;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public DontOfferConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class DeclineConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood looks a bit flustered and nearly knocks over his
|
||||
* bottle of ale.</I><BR><BR>
|
||||
*
|
||||
* Well, I see. It's like that, is it? Yes. Well then. Okay.
|
||||
* You've changed. Yes. Yes, you have. Something's changed. I know
|
||||
* I haven't. Not me. Not good ole Elwood.<BR><BR>
|
||||
*
|
||||
* <I>Elwood trails off, though you can still hear him muttering softly.</I>
|
||||
*/
|
||||
return 1055082;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public DeclineConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class AcceptConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood slaps his knee and grins at you.</I><BR><BR>
|
||||
*
|
||||
* Yes. Yes. That's the spirit. I knew it. Knew it when I
|
||||
* first saw you. You remind me so much of your dear departed
|
||||
* father. Or someone. Not sure. Maybe no one. But that's okay.
|
||||
* Ah, good times.<BR><BR>
|
||||
*
|
||||
* Anyway, so as you know, I'm a collector. Got all kinds of
|
||||
* interesting things laying around back at my warehouse.
|
||||
* You know. You've seen it. Haven't you? Yes? No? Nevermind.
|
||||
* Not important.<BR><BR>
|
||||
*
|
||||
* Right. So, always trying to add new things to my collection.
|
||||
* Or sometimes just get more of something. Can't have too many.
|
||||
* Right? Yeah? Sure.<BR><BR>
|
||||
*
|
||||
* Let's see. Where to start. Oh, I know. Pearls. Yes. But not
|
||||
* just any pearls. Rainbow pearls. Yes. From the lake here in
|
||||
* Haven. Seems all that magic Uzeraan was throwing around when
|
||||
* he transformed the island had an interesting effect on some
|
||||
* of the shellfish down there. Exactly, rainbow pearls. Useless
|
||||
* for magic, but an item worth collecting. Trust me on this.
|
||||
* Trust me.<BR><BR>
|
||||
*
|
||||
* Need you to go fish some up for me. Down at the lake. Lake Haven.
|
||||
* Off ya go. Happy fishing!<BR><BR>
|
||||
*
|
||||
* <I>Elwood turns back to his ale and now seems oblivious to you.</I>
|
||||
*/
|
||||
return 1055083;
|
||||
}
|
||||
}
|
||||
|
||||
public AcceptConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new FishPearlsObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringFishConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood looks up as you tap him on the shoulder.</I><BR><BR>
|
||||
*
|
||||
* Good. Good. You're back. Wait. You don't have the rainbow pearls I
|
||||
* need. Taking a break? Yeah. Sure. There's no hurry. Let me know when
|
||||
* you've got all those pearls, though. I'll be here.
|
||||
*/
|
||||
return 1055089;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringFishConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnPearlsConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood jumps slightly when you call his name.</I><BR><BR>
|
||||
*
|
||||
* What. I'm awake. Oh, It's you. Hey, look at those pearls.
|
||||
* Beautiful. Wow. Where'd you get those... oh right. I sent you to get
|
||||
* them. From the lake. Lake Haven. Great job. Gotta love rainbow
|
||||
* pearls. Oooh, Colors.<BR><BR>
|
||||
*
|
||||
* Okay, let's see. Next. Need a painting. Go to the Colored Canvas and
|
||||
* speak to Alberta. Alberta Giacco. Best painter I've ever met. Ask
|
||||
* her to do a painting of you. Yes. Of you. A portrait. Never know if
|
||||
* you might up and become famous one day. Need to have a painting of you
|
||||
* in my collection. From now. Before all the fame. Go. Alberta awaits.
|
||||
* She's in Vesper.<BR><BR>
|
||||
*
|
||||
* <I>Elwood starts playing with the pearls you brought him and seems
|
||||
* to have forgotten you're there.</I>
|
||||
*/
|
||||
return 1055090;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnPearlsConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new FindAlbertaObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class AlbertaPaintingConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Alberta looks up from the painting she is working on and
|
||||
* faces you.</I><BR><BR>
|
||||
*
|
||||
* Excuse me. I don't mean to be rude, but I'm in the middle
|
||||
* of something, and can't... oh wait, I see. You must be the one
|
||||
* Elwood sent over.<BR><BR>
|
||||
*
|
||||
* Very well. If you'll have a seat on the stool over there, we'll
|
||||
* get started. This will just take a few seconds. I paint quite
|
||||
* quickly, you see. I'll start once you are seated.<BR><BR>
|
||||
*
|
||||
* <I>Alberta exchanges the painting she was working on for a blank canvas.</I>
|
||||
*/
|
||||
return 1055092;
|
||||
}
|
||||
}
|
||||
|
||||
public AlbertaPaintingConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new SitOnTheStoolObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class AlbertaStoolConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Alberta looks at you sympathetically.</I><BR><BR>
|
||||
*
|
||||
* Don't worry, this will only take a few seconds. I realize
|
||||
* that stool can be uncomfortable, and I apologize for that.
|
||||
* Perhaps I should replace it with a more comfortable chair.
|
||||
* But then again, it's that very discomfort that helps produce
|
||||
* such wonderful facial expressions for my paintings. Ah well.
|
||||
*/
|
||||
return 1055096;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public AlbertaStoolConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class AlbertaEndPaintingConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Alberta stands back from the canvas and surveys her
|
||||
* work.</I><BR><BR>
|
||||
*
|
||||
* Not too bad. Quite good even, if I do say so myself. As always,
|
||||
* of course.<BR><BR>
|
||||
*
|
||||
* Oh, you're still here. Please let Elwood know that the painting
|
||||
* has been completed. I'll have it sent to him once it dries.<BR><BR>
|
||||
*
|
||||
* <I>Alberta removes the portrait from her easel and sets
|
||||
* it aside to dry.</I>
|
||||
*/
|
||||
return 1055098;
|
||||
}
|
||||
}
|
||||
|
||||
public AlbertaEndPaintingConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new ReturnPaintingObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class AlbertaAfterPaintingConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Alberta stops cleaning her brushes and looks your way.</I><BR><BR>
|
||||
*
|
||||
* Don't worry, I'll send the painting to Elwood once it's dry. Please
|
||||
* let him know that the painting has been finished.
|
||||
*/
|
||||
return 1055102;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public AlbertaAfterPaintingConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringPainting1Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood yawns and stretches, then focuses his gaze
|
||||
* on you.</I><BR><BR>
|
||||
*
|
||||
* Hello. Do I know you? Hold on a second. Yes. Yes, I do.
|
||||
* You were going to bring me some rainbow pearls. Wait. No.
|
||||
* You already did that. I remember now. Right. So go get that
|
||||
* portrait painted. Alberta is in Vesper. Go to her. Alberta
|
||||
* Giacco. Come back when she's done.
|
||||
*/
|
||||
return 1055094;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringPainting1Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringPainting2Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood drums his fingers on the counter then looks
|
||||
* up at you expectantly.</I><BR><BR>
|
||||
*
|
||||
* Ah, finally. I'm famished. This so-called tavern doesn't
|
||||
* even serve pizza, so one must have it delivered. It's an
|
||||
* outrage. Er... wait. Where's my pizza? Yes, my pizza.
|
||||
* What kind of delivery is this? Didn't even bring my pizza.
|
||||
* This will severely impact your tip, I'm afraid.<BR><BR>
|
||||
*
|
||||
* Hold on a moment. You were helping me with something else,
|
||||
* weren't you? Ah. Yes. I've got it now. You were to have a
|
||||
* portrait done. Well. Good. Yes. But let's not dawdle.
|
||||
* Off you go. If you happen to see anyone with my pizza,
|
||||
* please insist they hurry.<BR><BR>
|
||||
*/
|
||||
return 1055097;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringPainting2Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnPaintingConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood notices you immediately and waves you over.</I><BR><BR>
|
||||
*
|
||||
* You're back. Good. That's good. Hmm. You don't seem to have that
|
||||
* painting yet. Don't tell me Alberta refused. That's no good. I made
|
||||
* her what she is! She was living in the gutter when I found her. The
|
||||
* gutter. And she has the... what's that? Oh, she finished the portrait.
|
||||
* Right. Good. Can always count on Alberta. Always. Best painter in
|
||||
* the land.<BR><BR>
|
||||
*
|
||||
* Just have a couple... er... wait... make that... two more task for you.
|
||||
* Then our business will be concluded. For now. Old chums like us will
|
||||
* always work together again. Yes. We go so far back. Right. I think.<BR><BR>
|
||||
*
|
||||
* Anyway. There's a musician. A minstrel. His name's Gabriel Piete. Quite
|
||||
* the good singer. One of my favorites. Absolute favorite. What I'd like
|
||||
* is his autograph. Simple. Just his autograph. You're likely to find him
|
||||
* at the Conservatory of Music in Britain. He's often there. Often. Between
|
||||
* performances. Hurry now. There ya go.<BR><BR>
|
||||
*
|
||||
* <I>Elwood falls silent though his lips are still moving. It looks like
|
||||
* he's quietly repeating the word, "autograph."</I>
|
||||
*/
|
||||
return 1055100;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnPaintingConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new FindGabrielObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class GabrielAutographConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Gabriel sighs loudly as you address him and stops whatever
|
||||
* it was that he was doing.</I><BR><BR>
|
||||
*
|
||||
* WHAT?!? Can you not see that I'm working here? Ugh, sometimes
|
||||
* I wish they'd just lock the outer doors to anyone who doesn't
|
||||
* belong here. So go ahead and fawn. Get it over with, and then
|
||||
* leave. Sooner you're out of here, the sooner I'm back to work.<BR><BR>
|
||||
*
|
||||
* I see. So you want an autograph. Fine. If it'll get rid of you,
|
||||
* I'll give you my autograph. But I'll only sign some sheet music
|
||||
* for one of my songs. Until then, please let me get back to work.<BR><BR>
|
||||
*
|
||||
* You can probably find some of my sheet music at one of the theaters
|
||||
* in the land. When I perform there, they often sell it as a souvenir.
|
||||
* Speak to the impresario... the theater manager. My last three
|
||||
* performances were in Nujel'm, Jhelom, and here in Britian.
|
||||
*/
|
||||
return 1055103;
|
||||
}
|
||||
}
|
||||
|
||||
public GabrielAutographConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new FindSheetMusicObjective( true ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class GabrielNoSheetMusicConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Gabriel does not look happy to see you.</I><BR><BR>
|
||||
*
|
||||
* Do you have any sheet music? No. Please return when you do,
|
||||
* but until then please leave me to my work.
|
||||
*/
|
||||
return 1055111;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public GabrielNoSheetMusicConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class NoSheetMusicConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Sheet music for a Gabriel Piete song? No, I'm sorry, but we've run out.
|
||||
* We might get some more after he performs here again, but right now
|
||||
* we don't have any. My apologies.
|
||||
*/
|
||||
return 1055106;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public NoSheetMusicConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class GetSheetMusicConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// The theater impresario hands you some sheet of music for one of Gabriel Piete's songs.
|
||||
return 1055109;
|
||||
}
|
||||
}
|
||||
|
||||
public GetSheetMusicConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new ReturnSheetMusicObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class GabrielSheetMusicConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Gabriel looks up impatiently as you approach.</I><BR><BR>
|
||||
*
|
||||
* Good. We can finally be done with one another. Here, let me
|
||||
* sign that and have this business completed.<BR><BR>
|
||||
*
|
||||
* <I>Gabriel takes the sheet music, autographs it, and then hands it back to you.</I>
|
||||
*/
|
||||
return 1055113;
|
||||
}
|
||||
}
|
||||
|
||||
public GabrielSheetMusicConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new ReturnAutographObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class GabrielIgnoreConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// <I>Gabriel ignores you.</I>
|
||||
return 1055118;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public GabrielIgnoreConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringAutograph1Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood jumps and almost falls from his stool when you
|
||||
* tap his shoulder.</I><BR><BR>
|
||||
*
|
||||
* Oh my. Don't do that. Scared me half to death. Sneaking up on
|
||||
* people like that. I don't even know you. Yes, I do. I do know you.
|
||||
* Ordered a pizza from you and never received it. I'm rather miffed
|
||||
* about that.<BR><BR>
|
||||
*
|
||||
* No. No. Wait. Of course. Not the pizza. You're here with the
|
||||
* moonfire brew I wanted. Magical moonfire brew. Not sure what it is.
|
||||
* Just want some.<BR><BR>
|
||||
*
|
||||
* What's that? Oh. The autograph. Gabriel Piete. Yes. Of course.
|
||||
* Do you have it? No. Well. Hmm. Don't sneak up on people like that. Not polite.
|
||||
*/
|
||||
return 1055105;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringAutograph1Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringAutograph2Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood seems to be studying the bottom of his bottle of ale
|
||||
* as you approach.</I><BR><BR>
|
||||
*
|
||||
* What's this? Strange. Quite strange. I could have sworn I was
|
||||
* drinking wine.<BR><BR>
|
||||
*
|
||||
* Oh, hello. Yes. Good to see you. Any luck with that autograph?
|
||||
* Bet you thought I'd forgotten. No. Not me. Mind like a steel trap.
|
||||
* Can't get it open no matter how hard you try. Or something. No luck
|
||||
* yet? Ah well. keep trying. I have faith in you. Whoever you are.
|
||||
*/
|
||||
return 1055112;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringAutograph2Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringAutograph3Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood scratches his ear then notices you.</I><BR><BR>
|
||||
*
|
||||
* Good day. What brings you to the Albatross? Me? An autograph?
|
||||
* You want my autograph? Well, I suppose. What's that? Oh. Yes.
|
||||
* Gabriel Piete. Yes. Get his autograph and return to me. Good day.
|
||||
*/
|
||||
return 1055115;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringAutograph3Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnAutographConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood looks up eagerly as you tell him about the autographed
|
||||
* sheet music.</I><BR><BR>
|
||||
*
|
||||
* Quite good work. Not an easy one to deal with, that one. Gabriel Piete.
|
||||
* Yes. Well done. Nice autograph.<BR><BR>
|
||||
*
|
||||
* One last task. I would like a set of toy monster figurines made by the
|
||||
* famous toymaker, Tomas O'Neerlan. You'll find him in Trinsic. He's often
|
||||
* at the Tinker's Guild. Try looking there.<BR><BR>
|
||||
*
|
||||
* You're doing quite well. Quite well indeed. Knew you would. Just like old
|
||||
* times. Yes. Quite good.
|
||||
*/
|
||||
return 1055116;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnAutographConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new FindTomasObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class TomasToysConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Tomas smiles freely as you speak to him.</I><BR><BR>
|
||||
*
|
||||
* Ah, to be sure I can make you some toy monster figurines.
|
||||
* That's my work, making toys. Worry not, we'll put together
|
||||
* a good set of monsters for you and your figurines.<BR><BR>
|
||||
*
|
||||
* But I'll be needing something from you before I can begin.
|
||||
* Here, take these enchanted paints. Using them, you can capture
|
||||
* a set of images of the creatures you wish me to make into toys.
|
||||
* It'll only work on the group of creatures I select for your
|
||||
* set of figurines. Oh, and I'll be needing those enchanted paints
|
||||
* back when all is said and done.<BR><BR>
|
||||
*/
|
||||
return 1055119;
|
||||
}
|
||||
}
|
||||
|
||||
public TomasToysConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new CaptureImagesObjective( true ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class TomasDuringCollectingConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Tomas greets you warmly as you approach.</I><BR><BR>
|
||||
*
|
||||
* 'Tis good to see you. I see that you have not yet collected
|
||||
* all of the images we need. 'Tis fine, but I'll be needing
|
||||
* those before I can make the toy figurines. Return when you have
|
||||
* the complete set of images.<BR><BR>
|
||||
*/
|
||||
return 1055129;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public TomasDuringCollectingConversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnImagesConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Tomas grins as you walk toward him.</I><BR><BR>
|
||||
*
|
||||
* I see that you have collected all of the images we need.
|
||||
* 'Tis good. I'll begin straight away on the toy figurines.
|
||||
* I'll have them delivered to you when ready. Where shall I send
|
||||
* them? To Elwood in Haven? Yes, I know him. We've done business
|
||||
* in the past. Odd fellow.<BR><BR>Tomas smiles as you return his
|
||||
* enchanted paints back to him.<BR><BR>
|
||||
*/
|
||||
return 1055131;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnImagesConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new ReturnToysObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringToys1Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>You watch as Elwood spins around blissfully on his stool.</I><BR><BR>
|
||||
*
|
||||
* Oh. Forgive me. Didn't see you there. Whoo. Dizzy. Can't see straight.
|
||||
* Have you gotten those figurines yet? No. Ah. Not to worry. Keep at it.
|
||||
* No doubt you'll come through with those.<BR><BR>
|
||||
*
|
||||
* Excuse me a moment. I think I need to sit down. Wait. I am sitting down.
|
||||
* Good then. Yes. Sitting down.<BR><BR><I>Elwood reaches out and takes hold
|
||||
* of the counter as if to steady himself.</I>
|
||||
*/
|
||||
return 1055123;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringToys1Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringToys2Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood suddenly stops and beckons you over to him.</I><BR><BR>
|
||||
*
|
||||
* Over here. Come here. Don't be alarmed, but I think one of the
|
||||
* tavernkeepers used to be a wandering healer. Said something about
|
||||
* the good ole days when people would just walk up and hand gold to
|
||||
* them. Piles of gold. Out of the blue. Can you imagine? Got so much
|
||||
* gold, this ex-healer decided to buy a tavern and settle down. Kind
|
||||
* of sad really. Can't even cure my hangover now. Nice tavern though.<BR><BR>
|
||||
*
|
||||
* Right. Anyway. Let me know when those toy figurines are ready.
|
||||
* I'll be here. As always.
|
||||
*/
|
||||
return 1055130;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringToys2Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ElwoodDuringToys3Conversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood is singing as you greet him.</I><BR><BR>
|
||||
*
|
||||
* Come. Join in. It's a Gabriel Piete song. I have the sheet music
|
||||
* for it. It's even autographed by Gabriel Piete himself. Yes.
|
||||
* One of his songs. Brilliant.<BR><BR>
|
||||
*
|
||||
* So let me see the toys. Figurines. Let's see them. Oh. You don't
|
||||
* have them yet. I see. Well. Okay. That's too bad.
|
||||
*/
|
||||
return 1055133;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return false; } }
|
||||
|
||||
public ElwoodDuringToys3Conversation()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class EndConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood takes a sip of his ale as you address him.</I><BR><BR>
|
||||
*
|
||||
* Ah. That's the stuff. Ale. Nothing better. What's that? Toy figurines
|
||||
* will be delivered. Right. Yes. Perhaps better than Ale. Tough one.<BR><BR>
|
||||
*
|
||||
* Very good work. Quite. Think we're all done now. You completed everything
|
||||
* I asked. Would work with you again. Yes. We should.<BR><BR>
|
||||
*
|
||||
* Ah. Yes. your payment. The usual. I think you'll be pleased.<BR><BR>
|
||||
*
|
||||
* <I>With that Elwood rummages around in his backpack. He eventually
|
||||
* pulls out a small bag and hands it to you.</I>
|
||||
*/
|
||||
return 1055134;
|
||||
}
|
||||
}
|
||||
|
||||
public EndConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public class FullEndConversation : QuestConversation
|
||||
{
|
||||
private bool m_Logged;
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Elwood stares at you as you approach.</I><BR><BR>
|
||||
*
|
||||
* I know you. Oh yes. You've been running some errands for me.
|
||||
* We are about done. Noticed that your backpack is a bit full.
|
||||
* Might want to make some room. Won't be able to hold your payment.
|
||||
* Come back when you have more room, and we'll conclude our business.
|
||||
*/
|
||||
return 1055135;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged{ get{ return m_Logged; } }
|
||||
|
||||
public FullEndConversation( bool logged )
|
||||
{
|
||||
m_Logged = logged;
|
||||
}
|
||||
|
||||
public FullEndConversation()
|
||||
{
|
||||
m_Logged = true;
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
if ( m_Logged )
|
||||
System.AddObjective( new MakeRoomObjective() );
|
||||
}
|
||||
}
|
||||
}
|
||||
141
Scripts/Engines/Quests/Collector/Items/EnchantedPaints.cs
Normal file
141
Scripts/Engines/Quests/Collector/Items/EnchantedPaints.cs
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class EnchantedPaints : QuestItem
|
||||
{
|
||||
[Constructable]
|
||||
public EnchantedPaints() : base( 0xFC1 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public EnchantedPaints( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
CollectorQuest qs = player.Quest as CollectorQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return true;
|
||||
|
||||
/*return !( qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( ReturnImagesObjective ) ) );*/
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) ) )
|
||||
{
|
||||
player.SendAsciiMessage( 0x59, "Target the creature whose image you wish to create." );
|
||||
player.Target = new InternalTarget( this );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 1010085 ); // You cannot use this.
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private EnchantedPaints m_Paints;
|
||||
|
||||
public InternalTarget( EnchantedPaints paints ) : base( -1, false, TargetFlags.None )
|
||||
{
|
||||
CheckLOS = false;
|
||||
m_Paints = paints;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Paints.Deleted || !m_Paints.IsChildOf( from.Backpack ) )
|
||||
return;
|
||||
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
CaptureImagesObjective obj = qs.FindObjective( typeof( CaptureImagesObjective ) ) as CaptureImagesObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
if ( targeted is Mobile )
|
||||
{
|
||||
ImageType image;
|
||||
CaptureResponse response = obj.CaptureImage(( targeted.GetType().Name=="GreaterMongbat" ? new Mongbat().GetType() : targeted.GetType() ), out image );
|
||||
|
||||
switch ( response )
|
||||
{
|
||||
case CaptureResponse.Valid:
|
||||
{
|
||||
player.SendLocalizedMessage( 1055125 ); // The enchanted paints swirl for a moment then an image begins to take shape. *Click*
|
||||
player.AddToBackpack( new PaintedImage( image ) );
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.AlreadyDone:
|
||||
{
|
||||
player.SendAsciiMessage( 0x2C, "You have already captured the image of this creature" );
|
||||
|
||||
break;
|
||||
}
|
||||
case CaptureResponse.Invalid:
|
||||
{
|
||||
player.SendLocalizedMessage( 1055124 ); // You have no interest in capturing the image of this creature.
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendAsciiMessage( 0x35, "You have no interest in that." );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 1010085 ); // You cannot use this.
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
107
Scripts/Engines/Quests/Collector/Items/ImageType.cs
Normal file
107
Scripts/Engines/Quests/Collector/Items/ImageType.cs
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public enum ImageType
|
||||
{
|
||||
Betrayer,
|
||||
Bogling,
|
||||
BogThing,
|
||||
Gazer,
|
||||
Beetle,
|
||||
GiantBlackWidow,
|
||||
Scorpion,
|
||||
JukaMage,
|
||||
JukaWarrior,
|
||||
Lich,
|
||||
MeerMage,
|
||||
MeerWarrior,
|
||||
Mongbat,
|
||||
Mummy,
|
||||
Pixie,
|
||||
PlagueBeast,
|
||||
SandVortex,
|
||||
StoneGargoyle,
|
||||
SwampDragon,
|
||||
Wisp,
|
||||
Juggernaut
|
||||
}
|
||||
|
||||
public class ImageTypeInfo
|
||||
{
|
||||
private static readonly ImageTypeInfo[] m_Table = new ImageTypeInfo[]
|
||||
{
|
||||
new ImageTypeInfo( 9734, typeof( Betrayer ), 75, 45 ),
|
||||
new ImageTypeInfo( 9735, typeof( Bogling ), 75, 45 ),
|
||||
new ImageTypeInfo( 9736, typeof( BogThing ), 60, 47 ),
|
||||
new ImageTypeInfo( 9615, typeof( Gazer ), 75, 45 ),
|
||||
new ImageTypeInfo( 9743, typeof( Beetle ), 60, 55 ),
|
||||
new ImageTypeInfo( 9667, typeof( GiantBlackWidow ), 55, 52 ),
|
||||
new ImageTypeInfo( 9657, typeof( Scorpion ), 65, 47 ),
|
||||
new ImageTypeInfo( 9758, typeof( JukaMage ), 75, 45 ),
|
||||
new ImageTypeInfo( 9759, typeof( JukaWarrior ), 75, 45 ),
|
||||
new ImageTypeInfo( 9636, typeof( Lich ), 75, 45 ),
|
||||
new ImageTypeInfo( 9756, typeof( MeerMage ), 75, 45 ),
|
||||
new ImageTypeInfo( 9757, typeof( MeerWarrior ), 75, 45 ),
|
||||
new ImageTypeInfo( 9638, typeof( Mongbat ), 70, 50 ),
|
||||
new ImageTypeInfo( 9639, typeof( Mummy ), 75, 45 ),
|
||||
new ImageTypeInfo( 9654, typeof( Pixie ), 75, 45 ),
|
||||
new ImageTypeInfo( 9747, typeof( PlagueBeast ), 60, 45 ),
|
||||
new ImageTypeInfo( 9750, typeof( SandVortex ), 60, 43 ),
|
||||
new ImageTypeInfo( 9614, typeof( StoneGargoyle ), 75, 45 ),
|
||||
new ImageTypeInfo( 9753, typeof( SwampDragon ), 50, 55 ),
|
||||
new ImageTypeInfo( 8448, typeof( Wisp ), 75, 45 ),
|
||||
new ImageTypeInfo( 9746, typeof( Juggernaut ), 55, 38 )
|
||||
};
|
||||
|
||||
public static ImageTypeInfo Get( ImageType image )
|
||||
{
|
||||
int index = (int)image;
|
||||
if ( index >= 0 && index < m_Table.Length )
|
||||
return m_Table[index];
|
||||
else
|
||||
return m_Table[0];
|
||||
}
|
||||
|
||||
public static ImageType[] RandomList( int count )
|
||||
{
|
||||
ArrayList list = new ArrayList( m_Table.Length );
|
||||
for ( int i = 0; i < m_Table.Length; i++ )
|
||||
list.Add( (ImageType)i );
|
||||
|
||||
ImageType[] images = new ImageType[count];
|
||||
|
||||
for ( int i = 0; i < images.Length; i++ )
|
||||
{
|
||||
int index = Utility.Random( list.Count );
|
||||
images[i] = (ImageType)list[index];
|
||||
|
||||
list.RemoveAt( index );
|
||||
}
|
||||
|
||||
return images;
|
||||
}
|
||||
|
||||
private int m_Figurine;
|
||||
private Type m_Type;
|
||||
private int m_X;
|
||||
private int m_Y;
|
||||
|
||||
public int Figurine { get { return m_Figurine; } }
|
||||
public Type Type { get { return m_Type; } }
|
||||
public int Name { get { return m_Figurine < 0x4000 ? 1020000 + m_Figurine : 1078872 + m_Figurine; } }
|
||||
public int X { get { return m_X; } }
|
||||
public int Y { get { return m_Y; } }
|
||||
|
||||
public ImageTypeInfo( int figurine, Type type, int x, int y )
|
||||
{
|
||||
m_Figurine = figurine;
|
||||
m_Type = type;
|
||||
m_X = x;
|
||||
m_Y = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
264
Scripts/Engines/Quests/Collector/Items/Obsidian.cs
Normal file
264
Scripts/Engines/Quests/Collector/Items/Obsidian.cs
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class Obsidian : Item
|
||||
{
|
||||
private static readonly string[] m_Names = new string[]
|
||||
{
|
||||
null,
|
||||
"an aggressive cavalier",
|
||||
"a beguiling rogue",
|
||||
"a benevolent physician",
|
||||
"a brilliant artisan",
|
||||
"a capricious adventurer",
|
||||
"a clever beggar",
|
||||
"a convincing charlatan",
|
||||
"a creative inventor",
|
||||
"a creative tinker",
|
||||
"a cunning knave",
|
||||
"a dauntless explorer",
|
||||
"a despicable ruffian",
|
||||
"an earnest malcontent",
|
||||
"an exultant animal tamer",
|
||||
"a famed adventurer",
|
||||
"a fanatical crusader",
|
||||
"a fastidious clerk",
|
||||
"a fearless hunter",
|
||||
"a festive harlequin",
|
||||
"a fidgety assassin",
|
||||
"a fierce soldier",
|
||||
"a fierce warrior",
|
||||
"a frugal magnate",
|
||||
"a glib pundit",
|
||||
"a gnomic shaman",
|
||||
"a graceful noblewoman",
|
||||
"a idiotic madman",
|
||||
"a imaginative designer",
|
||||
"an inept conjurer",
|
||||
"an innovative architect",
|
||||
"an inventive blacksmith",
|
||||
"a judicious mayor",
|
||||
"a masterful chef",
|
||||
"a masterful woodworker",
|
||||
"a melancholy clown",
|
||||
"a melodic bard",
|
||||
"a merciful guard",
|
||||
"a mirthful jester",
|
||||
"a nervous surgeon",
|
||||
"a peaceful scholar",
|
||||
"a prolific gardener",
|
||||
"a quixotic knight",
|
||||
"a regal aristocrat",
|
||||
"a resourceful smith",
|
||||
"a reticent alchemist",
|
||||
"a sanctified priest",
|
||||
"a scheming patrician",
|
||||
"a shrewd mage",
|
||||
"a singing minstrel",
|
||||
"a skilled tailor",
|
||||
"a squeamish assassin",
|
||||
"a stoic swordsman",
|
||||
"a studious scribe",
|
||||
"a thought provoking writer",
|
||||
"a treacherous scoundrel",
|
||||
"a troubled poet",
|
||||
"an unflappable wizard",
|
||||
"a valiant warrior",
|
||||
"a wayward fool"
|
||||
};
|
||||
|
||||
public static string RandomName( Mobile from )
|
||||
{
|
||||
int index = Utility.Random( m_Names.Length );
|
||||
if ( m_Names[index] == null )
|
||||
return from.Name;
|
||||
else
|
||||
return m_Names[index];
|
||||
}
|
||||
|
||||
private const int m_Partial = 2;
|
||||
private const int m_Completed = 10;
|
||||
|
||||
private int m_Quantity;
|
||||
private string m_StatueName;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Quantity
|
||||
{
|
||||
get { return m_Quantity; }
|
||||
set
|
||||
{
|
||||
if ( value <= 1 )
|
||||
m_Quantity = 1;
|
||||
else if ( value >= m_Completed )
|
||||
m_Quantity = m_Completed;
|
||||
else
|
||||
m_Quantity = value;
|
||||
|
||||
if ( m_Quantity < m_Partial )
|
||||
ItemID = 0x1EA7;
|
||||
else if ( m_Quantity < m_Completed )
|
||||
ItemID = 0x1F13;
|
||||
else
|
||||
ItemID = 0x12CB;
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string StatueName
|
||||
{
|
||||
get { return m_StatueName; }
|
||||
set { m_StatueName = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties { get { return ObjectPropertyList.Enabled; } }
|
||||
|
||||
[Constructable]
|
||||
public Obsidian() : base( 0x1EA7 )
|
||||
{
|
||||
Hue = 0x497;
|
||||
|
||||
m_Quantity = 1;
|
||||
m_StatueName = "";
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( m_Quantity < m_Partial )
|
||||
list.Add( 1055137 ); // a section of an obsidian statue
|
||||
else if ( m_Quantity < m_Completed )
|
||||
list.Add( 1055138 ); // a partially reconstructed obsidian statue
|
||||
else
|
||||
list.Add( 1055139, m_StatueName ); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
if ( m_Quantity < m_Partial )
|
||||
LabelTo( from, 1055137 ); // a section of an obsidian statue
|
||||
else if ( m_Quantity < m_Completed )
|
||||
LabelTo( from, 1055138 ); // a partially reconstructed obsidian statue
|
||||
else
|
||||
LabelTo( from, 1055139, m_StatueName ); // an obsidian statue of ~1_STATUE_NAME~
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
if ( from.Alive && m_Quantity >= m_Partial && m_Quantity < m_Completed && IsChildOf( from.Backpack ) )
|
||||
list.Add( new DisassembleEntry( this ) );
|
||||
}
|
||||
|
||||
private class DisassembleEntry : ContextMenuEntry
|
||||
{
|
||||
private Obsidian m_Obsidian;
|
||||
|
||||
public DisassembleEntry( Obsidian obsidian ) : base( 6142 )
|
||||
{
|
||||
m_Obsidian = obsidian;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
Mobile from = Owner.From;
|
||||
if ( !m_Obsidian.Deleted && m_Obsidian.Quantity >= Obsidian.m_Partial && m_Obsidian.Quantity < Obsidian.m_Completed && m_Obsidian.IsChildOf( from.Backpack ) && from.CheckAlive() )
|
||||
{
|
||||
for ( int i = 0; i < m_Obsidian.Quantity - 1; i++ )
|
||||
from.AddToBackpack( new Obsidian() );
|
||||
|
||||
m_Obsidian.Quantity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Quantity < m_Completed )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x2C, 3, 500309, "", "" ) ); // Nothing Happens.
|
||||
else
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private Obsidian m_Obsidian;
|
||||
|
||||
public InternalTarget( Obsidian obsidian ) : base( -1, false, TargetFlags.None )
|
||||
{
|
||||
m_Obsidian = obsidian;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
Item targ = targeted as Item;
|
||||
if ( m_Obsidian.Deleted || m_Obsidian.Quantity >= Obsidian.m_Completed || targ == null )
|
||||
return;
|
||||
|
||||
if ( m_Obsidian.IsChildOf( from.Backpack ) && targ.IsChildOf( from.Backpack ) && targ is Obsidian && targ != m_Obsidian )
|
||||
{
|
||||
Obsidian targObsidian = (Obsidian)targ;
|
||||
if ( targObsidian.Quantity < Obsidian.m_Completed )
|
||||
{
|
||||
if ( targObsidian.Quantity + m_Obsidian.Quantity <= Obsidian.m_Completed )
|
||||
{
|
||||
targObsidian.Quantity += m_Obsidian.Quantity;
|
||||
m_Obsidian.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
int delta = Obsidian.m_Completed - targObsidian.Quantity;
|
||||
targObsidian.Quantity += delta;
|
||||
m_Obsidian.Quantity -= delta;
|
||||
}
|
||||
|
||||
if ( targObsidian.Quantity >= Obsidian.m_Completed )
|
||||
targObsidian.StatueName = Obsidian.RandomName( from );
|
||||
|
||||
from.Send( new AsciiMessage( targObsidian.Serial, targObsidian.ItemID, MessageType.Regular, 0x59, 3, m_Obsidian.Name, "Something Happened." ) );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.Send( new MessageLocalized( m_Obsidian.Serial, m_Obsidian.ItemID, MessageType.Regular, 0x2C, 3, 500309, m_Obsidian.Name, "" ) ); // Nothing Happens.
|
||||
}
|
||||
}
|
||||
|
||||
public Obsidian( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( m_Quantity );
|
||||
writer.Write( (string) m_StatueName );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Quantity = reader.ReadEncodedInt();
|
||||
m_StatueName = Utility.Intern( reader.ReadString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Engines/Quests/Collector/Items/PaintedImage.cs
Normal file
86
Scripts/Engines/Quests/Collector/Items/PaintedImage.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class PaintedImage : Item
|
||||
{
|
||||
private ImageType m_Image;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ImageType Image
|
||||
{
|
||||
get { return m_Image; }
|
||||
set { m_Image = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PaintedImage( ImageType image ) : base( 0xFF3 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8FD;
|
||||
|
||||
m_Image = image;
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( m_Image );
|
||||
list.Add( 1060847, "#1055126\t#" + info.Name ); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( m_Image );
|
||||
LabelTo( from, 1060847, "#1055126\t#" + info.Name ); // a painted image of:
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendGump( new InternalGump( m_Image ) );
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
public InternalGump( ImageType image ) : base( 75, 25 )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( image );
|
||||
|
||||
AddBackground( 45, 20, 100, 100, 0xA3C );
|
||||
AddBackground( 52, 29, 86, 82, 0xBB8 );
|
||||
|
||||
AddItem( info.X, info.Y, info.Figurine );
|
||||
}
|
||||
}
|
||||
|
||||
public PaintedImage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Image );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Image = (ImageType) reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
94
Scripts/Engines/Quests/Collector/Mobiles/AlbertaGiacco.cs
Normal file
94
Scripts/Engines/Quests/Collector/Mobiles/AlbertaGiacco.cs
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class AlbertaGiacco : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public AlbertaGiacco() : base( "the respected painter" )
|
||||
{
|
||||
}
|
||||
|
||||
public AlbertaGiacco( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Hue = 0x83F2;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
Name = "Alberta Giacco";
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new FancyShirt() );
|
||||
AddItem( new Skirt( 0x59B ) );
|
||||
AddItem( new Boots() );
|
||||
AddItem( new FeatheredHat( 0x59B ) );
|
||||
AddItem( new FullApron( 0x59B ) );
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x457;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return false;
|
||||
|
||||
return ( qs.IsObjectiveInProgress( typeof( FindAlbertaObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( SitOnTheStoolObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( ReturnPaintingObjective ) ) );
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindAlbertaObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( SitOnTheStoolObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new AlbertaStoolConversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( ReturnPaintingObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new AlbertaAfterPaintingConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
243
Scripts/Engines/Quests/Collector/Mobiles/ElwoodMcCarrin.cs
Normal file
243
Scripts/Engines/Quests/Collector/Mobiles/ElwoodMcCarrin.cs
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class ElwoodMcCarrin : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public ElwoodMcCarrin() : base( "the well-known collector" )
|
||||
{
|
||||
}
|
||||
|
||||
public ElwoodMcCarrin( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Hue = 0x83ED;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = "Elwood McCarrin";
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new FancyShirt() );
|
||||
AddItem( new LongPants( 0x544 ) );
|
||||
AddItem( new Shoes( 0x454 ) );
|
||||
AddItem( new JesterHat( 0x4D2 ) );
|
||||
AddItem( new FullApron( 0x4D2 ) );
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x47D;
|
||||
|
||||
FacialHairItemID = 0x2040; // Goatee
|
||||
FacialHairHue = 0x47D;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( FishPearlsObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringFishConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReturnPearlsObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindAlbertaObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringPainting1Conversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( SitOnTheStoolObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringPainting2Conversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnPaintingObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindGabrielObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringAutograph1Conversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindSheetMusicObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringAutograph2Conversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( ReturnSheetMusicObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringAutograph3Conversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnAutographObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindTomasObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringToys1Conversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringToys2Conversation() );
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( ReturnImagesObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new ElwoodDuringToys3Conversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnToysObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
if ( GiveReward( player ) )
|
||||
{
|
||||
qs.AddConversation( new EndConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation( new FullEndConversation( true ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( MakeRoomObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
if ( GiveReward( player ) )
|
||||
{
|
||||
obj.Complete();
|
||||
qs.AddConversation( new EndConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation( new FullEndConversation( false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestSystem newQuest = new CollectorQuest( player );
|
||||
|
||||
if ( qs == null && QuestSystem.CanOfferQuest( player, typeof( CollectorQuest ) ) )
|
||||
{
|
||||
newQuest.SendOffer();
|
||||
}
|
||||
else
|
||||
{
|
||||
newQuest.AddConversation( new DontOfferConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool GiveReward( Mobile to )
|
||||
{
|
||||
Bag bag = new Bag();
|
||||
|
||||
bag.DropItem( new Gold( Utility.RandomMinMax( 500, 1000 ) ) );
|
||||
|
||||
if ( Utility.RandomBool() )
|
||||
{
|
||||
BaseWeapon weapon = Loot.RandomWeapon();
|
||||
|
||||
if ( Core.AOS )
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo( weapon, 2, 20, 30 );
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
|
||||
}
|
||||
|
||||
bag.DropItem( weapon );
|
||||
}
|
||||
else
|
||||
{
|
||||
Item item;
|
||||
|
||||
if ( Core.AOS )
|
||||
{
|
||||
item = Loot.RandomArmorOrShieldOrJewelry();
|
||||
|
||||
if ( item is BaseArmor )
|
||||
BaseRunicTool.ApplyAttributesTo( (BaseArmor)item, 2, 20, 30 );
|
||||
else if ( item is BaseJewel )
|
||||
BaseRunicTool.ApplyAttributesTo( (BaseJewel)item, 2, 20, 30 );
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseArmor armor = Loot.RandomArmorOrShield();
|
||||
item = armor;
|
||||
|
||||
armor.ProtectionLevel = (ArmorProtectionLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
|
||||
armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
|
||||
}
|
||||
|
||||
bag.DropItem( item );
|
||||
}
|
||||
|
||||
bag.DropItem( new Obsidian() );
|
||||
|
||||
if ( to.PlaceInBackpack( bag ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bag.Delete();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
105
Scripts/Engines/Quests/Collector/Mobiles/GabrielPiete.cs
Normal file
105
Scripts/Engines/Quests/Collector/Mobiles/GabrielPiete.cs
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class GabrielPiete : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public GabrielPiete() : base( "the renowned minstrel" )
|
||||
{
|
||||
}
|
||||
|
||||
public GabrielPiete( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Hue = 0x83EF;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = "Gabriel Piete";
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new FancyShirt() );
|
||||
AddItem( new LongPants( 0x5F7 ) );
|
||||
AddItem( new Shoes( 0x5F7 ) );
|
||||
|
||||
HairItemID = 0x2049; // Pig Tails
|
||||
HairHue = 0x460;
|
||||
|
||||
FacialHairItemID = 0x2041; // Mustache
|
||||
FacialHairHue = 0x460;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return false;
|
||||
|
||||
return ( qs.IsObjectiveInProgress( typeof( FindGabrielObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindSheetMusicObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( ReturnSheetMusicObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( ReturnAutographObjective ) ) );
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindGabrielObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindSheetMusicObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new GabrielNoSheetMusicConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnSheetMusicObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( ReturnAutographObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new GabrielIgnoreConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
175
Scripts/Engines/Quests/Collector/Mobiles/Impresario.cs
Normal file
175
Scripts/Engines/Quests/Collector/Mobiles/Impresario.cs
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class Impresario : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public Impresario() : base( "the impresario" )
|
||||
{
|
||||
}
|
||||
|
||||
public Impresario( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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 FancyShirt( Utility.RandomDyedHue() ) );
|
||||
AddItem( new LongPants( Utility.RandomNondyedHue() ) );
|
||||
AddItem( new Shoes( Utility.RandomNeutralHue() ) );
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this );
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return false;
|
||||
|
||||
return qs.IsObjectiveInProgress( typeof( FindSheetMusicObjective ) );
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
FindSheetMusicObjective obj = qs.FindObjective( typeof( FindSheetMusicObjective ) ) as FindSheetMusicObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
|
||||
if ( obj.IsInRightTheater() )
|
||||
{
|
||||
player.CloseGump( typeof( SheetMusicOfferGump ) );
|
||||
player.SendGump( new SheetMusicOfferGump() );
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.AddConversation( new NoSheetMusicConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 SheetMusicOfferGump : BaseQuestGump
|
||||
{
|
||||
public SheetMusicOfferGump() : base( 75, 25 )
|
||||
{
|
||||
Closable = false;
|
||||
|
||||
AddImage( 349, 10, 0x24B0 );
|
||||
AddImageTiled( 349, 130, 100, 120, 0x24B3 );
|
||||
AddImageTiled( 149, 10, 200, 140, 0x24AF );
|
||||
AddImageTiled( 149, 300, 200, 140, 0x24B5 );
|
||||
AddImage( 349, 300, 0x24B6 );
|
||||
AddImage( 35, 10, 0x24AE );
|
||||
AddImageTiled( 35, 150, 120, 100, 0x24B1 );
|
||||
AddImage( 35, 300, 0x24B4 );
|
||||
|
||||
AddHtmlLocalized( 110, 60, 200, 20, 1049069, White, false, false ); // <STRONG>Conversation Event</STRONG>
|
||||
|
||||
AddImage( 65, 14, 0x2776 );
|
||||
AddImageTiled( 81, 14, 349, 17, 0x2775 );
|
||||
AddImage( 426, 14, 0x2778 );
|
||||
|
||||
AddImageTiled( 50, 37, 400, 376, 0xA40 );
|
||||
AddAlphaRegion( 50, 37, 400, 376 );
|
||||
|
||||
AddImage( 0, 0, 0x28C8 );
|
||||
|
||||
AddImageTiled( 75, 90, 200, 1, 0x238D );
|
||||
AddImage( 75, 58, 0x2635 );
|
||||
AddImage( 380, 45, 0xDF );
|
||||
|
||||
AddHtmlLocalized( 98, 140, 312, 200, 1055107, LightGreen, false, true ); // Sure, I have some sheet music for a Gabriel Piete song. I'd be happy to sell you a copy for 10 gold.
|
||||
|
||||
AddRadio( 85, 350, 0x25F8, 0x25FB, true, 1 );
|
||||
AddHtmlLocalized( 120, 356, 280, 20, 1014088, White, false, false ); // I accept.
|
||||
|
||||
AddRadio( 85, 385, 0x25F8, 0x25FB, false, 0 );
|
||||
AddHtmlLocalized( 120, 391, 280, 20, 1049012, White, false, false ); // No thanks, I decline.
|
||||
|
||||
AddButton( 340, 390, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( info.ButtonID == 1 && info.IsSwitched( 1 ) )
|
||||
{
|
||||
PlayerMobile player = sender.Mobile as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
FindSheetMusicObjective obj = qs.FindObjective( typeof( FindSheetMusicObjective ) ) as FindSheetMusicObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
|
||||
|
||||
if ( player.Backpack!= null && player.Backpack.ConsumeTotal( typeof( Gold ), 10 ) )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
BankBox bank = player.FindBankNoCreate();
|
||||
if ( bank != null && bank.ConsumeTotal( typeof( Gold ), 10 ) )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage( 1055108 ); // You don't have enough gold to buy the sheet music.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
111
Scripts/Engines/Quests/Collector/Mobiles/TomasONeerlan.cs
Normal file
111
Scripts/Engines/Quests/Collector/Mobiles/TomasONeerlan.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class TomasONeerlan : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public TomasONeerlan() : base( "the famed toymaker" )
|
||||
{
|
||||
}
|
||||
|
||||
public TomasONeerlan( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Hue = 0x83F8;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = "Tomas O'Neerlan";
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new FancyShirt() );
|
||||
AddItem( new LongPants( 0x546 ) );
|
||||
AddItem( new Boots( 0x452 ) );
|
||||
AddItem( new FullApron( 0x455 ) );
|
||||
|
||||
HairItemID = 0x203B; //ShortHair
|
||||
HairHue = 0x455;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
QuestSystem qs = to.Quest as CollectorQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return false;
|
||||
|
||||
return ( qs.IsObjectiveInProgress( typeof( FindTomasObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( ReturnImagesObjective ) ) );
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is CollectorQuest )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindTomasObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Item paints = new EnchantedPaints();
|
||||
|
||||
if ( !player.PlaceInBackpack( paints ) )
|
||||
{
|
||||
paints.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) ) )
|
||||
{
|
||||
qs.AddConversation( new TomasDuringCollectingConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnImagesObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
if ( player.Backpack != null )
|
||||
player.Backpack.ConsumeUpTo( typeof( EnchantedPaints ), 1 );
|
||||
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
533
Scripts/Engines/Quests/Collector/Objectives.cs
Normal file
533
Scripts/Engines/Quests/Collector/Objectives.cs
Normal file
|
|
@ -0,0 +1,533 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Collector
|
||||
{
|
||||
public class FishPearlsObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Fish up shellfish from Lake Haven and collect rainbow pearls.
|
||||
return 1055084;
|
||||
}
|
||||
}
|
||||
|
||||
public override int MaxProgress{ get{ return 6; } }
|
||||
|
||||
public FishPearlsObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void RenderProgress( BaseQuestGump gump )
|
||||
{
|
||||
if ( !Completed )
|
||||
{
|
||||
// Rainbow pearls collected:
|
||||
gump.AddHtmlObject( 70, 260, 270, 100, 1055085, BaseQuestGump.Blue, false, false );
|
||||
|
||||
gump.AddLabel( 70, 280, 0x64, CurProgress.ToString() );
|
||||
gump.AddLabel( 100, 280, 0x64, "/" );
|
||||
gump.AddLabel( 130, 280, 0x64, MaxProgress.ToString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress( gump );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new ReturnPearlsObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnPearlsObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* You've collected enough rainbow pearls. Speak to
|
||||
* Elwood to give them to him and get your next task.
|
||||
*/
|
||||
return 1055088;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnPearlsObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new ReturnPearlsConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindAlbertaObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Go to Vesper and speak to Alberta Giacco at the Colored Canvas.
|
||||
return 1055091;
|
||||
}
|
||||
}
|
||||
|
||||
public FindAlbertaObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new AlbertaPaintingConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class SitOnTheStoolObjective : QuestObjective
|
||||
{
|
||||
private static readonly Point3D m_StoolLocation = new Point3D( 2899, 706, 0 );
|
||||
private static readonly Map m_StoolMap = Map.Trammel;
|
||||
|
||||
private DateTime m_Begin;
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Sit on the stool in front of Alberta's easel so that she can
|
||||
* paint your portrait. You'll need to sit there for about 30 seconds.
|
||||
*/
|
||||
return 1055093;
|
||||
}
|
||||
}
|
||||
|
||||
public SitOnTheStoolObjective()
|
||||
{
|
||||
m_Begin = DateTime.MaxValue;
|
||||
}
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
PlayerMobile pm = System.From;
|
||||
|
||||
if ( pm.Map == m_StoolMap && pm.Location == m_StoolLocation )
|
||||
{
|
||||
if ( m_Begin == DateTime.MaxValue )
|
||||
{
|
||||
m_Begin = DateTime.UtcNow;
|
||||
}
|
||||
else if ( DateTime.UtcNow - m_Begin > TimeSpan.FromSeconds( 30.0 ) )
|
||||
{
|
||||
Complete();
|
||||
}
|
||||
}
|
||||
else if ( m_Begin != DateTime.MaxValue )
|
||||
{
|
||||
m_Begin = DateTime.MaxValue;
|
||||
pm.SendLocalizedMessage( 1055095, "", 0x26 ); // You must remain seated on the stool until the portrait is complete. Alberta will now have to start again with a fresh canvas.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new AlbertaEndPaintingConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnPaintingObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Return to Elwood and let him know that the painting is complete.
|
||||
return 1055099;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnPaintingObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new ReturnPaintingConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindGabrielObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Go to Britain and obtain the autograph of renowned
|
||||
* minstrel, Gabriel Piete. He is often found at the Conservatory of Music.
|
||||
*/
|
||||
return 1055101;
|
||||
}
|
||||
}
|
||||
|
||||
public FindGabrielObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new GabrielAutographConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public enum Theater
|
||||
{
|
||||
Britain,
|
||||
Nujelm,
|
||||
Jhelom
|
||||
}
|
||||
|
||||
public class FindSheetMusicObjective : QuestObjective
|
||||
{
|
||||
private Theater m_Theater;
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Find some sheet music for one of Gabriel's songs.
|
||||
* Try speaking to an impresario from one of the theaters in the land.
|
||||
*/
|
||||
return 1055104;
|
||||
}
|
||||
}
|
||||
|
||||
public FindSheetMusicObjective( bool init )
|
||||
{
|
||||
if ( init )
|
||||
InitTheater();
|
||||
}
|
||||
|
||||
public FindSheetMusicObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public void InitTheater()
|
||||
{
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 1: m_Theater = Theater.Britain; break;
|
||||
case 2: m_Theater = Theater.Nujelm; break;
|
||||
default: m_Theater = Theater.Jhelom; break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInRightTheater()
|
||||
{
|
||||
PlayerMobile player = System.From;
|
||||
|
||||
Region region = Region.Find( player.Location, player.Map );
|
||||
|
||||
if ( region == null )
|
||||
return false;
|
||||
|
||||
switch ( m_Theater )
|
||||
{
|
||||
case Theater.Britain: return region.IsPartOf( "Britain" );
|
||||
case Theater.Nujelm: return region.IsPartOf( "Nujel'm" );
|
||||
case Theater.Jhelom: return region.IsPartOf( "Jhelom" );
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new GetSheetMusicConversation() );
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Theater = (Theater) reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Theater );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnSheetMusicObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Speak to Gabriel to have him autograph the sheet music.
|
||||
return 1055110;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnSheetMusicObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new GabrielSheetMusicConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnAutographObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Speak to Elwood to give him the autographed sheet music.
|
||||
return 1055114;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnAutographObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new ReturnAutographConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindTomasObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Go to Trinsic and speak to Tomas O'Neerlan, the famous toymaker.
|
||||
return 1055117;
|
||||
}
|
||||
}
|
||||
|
||||
public FindTomasObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new TomasToysConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public enum CaptureResponse
|
||||
{
|
||||
Valid,
|
||||
AlreadyDone,
|
||||
Invalid
|
||||
}
|
||||
|
||||
public class CaptureImagesObjective : QuestObjective
|
||||
{
|
||||
private ImageType[] m_Images;
|
||||
private bool[] m_Done;
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Use the enchanted paints to capture the image of all of the creatures listed below.
|
||||
return 1055120;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Completed
|
||||
{
|
||||
get
|
||||
{
|
||||
for ( int i = 0; i < m_Done.Length; i++ )
|
||||
{
|
||||
if ( !m_Done[i] )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public CaptureImagesObjective( bool init )
|
||||
{
|
||||
if ( init )
|
||||
{
|
||||
m_Images = ImageTypeInfo.RandomList( 4 );
|
||||
m_Done = new bool[4];
|
||||
}
|
||||
}
|
||||
|
||||
public CaptureImagesObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection( Mobile from )
|
||||
{
|
||||
if ( Completed )
|
||||
return false;
|
||||
|
||||
Type fromType = from.GetType();
|
||||
|
||||
for ( int i = 0; i < m_Images.Length; i++ )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( m_Images[i] );
|
||||
|
||||
if ( info.Type == fromType )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public CaptureResponse CaptureImage( Type type, out ImageType image )
|
||||
{
|
||||
for ( int i = 0; i < m_Images.Length; i++ )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( m_Images[i] );
|
||||
|
||||
if ( info.Type == type )
|
||||
{
|
||||
image = m_Images[i];
|
||||
|
||||
if ( m_Done[i] )
|
||||
{
|
||||
return CaptureResponse.AlreadyDone;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Done[i] = true;
|
||||
|
||||
CheckCompletionStatus();
|
||||
|
||||
return CaptureResponse.Valid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
image = (ImageType)0;
|
||||
return CaptureResponse.Invalid;
|
||||
}
|
||||
|
||||
public override void RenderProgress( BaseQuestGump gump )
|
||||
{
|
||||
if ( !Completed )
|
||||
{
|
||||
for ( int i = 0; i < m_Images.Length; i++ )
|
||||
{
|
||||
ImageTypeInfo info = ImageTypeInfo.Get( m_Images[i] );
|
||||
|
||||
gump.AddHtmlObject( 70, 260 + 20 * i, 200, 100, info.Name, BaseQuestGump.Blue, false, false );
|
||||
gump.AddLabel( 200, 260 + 20 * i, 0x64, " : " );
|
||||
gump.AddHtmlObject( 220, 260 + 20 * i, 100, 100, m_Done[i] ? 1055121 : 1055122, BaseQuestGump.Blue, false, false );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress( gump );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new ReturnImagesObjective() );
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
int count = reader.ReadEncodedInt();
|
||||
|
||||
m_Images = new ImageType[count];
|
||||
m_Done = new bool[count];
|
||||
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
m_Images[i] = (ImageType) reader.ReadEncodedInt();
|
||||
m_Done[i] = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Images.Length );
|
||||
|
||||
for ( int i = 0; i < m_Images.Length; i++ )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) m_Images[i] );
|
||||
writer.Write( (bool) m_Done[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnImagesObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* You now have all of the creature images you need.
|
||||
* Return to Tomas O'Neerlan so that he can make the toy figurines.
|
||||
*/
|
||||
return 1055128;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnImagesObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new ReturnImagesConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnToysObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Return to Elwood with news that the toy figurines will be delivered when ready.
|
||||
return 1055132;
|
||||
}
|
||||
}
|
||||
|
||||
public ReturnToysObjective()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class MakeRoomObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
// Return to Elwood for your reward when you have some room in your backpack.
|
||||
return 1055136;
|
||||
}
|
||||
}
|
||||
|
||||
public MakeRoomObjective()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue