Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -2,174 +2,185 @@ using Server.Items;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public enum CannonDirection
|
||||
{
|
||||
North,
|
||||
East,
|
||||
South,
|
||||
West
|
||||
}
|
||||
public enum CannonDirection
|
||||
{
|
||||
North,
|
||||
East,
|
||||
South,
|
||||
West
|
||||
}
|
||||
|
||||
public class Cannon : BaseAddon
|
||||
{
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CannonDirection CannonDirection { get; private set; }
|
||||
public class Cannon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public Cannon(CannonDirection direction)
|
||||
{
|
||||
CannonDirection = direction;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public MilitiaCanoneer Canoneer { get; set; }
|
||||
switch (direction)
|
||||
{
|
||||
case CannonDirection.North:
|
||||
{
|
||||
AddComponent(new CannonComponent(0xE8D), 0, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE8C), 0, 1, 0);
|
||||
AddComponent(new CannonComponent(0xE8B), 0, 2, 0);
|
||||
|
||||
[Constructible]
|
||||
public Cannon( CannonDirection direction )
|
||||
{
|
||||
CannonDirection = direction;
|
||||
break;
|
||||
}
|
||||
case CannonDirection.East:
|
||||
{
|
||||
AddComponent(new CannonComponent(0xE96), 0, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE95), -1, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE94), -2, 0, 0);
|
||||
|
||||
switch ( direction )
|
||||
{
|
||||
case CannonDirection.North:
|
||||
{
|
||||
AddComponent( new CannonComponent( 0xE8D ), 0, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE8C ), 0, 1, 0 );
|
||||
AddComponent( new CannonComponent( 0xE8B ), 0, 2, 0 );
|
||||
break;
|
||||
}
|
||||
case CannonDirection.South:
|
||||
{
|
||||
AddComponent(new CannonComponent(0xE91), 0, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE92), 0, -1, 0);
|
||||
AddComponent(new CannonComponent(0xE93), 0, -2, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
case CannonDirection.East:
|
||||
{
|
||||
AddComponent( new CannonComponent( 0xE96 ), 0, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE95 ), -1, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE94 ), -2, 0, 0 );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddComponent(new CannonComponent(0xE8E), 0, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE8F), 1, 0, 0);
|
||||
AddComponent(new CannonComponent(0xE90), 2, 0, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
case CannonDirection.South:
|
||||
{
|
||||
AddComponent( new CannonComponent( 0xE91 ), 0, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE92 ), 0, -1, 0 );
|
||||
AddComponent( new CannonComponent( 0xE93 ), 0, -2, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
AddComponent( new CannonComponent( 0xE8E ), 0, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE8F ), 1, 0, 0 );
|
||||
AddComponent( new CannonComponent( 0xE90 ), 2, 0, 0 );
|
||||
public Cannon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CannonDirection CannonDirection{ get; private set; }
|
||||
|
||||
public Cannon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public MilitiaCanoneer Canoneer{ get; set; }
|
||||
|
||||
public void DoFireEffect( IPoint3D target )
|
||||
{
|
||||
Point3D from;
|
||||
switch ( CannonDirection )
|
||||
{
|
||||
case CannonDirection.North: from = new Point3D( X, Y - 1, Z ); break;
|
||||
case CannonDirection.East: from = new Point3D( X + 1, Y, Z ); break;
|
||||
case CannonDirection.South: from = new Point3D( X, Y + 1, Z ); break;
|
||||
default: from = new Point3D( X - 1, Y, Z ); break;
|
||||
}
|
||||
public override bool HandlesOnMovement => Canoneer != null && !Canoneer.Deleted && Canoneer.Active;
|
||||
|
||||
Effects.SendLocationEffect( from, Map, 0x36B0, 16, 1 );
|
||||
Effects.PlaySound( from, Map, 0x11D );
|
||||
public void DoFireEffect(IPoint3D target)
|
||||
{
|
||||
Point3D from;
|
||||
switch (CannonDirection)
|
||||
{
|
||||
case CannonDirection.North:
|
||||
from = new Point3D(X, Y - 1, Z);
|
||||
break;
|
||||
case CannonDirection.East:
|
||||
from = new Point3D(X + 1, Y, Z);
|
||||
break;
|
||||
case CannonDirection.South:
|
||||
from = new Point3D(X, Y + 1, Z);
|
||||
break;
|
||||
default:
|
||||
from = new Point3D(X - 1, Y, Z);
|
||||
break;
|
||||
}
|
||||
|
||||
Effects.SendLocationEffect( target, Map, 0x36B0, 16, 1 );
|
||||
Effects.PlaySound( target, Map, 0x11D );
|
||||
}
|
||||
Effects.SendLocationEffect(from, Map, 0x36B0, 16, 1);
|
||||
Effects.PlaySound(from, Map, 0x11D);
|
||||
|
||||
public void Fire( Mobile from, Mobile target )
|
||||
{
|
||||
DoFireEffect( target );
|
||||
Effects.SendLocationEffect(target, Map, 0x36B0, 16, 1);
|
||||
Effects.PlaySound(target, Map, 0x11D);
|
||||
}
|
||||
|
||||
target.Damage( 9999, from );
|
||||
}
|
||||
public void Fire(Mobile from, Mobile target)
|
||||
{
|
||||
DoFireEffect(target);
|
||||
|
||||
public override bool HandlesOnMovement => Canoneer != null && !Canoneer.Deleted && Canoneer.Active;
|
||||
target.Damage(9999, from);
|
||||
}
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
if ( Canoneer == null || Canoneer.Deleted || !Canoneer.Active )
|
||||
return;
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (Canoneer == null || Canoneer.Deleted || !Canoneer.Active)
|
||||
return;
|
||||
|
||||
bool canFire;
|
||||
switch ( CannonDirection )
|
||||
{
|
||||
case CannonDirection.North:
|
||||
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y - 7 && oldLocation.Y < Y - 7;
|
||||
break;
|
||||
case CannonDirection.East:
|
||||
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X + 7 && oldLocation.X > X + 7;
|
||||
break;
|
||||
case CannonDirection.South:
|
||||
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y + 7 && oldLocation.Y > Y + 7;
|
||||
break;
|
||||
default:
|
||||
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X - 7 && oldLocation.X < X - 7;
|
||||
break;
|
||||
}
|
||||
bool canFire;
|
||||
switch (CannonDirection)
|
||||
{
|
||||
case CannonDirection.North:
|
||||
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y - 7 && oldLocation.Y < Y - 7;
|
||||
break;
|
||||
case CannonDirection.East:
|
||||
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X + 7 && oldLocation.X > X + 7;
|
||||
break;
|
||||
case CannonDirection.South:
|
||||
canFire = m.X >= X - 7 && m.X <= X + 7 && m.Y == Y + 7 && oldLocation.Y > Y + 7;
|
||||
break;
|
||||
default:
|
||||
canFire = m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X - 7 && oldLocation.X < X - 7;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( canFire && Canoneer.WillFire( this, m ) )
|
||||
Fire( Canoneer, m );
|
||||
}
|
||||
if (canFire && Canoneer.WillFire(this, m))
|
||||
Fire(Canoneer, m);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
if ( Canoneer != null && Canoneer.Deleted )
|
||||
Canoneer = null;
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
if (Canoneer != null && Canoneer.Deleted)
|
||||
Canoneer = null;
|
||||
|
||||
base.Serialize( writer );
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) CannonDirection );
|
||||
writer.Write( (Mobile) Canoneer );
|
||||
}
|
||||
writer.WriteEncodedInt((int)CannonDirection);
|
||||
writer.Write(Canoneer);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
CannonDirection = (CannonDirection) reader.ReadEncodedInt();
|
||||
Canoneer = (MilitiaCanoneer) reader.ReadMobile();
|
||||
}
|
||||
}
|
||||
CannonDirection = (CannonDirection)reader.ReadEncodedInt();
|
||||
Canoneer = (MilitiaCanoneer)reader.ReadMobile();
|
||||
}
|
||||
}
|
||||
|
||||
public class CannonComponent : AddonComponent
|
||||
{
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public MilitiaCanoneer Canoneer
|
||||
{
|
||||
get => Addon is Cannon cannon ? cannon.Canoneer : null;
|
||||
set { if ( Addon is Cannon cannon ) cannon.Canoneer = value; }
|
||||
}
|
||||
public class CannonComponent : AddonComponent
|
||||
{
|
||||
public CannonComponent(int itemID) : base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public CannonComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
public CannonComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public CannonComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public MilitiaCanoneer Canoneer
|
||||
{
|
||||
get => Addon is Cannon cannon ? cannon.Canoneer : null;
|
||||
set
|
||||
{
|
||||
if (Addon is Cannon cannon) cannon.Canoneer = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,65 +3,67 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class DaemonBloodChest : MetalChest
|
||||
{
|
||||
[Constructible]
|
||||
public DaemonBloodChest()
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
public class DaemonBloodChest : MetalChest
|
||||
{
|
||||
[Constructible]
|
||||
public DaemonBloodChest()
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public DaemonBloodChest( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public DaemonBloodChest(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from is PlayerMobile player && player.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile player && player.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( GetDaemonBloodObjective ) );
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(GetDaemonBloodObjective));
|
||||
|
||||
if ( (obj != null && !obj.Completed) || UzeraanTurmoilQuest.HasLostDaemonBlood( player ) )
|
||||
{
|
||||
Item vial = new QuestDaemonBlood();
|
||||
if (obj != null && !obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBlood(player))
|
||||
{
|
||||
Item vial = new QuestDaemonBlood();
|
||||
|
||||
if ( player.PlaceInBackpack( vial ) )
|
||||
{
|
||||
player.SendLocalizedMessage( 1049331, "", 0x22 ); // You take a vial of blood from the chest and put it in your pack.
|
||||
if (player.PlaceInBackpack(vial))
|
||||
{
|
||||
player.SendLocalizedMessage(1049331, "",
|
||||
0x22); // You take a vial of blood from the chest and put it in your pack.
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage( 1049338, "", 0x22 ); // You find a vial of blood, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
|
||||
vial.Delete();
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1049338, "",
|
||||
0x22); // You find a vial of blood, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
|
||||
vial.Delete();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick( from );
|
||||
}
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,37 +2,37 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class QuestDaemonBlood : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBlood() : base( 0xF7D )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
public class QuestDaemonBlood : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBlood() : base(0xF7D)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public QuestDaemonBlood( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public QuestDaemonBlood(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
|
||||
/*return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBloodObjective ) );*/
|
||||
}
|
||||
/*return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBloodObjective ) );*/
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,37 +2,37 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class QuestDaemonBone : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBone() : base( 0xF80 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
public class QuestDaemonBone : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestDaemonBone() : base(0xF80)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public QuestDaemonBone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public QuestDaemonBone(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
|
||||
//return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBoneObjective ) );
|
||||
}
|
||||
//return !qs.IsObjectiveInProgress( typeof( ReturnDaemonBoneObjective ) );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,37 +2,37 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class QuestFertileDirt : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestFertileDirt() : base( 0xF81 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
public class QuestFertileDirt : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public QuestFertileDirt() : base(0xF81)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public QuestFertileDirt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public QuestFertileDirt(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest);
|
||||
|
||||
//return !qs.IsObjectiveInProgress( typeof( ReturnFertileDirtObjective ) );
|
||||
}
|
||||
//return !qs.IsObjectiveInProgress( typeof( ReturnFertileDirtObjective ) );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,199 +1,202 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class SchmendrickApprenticeCorpse : Corpse
|
||||
{
|
||||
private static Mobile GetOwner()
|
||||
{
|
||||
Mobile apprentice = new Mobile();
|
||||
public class SchmendrickApprenticeCorpse : Corpse
|
||||
{
|
||||
private static int m_HairHue;
|
||||
|
||||
apprentice.Hue = Utility.RandomSkinHue();
|
||||
apprentice.Female = false;
|
||||
apprentice.Body = 0x190;
|
||||
apprentice.Name = NameList.RandomName( "male" );
|
||||
private Lantern m_Lantern;
|
||||
|
||||
apprentice.Delete();
|
||||
[Constructible]
|
||||
public SchmendrickApprenticeCorpse() : base(GetOwner(), GetHair(), GetFacialHair(), GetEquipment())
|
||||
{
|
||||
Direction = Direction.West;
|
||||
|
||||
return apprentice;
|
||||
}
|
||||
foreach (Item item in EquipItems) DropItem(item);
|
||||
|
||||
private static List<Item> GetEquipment()
|
||||
{
|
||||
List<Item> list = new List<Item>();
|
||||
m_Lantern = new Lantern();
|
||||
m_Lantern.Movable = false;
|
||||
m_Lantern.Protected = true;
|
||||
m_Lantern.Ignite();
|
||||
}
|
||||
|
||||
list.Add( new Robe( QuestSystem.RandomBrightHue() ) );
|
||||
list.Add( new WizardsHat( Utility.RandomNeutralHue() ) );
|
||||
list.Add( new Shoes( Utility.RandomNeutralHue() ) );
|
||||
public SchmendrickApprenticeCorpse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
int hairHue = Utility.RandomHairHue();
|
||||
private static Mobile GetOwner()
|
||||
{
|
||||
Mobile apprentice = new Mobile();
|
||||
|
||||
switch ( Utility.Random( 8 ) )
|
||||
{
|
||||
case 0: list.Add( new Afro( hairHue ) ); break;
|
||||
case 1: list.Add( new KrisnaHair( hairHue ) ); break;
|
||||
case 2: list.Add( new PageboyHair( hairHue ) ); break;
|
||||
case 3: list.Add( new PonyTail( hairHue ) ); break;
|
||||
case 4: list.Add( new ReceedingHair( hairHue ) ); break;
|
||||
case 5: list.Add( new TwoPigTails( hairHue ) ); break;
|
||||
case 6: list.Add( new ShortHair( hairHue ) ); break;
|
||||
case 7: list.Add( new LongHair( hairHue ) ); break;
|
||||
}
|
||||
apprentice.Hue = Utility.RandomSkinHue();
|
||||
apprentice.Female = false;
|
||||
apprentice.Body = 0x190;
|
||||
apprentice.Name = NameList.RandomName("male");
|
||||
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: list.Add( new LongBeard( hairHue ) ); break;
|
||||
case 1: list.Add( new MediumLongBeard( hairHue ) ); break;
|
||||
case 2: list.Add( new Vandyke( hairHue ) ); break;
|
||||
case 3: list.Add( new Mustache( hairHue ) ); break;
|
||||
case 4: list.Add( new Goatee( hairHue ) ); break;
|
||||
}
|
||||
* */
|
||||
apprentice.Delete();
|
||||
|
||||
list.Add( new Spellbook() );
|
||||
return apprentice;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
private static List<Item> GetEquipment()
|
||||
{
|
||||
List<Item> list = new List<Item>();
|
||||
|
||||
private static int m_HairHue;
|
||||
private static HairInfo GetHair()
|
||||
{
|
||||
m_HairHue = Race.Human.RandomHairHue();
|
||||
list.Add(new Robe(QuestSystem.RandomBrightHue()));
|
||||
list.Add(new WizardsHat(Utility.RandomNeutralHue()));
|
||||
list.Add(new Shoes(Utility.RandomNeutralHue()));
|
||||
|
||||
return new HairInfo( Race.Human.RandomHair( false ), m_HairHue );
|
||||
}
|
||||
/*
|
||||
int hairHue = Utility.RandomHairHue();
|
||||
|
||||
private static FacialHairInfo GetFacialHair()
|
||||
{
|
||||
m_HairHue = Race.Human.RandomHairHue();
|
||||
switch ( Utility.Random( 8 ) )
|
||||
{
|
||||
case 0: list.Add( new Afro( hairHue ) ); break;
|
||||
case 1: list.Add( new KrisnaHair( hairHue ) ); break;
|
||||
case 2: list.Add( new PageboyHair( hairHue ) ); break;
|
||||
case 3: list.Add( new PonyTail( hairHue ) ); break;
|
||||
case 4: list.Add( new ReceedingHair( hairHue ) ); break;
|
||||
case 5: list.Add( new TwoPigTails( hairHue ) ); break;
|
||||
case 6: list.Add( new ShortHair( hairHue ) ); break;
|
||||
case 7: list.Add( new LongHair( hairHue ) ); break;
|
||||
}
|
||||
|
||||
return new FacialHairInfo( Race.Human.RandomFacialHair( false ), m_HairHue );
|
||||
}
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: list.Add( new LongBeard( hairHue ) ); break;
|
||||
case 1: list.Add( new MediumLongBeard( hairHue ) ); break;
|
||||
case 2: list.Add( new Vandyke( hairHue ) ); break;
|
||||
case 3: list.Add( new Mustache( hairHue ) ); break;
|
||||
case 4: list.Add( new Goatee( hairHue ) ); break;
|
||||
}
|
||||
* */
|
||||
|
||||
private Lantern m_Lantern;
|
||||
list.Add(new Spellbook());
|
||||
|
||||
[Constructible]
|
||||
public SchmendrickApprenticeCorpse() : base( GetOwner(), GetHair(), GetFacialHair(), GetEquipment() )
|
||||
{
|
||||
Direction = Direction.West;
|
||||
return list;
|
||||
}
|
||||
|
||||
foreach ( Item item in EquipItems )
|
||||
{
|
||||
DropItem( item );
|
||||
}
|
||||
private static HairInfo GetHair()
|
||||
{
|
||||
m_HairHue = Race.Human.RandomHairHue();
|
||||
|
||||
m_Lantern = new Lantern();
|
||||
m_Lantern.Movable = false;
|
||||
m_Lantern.Protected = true;
|
||||
m_Lantern.Ignite();
|
||||
}
|
||||
return new HairInfo(Race.Human.RandomHair(false), m_HairHue);
|
||||
}
|
||||
|
||||
public SchmendrickApprenticeCorpse( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
private static FacialHairInfo GetFacialHair()
|
||||
{
|
||||
m_HairHue = Race.Human.RandomHairHue();
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( ItemID == 0x2006 ) // Corpse form
|
||||
{
|
||||
list.Add( "a human corpse" );
|
||||
list.Add( 1049144, Name ); // the remains of ~1_NAME~ the apprentice
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add( 1049145 ); // the remains of a wizard's apprentice
|
||||
}
|
||||
}
|
||||
return new FacialHairInfo(Race.Human.RandomFacialHair(false), m_HairHue);
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int hue = Notoriety.GetHue( Misc.NotorietyHandlers.CorpseNotoriety( from, this ) );
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
{
|
||||
list.Add("a human corpse");
|
||||
list.Add(1049144, Name); // the remains of ~1_NAME~ the apprentice
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1049145); // the remains of a wizard's apprentice
|
||||
}
|
||||
}
|
||||
|
||||
if ( ItemID == 0x2006 ) // Corpse form
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049144, "", Name ) ); // the remains of ~1_NAME~ the apprentice
|
||||
else
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049145, "", "" ) ); // the remains of a wizard's apprentice
|
||||
}
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int hue = Notoriety.GetHue(NotorietyHandlers.CorpseNotoriety(from, this));
|
||||
|
||||
public override void Open( Mobile from, bool checkSelfLoot )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 2 ) )
|
||||
return;
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049144, "",
|
||||
Name)); // the remains of ~1_NAME~ the apprentice
|
||||
else
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049145, "",
|
||||
"")); // the remains of a wizard's apprentice
|
||||
}
|
||||
|
||||
if ( from is PlayerMobile player )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public override void Open(Mobile from, bool checkSelfLoot)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
return;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindApprenticeObjective ) );
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Item scroll = new SchmendrickScrollOfPower();
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindApprenticeObjective));
|
||||
|
||||
if ( player.PlaceInBackpack( scroll ) )
|
||||
{
|
||||
player.SendLocalizedMessage( 1049147, "", 0x22 ); // You find the scroll and put it in your pack.
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage( 1049146, "", 0x22 ); // You find the scroll, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
|
||||
scroll.Delete();
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Item scroll = new SchmendrickScrollOfPower();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player.PlaceInBackpack(scroll))
|
||||
{
|
||||
player.SendLocalizedMessage(1049147, "", 0x22); // You find the scroll and put it in your pack.
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1049146, "",
|
||||
0x22); // You find the scroll, but can't pick it up because your pack is too full. Come back when you have more room in your pack.
|
||||
scroll.Delete();
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 1049143, "", 0x22 ); // This is the corpse of a wizard's apprentice. You can't bring yourself to search it without a good reason.
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D oldLoc )
|
||||
{
|
||||
if ( m_Lantern != null && !m_Lantern.Deleted )
|
||||
m_Lantern.Location = new Point3D( X, Y + 1, Z );
|
||||
}
|
||||
from.SendLocalizedMessage(1049143, "",
|
||||
0x22); // This is the corpse of a wizard's apprentice. You can't bring yourself to search it without a good reason.
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
if ( m_Lantern != null && !m_Lantern.Deleted )
|
||||
m_Lantern.Map = Map;
|
||||
}
|
||||
public override void OnLocationChange(Point3D oldLoc)
|
||||
{
|
||||
if (m_Lantern != null && !m_Lantern.Deleted)
|
||||
m_Lantern.Location = new Point3D(X, Y + 1, Z);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
public override void OnMapChange()
|
||||
{
|
||||
if (m_Lantern != null && !m_Lantern.Deleted)
|
||||
m_Lantern.Map = Map;
|
||||
}
|
||||
|
||||
if ( m_Lantern != null && !m_Lantern.Deleted )
|
||||
m_Lantern.Delete();
|
||||
}
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
if ( m_Lantern != null && m_Lantern.Deleted )
|
||||
m_Lantern = null;
|
||||
if (m_Lantern != null && !m_Lantern.Deleted)
|
||||
m_Lantern.Delete();
|
||||
}
|
||||
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
if (m_Lantern != null && m_Lantern.Deleted)
|
||||
m_Lantern = null;
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( m_Lantern );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(m_Lantern);
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
m_Lantern = (Lantern)reader.ReadItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Lantern = (Lantern)reader.ReadItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,38 +2,38 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class SchmendrickScrollOfPower : QuestItem
|
||||
{
|
||||
public override int LabelNumber => 1049118; // a scroll with ancient markings
|
||||
public class SchmendrickScrollOfPower : QuestItem
|
||||
{
|
||||
public SchmendrickScrollOfPower() : base(0xE34)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x34D;
|
||||
}
|
||||
|
||||
public SchmendrickScrollOfPower() : base( 0xE34 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x34D;
|
||||
}
|
||||
public SchmendrickScrollOfPower(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SchmendrickScrollOfPower( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1049118; // a scroll with ancient markings
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest qs &&
|
||||
qs.IsObjectiveInProgress(typeof(ReturnScrollOfPowerObjective)));
|
||||
}
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is UzeraanTurmoilQuest qs &&
|
||||
qs.IsObjectiveInProgress(typeof(ReturnScrollOfPowerObjective)));
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,36 +2,36 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class UzeraanTurmoilHorn : HornOfRetreat
|
||||
{
|
||||
public override bool ValidateUse( Mobile from )
|
||||
{
|
||||
return ( from is PlayerMobile pm && pm.Quest is UzeraanTurmoilQuest );
|
||||
}
|
||||
public class UzeraanTurmoilHorn : HornOfRetreat
|
||||
{
|
||||
[Constructible]
|
||||
public UzeraanTurmoilHorn()
|
||||
{
|
||||
DestLoc = new Point3D(3597, 2582, 0);
|
||||
DestMap = Map.Trammel;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public UzeraanTurmoilHorn()
|
||||
{
|
||||
DestLoc = new Point3D( 3597, 2582, 0 );
|
||||
DestMap = Map.Trammel;
|
||||
}
|
||||
public UzeraanTurmoilHorn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public UzeraanTurmoilHorn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ValidateUse(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile pm && pm.Quest is UzeraanTurmoilQuest;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,70 +2,72 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class UzeraanTurmoilTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public UzeraanTurmoilTeleporter()
|
||||
{
|
||||
}
|
||||
public class UzeraanTurmoilTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public UzeraanTurmoilTeleporter()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public UzeraanTurmoilTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( FindSchmendrickObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindApprenticeObjective ) )
|
||||
|| UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
|
||||
{
|
||||
loc = new Point3D( 5222, 1858, 0 );
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs.IsObjectiveInProgress( typeof( FindDryadObjective ) )
|
||||
|| UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
|
||||
{
|
||||
loc = new Point3D( 3557, 2690, 2 );
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
if ( player.Profession != 5 // paladin
|
||||
&& ( qs.IsObjectiveInProgress( typeof( GetDaemonBoneObjective ) )
|
||||
|| UzeraanTurmoilQuest.HasLostDaemonBone( player ) ) )
|
||||
{
|
||||
loc = new Point3D( 3422, 2653, 48 );
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
if ( qs.IsObjectiveInProgress( typeof( CashBankCheckObjective ) ) )
|
||||
{
|
||||
loc = new Point3D( 3624, 2610, 0 );
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FindSchmendrickObjective))
|
||||
|| qs.IsObjectiveInProgress(typeof(FindApprenticeObjective))
|
||||
|| UzeraanTurmoilQuest.HasLostScrollOfPower(player))
|
||||
{
|
||||
loc = new Point3D(5222, 1858, 0);
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
if (qs.IsObjectiveInProgress(typeof(FindDryadObjective))
|
||||
|| UzeraanTurmoilQuest.HasLostFertileDirt(player))
|
||||
{
|
||||
loc = new Point3D(3557, 2690, 2);
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
|
||||
public UzeraanTurmoilTeleporter( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (player.Profession != 5 // paladin
|
||||
&& (qs.IsObjectiveInProgress(typeof(GetDaemonBoneObjective))
|
||||
|| UzeraanTurmoilQuest.HasLostDaemonBone(player)))
|
||||
{
|
||||
loc = new Point3D(3422, 2653, 48);
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
if (qs.IsObjectiveInProgress(typeof(CashBankCheckObjective)))
|
||||
{
|
||||
loc = new Point3D(3624, 2610, 0);
|
||||
map = Map.Trammel;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,188 +1,185 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Dryad : BaseQuester
|
||||
{
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool DisallowAllMoves => false;
|
||||
public override bool ClickTitle => true;
|
||||
public override bool CanTeach => true;
|
||||
public override string DefaultName => "Anwin Brenna";
|
||||
public class Dryad : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Dryad() : base("the Dryad")
|
||||
{
|
||||
SetSkill(SkillName.Peacemaking, 80.0, 100.0);
|
||||
SetSkill(SkillName.Cooking, 80.0, 100.0);
|
||||
SetSkill(SkillName.Provocation, 80.0, 100.0);
|
||||
SetSkill(SkillName.Musicianship, 80.0, 100.0);
|
||||
SetSkill(SkillName.Poisoning, 80.0, 100.0);
|
||||
SetSkill(SkillName.Archery, 80.0, 100.0);
|
||||
SetSkill(SkillName.Tailoring, 80.0, 100.0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Dryad() : base( "the Dryad" )
|
||||
{
|
||||
SetSkill( SkillName.Peacemaking, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Cooking, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Provocation, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Musicianship, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Poisoning, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Archery, 80.0, 100.0 );
|
||||
SetSkill( SkillName.Tailoring, 80.0, 100.0 );
|
||||
}
|
||||
public Dryad(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public Dryad( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool DisallowAllMoves => false;
|
||||
public override bool ClickTitle => true;
|
||||
public override bool CanTeach => true;
|
||||
public override string DefaultName => "Anwin Brenna";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x85A7;
|
||||
Hue = 0x85A7;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new Kilt( 0x301 ) );
|
||||
AddItem( new FancyShirt( 0x300 ) );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Kilt(0x301));
|
||||
AddItem(new FancyShirt(0x300));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x22;
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x22;
|
||||
|
||||
Bow bow = new Bow();
|
||||
bow.Movable = false;
|
||||
AddItem( bow );
|
||||
}
|
||||
Bow bow = new Bow();
|
||||
bow.Movable = false;
|
||||
AddItem(bow);
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add( new SBDryad() );
|
||||
}
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBDryad());
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange( PlayerMobile pm )
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return ( to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective( typeof( FindDryadObjective ) ) != null );
|
||||
}
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective(typeof(FindDryadObjective)) != null;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
|
||||
{
|
||||
FocusTo( player );
|
||||
qs.AddConversation( new LostFertileDirtConversation( false ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindDryadObjective ) );
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostFertileDirt(player))
|
||||
{
|
||||
FocusTo(player);
|
||||
qs.AddConversation(new LostFertileDirtConversation(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindDryadObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if ( !player.PlaceInBackpack( fertileDirt ) )
|
||||
{
|
||||
fertileDirt.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if ( contextMenu )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049357 ); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
fertileDirt.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( from is PlayerMobile player )
|
||||
{
|
||||
if ( player.Quest is UzeraanTurmoilQuest qs && dropped is Apple && UzeraanTurmoilQuest.HasLostFertileDirt( from ) )
|
||||
{
|
||||
FocusTo( from );
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
if (player.Quest is UzeraanTurmoilQuest qs && dropped is Apple &&
|
||||
UzeraanTurmoilQuest.HasLostFertileDirt(from))
|
||||
{
|
||||
FocusTo(from);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if ( !player.PlaceInBackpack( fertileDirt ) )
|
||||
{
|
||||
fertileDirt.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
fertileDirt.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Consume();
|
||||
qs.AddConversation( new DryadAppleConversation() );
|
||||
return dropped.Deleted;
|
||||
}
|
||||
}
|
||||
dropped.Consume();
|
||||
qs.AddConversation(new DryadAppleConversation());
|
||||
return dropped.Deleted;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SBDryad : SBInfo
|
||||
{
|
||||
public SBDryad()
|
||||
{
|
||||
}
|
||||
public class SBDryad : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Bandage), 5, 20, 0xE21, 0));
|
||||
Add(new GenericBuyInfo(typeof(Ginseng), 3, 20, 0xF85, 0));
|
||||
Add(new GenericBuyInfo(typeof(Garlic), 3, 20, 0xF84, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bloodmoss), 5, 20, 0xF7B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Nightshade), 3, 20, 0xF88, 0));
|
||||
Add(new GenericBuyInfo(typeof(SpidersSilk), 3, 20, 0xF8D, 0));
|
||||
Add(new GenericBuyInfo(typeof(MandrakeRoot), 3, 20, 0xF86, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( Bandage ), 5, 20, 0xE21, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Ginseng ), 3, 20, 0xF85, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Garlic ), 3, 20, 0xF84, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Bloodmoss ), 5, 20, 0xF7B, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Nightshade ), 3, 20, 0xF88, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( SpidersSilk ), 3, 20, 0xF8D, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( MandrakeRoot ), 3, 20, 0xF86, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add( typeof( Bandage ), 2 );
|
||||
Add( typeof( Garlic ), 2 );
|
||||
Add( typeof( Ginseng ), 2 );
|
||||
Add( typeof( Bloodmoss ), 3 );
|
||||
Add( typeof( Nightshade ), 2 );
|
||||
Add( typeof( SpidersSilk ), 2 );
|
||||
Add( typeof( MandrakeRoot ), 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Bandage), 2);
|
||||
Add(typeof(Garlic), 2);
|
||||
Add(typeof(Ginseng), 2);
|
||||
Add(typeof(Bloodmoss), 3);
|
||||
Add(typeof(Nightshade), 2);
|
||||
Add(typeof(SpidersSilk), 2);
|
||||
Add(typeof(MandrakeRoot), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,77 +1,77 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MansionGuard : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public MansionGuard() : base( "the Mansion Guard" )
|
||||
{
|
||||
}
|
||||
public class MansionGuard : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public MansionGuard() : base("the Mansion Guard")
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
public MansionGuard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new PlateChest() );
|
||||
AddItem( new PlateArms() );
|
||||
AddItem( new PlateGloves() );
|
||||
AddItem( new PlateLegs() );
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
Bardiche weapon = new Bardiche();
|
||||
weapon.Movable = false;
|
||||
AddItem( weapon );
|
||||
}
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
public override int GetAutoTalkRange( PlayerMobile pm )
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
Bardiche weapon = new Bardiche();
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return ( to.Quest == null && QuestSystem.CanOfferQuest( to, typeof( UzeraanTurmoilQuest ) ) );
|
||||
}
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( UzeraanTurmoilQuest ) ) )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(UzeraanTurmoilQuest));
|
||||
}
|
||||
|
||||
new UzeraanTurmoilQuest( player ).SendOffer();
|
||||
}
|
||||
}
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(UzeraanTurmoilQuest)))
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
public MansionGuard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
new UzeraanTurmoilQuest(player).SendOffer();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,100 +3,100 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MilitiaCanoneer : BaseQuester
|
||||
{
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Active { get; set; }
|
||||
public class MilitiaCanoneer : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public MilitiaCanoneer() : base("the Militia Canoneer")
|
||||
{
|
||||
Active = true;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MilitiaCanoneer() : base( "the Militia Canoneer" )
|
||||
{
|
||||
Active = true;
|
||||
}
|
||||
public MilitiaCanoneer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 125, 25 );
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Active{ get; set; }
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 125, 25);
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
AddItem( new PlateChest() );
|
||||
AddItem( new PlateArms() );
|
||||
AddItem( new PlateGloves() );
|
||||
AddItem( new PlateLegs() );
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
Torch torch = new Torch();
|
||||
torch.Movable = false;
|
||||
AddItem( torch );
|
||||
torch.Ignite();
|
||||
}
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Torch torch = new Torch();
|
||||
torch.Movable = false;
|
||||
AddItem(torch);
|
||||
torch.Ignite();
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
}
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool IsEnemy( Mobile m )
|
||||
{
|
||||
if ( m.Player || m is BaseVendor )
|
||||
return false;
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
if ( m is BaseCreature bc )
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if ( master != null )
|
||||
return IsEnemy( master );
|
||||
}
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m.Player || m is BaseVendor)
|
||||
return false;
|
||||
|
||||
return m.Karma < 0;
|
||||
}
|
||||
if (m is BaseCreature bc)
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if (master != null)
|
||||
return IsEnemy(master);
|
||||
}
|
||||
|
||||
public bool WillFire( Cannon cannon, Mobile target )
|
||||
{
|
||||
if ( Active && IsEnemy( target ) )
|
||||
{
|
||||
Direction = GetDirectionTo( target );
|
||||
Say( Utility.RandomList( 500651, 1049098, 1049320, 1043149 ) );
|
||||
return true;
|
||||
}
|
||||
return m.Karma < 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public bool WillFire(Cannon cannon, Mobile target)
|
||||
{
|
||||
if (Active && IsEnemy(target))
|
||||
{
|
||||
Direction = GetDirectionTo(target);
|
||||
Say(Utility.RandomList(500651, 1049098, 1049320, 1043149));
|
||||
return true;
|
||||
}
|
||||
|
||||
public MilitiaCanoneer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write( (bool) Active );
|
||||
}
|
||||
writer.Write(Active);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Active = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
Active = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,146 +1,162 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MilitiaFighter : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public MilitiaFighter() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( 40, 30, 5 );
|
||||
Title = "the Militia Fighter";
|
||||
public class MilitiaFighter : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public MilitiaFighter() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(40, 30, 5);
|
||||
Title = "the Militia Fighter";
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
AddItem( new ThighBoots( 0x1BB ) );
|
||||
AddItem( new LeatherChest() );
|
||||
AddItem( new LeatherArms() );
|
||||
AddItem( new LeatherLegs() );
|
||||
AddItem( new LeatherCap() );
|
||||
AddItem( new LeatherGloves() );
|
||||
AddItem( new LeatherGorget() );
|
||||
AddItem(new ThighBoots(0x1BB));
|
||||
AddItem(new LeatherChest());
|
||||
AddItem(new LeatherArms());
|
||||
AddItem(new LeatherLegs());
|
||||
AddItem(new LeatherCap());
|
||||
AddItem(new LeatherGloves());
|
||||
AddItem(new LeatherGorget());
|
||||
|
||||
Item weapon;
|
||||
switch ( Utility.Random( 6 ) )
|
||||
{
|
||||
case 0: weapon = new Broadsword(); break;
|
||||
case 1: weapon = new Cutlass(); break;
|
||||
case 2: weapon = new Katana(); break;
|
||||
case 3: weapon = new Longsword(); break;
|
||||
case 4: weapon = new Scimitar(); break;
|
||||
default: weapon = new VikingSword(); break;
|
||||
}
|
||||
weapon.Movable = false;
|
||||
AddItem( weapon );
|
||||
Item weapon;
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
case 0:
|
||||
weapon = new Broadsword();
|
||||
break;
|
||||
case 1:
|
||||
weapon = new Cutlass();
|
||||
break;
|
||||
case 2:
|
||||
weapon = new Katana();
|
||||
break;
|
||||
case 3:
|
||||
weapon = new Longsword();
|
||||
break;
|
||||
case 4:
|
||||
weapon = new Scimitar();
|
||||
break;
|
||||
default:
|
||||
weapon = new VikingSword();
|
||||
break;
|
||||
}
|
||||
|
||||
Item shield = new BronzeShield();
|
||||
shield.Movable = false;
|
||||
AddItem( shield );
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
|
||||
SetSkill( SkillName.Swords, 20.0 );
|
||||
}
|
||||
Item shield = new BronzeShield();
|
||||
shield.Movable = false;
|
||||
AddItem(shield);
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
SetSkill(SkillName.Swords, 20.0);
|
||||
}
|
||||
|
||||
public override bool IsEnemy( Mobile m )
|
||||
{
|
||||
if ( m.Player || m is BaseVendor )
|
||||
return false;
|
||||
public MilitiaFighter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
if ( m is BaseCreature bc )
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if ( master != null )
|
||||
return IsEnemy( master );
|
||||
}
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
return m.Karma < 0;
|
||||
}
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m.Player || m is BaseVendor)
|
||||
return false;
|
||||
|
||||
public MilitiaFighter( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (m is BaseCreature bc)
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if (master != null)
|
||||
return IsEnemy(master);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
return m.Karma < 0;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public class MilitiaFighterCorpse : Corpse
|
||||
{
|
||||
public MilitiaFighterCorpse( Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> equipItems ) : base( owner, hair, facialhair, equipItems )
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( ItemID == 0x2006 ) // Corpse form
|
||||
{
|
||||
list.Add( "a human corpse" );
|
||||
list.Add( 1049318, Name ); // the remains of ~1_NAME~ the militia fighter
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add( 1049319 ); // the remains of a militia fighter
|
||||
}
|
||||
}
|
||||
public class MilitiaFighterCorpse : Corpse
|
||||
{
|
||||
public MilitiaFighterCorpse(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> equipItems) : base(
|
||||
owner, hair, facialhair, equipItems)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int hue = Notoriety.GetHue( Misc.NotorietyHandlers.CorpseNotoriety( from, this ) );
|
||||
public MilitiaFighterCorpse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
if ( ItemID == 0x2006 ) // Corpse form
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049318, "", Name ) ); // the remains of ~1_NAME~ the militia fighter
|
||||
else
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, 1049319, "", "" ) ); // the remains of a militia fighter
|
||||
}
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
{
|
||||
list.Add("a human corpse");
|
||||
list.Add(1049318, Name); // the remains of ~1_NAME~ the militia fighter
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1049319); // the remains of a militia fighter
|
||||
}
|
||||
}
|
||||
|
||||
public override void Open( Mobile from, bool checkSelfLoot )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049661, "", 0x22 ); // Thinking about his sacrifice, you can't bring yourself to loot the body of this militia fighter.
|
||||
}
|
||||
}
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int hue = Notoriety.GetHue(NotorietyHandlers.CorpseNotoriety(from, this));
|
||||
|
||||
public MilitiaFighterCorpse( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049318, "",
|
||||
Name)); // the remains of ~1_NAME~ the militia fighter
|
||||
else
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049319, "",
|
||||
"")); // the remains of a militia fighter
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Open(Mobile from, bool checkSelfLoot)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 2))
|
||||
from.SendLocalizedMessage(1049661, "",
|
||||
0x22); // Thinking about his sacrifice, you can't bring yourself to loot the body of this militia fighter.
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,150 +1,152 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Schmendrick : BaseQuester
|
||||
{
|
||||
public override string DefaultName => "Schmendrick";
|
||||
public class Schmendrick : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Schmendrick() : base("the High Mage")
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Schmendrick() : base( "the High Mage" )
|
||||
{
|
||||
}
|
||||
public Schmendrick(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
public override string DefaultName => "Schmendrick";
|
||||
|
||||
Hue = 0x83F3;
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
Hue = 0x83F3;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new Robe( 0x4DD ) );
|
||||
AddItem( new WizardsHat( 0x482 ) );
|
||||
AddItem( new Shoes( 0x482 ) );
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Robe(0x4DD));
|
||||
AddItem(new WizardsHat(0x482));
|
||||
AddItem(new Shoes(0x482));
|
||||
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
|
||||
GlacialStaff staff = new GlacialStaff();
|
||||
staff.Movable = false;
|
||||
AddItem( staff );
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
|
||||
Backpack pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
AddItem( pack );
|
||||
}
|
||||
GlacialStaff staff = new GlacialStaff();
|
||||
staff.Movable = false;
|
||||
AddItem(staff);
|
||||
|
||||
public override int GetAutoTalkRange( PlayerMobile pm )
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
Backpack pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return ( to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective( typeof( FindSchmendrickObjective ) ) != null );
|
||||
}
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective(typeof(FindSchmendrickObjective)) != null;
|
||||
}
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
|
||||
{
|
||||
FocusTo( player );
|
||||
qs.AddConversation( new LostScrollOfPowerConversation( false ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindSchmendrickObjective ) );
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
obj.Complete();
|
||||
}
|
||||
else if ( contextMenu )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049357 ); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostScrollOfPower(player))
|
||||
{
|
||||
FocusTo(player);
|
||||
qs.AddConversation(new LostScrollOfPowerConversation(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindSchmendrickObjective));
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower( from ) )
|
||||
{
|
||||
FocusTo( from );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
obj.Complete();
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item scroll = new SchmendrickScrollOfPower();
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower(from))
|
||||
{
|
||||
FocusTo(from);
|
||||
|
||||
if ( !from.PlaceInBackpack( scroll ) )
|
||||
{
|
||||
scroll.Delete();
|
||||
from.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
Item scroll = new SchmendrickScrollOfPower();
|
||||
|
||||
dropped.Consume();
|
||||
from.SendLocalizedMessage( 1049346 ); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
|
||||
return dropped.Deleted;
|
||||
}
|
||||
if (!from.PlaceInBackpack(scroll))
|
||||
{
|
||||
scroll.Delete();
|
||||
from.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
dropped.Consume();
|
||||
from.SendLocalizedMessage(
|
||||
1049346); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
|
||||
return dropped.Deleted;
|
||||
}
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
base.OnMovement( m, oldLocation );
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
if ( m is PlayerMobile && !m.Frozen && !m.Alive && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
|
||||
{
|
||||
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.CloseGump( typeof( ResurrectGump ) );
|
||||
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
public Schmendrick( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
m.CloseGump(typeof(ResurrectGump));
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,420 +1,432 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Uzeraan : BaseQuester
|
||||
{
|
||||
public override string DefaultName => "Uzeraan";
|
||||
public class Uzeraan : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Uzeraan() : base("the Conjurer")
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Uzeraan() : base( "the Conjurer" )
|
||||
{
|
||||
}
|
||||
public Uzeraan(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
public override string DefaultName => "Uzeraan";
|
||||
|
||||
Hue = 0x83F3;
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
Hue = 0x83F3;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem( new Robe( 0x4DD ) );
|
||||
AddItem( new WizardsHat( 0x8A5 ) );
|
||||
AddItem( new Shoes( 0x8A5 ) );
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Robe(0x4DD));
|
||||
AddItem(new WizardsHat(0x8A5));
|
||||
AddItem(new Shoes(0x8A5));
|
||||
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
|
||||
BlackStaff staff = new BlackStaff();
|
||||
staff.Movable = false;
|
||||
AddItem( staff );
|
||||
}
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
|
||||
public override int GetAutoTalkRange( PlayerMobile pm )
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
BlackStaff staff = new BlackStaff();
|
||||
staff.Movable = false;
|
||||
AddItem(staff);
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest;
|
||||
}
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest;
|
||||
}
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( UzeraanTurmoilQuest.HasLostScrollOfPower( player ) )
|
||||
{
|
||||
qs.AddConversation( new LostScrollOfPowerConversation( true ) );
|
||||
}
|
||||
else if ( UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
|
||||
{
|
||||
qs.AddConversation( new LostFertileDirtConversation( true ) );
|
||||
}
|
||||
else if ( UzeraanTurmoilQuest.HasLostDaemonBlood( player ) )
|
||||
{
|
||||
qs.AddConversation( new LostDaemonBloodConversation() );
|
||||
}
|
||||
else if ( UzeraanTurmoilQuest.HasLostDaemonBone( player ) )
|
||||
{
|
||||
qs.AddConversation( new LostDaemonBoneConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( player.Profession == 2 ) // magician
|
||||
{
|
||||
Container backpack = player.Backpack;
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( backpack == null
|
||||
|| backpack.GetAmount( typeof( BlackPearl ) ) < 30
|
||||
|| backpack.GetAmount( typeof( Bloodmoss ) ) < 30
|
||||
|| backpack.GetAmount( typeof( Garlic ) ) < 30
|
||||
|| backpack.GetAmount( typeof( Ginseng ) ) < 30
|
||||
|| backpack.GetAmount( typeof( MandrakeRoot ) ) < 30
|
||||
|| backpack.GetAmount( typeof( Nightshade ) ) < 30
|
||||
|| backpack.GetAmount( typeof( SulfurousAsh ) ) < 30
|
||||
|| backpack.GetAmount( typeof( SpidersSilk ) ) < 30 )
|
||||
{
|
||||
qs.AddConversation( new FewReagentsConversation() );
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostScrollOfPower(player))
|
||||
{
|
||||
qs.AddConversation(new LostScrollOfPowerConversation(true));
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostFertileDirt(player))
|
||||
{
|
||||
qs.AddConversation(new LostFertileDirtConversation(true));
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostDaemonBlood(player))
|
||||
{
|
||||
qs.AddConversation(new LostDaemonBloodConversation());
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostDaemonBone(player))
|
||||
{
|
||||
qs.AddConversation(new LostDaemonBoneConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
Container backpack = player.Backpack;
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindUzeraanBeginObjective ) );
|
||||
if (backpack == null
|
||||
|| backpack.GetAmount(typeof(BlackPearl)) < 30
|
||||
|| backpack.GetAmount(typeof(Bloodmoss)) < 30
|
||||
|| backpack.GetAmount(typeof(Garlic)) < 30
|
||||
|| backpack.GetAmount(typeof(Ginseng)) < 30
|
||||
|| backpack.GetAmount(typeof(MandrakeRoot)) < 30
|
||||
|| backpack.GetAmount(typeof(Nightshade)) < 30
|
||||
|| backpack.GetAmount(typeof(SulfurousAsh)) < 30
|
||||
|| backpack.GetAmount(typeof(SpidersSilk)) < 30)
|
||||
qs.AddConversation(new FewReagentsConversation());
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( FindUzeraanFirstTaskObjective ) );
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindUzeraanBeginObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( FindUzeraanAboutReportObjective ) );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(FindUzeraanFirstTaskObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(FindUzeraanAboutReportObjective));
|
||||
|
||||
if ( player.Profession == 2 ) // magician
|
||||
{
|
||||
cont.DropItem( new MarkScroll( 5 ) );
|
||||
cont.DropItem( new RecallScroll( 5 ) );
|
||||
for ( int i = 0; i < 5; i++ )
|
||||
{
|
||||
cont.DropItem( new RecallRune() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem( new Gold( 300 ) );
|
||||
for ( int i = 0; i < 6; i++ )
|
||||
{
|
||||
cont.DropItem( new NightSightPotion() );
|
||||
cont.DropItem( new LesserHealPotion() );
|
||||
}
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
if ( !player.PlaceInBackpack( cont ) )
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnScrollOfPowerObjective ) );
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
cont.DropItem(new MarkScroll(5));
|
||||
cont.DropItem(new RecallScroll(5));
|
||||
for (int i = 0; i < 5; i++) cont.DropItem(new RecallRune());
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem(new Gold(300));
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
cont.DropItem(new NightSightPotion());
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049378 ); // Hand me the scroll, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnFertileDirtObjective ) );
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnScrollOfPowerObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049381 ); // Hand me the Fertile Dirt, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnDaemonBloodObjective ) );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049378); // Hand me the scroll, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnFertileDirtObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049379 ); // Hand me the Vial of Blood, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective( typeof( ReturnDaemonBoneObjective ) );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049381); // Hand me the Fertile Dirt, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnDaemonBloodObjective));
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
FocusTo( player );
|
||||
SayTo( player, 1049380 ); // Hand me the Daemon Bone, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( player, 1049357 ); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049379); // Hand me the Vial of Blood, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnDaemonBoneObjective));
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( from is PlayerMobile player )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049380); // Hand me the Daemon Bone, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( dropped is UzeraanTurmoilHorn horn )
|
||||
{
|
||||
if ( player.Young )
|
||||
{
|
||||
if ( horn.Charges < 10 )
|
||||
{
|
||||
SayTo( from, 1049384 ); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 1049385 ); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
|
||||
}
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
return false;
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (dropped is UzeraanTurmoilHorn horn)
|
||||
{
|
||||
if (player.Young)
|
||||
{
|
||||
if (horn.Charges < 10)
|
||||
{
|
||||
SayTo(from, 1049384); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049385); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
|
||||
}
|
||||
|
||||
if ( dropped is SchmendrickScrollOfPower )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReturnScrollOfPowerObjective ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
if (dropped is SchmendrickScrollOfPower)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(ReturnScrollOfPowerObjective));
|
||||
|
||||
cont.DropItem( new TreasureMap( player.Young ? 0 : 1, Map.Trammel ) );
|
||||
cont.DropItem( new Shovel() );
|
||||
cont.DropItem( new UzeraanTurmoilHorn() );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
if ( !player.PlaceInBackpack( cont ) )
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
cont.DropItem(new TreasureMap(player.Young ? 0 : 1, Map.Trammel));
|
||||
cont.DropItem(new Shovel());
|
||||
cont.DropItem(new UzeraanTurmoilHorn());
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( dropped is QuestFertileDirt )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReturnFertileDirtObjective ) );
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestFertileDirt)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(ReturnFertileDirtObjective));
|
||||
|
||||
if ( player.Profession == 2 ) // magician
|
||||
{
|
||||
cont.DropItem( new BlackPearl( 20 ) );
|
||||
cont.DropItem( new Bloodmoss( 20 ) );
|
||||
cont.DropItem( new Garlic( 20 ) );
|
||||
cont.DropItem( new Ginseng( 20 ) );
|
||||
cont.DropItem( new MandrakeRoot( 20 ) );
|
||||
cont.DropItem( new Nightshade( 20 ) );
|
||||
cont.DropItem( new SulfurousAsh( 20 ) );
|
||||
cont.DropItem( new SpidersSilk( 20 ) );
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
for ( int i = 0; i < 3; i++ )
|
||||
cont.DropItem( Loot.RandomScroll( 0, 23, SpellbookType.Regular ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem( new Gold( 300 ) );
|
||||
cont.DropItem( new Bandage( 25 ) );
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
cont.DropItem(new BlackPearl(20));
|
||||
cont.DropItem(new Bloodmoss(20));
|
||||
cont.DropItem(new Garlic(20));
|
||||
cont.DropItem(new Ginseng(20));
|
||||
cont.DropItem(new MandrakeRoot(20));
|
||||
cont.DropItem(new Nightshade(20));
|
||||
cont.DropItem(new SulfurousAsh(20));
|
||||
cont.DropItem(new SpidersSilk(20));
|
||||
|
||||
for ( int i = 0; i < 5; i++ )
|
||||
cont.DropItem( new LesserHealPotion() );
|
||||
}
|
||||
for (int i = 0; i < 3; i++)
|
||||
cont.DropItem(Loot.RandomScroll(0, 23, SpellbookType.Regular));
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem(new Gold(300));
|
||||
cont.DropItem(new Bandage(25));
|
||||
|
||||
if ( !player.PlaceInBackpack( cont ) )
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( dropped is QuestDaemonBlood )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReturnDaemonBloodObjective ) );
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Item reward;
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestDaemonBlood)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBloodObjective));
|
||||
|
||||
if ( player.Profession == 2 ) // magician
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Item reward;
|
||||
|
||||
cont.DropItem( new ExplosionScroll( 4 ) );
|
||||
cont.DropItem( new MagicWizardsHat() );
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
reward = cont;
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseWeapon weapon;
|
||||
switch ( Utility.Random( 6 ) )
|
||||
{
|
||||
case 0: weapon = new Broadsword(); break;
|
||||
case 1: weapon = new Cutlass(); break;
|
||||
case 2: weapon = new Katana(); break;
|
||||
case 3: weapon = new Longsword(); break;
|
||||
case 4: weapon = new Scimitar(); break;
|
||||
default: weapon = new VikingSword(); break;
|
||||
}
|
||||
cont.DropItem(new ExplosionScroll(4));
|
||||
cont.DropItem(new MagicWizardsHat());
|
||||
|
||||
if ( Core.AOS )
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo( weapon, 3, 20, 40 );
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled( 2, 4 );
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled( 2, 4 );
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled( 2, 4 );
|
||||
}
|
||||
reward = cont;
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseWeapon weapon;
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
case 0:
|
||||
weapon = new Broadsword();
|
||||
break;
|
||||
case 1:
|
||||
weapon = new Cutlass();
|
||||
break;
|
||||
case 2:
|
||||
weapon = new Katana();
|
||||
break;
|
||||
case 3:
|
||||
weapon = new Longsword();
|
||||
break;
|
||||
case 4:
|
||||
weapon = new Scimitar();
|
||||
break;
|
||||
default:
|
||||
weapon = new VikingSword();
|
||||
break;
|
||||
}
|
||||
|
||||
weapon.Slayer = SlayerName.Silver;
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 4);
|
||||
}
|
||||
|
||||
reward = weapon;
|
||||
}
|
||||
weapon.Slayer = SlayerName.Silver;
|
||||
|
||||
if ( !player.PlaceInBackpack( reward ) )
|
||||
{
|
||||
reward.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
reward = weapon;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( dropped is QuestDaemonBone )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReturnDaemonBoneObjective ) );
|
||||
if (!player.PlaceInBackpack(reward))
|
||||
{
|
||||
reward.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
cont.DropItem( new BankCheck( 2000 ) );
|
||||
cont.DropItem( new EnchantedSextant() );
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestDaemonBone)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBoneObjective));
|
||||
|
||||
if ( !player.PlaceInBackpack( cont ) )
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
if (obj != null && !obj.Completed)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
cont.DropItem(new BankCheck(2000));
|
||||
cont.DropItem(new EnchantedSextant());
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
base.OnMovement( m, oldLocation );
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
if ( m is PlayerMobile && !m.Frozen && !m.Alive && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
|
||||
{
|
||||
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.CloseGump( typeof( ResurrectGump ) );
|
||||
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
public Uzeraan( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
m.CloseGump(typeof(ResurrectGump));
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,495 +1,435 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class FindUzeraanBeginObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1046039;
|
||||
|
||||
public FindUzeraanBeginObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
if ( System.From.Profession == 5 ) // paladin
|
||||
System.AddConversation( new UzeraanTitheConversation() );
|
||||
else
|
||||
System.AddConversation( new UzeraanFirstTaskConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class TitheGoldObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060386;
|
||||
|
||||
private int m_OldTithingPoints;
|
||||
|
||||
public TitheGoldObjective()
|
||||
{
|
||||
m_OldTithingPoints = -1;
|
||||
}
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
PlayerMobile pm = System.From;
|
||||
int curTithingPoints = pm.TithingPoints;
|
||||
|
||||
if ( curTithingPoints >= 500 )
|
||||
Complete();
|
||||
else if ( curTithingPoints > m_OldTithingPoints && m_OldTithingPoints >= 0 )
|
||||
pm.SendLocalizedMessage( 1060240, "", 0x41 ); // You must have at least 500 tithing points before you can continue in your quest.
|
||||
|
||||
m_OldTithingPoints = curTithingPoints;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new FindUzeraanFirstTaskObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindUzeraanFirstTaskObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060387;
|
||||
|
||||
public FindUzeraanFirstTaskObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanFirstTaskConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public enum KillHordeMinionsStep
|
||||
{
|
||||
First,
|
||||
LearnKarma,
|
||||
Others
|
||||
}
|
||||
|
||||
public class KillHordeMinionsObjective : QuestObjective
|
||||
{
|
||||
public KillHordeMinionsStep Step { get; private set; }
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
switch ( Step )
|
||||
{
|
||||
case KillHordeMinionsStep.First:
|
||||
/* Find the mountain pass beyond the house which lies at the
|
||||
* end of the runic road.<BR><BR>
|
||||
*
|
||||
* Assist the city Militia by slaying <I>Horde Minions</I>
|
||||
*/
|
||||
return 1049089;
|
||||
|
||||
case KillHordeMinionsStep.LearnKarma:
|
||||
/* You have just gained some <a href="?ForceTopic45">Karma</a>
|
||||
* for killing the horde minion. <a href="?ForceTopic134">Learn</a>
|
||||
* how this affects your Paladin abilities.
|
||||
*/
|
||||
return 1060389;
|
||||
|
||||
default:
|
||||
// Continue driving back the Horde Minions, as Uzeraan instructed you to do.
|
||||
return 1060507;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int MaxProgress
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( System.From.Profession == 5 ) // paladin
|
||||
{
|
||||
switch ( Step )
|
||||
{
|
||||
case KillHordeMinionsStep.First: return 1;
|
||||
case KillHordeMinionsStep.LearnKarma: return 2;
|
||||
default: return 5;
|
||||
}
|
||||
}
|
||||
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Completed
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( Step == KillHordeMinionsStep.LearnKarma && HasBeenRead )
|
||||
return true;
|
||||
return base.Completed;
|
||||
}
|
||||
}
|
||||
|
||||
public KillHordeMinionsObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public KillHordeMinionsObjective( KillHordeMinionsStep step )
|
||||
{
|
||||
Step = step;
|
||||
}
|
||||
|
||||
public override void RenderProgress( BaseQuestGump gump )
|
||||
{
|
||||
if ( !Completed )
|
||||
{
|
||||
gump.AddHtmlObject( 70, 260, 270, 100, 1049090, BaseQuestGump.Blue, false, false ); // Horde Minions killed:
|
||||
gump.AddLabel( 70, 280, 0x64, CurProgress.ToString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress( gump );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
CheckCompletionStatus();
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection( Mobile from )
|
||||
{
|
||||
// This restriction continues until the quest is ended
|
||||
if ( from is HordeMinion && from.Map == Map.Trammel && from.X >= 3314 && from.X <= 3814 && from.Y >= 2345 && from.Y <= 3095 ) // Haven island
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnKill( BaseCreature creature, Container corpse )
|
||||
{
|
||||
if ( creature is HordeMinion && corpse.Map == Map.Trammel && corpse.X >= 3314 && corpse.X <= 3814 && corpse.Y >= 2345 && corpse.Y <= 3095 ) // Haven island
|
||||
{
|
||||
if ( CurProgress == 0 )
|
||||
System.From.Send( new DisplayHelpTopic( 29, false ) ); // HEALING
|
||||
|
||||
CurProgress++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
if ( System.From.Profession == 5 )
|
||||
{
|
||||
switch ( Step )
|
||||
{
|
||||
case KillHordeMinionsStep.First:
|
||||
{
|
||||
QuestObjective obj = new KillHordeMinionsObjective( KillHordeMinionsStep.LearnKarma );
|
||||
System.AddObjective( obj );
|
||||
obj.CurProgress = CurProgress;
|
||||
break;
|
||||
}
|
||||
case KillHordeMinionsStep.LearnKarma:
|
||||
{
|
||||
QuestObjective obj = new KillHordeMinionsObjective( KillHordeMinionsStep.Others );
|
||||
System.AddObjective( obj );
|
||||
obj.CurProgress = CurProgress;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
System.AddObjective( new FindUzeraanAboutReportObjective() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.AddObjective( new FindUzeraanAboutReportObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
Step = (KillHordeMinionsStep) reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) Step );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindUzeraanAboutReportObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049091;
|
||||
|
||||
public FindUzeraanAboutReportObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanReportConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindSchmendrickObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049120;
|
||||
|
||||
public FindSchmendrickObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection( Mobile from )
|
||||
{
|
||||
// This restriction begins when this objective is completed, and continues until the quest is ended
|
||||
if ( Completed && from is RestlessSoul && from.Map == Map.Trammel && from.X >= 5199 && from.X <= 5271 && from.Y >= 1812 && from.Y <= 1865 ) // Schmendrick's cave
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new SchmendrickConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindApprenticeObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049323;
|
||||
|
||||
public FindApprenticeObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new ReturnScrollOfPowerObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnScrollOfPowerObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049324;
|
||||
|
||||
public ReturnScrollOfPowerObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanScrollOfPowerConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class FindDryadObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049358;
|
||||
|
||||
public FindDryadObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new DryadConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnFertileDirtObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049327;
|
||||
|
||||
public ReturnFertileDirtObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanFertileDirtConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class GetDaemonBloodObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049361;
|
||||
|
||||
private bool m_Ambushed;
|
||||
|
||||
public GetDaemonBloodObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
PlayerMobile player = System.From;
|
||||
|
||||
if ( !m_Ambushed && player.Map == Map.Trammel && player.InRange( new Point3D( 3456, 2558, 50 ), 30 ) )
|
||||
{
|
||||
int x = player.X - 1;
|
||||
int y = player.Y - 2;
|
||||
int z = Map.Trammel.GetAverageZ( x, y );
|
||||
|
||||
if ( Map.Trammel.CanSpawnMobile( x, y, z ) )
|
||||
{
|
||||
m_Ambushed = true;
|
||||
|
||||
player.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1049330 ); // You have been ambushed! Fight for your honor!!!
|
||||
|
||||
BaseCreature creature = new HordeMinion();
|
||||
creature.MoveToWorld( new Point3D( x, y, z ), Map.Trammel );
|
||||
creature.Combatant = player;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new ReturnDaemonBloodObjective() );
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Ambushed = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.Write( (bool) m_Ambushed );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnDaemonBloodObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049332;
|
||||
|
||||
public ReturnDaemonBloodObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanDaemonBloodConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class GetDaemonBoneObjective : QuestObjective
|
||||
{
|
||||
public Container CorpseWithBone { get; set; }
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( System.From.Profession == 5 )
|
||||
{
|
||||
/* Use your <a href="?ForceTopic108">Sacred Journey</a>
|
||||
* ability on the rune to the <a href="?ForceTopic13">North</a>
|
||||
* of Uzeraan to travel to the graveyard.
|
||||
*/
|
||||
return 1060755;
|
||||
}
|
||||
|
||||
/* Use Uzeraan's teleporter to get to the Haunted graveyard.<BR><BR>
|
||||
*
|
||||
* Slay the undead until you find a <I>Daemon Bone</I>.
|
||||
*/
|
||||
return 1049362;
|
||||
}
|
||||
}
|
||||
|
||||
public GetDaemonBoneObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective( new ReturnDaemonBoneObjective() );
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection( Mobile from )
|
||||
{
|
||||
// This restriction continues until the end of the quest
|
||||
if ( ( from is Zombie || from is Skeleton ) && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 && from.Y >= 2639 && from.Y <= 2664 ) // Haven graveyard
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool GetKillEvent( BaseCreature creature, Container corpse )
|
||||
{
|
||||
if ( base.GetKillEvent( creature, corpse ) )
|
||||
return true;
|
||||
|
||||
return UzeraanTurmoilQuest.HasLostDaemonBone( System.From );
|
||||
}
|
||||
|
||||
public override void OnKill( BaseCreature creature, Container corpse )
|
||||
{
|
||||
if ( ( creature is Zombie || creature is Skeleton ) && corpse.Map == Map.Trammel && corpse.X >= 3391 && corpse.X <= 3424 && corpse.Y >= 2639 && corpse.Y <= 2664 ) // Haven graveyard
|
||||
{
|
||||
if ( Utility.RandomDouble() < 0.25 )
|
||||
CorpseWithBone = corpse;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
CorpseWithBone = (Container) reader.ReadItem();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
if ( CorpseWithBone != null && CorpseWithBone.Deleted )
|
||||
CorpseWithBone = null;
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Item) CorpseWithBone );
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnDaemonBoneObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049334;
|
||||
|
||||
public ReturnDaemonBoneObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new UzeraanDaemonBoneConversation() );
|
||||
}
|
||||
}
|
||||
|
||||
public class CashBankCheckObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049336;
|
||||
|
||||
public CashBankCheckObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation( new BankerConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
public class FindUzeraanBeginObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1046039;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
if (System.From.Profession == 5) // paladin
|
||||
System.AddConversation(new UzeraanTitheConversation());
|
||||
else
|
||||
System.AddConversation(new UzeraanFirstTaskConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class TitheGoldObjective : QuestObjective
|
||||
{
|
||||
private int m_OldTithingPoints;
|
||||
|
||||
public TitheGoldObjective()
|
||||
{
|
||||
m_OldTithingPoints = -1;
|
||||
}
|
||||
|
||||
public override object Message => 1060386;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
PlayerMobile pm = System.From;
|
||||
int curTithingPoints = pm.TithingPoints;
|
||||
|
||||
if (curTithingPoints >= 500)
|
||||
Complete();
|
||||
else if (curTithingPoints > m_OldTithingPoints && m_OldTithingPoints >= 0)
|
||||
pm.SendLocalizedMessage(1060240, "",
|
||||
0x41); // You must have at least 500 tithing points before you can continue in your quest.
|
||||
|
||||
m_OldTithingPoints = curTithingPoints;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new FindUzeraanFirstTaskObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindUzeraanFirstTaskObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060387;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanFirstTaskConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public enum KillHordeMinionsStep
|
||||
{
|
||||
First,
|
||||
LearnKarma,
|
||||
Others
|
||||
}
|
||||
|
||||
public class KillHordeMinionsObjective : QuestObjective
|
||||
{
|
||||
public KillHordeMinionsObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public KillHordeMinionsObjective(KillHordeMinionsStep step)
|
||||
{
|
||||
Step = step;
|
||||
}
|
||||
|
||||
public KillHordeMinionsStep Step{ get; private set; }
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Step)
|
||||
{
|
||||
case KillHordeMinionsStep.First:
|
||||
/* Find the mountain pass beyond the house which lies at the
|
||||
* end of the runic road.<BR><BR>
|
||||
*
|
||||
* Assist the city Militia by slaying <I>Horde Minions</I>
|
||||
*/
|
||||
return 1049089;
|
||||
|
||||
case KillHordeMinionsStep.LearnKarma:
|
||||
/* You have just gained some <a href="?ForceTopic45">Karma</a>
|
||||
* for killing the horde minion. <a href="?ForceTopic134">Learn</a>
|
||||
* how this affects your Paladin abilities.
|
||||
*/
|
||||
return 1060389;
|
||||
|
||||
default:
|
||||
// Continue driving back the Horde Minions, as Uzeraan instructed you to do.
|
||||
return 1060507;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int MaxProgress
|
||||
{
|
||||
get
|
||||
{
|
||||
if (System.From.Profession == 5) // paladin
|
||||
switch (Step)
|
||||
{
|
||||
case KillHordeMinionsStep.First: return 1;
|
||||
case KillHordeMinionsStep.LearnKarma: return 2;
|
||||
default: return 5;
|
||||
}
|
||||
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Completed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Step == KillHordeMinionsStep.LearnKarma && HasBeenRead)
|
||||
return true;
|
||||
return base.Completed;
|
||||
}
|
||||
}
|
||||
|
||||
public override void RenderProgress(BaseQuestGump gump)
|
||||
{
|
||||
if (!Completed)
|
||||
{
|
||||
gump.AddHtmlObject(70, 260, 270, 100, 1049090, BaseQuestGump.Blue, false, false); // Horde Minions killed:
|
||||
gump.AddLabel(70, 280, 0x64, CurProgress.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress(gump);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
CheckCompletionStatus();
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection(Mobile from)
|
||||
{
|
||||
// This restriction continues until the quest is ended
|
||||
if (from is HordeMinion && from.Map == Map.Trammel && from.X >= 3314 && from.X <= 3814 && from.Y >= 2345 &&
|
||||
from.Y <= 3095) // Haven island
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is HordeMinion && corpse.Map == Map.Trammel && corpse.X >= 3314 && corpse.X <= 3814 &&
|
||||
corpse.Y >= 2345 && corpse.Y <= 3095) // Haven island
|
||||
{
|
||||
if (CurProgress == 0)
|
||||
System.From.Send(new DisplayHelpTopic(29, false)); // HEALING
|
||||
|
||||
CurProgress++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
if (System.From.Profession == 5)
|
||||
switch (Step)
|
||||
{
|
||||
case KillHordeMinionsStep.First:
|
||||
{
|
||||
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.LearnKarma);
|
||||
System.AddObjective(obj);
|
||||
obj.CurProgress = CurProgress;
|
||||
break;
|
||||
}
|
||||
case KillHordeMinionsStep.LearnKarma:
|
||||
{
|
||||
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.Others);
|
||||
System.AddObjective(obj);
|
||||
obj.CurProgress = CurProgress;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
System.AddObjective(new FindUzeraanAboutReportObjective());
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
System.AddObjective(new FindUzeraanAboutReportObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
Step = (KillHordeMinionsStep)reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.WriteEncodedInt((int)Step);
|
||||
}
|
||||
}
|
||||
|
||||
public class FindUzeraanAboutReportObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049091;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanReportConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindSchmendrickObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049120;
|
||||
|
||||
public override bool IgnoreYoungProtection(Mobile from)
|
||||
{
|
||||
// This restriction begins when this objective is completed, and continues until the quest is ended
|
||||
if (Completed && from is RestlessSoul && from.Map == Map.Trammel && from.X >= 5199 && from.X <= 5271 &&
|
||||
from.Y >= 1812 && from.Y <= 1865) // Schmendrick's cave
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SchmendrickConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindApprenticeObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049323;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new ReturnScrollOfPowerObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnScrollOfPowerObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049324;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanScrollOfPowerConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindDryadObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049358;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new DryadConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnFertileDirtObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049327;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanFertileDirtConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class GetDaemonBloodObjective : QuestObjective
|
||||
{
|
||||
private bool m_Ambushed;
|
||||
|
||||
public override object Message => 1049361;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
PlayerMobile player = System.From;
|
||||
|
||||
if (!m_Ambushed && player.Map == Map.Trammel && player.InRange(new Point3D(3456, 2558, 50), 30))
|
||||
{
|
||||
int x = player.X - 1;
|
||||
int y = player.Y - 2;
|
||||
int z = Map.Trammel.GetAverageZ(x, y);
|
||||
|
||||
if (Map.Trammel.CanSpawnMobile(x, y, z))
|
||||
{
|
||||
m_Ambushed = true;
|
||||
|
||||
player.LocalOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1049330); // You have been ambushed! Fight for your honor!!!
|
||||
|
||||
BaseCreature creature = new HordeMinion();
|
||||
creature.MoveToWorld(new Point3D(x, y, z), Map.Trammel);
|
||||
creature.Combatant = player;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new ReturnDaemonBloodObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Ambushed = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_Ambushed);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnDaemonBloodObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049332;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanDaemonBloodConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class GetDaemonBoneObjective : QuestObjective
|
||||
{
|
||||
public Container CorpseWithBone{ get; set; }
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (System.From.Profession == 5) return 1060755;
|
||||
|
||||
/* Use Uzeraan's teleporter to get to the Haunted graveyard.<BR><BR>
|
||||
*
|
||||
* Slay the undead until you find a <I>Daemon Bone</I>.
|
||||
*/
|
||||
return 1049362;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new ReturnDaemonBoneObjective());
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection(Mobile from)
|
||||
{
|
||||
// This restriction continues until the end of the quest
|
||||
if ((from is Zombie || from is Skeleton) && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 &&
|
||||
from.Y >= 2639 && from.Y <= 2664) // Haven graveyard
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool GetKillEvent(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (base.GetKillEvent(creature, corpse))
|
||||
return true;
|
||||
|
||||
return UzeraanTurmoilQuest.HasLostDaemonBone(System.From);
|
||||
}
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if ((creature is Zombie || creature is Skeleton) && corpse.Map == Map.Trammel && corpse.X >= 3391 &&
|
||||
corpse.X <= 3424 && corpse.Y >= 2639 && corpse.Y <= 2664) // Haven graveyard
|
||||
if (Utility.RandomDouble() < 0.25)
|
||||
CorpseWithBone = corpse;
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
CorpseWithBone = (Container)reader.ReadItem();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
if (CorpseWithBone != null && CorpseWithBone.Deleted)
|
||||
CorpseWithBone = null;
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(CorpseWithBone);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnDaemonBoneObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049334;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UzeraanDaemonBoneConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class CashBankCheckObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1049336;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new BankerConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,179 +3,165 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class UzeraanTurmoilQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable = {
|
||||
typeof( AcceptConversation ),
|
||||
typeof( UzeraanTitheConversation ),
|
||||
typeof( UzeraanFirstTaskConversation ),
|
||||
typeof( UzeraanReportConversation ),
|
||||
typeof( SchmendrickConversation ),
|
||||
typeof( UzeraanScrollOfPowerConversation ),
|
||||
typeof( DryadConversation ),
|
||||
typeof( UzeraanFertileDirtConversation ),
|
||||
typeof( UzeraanDaemonBloodConversation ),
|
||||
typeof( UzeraanDaemonBoneConversation ),
|
||||
typeof( BankerConversation ),
|
||||
typeof( RadarConversation ),
|
||||
typeof( LostScrollOfPowerConversation ),
|
||||
typeof( LostFertileDirtConversation ),
|
||||
typeof( DryadAppleConversation ),
|
||||
typeof( LostDaemonBloodConversation ),
|
||||
typeof( LostDaemonBoneConversation ),
|
||||
typeof( FindUzeraanBeginObjective ),
|
||||
typeof( TitheGoldObjective ),
|
||||
typeof( FindUzeraanFirstTaskObjective ),
|
||||
typeof( KillHordeMinionsObjective ),
|
||||
typeof( FindUzeraanAboutReportObjective ),
|
||||
typeof( FindSchmendrickObjective ),
|
||||
typeof( FindApprenticeObjective ),
|
||||
typeof( ReturnScrollOfPowerObjective ),
|
||||
typeof( FindDryadObjective ),
|
||||
typeof( ReturnFertileDirtObjective ),
|
||||
typeof( GetDaemonBloodObjective ),
|
||||
typeof( ReturnDaemonBloodObjective ),
|
||||
typeof( GetDaemonBoneObjective ),
|
||||
typeof( ReturnDaemonBoneObjective ),
|
||||
typeof( CashBankCheckObjective ),
|
||||
typeof( FewReagentsConversation )
|
||||
};
|
||||
public class UzeraanTurmoilQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable =
|
||||
{
|
||||
typeof(AcceptConversation),
|
||||
typeof(UzeraanTitheConversation),
|
||||
typeof(UzeraanFirstTaskConversation),
|
||||
typeof(UzeraanReportConversation),
|
||||
typeof(SchmendrickConversation),
|
||||
typeof(UzeraanScrollOfPowerConversation),
|
||||
typeof(DryadConversation),
|
||||
typeof(UzeraanFertileDirtConversation),
|
||||
typeof(UzeraanDaemonBloodConversation),
|
||||
typeof(UzeraanDaemonBoneConversation),
|
||||
typeof(BankerConversation),
|
||||
typeof(RadarConversation),
|
||||
typeof(LostScrollOfPowerConversation),
|
||||
typeof(LostFertileDirtConversation),
|
||||
typeof(DryadAppleConversation),
|
||||
typeof(LostDaemonBloodConversation),
|
||||
typeof(LostDaemonBoneConversation),
|
||||
typeof(FindUzeraanBeginObjective),
|
||||
typeof(TitheGoldObjective),
|
||||
typeof(FindUzeraanFirstTaskObjective),
|
||||
typeof(KillHordeMinionsObjective),
|
||||
typeof(FindUzeraanAboutReportObjective),
|
||||
typeof(FindSchmendrickObjective),
|
||||
typeof(FindApprenticeObjective),
|
||||
typeof(ReturnScrollOfPowerObjective),
|
||||
typeof(FindDryadObjective),
|
||||
typeof(ReturnFertileDirtObjective),
|
||||
typeof(GetDaemonBloodObjective),
|
||||
typeof(ReturnDaemonBloodObjective),
|
||||
typeof(GetDaemonBoneObjective),
|
||||
typeof(ReturnDaemonBoneObjective),
|
||||
typeof(CashBankCheckObjective),
|
||||
typeof(FewReagentsConversation)
|
||||
};
|
||||
|
||||
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
|
||||
private bool m_HasLeftTheMansion;
|
||||
|
||||
public override object Name => 1049007;
|
||||
public UzeraanTurmoilQuest(PlayerMobile from) : base(from)
|
||||
{
|
||||
}
|
||||
|
||||
public override object OfferMessage => 1049008;
|
||||
// Serialization
|
||||
public UzeraanTurmoilQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
|
||||
public override bool IsTutorial => true;
|
||||
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
|
||||
|
||||
public override int Picture
|
||||
{
|
||||
get
|
||||
{
|
||||
switch ( From.Profession )
|
||||
{
|
||||
case 1: return 0x15C9; // warrior
|
||||
case 2: return 0x15C1; // magician
|
||||
default: return 0x15D3; // paladin
|
||||
}
|
||||
}
|
||||
}
|
||||
public override object Name => 1049007;
|
||||
|
||||
private bool m_HasLeftTheMansion;
|
||||
public override object OfferMessage => 1049008;
|
||||
|
||||
public override void Slice()
|
||||
{
|
||||
if ( !m_HasLeftTheMansion && ( From.Map != Map.Trammel || From.X < 3573 || From.X > 3611 || From.Y < 2568 || From.Y > 2606 ) )
|
||||
{
|
||||
m_HasLeftTheMansion = true;
|
||||
AddConversation( new RadarConversation() );
|
||||
}
|
||||
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
|
||||
public override bool IsTutorial => true;
|
||||
|
||||
base.Slice();
|
||||
}
|
||||
public override int Picture
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (From.Profession)
|
||||
{
|
||||
case 1: return 0x15C9; // warrior
|
||||
case 2: return 0x15C1; // magician
|
||||
default: return 0x15D3; // paladin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UzeraanTurmoilQuest( PlayerMobile from ) : base( from )
|
||||
{
|
||||
}
|
||||
public override void Slice()
|
||||
{
|
||||
if (!m_HasLeftTheMansion &&
|
||||
(From.Map != Map.Trammel || From.X < 3573 || From.X > 3611 || From.Y < 2568 || From.Y > 2606))
|
||||
{
|
||||
m_HasLeftTheMansion = true;
|
||||
AddConversation(new RadarConversation());
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public UzeraanTurmoilQuest()
|
||||
{
|
||||
}
|
||||
base.Slice();
|
||||
}
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation( new AcceptConversation() );
|
||||
}
|
||||
AddConversation(new AcceptConversation());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_HasLeftTheMansion = reader.ReadBool();
|
||||
}
|
||||
m_HasLeftTheMansion = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write( (bool) m_HasLeftTheMansion );
|
||||
}
|
||||
writer.Write(m_HasLeftTheMansion);
|
||||
}
|
||||
|
||||
public static bool HasLostScrollOfPower( Mobile from )
|
||||
{
|
||||
if ( !(from is PlayerMobile pm) )
|
||||
return false;
|
||||
public static bool HasLostScrollOfPower(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( ReturnScrollOfPowerObjective ) ) )
|
||||
{
|
||||
return ( from.Backpack?.FindItemByType( typeof( SchmendrickScrollOfPower ) ) == null );
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnScrollOfPowerObjective)))
|
||||
return from.Backpack?.FindItemByType(typeof(SchmendrickScrollOfPower)) == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool HasLostFertileDirt( Mobile from )
|
||||
{
|
||||
if ( !(from is PlayerMobile pm) )
|
||||
return false;
|
||||
public static bool HasLostFertileDirt(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( ReturnFertileDirtObjective ) ) )
|
||||
{
|
||||
return ( from.Backpack?.FindItemByType( typeof( QuestFertileDirt ) ) == null );
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnFertileDirtObjective)))
|
||||
return from.Backpack?.FindItemByType(typeof(QuestFertileDirt)) == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool HasLostDaemonBlood( Mobile from )
|
||||
{
|
||||
if ( !(from is PlayerMobile pm) )
|
||||
return false;
|
||||
public static bool HasLostDaemonBlood(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( ReturnDaemonBloodObjective ) ) )
|
||||
{
|
||||
return ( from.Backpack?.FindItemByType( typeof( QuestDaemonBlood ) ) == null );
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnDaemonBloodObjective)))
|
||||
return from.Backpack?.FindItemByType(typeof(QuestDaemonBlood)) == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool HasLostDaemonBone( Mobile from )
|
||||
{
|
||||
if ( !(from is PlayerMobile pm) )
|
||||
return false;
|
||||
public static bool HasLostDaemonBone(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is UzeraanTurmoilQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( ReturnDaemonBoneObjective ) ) )
|
||||
{
|
||||
return ( from.Backpack?.FindItemByType( typeof( QuestDaemonBone ) ) == null );
|
||||
}
|
||||
}
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnDaemonBoneObjective)))
|
||||
return from.Backpack?.FindItemByType(typeof(QuestDaemonBone)) == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue