Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Druid
|
||||
{
|
||||
public class LureStone : Item
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public LureStone(Mobile owner): base (0x1355)
|
||||
{
|
||||
m_Owner=owner;
|
||||
Movable = false;
|
||||
Name="Lure Stone";
|
||||
}
|
||||
|
||||
public LureStone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement{ get{ return true;} }
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
Delete();
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation )
|
||||
{
|
||||
if(m_Owner!=null)
|
||||
{
|
||||
if ( m.InRange( this, 600 ) )
|
||||
{
|
||||
BaseCreature cret = m as BaseCreature;
|
||||
if(cret!=null)
|
||||
if(cret.Tamable&&(cret.Combatant==null||!cret.Combatant.Alive||cret.Combatant.Deleted))
|
||||
{
|
||||
double tamer = m_Owner.Skills[SkillName.AnimalLore].Value;
|
||||
double bonus = m_Owner.Skills[SkillName.AnimalTaming].Value/100;
|
||||
if(cret.MinTameSkill<=(tamer+bonus)+0.1)
|
||||
cret.TargetLocation = new Point2D( this.X,this.Y );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Druid
|
||||
{
|
||||
public class MushroomCircle : Item
|
||||
{
|
||||
private Timer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public MushroomCircle ()
|
||||
{
|
||||
}
|
||||
|
||||
public MushroomCircle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
m.SendMessage("The magic of the stones prevents you from crossing.");
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Druid
|
||||
{
|
||||
[DispellableField]
|
||||
public class MushroomGateCircle : Moongate
|
||||
{
|
||||
private int m_ItemID;
|
||||
|
||||
public MushroomGateCircle (Point3D target, Map map, int item)
|
||||
{
|
||||
m_ItemID=item;
|
||||
|
||||
if ( ShowFeluccaWarning && map == Map.Felucca )
|
||||
{
|
||||
Hue = 1175;
|
||||
ItemID=m_ItemID;
|
||||
}
|
||||
|
||||
InternalTimer t = new InternalTimer( this );
|
||||
t.Start();
|
||||
}
|
||||
|
||||
public MushroomGateCircle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
Delete();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Item m_Item;
|
||||
|
||||
public InternalTimer( Item item ) : base( TimeSpan.FromSeconds( 30.0 ) )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Item.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Druid
|
||||
{
|
||||
public class SacredStone : Item
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private bool m_campSecure = false;
|
||||
private Timer m_campSecureTimer;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override bool HandlesOnMovement{ get{ return true; } }
|
||||
public static int CampingRange{ get{ return 5; } }
|
||||
|
||||
[Constructable]
|
||||
public SacredStone( Mobile owner ) : base ( 0x8E3 )
|
||||
{
|
||||
Movable = false;
|
||||
Name="Sacred Stone";
|
||||
|
||||
m_Owner = owner;
|
||||
|
||||
m_Timer = new DecayTimer( this );
|
||||
m_Timer.Start();
|
||||
|
||||
m_campSecureTimer = new SecureTimer( m_Owner, this );
|
||||
m_campSecureTimer.Start();
|
||||
}
|
||||
|
||||
public SacredStone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Owner );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_Timer = new DecayTimer( this );
|
||||
m_Timer.Start();
|
||||
m_campSecureTimer = new SecureTimer( m_Owner, this );
|
||||
m_campSecureTimer.Start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
if( ( m is PlayerMobile ) && ( m == m_Owner ) )
|
||||
{
|
||||
bool inOldRange = Utility.InRange( oldLocation, Location, CampingRange );
|
||||
bool inNewRange = Utility.InRange( m.Location, Location, CampingRange );
|
||||
|
||||
if ( inNewRange && !inOldRange )
|
||||
OnEnter( m );
|
||||
else if ( inOldRange && !inNewRange )
|
||||
OnExit( m );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnEnter( Mobile m )
|
||||
{
|
||||
StartSecureTimer();
|
||||
}
|
||||
|
||||
public virtual void OnExit( Mobile m )
|
||||
{
|
||||
StopSecureTimer();
|
||||
m.SendMessage( "You have left the grove." );
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
}
|
||||
|
||||
private class DecayTimer : Timer
|
||||
{
|
||||
private SacredStone m_Owner;
|
||||
|
||||
public DecayTimer( SacredStone owner ) : base( TimeSpan.FromMinutes( 2.0 ) )
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Owner.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool CampSecure
|
||||
{
|
||||
get { return m_campSecure; }
|
||||
set { m_campSecure = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Camper{ get { return m_Owner; } }
|
||||
|
||||
public void StartSecureTimer()
|
||||
{
|
||||
Camper.SendMessage( "You start to feel secure" ); // You feel it would take a few moments to secure your camp.
|
||||
if( m_campSecureTimer.Running == false )
|
||||
{
|
||||
m_campSecure = false;
|
||||
m_campSecureTimer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public void StopSecureTimer()
|
||||
{
|
||||
m_campSecure = false;
|
||||
m_campSecureTimer.Stop();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
base.OnDelete();
|
||||
if( m_campSecureTimer != null )
|
||||
StopSecureTimer();
|
||||
}
|
||||
|
||||
private class SecureTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private SacredStone m_SacredStone;
|
||||
|
||||
public SecureTimer( Mobile owner , SacredStone SacredStone ) : base( TimeSpan.FromSeconds( 30.0 ) )
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
m_SacredStone = SacredStone;
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_SacredStone.CampSecure = true;
|
||||
m_Owner.SendMessage( "The power of the grove washes over you." );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user