#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
93
Scripts/Engines/Quests/The Summoning/Conversations.cs
Normal file
93
Scripts/Engines/Quests/The Summoning/Conversations.cs
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class AcceptConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* You have accepted Victoria's help. She requires 1000 Daemon
|
||||
* bones to summon the devourer.<BR><BR>
|
||||
*
|
||||
* You may hand Victoria the bones as you collect them and she
|
||||
* will keep count of how many you have brought her.<BR><BR>
|
||||
*
|
||||
* Daemon bones can be collected via various means throughout
|
||||
* Dungeon Doom.<BR><BR>
|
||||
*
|
||||
* Good luck.
|
||||
*/
|
||||
return 1050027;
|
||||
}
|
||||
}
|
||||
|
||||
public AcceptConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective( new CollectBonesObjective() );
|
||||
}
|
||||
}
|
||||
|
||||
public class VanquishDaemonConversation : QuestConversation
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Well done brave soul. I shall summon the beast to the circle
|
||||
* of stones just South-East of here. Take great care - the beast
|
||||
* takes many forms. Now hurry...
|
||||
*/
|
||||
return 1050021;
|
||||
}
|
||||
}
|
||||
|
||||
public VanquishDaemonConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
Victoria victoria = ((TheSummoningQuest)System).Victoria;
|
||||
|
||||
if ( victoria == null )
|
||||
{
|
||||
System.From.SendMessage( "Internal error: unable to find Victoria. Quest unable to continue." );
|
||||
System.Cancel();
|
||||
}
|
||||
else
|
||||
{
|
||||
SummoningAltar altar = victoria.Altar;
|
||||
|
||||
if ( altar == null )
|
||||
{
|
||||
System.From.SendMessage( "Internal error: unable to find summoning altar. Quest unable to continue." );
|
||||
System.Cancel();
|
||||
}
|
||||
else if ( altar.Daemon == null || !altar.Daemon.Alive )
|
||||
{
|
||||
BoneDemon daemon = new BoneDemon();
|
||||
|
||||
daemon.MoveToWorld( altar.Location, altar.Map );
|
||||
altar.Daemon = daemon;
|
||||
|
||||
System.AddObjective( new VanquishDaemonObjective( daemon ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
victoria.SayTo( System.From, "The devourer has already been summoned." );
|
||||
|
||||
((TheSummoningQuest)System).WaitForSummon = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs
Normal file
135
Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class BellOfTheDead : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1050018; } } // bell of the dead
|
||||
|
||||
[Constructable]
|
||||
public BellOfTheDead() : base( 0x91A )
|
||||
{
|
||||
Hue = 0x835;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
private Chyloth m_Chyloth;
|
||||
private SkeletalDragon m_Dragon;
|
||||
private bool m_Summoning;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public Chyloth Chyloth
|
||||
{
|
||||
get{ return m_Chyloth; }
|
||||
set{ m_Chyloth = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public SkeletalDragon Dragon
|
||||
{
|
||||
get{ return m_Dragon; }
|
||||
set{ m_Dragon = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public bool Summoning
|
||||
{
|
||||
get{ return m_Summoning; }
|
||||
set{ m_Summoning = value; }
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
BeginSummon( from );
|
||||
else
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
|
||||
public virtual void BeginSummon( Mobile from )
|
||||
{
|
||||
if ( m_Chyloth != null && !m_Chyloth.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050010 ); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if ( m_Dragon != null && !m_Dragon.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050017 ); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if ( !m_Summoning )
|
||||
{
|
||||
m_Summoning = true;
|
||||
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x100 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 8.0 ), new TimerStateCallback( EndSummon ), from );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EndSummon( object state )
|
||||
{
|
||||
Mobile from = (Mobile)state;
|
||||
|
||||
if ( m_Chyloth != null && !m_Chyloth.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050010 ); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if ( m_Dragon != null && !m_Dragon.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050017 ); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if ( m_Summoning )
|
||||
{
|
||||
m_Summoning = false;
|
||||
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
||||
loc.Z -= 16;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( loc, Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
|
||||
Effects.PlaySound( loc, Map, 0x1FE );
|
||||
|
||||
m_Chyloth = new Chyloth();
|
||||
|
||||
m_Chyloth.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo( loc )));
|
||||
m_Chyloth.MoveToWorld( loc, Map );
|
||||
|
||||
m_Chyloth.Bell = this;
|
||||
m_Chyloth.AngryAt = from;
|
||||
m_Chyloth.BeginGiveWarning();
|
||||
m_Chyloth.BeginRemove( TimeSpan.FromSeconds( 40.0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public BellOfTheDead( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Chyloth );
|
||||
writer.Write( (Mobile) m_Dragon );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Chyloth = reader.ReadMobile() as Chyloth;
|
||||
m_Dragon = reader.ReadMobile() as SkeletalDragon;
|
||||
|
||||
if ( m_Chyloth != null )
|
||||
m_Chyloth.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Scripts/Engines/Quests/The Summoning/Items/ChylothShroud.cs
Normal file
32
Scripts/Engines/Quests/The Summoning/Items/ChylothShroud.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothShroud : Item
|
||||
{
|
||||
[Constructable]
|
||||
public ChylothShroud() : base( 0x204E )
|
||||
{
|
||||
Hue = 0x846;
|
||||
Layer = Layer.OuterTorso;
|
||||
}
|
||||
|
||||
public ChylothShroud( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Engines/Quests/The Summoning/Items/ChylothStaff.cs
Normal file
35
Scripts/Engines/Quests/The Summoning/Items/ChylothStaff.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothStaff : BlackStaff
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041111; } } // a magic staff
|
||||
|
||||
[Constructable]
|
||||
public ChylothStaff()
|
||||
{
|
||||
Hue = 0x482;
|
||||
}
|
||||
|
||||
public ChylothStaff( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Engines/Quests/The Summoning/Items/GoldenSkull.cs
Normal file
35
Scripts/Engines/Quests/The Summoning/Items/GoldenSkull.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GoldenSkull : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061619; } } // a golden skull
|
||||
|
||||
[Constructable]
|
||||
public GoldenSkull() : base( Utility.Random( 0x1AE2, 3 ) )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8A5;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GoldenSkull( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Engines/Quests/The Summoning/Items/GrandGrimoire.cs
Normal file
36
Scripts/Engines/Quests/The Summoning/Items/GrandGrimoire.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GrandGrimoire : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1060801; } } // The Grand Grimoire
|
||||
|
||||
[Constructable]
|
||||
public GrandGrimoire() : base( 0xEFA )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x835;
|
||||
Layer = Layer.OneHanded;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GrandGrimoire( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs
Normal file
64
Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class SummoningAltar : AbbatoirAddon
|
||||
{
|
||||
private BoneDemon m_Daemon;
|
||||
|
||||
public BoneDemon Daemon
|
||||
{
|
||||
get{ return m_Daemon; }
|
||||
set
|
||||
{
|
||||
m_Daemon = value;
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckDaemon()
|
||||
{
|
||||
if ( m_Daemon == null || !m_Daemon.Alive )
|
||||
{
|
||||
m_Daemon = null;
|
||||
Hue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0x66D;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummoningAltar()
|
||||
{
|
||||
}
|
||||
|
||||
public SummoningAltar( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Daemon );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Daemon = reader.ReadMobile() as BoneDemon;
|
||||
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
}
|
||||
323
Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs
Normal file
323
Scripts/Engines/Quests/The Summoning/Mobiles/Chyloth.cs
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.PartySystem;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class Chyloth : BaseQuester
|
||||
{
|
||||
[Constructable]
|
||||
public Chyloth() : base( "the Ferryman" )
|
||||
{
|
||||
}
|
||||
|
||||
public Chyloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Hue = 0x8455;
|
||||
Body = 0x190;
|
||||
|
||||
Name = "Chyloth";
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
EquipItem( new ChylothShroud() );
|
||||
EquipItem( new ChylothStaff() );
|
||||
}
|
||||
|
||||
private Mobile m_AngryAt;
|
||||
private BellOfTheDead m_Bell;
|
||||
|
||||
public BellOfTheDead Bell
|
||||
{
|
||||
get{ return m_Bell; }
|
||||
set{ m_Bell = value; }
|
||||
}
|
||||
|
||||
public Mobile AngryAt
|
||||
{
|
||||
get{ return m_AngryAt; }
|
||||
set{ m_AngryAt = value; }
|
||||
}
|
||||
|
||||
public virtual void BeginGiveWarning()
|
||||
{
|
||||
if ( Deleted || m_AngryAt == null )
|
||||
return;
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 4.0 ), new TimerCallback( EndGiveWarning ) );
|
||||
}
|
||||
|
||||
public virtual void EndGiveWarning()
|
||||
{
|
||||
if ( Deleted || m_AngryAt == null )
|
||||
return;
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1050013, m_AngryAt.Name ); // You have summoned me in vain ~1_NAME~! Only the dead may cross!
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1050014 ); // Why have you disturbed me, mortal?!?
|
||||
|
||||
BeginSummonDragon();
|
||||
}
|
||||
|
||||
public virtual void BeginSummonDragon()
|
||||
{
|
||||
if ( Deleted || m_AngryAt == null )
|
||||
return;
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 30.0 ), new TimerCallback( EndSummonDragon ) );
|
||||
}
|
||||
|
||||
public virtual void BeginRemove( TimeSpan delay )
|
||||
{
|
||||
Timer.DelayCall( delay, new TimerCallback( EndRemove ) );
|
||||
}
|
||||
|
||||
public virtual void EndRemove()
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
Point3D loc = this.Location;
|
||||
Map map = this.Map;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( loc, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
|
||||
Effects.PlaySound( loc, map, 0x1FE );
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
private static int[] m_Offsets = new int[]
|
||||
{
|
||||
-1, -1,
|
||||
-1, 0,
|
||||
-1, 1,
|
||||
0, -1,
|
||||
0, 1,
|
||||
1, -1,
|
||||
1, 0,
|
||||
1, 1
|
||||
};
|
||||
|
||||
public virtual void EndSummonDragon()
|
||||
{
|
||||
if ( Deleted || m_AngryAt == null )
|
||||
return;
|
||||
|
||||
Map map = m_AngryAt.Map;
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
|
||||
if ( !m_AngryAt.Region.IsPartOf( "Doom" ) )
|
||||
return;
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1050015 ); // Feel the wrath of my legions!!!
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, false, "MUHAHAHAHA HAHAH HAHA" ); // A wee bit crazy, aren't we?
|
||||
|
||||
SkeletalDragon dragon = new SkeletalDragon();
|
||||
|
||||
int offset = Utility.Random( 8 ) * 2;
|
||||
|
||||
bool foundLoc = false;
|
||||
|
||||
for ( int i = 0; i < m_Offsets.Length; i += 2 )
|
||||
{
|
||||
int x = m_AngryAt.X + m_Offsets[(offset + i) % m_Offsets.Length];
|
||||
int y = m_AngryAt.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
|
||||
|
||||
if ( map.CanSpawnMobile( x, y, m_AngryAt.Z ) )
|
||||
{
|
||||
dragon.MoveToWorld( new Point3D( x, y, m_AngryAt.Z ), map );
|
||||
foundLoc = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
int z = map.GetAverageZ( x, y );
|
||||
|
||||
if ( map.CanSpawnMobile( x, y, z ) )
|
||||
{
|
||||
dragon.MoveToWorld( new Point3D( x, y, z ), map );
|
||||
foundLoc = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !foundLoc )
|
||||
dragon.MoveToWorld( m_AngryAt.Location, map );
|
||||
|
||||
dragon.Combatant = m_AngryAt;
|
||||
|
||||
if ( m_Bell != null )
|
||||
m_Bell.Dragon = dragon;
|
||||
}
|
||||
|
||||
public static void TeleportToFerry( Mobile from )
|
||||
{
|
||||
Point3D loc = new Point3D( 408, 251, 2 );
|
||||
Map map = Map.Malas;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( loc, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
|
||||
Effects.PlaySound( loc, map, 0x1FE );
|
||||
|
||||
BaseCreature.TeleportPets( from, loc, map );
|
||||
|
||||
from.MoveToWorld( loc, map );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( dropped is GoldenSkull )
|
||||
{
|
||||
dropped.Delete();
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1050046, from.Name ); // Very well, ~1_NAME~, I accept your token. You may cross.
|
||||
BeginRemove( TimeSpan.FromSeconds( 4.0 ) );
|
||||
|
||||
Party p = PartySystem.Party.Get( from );
|
||||
|
||||
if ( p != null )
|
||||
{
|
||||
for ( int i = 0; i < p.Members.Count; ++i )
|
||||
{
|
||||
PartyMemberInfo pmi = (PartyMemberInfo)p.Members[i];
|
||||
Mobile member = pmi.Mobile;
|
||||
|
||||
if ( member != from && member.Map == Map.Malas && member.Region.IsPartOf( "Doom" ) )
|
||||
{
|
||||
if ( m_AngryAt == member )
|
||||
m_AngryAt = null;
|
||||
|
||||
member.CloseGump( typeof( ChylothPartyGump ) );
|
||||
member.SendGump( new ChylothPartyGump( from, member ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_AngryAt == from )
|
||||
m_AngryAt = null;
|
||||
|
||||
TeleportToFerry( from );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ChylothPartyGump : Gump
|
||||
{
|
||||
private Mobile m_Leader;
|
||||
private Mobile m_Member;
|
||||
|
||||
public ChylothPartyGump( Mobile leader, Mobile member ) : base( 150, 50 )
|
||||
{
|
||||
m_Leader = leader;
|
||||
m_Member = member;
|
||||
|
||||
Closable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
AddImage( 0, 0, 3600 );
|
||||
|
||||
AddImageTiled( 0, 14, 15, 200, 3603 );
|
||||
AddImageTiled( 380, 14, 14, 200, 3605 );
|
||||
AddImage( 0, 201, 3606 );
|
||||
AddImageTiled( 15, 201, 370, 16, 3607 );
|
||||
AddImageTiled( 15, 0, 370, 16, 3601 );
|
||||
AddImage( 380, 0, 3602 );
|
||||
AddImage( 380, 201, 3608 );
|
||||
AddImageTiled( 15, 15, 365, 190, 2624 );
|
||||
|
||||
AddRadio( 30, 140, 9727, 9730, true, 1 );
|
||||
AddHtmlLocalized( 65, 145, 300, 25, 1050050, 0x7FFF, false, false ); // Yes, let's go!
|
||||
|
||||
AddRadio( 30, 175, 9727, 9730, false, 0 );
|
||||
AddHtmlLocalized( 65, 178, 300, 25, 1050049, 0x7FFF, false, false ); // No thanks, I'd rather stay here.
|
||||
|
||||
AddHtmlLocalized( 30, 20, 360, 35, 1050047, 0x7FFF, false, false ); // Another player has paid Chyloth for your passage across lake Mortis:
|
||||
|
||||
AddHtmlLocalized( 30, 105, 345, 40, 1050048, 0x5B2D, false, false ); // Do you wish to accept their invitation at this time?
|
||||
|
||||
AddImage( 65, 72, 5605 );
|
||||
|
||||
AddImageTiled( 80, 90, 200, 1, 9107 );
|
||||
AddImageTiled( 95, 92, 200, 1, 9157 );
|
||||
|
||||
AddLabel( 90, 70, 1645, leader.Name );
|
||||
|
||||
AddButton( 290, 175, 247, 248, 2, GumpButtonType.Reply, 0 );
|
||||
|
||||
AddImageTiled( 15, 14, 365, 1, 9107 );
|
||||
AddImageTiled( 380, 14, 1, 190, 9105 );
|
||||
AddImageTiled( 15, 205, 365, 1, 9107 );
|
||||
AddImageTiled( 15, 14, 1, 190, 9105 );
|
||||
AddImageTiled( 0, 0, 395, 1, 9157 );
|
||||
AddImageTiled( 394, 0, 1, 217, 9155 );
|
||||
AddImageTiled( 0, 216, 395, 1, 9157 );
|
||||
AddImageTiled( 0, 0, 1, 217, 9155 );
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( info.ButtonID == 2 && info.IsSwitched( 1 ) )
|
||||
{
|
||||
if ( m_Member.Region.IsPartOf( "Doom" ) )
|
||||
{
|
||||
m_Leader.SendLocalizedMessage( 1050054, m_Member.Name ); // ~1_NAME~ has accepted your invitation to cross lake Mortis.
|
||||
|
||||
Chyloth.TeleportToFerry( m_Member );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Member.SendLocalizedMessage( 1050051 ); // The invitation has been revoked.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Member.SendLocalizedMessage( 1050052 ); // You have declined their invitation.
|
||||
m_Leader.SendLocalizedMessage( 1050053, m_Member.Name ); // ~1_NAME~ has declined your invitation to cross lake Mortis.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
164
Scripts/Engines/Quests/The Summoning/Mobiles/Victoria.cs
Normal file
164
Scripts/Engines/Quests/The Summoning/Mobiles/Victoria.cs
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class Victoria : BaseQuester
|
||||
{
|
||||
public override int TalkNumber{ get{ return 6159; } } // Ask about Chyloth
|
||||
public override bool ClickTitle{ get{ return true; } }
|
||||
public override bool IsActiveVendor{ get{ return true; } }
|
||||
public override bool DisallowAllMoves{ get{ return false; } }
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add( new SBMage() );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Victoria() : base( "the Sorceress" )
|
||||
{
|
||||
}
|
||||
|
||||
public Victoria( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats( 100, 100, 25 );
|
||||
|
||||
Female = true;
|
||||
Hue = 0x8835;
|
||||
Body = 0x191;
|
||||
|
||||
Name = "Victoria";
|
||||
}
|
||||
|
||||
private SummoningAltar m_Altar;
|
||||
|
||||
private const int AltarRange = 24;
|
||||
|
||||
public SummoningAltar Altar
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Altar == null || m_Altar.Deleted || m_Altar.Map != this.Map || !Utility.InRange( m_Altar.Location, this.Location, AltarRange ) )
|
||||
{
|
||||
foreach ( Item item in GetItemsInRange( AltarRange ) )
|
||||
{
|
||||
if ( item is SummoningAltar )
|
||||
{
|
||||
m_Altar = (SummoningAltar)item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m_Altar;
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
EquipItem( new GrandGrimoire() );
|
||||
|
||||
EquipItem( SetHue( new Sandals(), 0x455 ) );
|
||||
EquipItem( SetHue( new SkullCap(), 0x455 ) );
|
||||
EquipItem( SetHue( new PlainDress(), 0x455 ) );
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x482;
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is TheSummoningQuest )
|
||||
{
|
||||
if ( dropped is DaemonBone )
|
||||
{
|
||||
DaemonBone bones = (DaemonBone)dropped;
|
||||
|
||||
QuestObjective obj = qs.FindObjective( typeof( CollectBonesObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
int need = obj.MaxProgress - obj.CurProgress;
|
||||
|
||||
if ( bones.Amount < need )
|
||||
{
|
||||
obj.CurProgress += bones.Amount;
|
||||
bones.Delete();
|
||||
|
||||
qs.ShowQuestLogUpdated();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
bones.Consume( need );
|
||||
|
||||
if ( !bones.Deleted )
|
||||
{
|
||||
// TODO: Accurate?
|
||||
SayTo( from, 1050038 ); // You have already given me all the Daemon bones necessary to weave the spell. Keep these for a later time.
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Accurate?
|
||||
SayTo( from, 1050038 ); // You have already given me all the Daemon bones necessary to weave the spell. Keep these for a later time.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
|
||||
public override bool CanTalkTo( PlayerMobile to )
|
||||
{
|
||||
return ( to.Quest == null && QuestSystem.CanOfferQuest( to, typeof( TheSummoningQuest ) ) );
|
||||
}
|
||||
|
||||
public override void OnTalk( PlayerMobile player, bool contextMenu )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs == null && QuestSystem.CanOfferQuest( player, typeof( TheSummoningQuest ) ) )
|
||||
{
|
||||
Direction = GetDirectionTo( player );
|
||||
new TheSummoningQuest( this, player ).SendOffer();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
191
Scripts/Engines/Quests/The Summoning/Objectives.cs
Normal file
191
Scripts/Engines/Quests/The Summoning/Objectives.cs
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class CollectBonesObjective : QuestObjective
|
||||
{
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Find 1000 Daemon bones and hand them
|
||||
* to Victoria as you find them.
|
||||
*/
|
||||
return 1050026;
|
||||
}
|
||||
}
|
||||
|
||||
public override int MaxProgress{ get{ return 1000; } }
|
||||
|
||||
public CollectBonesObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
Victoria victoria = ((TheSummoningQuest)System).Victoria;
|
||||
|
||||
if ( victoria == null )
|
||||
{
|
||||
System.From.SendMessage( "Internal error: unable to find Victoria. Quest unable to continue." );
|
||||
System.Cancel();
|
||||
}
|
||||
else
|
||||
{
|
||||
SummoningAltar altar = victoria.Altar;
|
||||
|
||||
if ( altar == null )
|
||||
{
|
||||
System.From.SendMessage( "Internal error: unable to find summoning altar. Quest unable to continue." );
|
||||
System.Cancel();
|
||||
}
|
||||
else if ( altar.Daemon == null || !altar.Daemon.Alive )
|
||||
{
|
||||
System.AddConversation( new VanquishDaemonConversation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
victoria.SayTo( System.From, "The devourer has already been summoned. Return when the devourer has been slain and I will summon it for you." );
|
||||
((TheSummoningQuest)System).WaitForSummon = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void RenderMessage( BaseQuestGump gump )
|
||||
{
|
||||
if ( CurProgress > 0 && CurProgress < MaxProgress )
|
||||
gump.AddHtmlObject( 70, 130, 300, 100, 1050028, BaseQuestGump.Blue, false, false ); // Victoria has accepted the Daemon bones, but the requirement is not yet met.
|
||||
else
|
||||
base.RenderMessage( gump );
|
||||
}
|
||||
|
||||
public override void RenderProgress( BaseQuestGump gump )
|
||||
{
|
||||
if ( CurProgress > 0 && CurProgress < MaxProgress )
|
||||
{
|
||||
gump.AddHtmlObject( 70, 260, 270, 100, 1050019, BaseQuestGump.Blue, false, false ); // Number of bones collected:
|
||||
|
||||
gump.AddLabel( 70, 280, 100, CurProgress.ToString() );
|
||||
gump.AddLabel( 100, 280, 100, "/" );
|
||||
gump.AddLabel( 130, 280, 100, MaxProgress.ToString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress( gump );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class VanquishDaemonObjective : QuestObjective
|
||||
{
|
||||
private BoneDemon m_Daemon;
|
||||
private Corpse m_CorpseWithSkull;
|
||||
|
||||
public Corpse CorpseWithSkull
|
||||
{
|
||||
get{ return m_CorpseWithSkull; }
|
||||
set{ m_CorpseWithSkull = value; }
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
/* Go forth and vanquish the devourer that has been summoned!
|
||||
*/
|
||||
return 1050037;
|
||||
}
|
||||
}
|
||||
|
||||
public VanquishDaemonObjective( BoneDemon daemon )
|
||||
{
|
||||
m_Daemon = daemon;
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public VanquishDaemonObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if ( m_Daemon == null || !m_Daemon.Alive )
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
Victoria victoria = ((TheSummoningQuest)System).Victoria;
|
||||
|
||||
if ( victoria != null )
|
||||
{
|
||||
SummoningAltar altar = victoria.Altar;
|
||||
|
||||
if ( altar != null )
|
||||
altar.CheckDaemon();
|
||||
}
|
||||
|
||||
PlayerMobile from = System.From;
|
||||
|
||||
if ( !from.Alive )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050033 ); // The devourer lies dead, unfortunately so do you. You cannot claim your reward while dead. You will need to face him again.
|
||||
((TheSummoningQuest)System).WaitForSummon = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool hasRights = true;
|
||||
|
||||
if ( m_Daemon != null )
|
||||
{
|
||||
List<DamageStore> lootingRights = BaseCreature.GetLootingRights( m_Daemon.DamageEntries, m_Daemon.HitsMax );
|
||||
|
||||
for ( int i = 0; i < lootingRights.Count; ++i )
|
||||
{
|
||||
DamageStore ds = lootingRights[i];
|
||||
|
||||
if ( ds.m_HasRight && ds.m_Mobile == from )
|
||||
{
|
||||
hasRights = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !hasRights )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050034 ); // The devourer lies dead. Unfortunately you did not sufficiently prove your worth in combating the devourer. Victoria shall summon another incarnation of the devourer to the circle of stones. Try again noble adventurer.
|
||||
((TheSummoningQuest)System).WaitForSummon = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1050035 ); // The devourer lies dead. Search his corpse to claim your prize!
|
||||
|
||||
if ( m_Daemon != null )
|
||||
m_CorpseWithSkull = m_Daemon.Corpse as Corpse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Daemon = reader.ReadMobile() as BoneDemon;
|
||||
m_CorpseWithSkull = reader.ReadItem() as Corpse;
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Daemon );
|
||||
writer.Write( (Item) m_CorpseWithSkull );
|
||||
}
|
||||
}
|
||||
}
|
||||
163
Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs
Normal file
163
Scripts/Engines/Quests/The Summoning/TheSummoningQuest.cs
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class TheSummoningQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable = new Type[]
|
||||
{
|
||||
typeof( Doom.AcceptConversation ),
|
||||
typeof( Doom.CollectBonesObjective ),
|
||||
typeof( Doom.VanquishDaemonConversation ),
|
||||
typeof( Doom.VanquishDaemonObjective )
|
||||
};
|
||||
|
||||
public override Type[] TypeReferenceTable{ get{ return m_TypeReferenceTable; } }
|
||||
|
||||
private Victoria m_Victoria;
|
||||
private bool m_WaitForSummon;
|
||||
|
||||
public Victoria Victoria
|
||||
{
|
||||
get{ return m_Victoria; }
|
||||
}
|
||||
|
||||
public bool WaitForSummon
|
||||
{
|
||||
get{ return m_WaitForSummon; }
|
||||
set{ m_WaitForSummon = value; }
|
||||
}
|
||||
|
||||
public override object Name
|
||||
{
|
||||
get
|
||||
{
|
||||
// The Summoning
|
||||
return 1050025;
|
||||
}
|
||||
}
|
||||
|
||||
public override object OfferMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
/* <I>Victoria turns to you and smiles...</I><BR><BR>
|
||||
*
|
||||
* Chyloth, eh? He is the ferry man of lake <I>Mortis</I>, beyond which lies
|
||||
* the nest of the <I>The Dark Father</I> - the fountainhead of all the evil
|
||||
* that you see around you here.<BR><BR>
|
||||
*
|
||||
* 800 and some years ago, my sisters and I persuaded the ferry man Chyloth
|
||||
* to take us across the lake to battle the <I>The Dark Father</I>.
|
||||
* My party was utterly destroyed, except for me. For my insolence, I was
|
||||
* cursed by the <I>The Dark Father</I> to wander these halls for eternity,
|
||||
* unable to die - unable to leave.<BR><BR>
|
||||
*
|
||||
* Chyloth usually only crosses over the souls of the undead, but he can be
|
||||
* persuaded otherwise...with a token of gold, in the form of a human skull.
|
||||
* Such a gem can be found only in the belly of the hellspawn known as
|
||||
* <I>the devourer</I>.<BR><BR>
|
||||
*
|
||||
* I can help you summon the beast from the depths of the abyss, but I require
|
||||
* 1000 Daemon bones to do so. If you accept my help, I will store the Daemon
|
||||
* bones for you until you have collected all 1000 of them. Once the bones
|
||||
* are collected in full, I will summon the beast for you, which you must
|
||||
* slay to claim your prize.<BR><BR>
|
||||
*
|
||||
* Do you accept?
|
||||
*/
|
||||
return 1050020;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsTutorial{ get{ return false; } }
|
||||
public override TimeSpan RestartDelay{ get{ return TimeSpan.Zero; } }
|
||||
public override int Picture{ get{ return 0x15B5; } }
|
||||
|
||||
// NOTE: Quest not entirely OSI-accurate: some changes made to prevent numerous OSI bugs
|
||||
|
||||
public override void Slice()
|
||||
{
|
||||
if ( m_WaitForSummon && m_Victoria != null )
|
||||
{
|
||||
SummoningAltar altar = m_Victoria.Altar;
|
||||
|
||||
if ( altar != null && (altar.Daemon == null || !altar.Daemon.Alive) )
|
||||
{
|
||||
if ( From.Map == m_Victoria.Map && From.InRange( m_Victoria, 8 ) )
|
||||
{
|
||||
m_WaitForSummon = false;
|
||||
|
||||
AddConversation( new VanquishDaemonConversation() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.Slice();
|
||||
}
|
||||
|
||||
public static int GetDaemonBonesFor( BaseCreature creature )
|
||||
{
|
||||
if ( creature == null || creature.Controlled || creature.Summoned )
|
||||
return 0;
|
||||
|
||||
int fame = creature.Fame;
|
||||
|
||||
if ( fame < 1500 )
|
||||
return Utility.Dice( 2, 5, -1 );
|
||||
else if ( fame < 20000 )
|
||||
return Utility.Dice( 2, 4, 8 );
|
||||
else
|
||||
return 50;
|
||||
}
|
||||
|
||||
public TheSummoningQuest( Victoria victoria, PlayerMobile from ) : base( from )
|
||||
{
|
||||
m_Victoria = victoria;
|
||||
}
|
||||
|
||||
public TheSummoningQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
|
||||
QuestObjective obj = FindObjective( typeof( CollectBonesObjective ) );
|
||||
|
||||
if ( obj != null && obj.CurProgress > 0 )
|
||||
{
|
||||
From.BankBox.DropItem( new DaemonBone( obj.CurProgress ) );
|
||||
|
||||
From.SendLocalizedMessage( 1050030 ); // The Daemon bones that you have thus far given to Victoria have been returned to you.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation( new AcceptConversation() );
|
||||
}
|
||||
|
||||
public override void ChildDeserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Victoria = reader.ReadMobile() as Victoria;
|
||||
m_WaitForSummon = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize( GenericWriter writer )
|
||||
{
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Victoria );
|
||||
writer.Write( (bool) m_WaitForSummon );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue