#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.

This commit is contained in:
WarrentyExpired 2026-08-06 11:06:05 -04:00
parent b51c58f514
commit 3045c83799
3512 changed files with 627673 additions and 0 deletions

View file

@ -0,0 +1,198 @@
using System;
using System.Collections;
using System.Collections.Generic;
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.Necro
{
public class Horus : BaseQuester
{
[Constructable]
public Horus() : base( "the Guardian" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x83F3;
Body = 0x190;
Name = "Horus";
}
public override void InitOutfit()
{
AddItem( SetHue( new PlateLegs(), 0x849 ) );
AddItem( SetHue( new PlateChest(), 0x849 ) );
AddItem( SetHue( new PlateArms(), 0x849 ) );
AddItem( SetHue( new PlateGloves(), 0x849 ) );
AddItem( SetHue( new PlateGorget(), 0x849 ) );
AddItem( SetHue( new Bardiche(), 0x482 ) );
AddItem( SetHue( new Boots(), 0x001 ) );
AddItem( SetHue( new Cloak(), 0x482 ) );
Utility.AssignRandomHair( this, false );
Utility.AssignRandomFacialHair( this, false );
}
public override int GetAutoTalkRange( PlayerMobile m )
{
return 3;
}
public override bool CanTalkTo( PlayerMobile to )
{
QuestSystem qs = to.Quest;
return ( qs is DarkTidesQuest && qs.IsObjectiveInProgress( typeof( FindCrystalCaveObjective ) ) );
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( FindCrystalCaveObjective ) );
if ( obj != null && !obj.Completed )
obj.Complete();
}
}
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if ( InRange( m.Location, 2 ) && !InRange( oldLocation, 2 ) && m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
QuestSystem qs = pm.Quest;
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnToCrystalCaveObjective ) );
if ( obj != null && !obj.Completed )
obj.Complete();
else
{
obj = qs.FindObjective( typeof( FindHorusAboutRewardObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
cont.DropItem( new Gold( 500 ) );
BaseJewel jewel = new GoldBracelet();
if ( Core.AOS )
BaseRunicTool.ApplyAttributesTo( jewel, 3, 20, 40 );
cont.DropItem( jewel );
if ( !pm.PlaceInBackpack( cont ) )
{
cont.Delete();
pm.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();
}
}
}
}
}
}
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
if ( from.Alive )
{
PlayerMobile pm = from as PlayerMobile;
if ( pm != null )
{
QuestSystem qs = pm.Quest;
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
bool enabled = ( obj != null && !obj.Completed );
list.Add( new SpeakPasswordEntry( this, pm, enabled ) );
}
}
}
}
public virtual void OnPasswordSpoken( PlayerMobile from )
{
QuestSystem qs = from.Quest;
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
return;
}
}
from.SendLocalizedMessage( 1060185 ); // Horus ignores you.
}
private class SpeakPasswordEntry : ContextMenuEntry
{
private Horus m_Horus;
private PlayerMobile m_From;
public SpeakPasswordEntry( Horus horus, PlayerMobile from, bool enabled ) : base( 6193, 3 )
{
m_Horus = horus;
m_From = from;
if ( !enabled )
Flags |= CMEFlags.Disabled;
}
public override void OnClick()
{
if ( m_From.Alive )
m_Horus.OnPasswordSpoken( m_From );
}
}
public Horus( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,47 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Necro
{
public class Maabus : BaseQuester
{
public Maabus()
{
}
public override void InitBody()
{
Body = 0x94;
Name = "Maabus";
}
public Maabus( Serial serial ) : base( serial )
{
}
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();
}
}
}

View file

