Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,94 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Commands;
using Server.Network;
using Server.Targeting;
namespace Server.Items
{
public class CustomFrontDoor : StrongWoodDoor
{
public override void Use( Mobile from )
{
Item item = from.Backpack.FindItemByType(typeof(CustomFrontDoorKey ) );
if ( item != null )
{
if ( item != this )
{
Locked = false;
from.SendMessage( "You have unlocked the front door." );
from.PlaySound( 0x1FF );
}
else
{
Locked = true;
return;
}
if ( m_Message != null && m_Message.Length > 0 )
from.SendMessage( m_Message );
base.Use( from );
}
}
[Constructable]
public CustomFrontDoor( DoorFacing facing ) : base( facing )
{
Name = "a front door - Requires Front Door Key";
}
private DateTime m_Unlocked;
[ CommandProperty( AccessLevel.GameMaster ) ]
public DateTime Unlocked
{
get { return m_Unlocked; }
set { m_Unlocked = value; }
}
private string m_Message = null;
[CommandProperty( AccessLevel.GameMaster )]
public string Message
{
get{ return m_Message; }
set{ m_Message = value; }
}
// determines how long the door remains unlocked
private TimeSpan m_RelockTime = TimeSpan.FromMinutes( 30.0 );
[ CommandProperty( AccessLevel.GameMaster ) ]
public TimeSpan RelockTime
{
get { return m_RelockTime; }
set { m_RelockTime = value; }
}
public CustomFrontDoor( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
writer.Write( m_Unlocked );
writer.Write( m_RelockTime );
writer.Write( m_Message );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Unlocked = reader.ReadDateTime();
m_RelockTime = reader.ReadTimeSpan();
m_Message = reader.ReadString();
}
}
}

View File

@@ -0,0 +1,40 @@
using System;
using Server;
namespace Server.Items
{
public class CustomFrontDoorKey : Item
{
[Constructable]
public CustomFrontDoorKey() : base( 0x100F )
{
Name = "Custom Front Door Key";
Weight = 0.1;
LootType = LootType.Blessed;
}
public override void OnDoubleClick( Mobile m )
{
m.SendMessage( "the key to The Front Door." );
}
public CustomFrontDoorKey( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}