#W# Initial Commit: Avatars Conquest

This commit is contained in:
WarrentyExpired 2026-07-03 20:19:48 -04:00
commit 8eae46895e
7512 changed files with 416187 additions and 0 deletions

View file

@ -0,0 +1,41 @@
using Server;
using System;
namespace Server.Items
{
[FlipableAttribute( 0xE97, 0xE98 )]
public class BookOfLore : Item
{
[Constructable]
public BookOfLore() : base( 0xE97 )
{
Name = "Book of Lore";
Hue = Utility.RandomList( 0x558, 0x8A1, 0x89F, 0x84E, 0x851, 0x556, 0x551, 0x8AD, 0x847, 0x84A, 0x89D, 0x89B, 0x845, 0x846, 0x429, 0x55F, 0x562, 0x430, 0x432, 0x441, 0x970, 0x96D, 0x905, 0x83B, 0x83E, 0x980, 0x97F, 0x969, 0x96A, 0x96B );
Movable = false;
}
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
from.SendMessage( "That is too far away!" );
else if ( !Server.Misc.QuestFunctions.MonstersNearby( from ) )
from.SendMessage( "You learn nothing of interest from this book." );
}
public BookOfLore( 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,41 @@
using Server;
using System;
namespace Server.Items
{
[FlipableAttribute( 0x0890, 0x0891 )]
public class ChestOfSecrets : Item
{
[Constructable]
public ChestOfSecrets() : base( 0x0890 )
{
Name = "golden chest";
Light = LightType.Circle150;
Movable = false;
}
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
from.SendMessage( "That is too far away!" );
else if ( !Server.Misc.QuestFunctions.MonstersNearby( from ) )
from.SendMessage( "You find nothing of interest in the chest." );
}
public ChestOfSecrets( 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,30 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Misc
{
class QuestFunctions
{
public static bool MonstersNearby( Mobile m )
{
bool inCombat = ( m.Combatant != null && m.InRange( m.Combatant.Location, 20 ) && m.Combatant.InLOS( m ) );
int monsters = 0;
foreach ( Mobile monster in m.GetMobilesInRange( 8 ) )
{
if ( monster is BaseCreature && !(((BaseCreature)monster).GetMaster() is PlayerMobile) )
monsters++;
}
if ( monsters > 0 || inCombat )
{
m.SendMessage( "You cannot do that with enemies nearby!" );
return true;
}
return false;
}
}
}