@ -0,0 +1,230 @@
using System;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
using Server.Engines.Quests.Necro;
namespace Server.Engines.Quests.Necro
{
public class Mardoth : BaseQuester
{
[Constructable]
public Mardoth() : base( "the Ancient Necromancer" )
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
Hue = 0x8849;
Body = 0x190;
Name = "Mardoth";
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
PlayerMobile player = from as PlayerMobile;
if ( player != null )
{
QuestSystem qs = player.Quest;
if ( qs is DarkTidesQuest )
{
if ( dropped is DarkTidesHorn )
{
if ( player.Young )
{
DarkTidesHorn horn = (DarkTidesHorn)dropped;
if ( horn.Charges < 10 )
{
SayTo( from, 1049384 ); // I have recharged the item for you.
horn.Charges = 10;
}
else
{
SayTo( from, 1049385 ); // That doesn't need recharging yet.
}
}
else
{
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
}
return false;
}
}
}
return base.OnDragDrop( from, dropped );
}
public override void InitOutfit()
{
AddItem( new Sandals( 0x1 ) );
AddItem( new Robe( 0x66D ) );
AddItem( new BlackStaff() );
AddItem( new WizardsHat( 0x1 ) );
FacialHairItemID = 0x2041;
FacialHairHue = 0x482;
HairItemID = 0x203C;
HairHue = 0x482;
Item gloves = new BoneGloves();
gloves.Hue = 0x66D;
AddItem( gloves );
Item gorget = new PlateGorget();
gorget.Hue = 0x1;
AddItem( gorget );
}
public override int GetAutoTalkRange( PlayerMobile m )
{
return 3;
}
public override bool CanTalkTo( PlayerMobile to )
{
DarkTidesQuest qs = to.Quest as DarkTidesQuest;
if ( qs == null )
return ( to.Quest == null && QuestSystem.CanOfferQuest( to, typeof( DarkTidesQuest ) ) );
return ( qs.FindObjective( typeof( FindMardothAboutVaultObjective ) ) != null );
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is DarkTidesQuest )
{
if ( DarkTidesQuest.HasLostCallingScroll( player ) )
{
qs.AddConversation( new LostCallingScrollConversation( true ) );
}
else
{
QuestObjective obj = qs.FindObjective( typeof( FindMardothAboutVaultObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindMardothAboutKronusObjective ) );
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindMardothEndObjective ) );
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
cont.DropItem( new PigIron( 20 ) );
cont.DropItem( new NoxCrystal( 20 ) );
cont.DropItem( new BatWing( 25 ) );
cont.DropItem( new DaemonBlood( 20 ) );
cont.DropItem( new GraveDust( 20 ) );
BaseWeapon weapon = new BoneHarvester();
weapon.Slayer = SlayerName.OrcSlaying;
if ( Core.AOS )
{
BaseRunicTool.ApplyAttributesTo( weapon, 3, 20, 40 );
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
}
cont.DropItem( weapon );
cont.DropItem( new BankCheck( 2000 ) );
cont.DropItem( new EnchantedSextant() );
if ( !player.PlaceInBackpack( cont ) )
{
cont.Delete();
player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
}
else
{
obj.Complete();
}
}
else if ( contextMenu )
{
FocusTo( player );
player.SendLocalizedMessage( 1061821 ); // Mardoth has nothing more for you at this time.
}
}
}
}
}
else if ( qs == null && QuestSystem.CanOfferQuest( player, typeof( DarkTidesQuest ) ) )
{
new DarkTidesQuest( player ).SendOffer();
}
}
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if ( m is PlayerMobile && !m.Frozen && !m.Alive && InRange( m, 4 ) && !InRange( oldLocation, 4 ) && InLOS( m ) )
{
if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
{
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
}
else
{
Direction = GetDirectionTo( m );
m.PlaySound( 0x214 );
m.FixedEffect( 0x376A, 10, 16 );
m.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
}
}
}
public Mardoth( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,241 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Engines.Quests.Necro
{
public class SummonedPaladin : BaseCreature
{
private PlayerMobile m_Necromancer;
private bool m_ToDelete;
public SummonedPaladin( PlayerMobile necromancer ) : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
m_Necromancer = necromancer;
InitStats( 45, 30, 5 );
Title = "the Paladin";
Hue = 0x83F3;
Female = false;
Body = 0x190;
Name = NameList.RandomName( "male" );
Utility.AssignRandomHair( this );
Utility.AssignRandomFacialHair( this, false );
FacialHairHue = HairHue;
AddItem( new Boots( 0x1 ) );
AddItem( new ChainChest() );
AddItem( new ChainLegs() );
AddItem( new RingmailArms() );
AddItem( new PlateHelm() );
AddItem( new PlateGloves() );
AddItem( new PlateGorget() );
AddItem( new Cloak( 0xCF ) );
AddItem( new ThinLongsword() );
SetSkill( SkillName.Swords, 50.0 );
SetSkill( SkillName.Tactics, 50.0 );
PackGold( 500 );
}
public override bool IsHarmfulCriminal(Mobile target)
{
if ( target == m_Necromancer )
return false;
return base.IsHarmfulCriminal( target );
}
public override bool ClickTitle{ get { return false; } }
public override bool PlayerRangeSensitive{ get { return false; } }
public override void OnThink()
{
if ( !m_ToDelete && !Frozen )
{
if ( m_Necromancer == null || m_Necromancer.Deleted || m_Necromancer.Map == Map.Internal )
{
Delete();
return;
}
if ( Combatant != m_Necromancer )
Combatant = m_Necromancer;
if ( !m_Necromancer.Alive )
{
QuestSystem qs = m_Necromancer.Quest;
if ( qs is DarkTidesQuest && qs.FindObjective( typeof( FindMardothEndObjective ) ) == null )
qs.AddObjective( new FindMardothEndObjective( false ) );
Say( 1060139, m_Necromancer.Name ); // You have made my work easy for me, ~1_NAME~. My task here is done.
m_ToDelete = true;
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( Delete ) );
}
else if ( m_Necromancer.Map != Map || GetDistanceToSqrt( m_Necromancer ) > RangePerception + 1 )
{
Effects.SendLocationParticles( EffectItem.Create( Location, Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( m_Necromancer.Location, m_Necromancer.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );
Map = m_Necromancer.Map;
Location = m_Necromancer.Location;
PlaySound( 0x1FE );
Say( 1060140 ); // You cannot escape me, knave of evil!
}
}
base.OnThink();
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
QuestSystem qs = m_Necromancer.Quest;
if ( qs is DarkTidesQuest && qs.FindObjective( typeof( FindMardothEndObjective ) ) == null )
qs.AddObjective( new FindMardothEndObjective( true ) );
}
public SummonedPaladin( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (Mobile) m_Necromancer );
writer.Write( (bool) m_ToDelete );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Necromancer = reader.ReadMobile() as PlayerMobile;
m_ToDelete = reader.ReadBool();
if ( m_ToDelete )
Delete();
}
public static void BeginSummon( PlayerMobile player )
{
new SummonTimer( player ).Start();
}
private class SummonTimer : Timer
{
private PlayerMobile m_Player;
private SummonedPaladin m_Paladin;
private int m_Step;
public SummonTimer( PlayerMobile player ) : base( TimeSpan.FromSeconds( 4.0 ) )
{
Priority = TimerPriority.FiftyMS;
m_Player = player;
}
protected override void OnTick()
{
if ( m_Player.Deleted )
{
if ( m_Step > 0 )
m_Paladin.Delete();
return;
}
if ( m_Step > 0 && m_Paladin.Deleted )
return;
if ( m_Step == 0 )
{
SummonedPaladinMoongate moongate = new SummonedPaladinMoongate();
moongate.MoveToWorld( new Point3D( 2091, 1348, -90 ), Map.Malas );
Effects.PlaySound( moongate.Location, moongate.Map, 0x20E );
m_Paladin = new SummonedPaladin( m_Player );
m_Paladin.Frozen = true;
m_Paladin.Location = moongate.Location;
m_Paladin.Map = moongate.Map;
Delay = TimeSpan.FromSeconds( 2.0 );
Start();
}
else if ( m_Step == 1 )
{
m_Paladin.Direction = m_Paladin.GetDirectionTo( m_Player );
m_Paladin.Say( 1060122 ); // STOP WICKED ONE!
Delay = TimeSpan.FromSeconds( 3.0 );
Start();
}
else
{
m_Paladin.Frozen = false;
m_Paladin.Say( 1060123 ); // I will slay you before I allow you to complete your evil rites!
m_Paladin.Combatant = m_Player;
}
m_Step++;
}
}
}
public class SummonedPaladinMoongate : Item
{
public SummonedPaladinMoongate() : base( 0xF6C )
{
Movable = false;
Hue = 0x482;
Light = LightType.Circle300;
Timer.DelayCall( TimeSpan.FromSeconds( 10.0 ), new TimerCallback( Delete ) );
}
public SummonedPaladinMoongate( 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();
Delete();
}
}
}