#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
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue