#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
281
Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs
Normal file
281
Scripts/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
using Server;
|
||||
using Server.Engines.VeteranRewards;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Fireflies : Item, IAddon
|
||||
{
|
||||
public override int LabelNumber { get { return 1150061; }}
|
||||
|
||||
public Item Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
FirefliesDeed deed = new FirefliesDeed();
|
||||
|
||||
return deed;
|
||||
}
|
||||
}
|
||||
|
||||
public bool FacingSouth
|
||||
{
|
||||
get
|
||||
{
|
||||
if( ItemID == 0x2336 )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fireflies()
|
||||
: this( 0x1596 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fireflies( int itemID )
|
||||
: base( itemID )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public Fireflies( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if( from.InRange( Location, 3 ) )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if( house != null && house.IsOwner( from ) )
|
||||
{
|
||||
from.CloseGump( typeof( RewardDemolitionGump ) );
|
||||
from.SendGump( new RewardDemolitionGump( this, 1049783 ) ); // Do you wish to re-deed this decoration?
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1049784 ); // You can only re-deed this decoration if you are the house owner or originally placed the decoration.
|
||||
}
|
||||
else
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public bool CouldFit( IPoint3D p, Map map )
|
||||
{
|
||||
if( map == null || !map.CanFit( p.X, p.Y, p.Z, ItemData.Height ) )
|
||||
return false;
|
||||
|
||||
if( FacingSouth )
|
||||
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
|
||||
else
|
||||
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
|
||||
}
|
||||
}
|
||||
|
||||
public class FirefliesDeed : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1150061; } }
|
||||
|
||||
[Constructable]
|
||||
public FirefliesDeed()
|
||||
: base( 0x14F0 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FirefliesDeed( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( from );
|
||||
|
||||
if( house != null && house.IsOwner( from ) )
|
||||
{
|
||||
from.CloseGump( typeof( FacingGump ) );
|
||||
|
||||
if( !from.SendGump( new FacingGump( this, from ) ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1150062 ); // You fail to re-deed the holiday fireflies.
|
||||
}
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 502092 ); // You must be in your house to do this.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class FacingGump : Gump
|
||||
{
|
||||
private FirefliesDeed m_Deed;
|
||||
private Mobile m_Placer;
|
||||
|
||||
private enum Buttons
|
||||
{
|
||||
Cancel,
|
||||
South,
|
||||
East
|
||||
}
|
||||
|
||||
public FacingGump( FirefliesDeed deed, Mobile player )
|
||||
: base( 150, 50 )
|
||||
{
|
||||
m_Deed = deed;
|
||||
m_Placer = player;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
AddBackground( 0, 0, 300, 150, 0xA28 );
|
||||
|
||||
AddItem( 90, 30, 0x2332 );
|
||||
AddItem( 180, 30, 0x2336 );
|
||||
|
||||
AddButton( 50, 35, 0x868, 0x869, ( int )Buttons.East, GumpButtonType.Reply, 0 );
|
||||
AddButton( 145, 35, 0x868, 0x869, ( int )Buttons.South, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
int m_ItemID;
|
||||
|
||||
switch( (int)info.ButtonID )
|
||||
{
|
||||
case ( int )Buttons.East: m_ItemID = 0x2332; break;
|
||||
case ( int )Buttons.South: m_ItemID = 0x2336; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
m_Placer.Target = new InternalTarget( m_Deed, m_ItemID );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private FirefliesDeed m_FirefliesDeed;
|
||||
private int m_ItemID;
|
||||
|
||||
public InternalTarget( FirefliesDeed m_Deed, int itemid )
|
||||
: base( -1, true, TargetFlags.None )
|
||||
{
|
||||
m_FirefliesDeed = m_Deed;
|
||||
m_ItemID = itemid;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if( m_FirefliesDeed == null || m_FirefliesDeed.Deleted )
|
||||
return;
|
||||
|
||||
if( m_FirefliesDeed.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( from );
|
||||
|
||||
if( house != null && house.IsOwner( from ) )
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
if( p == null || map == null || map == Map.Internal )
|
||||
return;
|
||||
|
||||
Point3D p3d = new Point3D( p );
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & TileData.MaxItemValue ];
|
||||
|
||||
if( map.CanFit( p3d, id.Height ) )
|
||||
{
|
||||
house = BaseHouse.FindHouseAt( p3d, map, id.Height );
|
||||
|
||||
if( house != null && house.IsOwner( from ) )
|
||||
{
|
||||
bool north = BaseAddon.IsWall( p3d.X, p3d.Y - 1, p3d.Z, map );
|
||||
bool west = BaseAddon.IsWall( p3d.X - 1, p3d.Y, p3d.Z, map );
|
||||
|
||||
bool isclear = true;
|
||||
|
||||
foreach( Item item in Map.Malas.GetItemsInRange( p3d, 0 ) )
|
||||
{
|
||||
if( item is Fireflies )
|
||||
{
|
||||
isclear = false;
|
||||
}
|
||||
}
|
||||
|
||||
if( ( ( m_ItemID == 0x2336 && north ) || ( m_ItemID == 0x2332 && west ) ) && isclear )
|
||||
{
|
||||
Fireflies flies = new Fireflies( m_ItemID );
|
||||
|
||||
house.Addons.Add( flies );
|
||||
|
||||
flies.MoveToWorld( p3d, from.Map );
|
||||
|
||||
m_FirefliesDeed.Delete();
|
||||
}
|
||||
|
||||
else
|
||||
from.SendLocalizedMessage( 1150065 ); // Holiday fireflies must be placed next to a wall.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1042036 ); // That location is not in your house.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 500269 ); // You cannot build that there.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 502092 ); // You must be in your house to do this.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
[TypeAlias( "Server.Items.AngelDecoration" )]
|
||||
[Flipable( 0x46FA, 0x46FB )]
|
||||
public class AngelDecoration : Item
|
||||
{
|
||||
public AngelDecoration() : base ( 0x46FA )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Weight = 30;
|
||||
}
|
||||
|
||||
public AngelDecoration( 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/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs
Normal file
35
Scripts/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
[TypeAlias( "Server.Items.RockingHorse" )]
|
||||
[Flipable( 0x4214, 0x4215 )]
|
||||
public class RockingHorse : Item
|
||||
{
|
||||
public RockingHorse() : base ( 0x4214 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Weight = 30;
|
||||
}
|
||||
|
||||
public RockingHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs
Normal file
44
Scripts/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DragonEasterEgg : Item, IDyable
|
||||
{
|
||||
public override int LabelNumber { get { return 1097278; } }
|
||||
|
||||
[Constructable]
|
||||
public DragonEasterEgg()
|
||||
: base( 0x47E6 )
|
||||
{
|
||||
}
|
||||
|
||||
public DragonEasterEgg( 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();
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if( Deleted || !sender.AllowDyables )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
363
Scripts/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs
Normal file
363
Scripts/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs
Normal file
|
|
@ -0,0 +1,363 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Events.Halloween;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.Events
|
||||
{
|
||||
public class TrickOrTreat
|
||||
{
|
||||
public static TimeSpan OneSecond = TimeSpan.FromSeconds( 1 );
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
if( DateTime.UtcNow >= HolidaySettings.StartHalloween && DateTime.UtcNow <= HolidaySettings.FinishHalloween )
|
||||
{
|
||||
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
|
||||
}
|
||||
}
|
||||
|
||||
private static void EventSink_Speech( SpeechEventArgs e )
|
||||
{
|
||||
|
||||
if( Insensitive.Contains( e.Speech, "trick or treat" ) )
|
||||
{
|
||||
e.Mobile.Target = new TrickOrTreatTarget();
|
||||
|
||||
e.Mobile.SendLocalizedMessage( 1076764 ); /* Pick someone to Trick or Treat. */
|
||||
}
|
||||
}
|
||||
|
||||
private class TrickOrTreatTarget : Target
|
||||
{
|
||||
public TrickOrTreatTarget()
|
||||
: base( 15, false, TargetFlags.None )
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targ )
|
||||
{
|
||||
if( targ != null && CheckMobile( from ) )
|
||||
{
|
||||
if( !( targ is Mobile ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076781 ); /* There is little chance of getting candy from that! */
|
||||
return;
|
||||
}
|
||||
if( !( targ is BaseVendor ) || ( ( BaseVendor )targ ).Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076765 ); /* That doesn't look friendly. */
|
||||
return;
|
||||
}
|
||||
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
BaseVendor m_Begged = targ as BaseVendor;
|
||||
|
||||
if( CheckMobile( m_Begged ) )
|
||||
{
|
||||
if( m_Begged.NextTrickOrTreat > now )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076767 ); /* That doesn't appear to have any more candy. */
|
||||
return;
|
||||
}
|
||||
|
||||
m_Begged.NextTrickOrTreat = now + TimeSpan.FromMinutes( Utility.RandomMinMax( 5, 10 ) );
|
||||
|
||||
if( from.Backpack != null && !from.Backpack.Deleted )
|
||||
{
|
||||
if( Utility.RandomDouble() > .10 )
|
||||
{
|
||||
switch( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: m_Begged.Say( 1076768 ); break; /* Oooooh, aren't you cute! */
|
||||
case 1: m_Begged.Say( 1076779 ); break; /* All right...This better not spoil your dinner! */
|
||||
case 2: m_Begged.Say( 1076778 ); break; /* Here you go! Enjoy! */
|
||||
default: break;
|
||||
}
|
||||
|
||||
if( Utility.RandomDouble() <= .01 && from.Skills.Begging.Value >= 100 )
|
||||
{
|
||||
from.AddToBackpack( HolidaySettings.RandomGMBeggerItem );
|
||||
|
||||
from.SendLocalizedMessage( 1076777 ); /* You receive a special treat! */
|
||||
}
|
||||
else
|
||||
{
|
||||
from.AddToBackpack( HolidaySettings.RandomTreat );
|
||||
|
||||
from.SendLocalizedMessage( 1076769 ); /* You receive some candy. */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Begged.Say( 1076770 ); /* TRICK! */
|
||||
|
||||
int m_Action = Utility.Random( 4 );
|
||||
|
||||
if( m_Action == 0 )
|
||||
{
|
||||
Timer.DelayCall<Mobile>( OneSecond, OneSecond, 10, new TimerStateCallback<Mobile>( Bleeding ), from );
|
||||
}
|
||||
else if( m_Action == 1 )
|
||||
{
|
||||
Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 2 ), new TimerStateCallback<Mobile>( SolidHueMobile ), from );
|
||||
}
|
||||
else
|
||||
{
|
||||
Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 2 ), new TimerStateCallback<Mobile>( MakeTwin ), from );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Bleeding( Mobile m_From )
|
||||
{
|
||||
if( TrickOrTreat.CheckMobile( m_From ) )
|
||||
{
|
||||
if( m_From.Location != Point3D.Zero )
|
||||
{
|
||||
int amount = Utility.RandomMinMax( 3, 7 );
|
||||
|
||||
for( int i = 0; i < amount; i++ )
|
||||
{
|
||||
new Blood( Utility.RandomMinMax( 0x122C, 0x122F ) ).MoveToWorld( RandomPointOneAway( m_From.X, m_From.Y, m_From.Z, m_From.Map ), m_From.Map );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveHueMod( Mobile target )
|
||||
{
|
||||
if( target != null && !target.Deleted )
|
||||
{
|
||||
target.SolidHueOverride = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SolidHueMobile( Mobile target )
|
||||
{
|
||||
if( CheckMobile( target ) )
|
||||
{
|
||||
target.SolidHueOverride = Utility.RandomMinMax( 2501, 2644 );
|
||||
|
||||
Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 10 ), new TimerStateCallback<Mobile>( RemoveHueMod ), target );
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeTwin( Mobile m_From )
|
||||
{
|
||||
List<Item> m_Items = new List<Item>();
|
||||
|
||||
if( CheckMobile( m_From ) )
|
||||
{
|
||||
Mobile twin = new NaughtyTwin( m_From );
|
||||
|
||||
if( twin != null && !twin.Deleted )
|
||||
{
|
||||
foreach( Item item in m_From.Items )
|
||||
{
|
||||
if( item.Layer != Layer.Backpack && item.Layer != Layer.Mount && item.Layer != Layer.Bank )
|
||||
{
|
||||
m_Items.Add( item );
|
||||
}
|
||||
}
|
||||
|
||||
if( m_Items.Count > 0 )
|
||||
{
|
||||
for( int i = 0; i < m_Items.Count; i++ ) /* dupe exploits start out like this ... */
|
||||
{
|
||||
twin.AddItem( Mobile.LiftItemDupe( m_Items[ i ], 1 ) );
|
||||
}
|
||||
|
||||
foreach( Item item in twin.Items ) /* ... and end like this */
|
||||
{
|
||||
if( item.Layer != Layer.Backpack && item.Layer != Layer.Mount && item.Layer != Layer.Bank )
|
||||
{
|
||||
item.Movable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
twin.Hue = m_From.Hue;
|
||||
twin.BodyValue = m_From.BodyValue;
|
||||
twin.Kills = m_From.Kills;
|
||||
|
||||
Point3D point = RandomPointOneAway( m_From.X, m_From.Y, m_From.Z, m_From.Map );
|
||||
|
||||
twin.MoveToWorld( m_From.Map.CanSpawnMobile( point ) ? point : m_From.Location, m_From.Map );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 5 ), new TimerStateCallback<Mobile>( DeleteTwin ), twin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteTwin( Mobile m_Twin )
|
||||
{
|
||||
if( TrickOrTreat.CheckMobile( m_Twin ) )
|
||||
{
|
||||
m_Twin.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public static Point3D RandomPointOneAway( int x, int y, int z, Map map )
|
||||
{
|
||||
Point3D loc = new Point3D( x + Utility.Random( -1, 3 ), y + Utility.Random( -1, 3 ), 0 );
|
||||
|
||||
loc.Z = ( map.CanFit( loc, 0 )) ? map.GetAverageZ( loc.X, loc.Y ) : z;
|
||||
|
||||
return loc;
|
||||
}
|
||||
|
||||
public static bool CheckMobile( Mobile mobile )
|
||||
{
|
||||
return ( mobile != null && mobile.Map != null && !mobile.Deleted && mobile.Alive && mobile.Map != Map.Internal );
|
||||
}
|
||||
}
|
||||
|
||||
public class NaughtyTwin : BaseCreature
|
||||
{
|
||||
private Mobile m_From;
|
||||
|
||||
private static Point3D[] Felucca_Locations =
|
||||
{
|
||||
new Point3D( 4467, 1283, 5 ), // Moonglow
|
||||
new Point3D( 1336, 1997, 5 ), // Britain
|
||||
new Point3D( 1499, 3771, 5 ), // Jhelom
|
||||
new Point3D( 771, 752, 5 ), // Yew
|
||||
new Point3D( 2701, 692, 5 ), // Minoc
|
||||
new Point3D( 1828, 2948,-20), // Trinsic
|
||||
new Point3D( 643, 2067, 5 ), // Skara Brae
|
||||
new Point3D( 3563, 2139, Map.Trammel.GetAverageZ( 3563, 2139 ) ), // (New) Magincia
|
||||
};
|
||||
|
||||
private static Point3D[] Malas_Locations =
|
||||
{
|
||||
new Point3D(1015, 527, -65), // Luna
|
||||
new Point3D(1997, 1386, -85) // Umbra
|
||||
};
|
||||
|
||||
private static Point3D[] Ilshenar_Locations =
|
||||
{
|
||||
new Point3D( 1215, 467, -13 ), // Compassion
|
||||
new Point3D( 722, 1366, -60 ), // Honesty
|
||||
new Point3D( 744, 724, -28 ), // Honor
|
||||
new Point3D( 281, 1016, 0 ), // Humility
|
||||
new Point3D( 987, 1011, -32 ), // Justice
|
||||
new Point3D( 1174, 1286, -30 ), // Sacrifice
|
||||
new Point3D( 1532, 1340, - 3 ), // Spirituality
|
||||
new Point3D( 528, 216, -45 ), // Valor
|
||||
new Point3D( 1721, 218, 96 ) // Chaos
|
||||
};
|
||||
|
||||
private static Point3D[] Tokuno_Locations =
|
||||
{
|
||||
new Point3D( 1169, 998, 41 ), // Isamu-Jima
|
||||
new Point3D( 802, 1204, 25 ), // Makoto-Jima
|
||||
new Point3D( 270, 628, 15 ) // Homare-Jima
|
||||
};
|
||||
|
||||
public NaughtyTwin( Mobile from )
|
||||
: base( AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
if( TrickOrTreat.CheckMobile( from ) )
|
||||
{
|
||||
Body = from.Body;
|
||||
|
||||
m_From = from;
|
||||
Name = String.Format( "{0}\'s Naughty Twin", from.Name );
|
||||
|
||||
Timer.DelayCall<Mobile>( TrickOrTreat.OneSecond, Utility.RandomBool() ? new TimerStateCallback<Mobile>( StealCandy ) : new TimerStateCallback<Mobile>( ToGate ), m_From );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if( m_From == null || m_From.Deleted )
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public static Item FindCandyTypes( Mobile target )
|
||||
{
|
||||
Type[] types = { typeof( WrappedCandy ), typeof( Lollipops ), typeof( NougatSwirl ), typeof( Taffy ), typeof( JellyBeans ) };
|
||||
|
||||
if( TrickOrTreat.CheckMobile( target ) )
|
||||
{
|
||||
for( int i = 0; i < types.Length; i++ )
|
||||
{
|
||||
Item item = target.Backpack.FindItemByType( types[ i ] );
|
||||
|
||||
if( item != null )
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void StealCandy( Mobile target )
|
||||
{
|
||||
if( TrickOrTreat.CheckMobile( target ) )
|
||||
{
|
||||
Item item = FindCandyTypes( target );
|
||||
|
||||
target.SendLocalizedMessage( 1113967 ); /* Your naughty twin steals some of your candy. */
|
||||
|
||||
if( item != null && !item.Deleted )
|
||||
{
|
||||
item.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ToGate( Mobile target )
|
||||
{
|
||||
if( TrickOrTreat.CheckMobile( target ) )
|
||||
{
|
||||
target.SendLocalizedMessage( 1113972 ); /* Your naughty twin teleports you away with a naughty laugh! */
|
||||
|
||||
target.MoveToWorld( RandomMoongate( target ), target.Map );
|
||||
}
|
||||
}
|
||||
|
||||
public static Point3D RandomMoongate( Mobile target )
|
||||
{
|
||||
Map map = target.Map;
|
||||
|
||||
switch( target.Map.MapID )
|
||||
{
|
||||
case 2: return Ilshenar_Locations[ Utility.Random( Ilshenar_Locations.Length ) ];
|
||||
case 3: return Malas_Locations[ Utility.Random( Malas_Locations.Length ) ];
|
||||
case 4: return Tokuno_Locations[ Utility.Random( Tokuno_Locations.Length ) ];
|
||||
default: return Felucca_Locations[ Utility.Random( Felucca_Locations.Length ) ];
|
||||
}
|
||||
}
|
||||
|
||||
public NaughtyTwin( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HalloweenPumpkin : Item
|
||||
{
|
||||
private static readonly string[] m_Staff =
|
||||
{
|
||||
"Ryan", "Mark", "Eos", "Athena", "Xavier", "Krrios", "Zippy"
|
||||
};
|
||||
|
||||
[Constructable]
|
||||
public HalloweenPumpkin()
|
||||
: base()
|
||||
{
|
||||
Weight = Utility.RandomMinMax( 3, 20 );
|
||||
ItemID = ( Utility.RandomDouble() <= .02 ) ? Utility.RandomList( 0x4694, 0x4698 ) : Utility.RandomList( 0xc6a, 0xc6b, 0xc6c );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
return;
|
||||
|
||||
bool douse = false;
|
||||
|
||||
switch ( ItemID )
|
||||
{
|
||||
case 0x4694: ItemID = 0x4691; break;
|
||||
case 0x4691: ItemID = 0x4694; douse = true; break;
|
||||
case 0x4698: ItemID = 0x4695; break;
|
||||
case 0x4695: ItemID = 0x4698; douse = true; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( douse ? 1113988 : 1113987 ); // You extinguish/light the Jack-O-Lantern
|
||||
Effects.PlaySound( GetWorldLocation(), Map, douse ? 0x3be : 0x47 );
|
||||
}
|
||||
|
||||
private void AssignRandomName()
|
||||
{
|
||||
Name = String.Format( "{0}'s Jack-O-Lantern", m_Staff[ Utility.Random( m_Staff.Length ) ] );
|
||||
}
|
||||
|
||||
public override bool OnDragLift( Mobile from )
|
||||
{
|
||||
if ( Name == null && ( ItemID == 0x4694 || ItemID == 0x4691 || ItemID == 0x4698 || ItemID == 0x4695 ) )
|
||||
{
|
||||
if ( Utility.RandomBool() )
|
||||
{
|
||||
new PumpkinHead().MoveToWorld( GetWorldLocation(), Map );
|
||||
|
||||
Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
AssignRandomName();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public HalloweenPumpkin( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version == 0 && Name == null && ItemID == 0x4698 )
|
||||
AssignRandomName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PumpkinScarecrow : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1096947; } }
|
||||
|
||||
[Constructable]
|
||||
public PumpkinScarecrow()
|
||||
: base( Utility.RandomBool() ? 0x469B : 0x469C )
|
||||
{
|
||||
}
|
||||
|
||||
public PumpkinScarecrow( 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/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs
Normal file
36
Scripts/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RuinedTapestry : Item
|
||||
{
|
||||
public override string DefaultName{ get { return "Ruined Tapestry "; } }
|
||||
|
||||
[Constructable]
|
||||
public RuinedTapestry()
|
||||
: base( Utility.RandomBool() ? 0x4699 : 0x469A )
|
||||
{
|
||||
}
|
||||
|
||||
public RuinedTapestry( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
||||
public class TwilightLantern : Lantern
|
||||
{
|
||||
public override string DefaultName { get { return "Twilight Lantern"; } }
|
||||
|
||||
[Constructable]
|
||||
public TwilightLantern()
|
||||
: base()
|
||||
{
|
||||
Hue = Utility.RandomBool() ? 244 : 997;
|
||||
}
|
||||
|
||||
public override bool AllowEquipedCast( Mobile from )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
list.Add( 1060482 ); // Spell Channeling
|
||||
}
|
||||
|
||||
public TwilightLantern( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs
Normal file
74
Scripts/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Events.Halloween;
|
||||
|
||||
namespace Server.Engines.Events
|
||||
{
|
||||
public class PumpkinPatchSpawner
|
||||
{
|
||||
private static Timer m_Timer;
|
||||
|
||||
private static Rectangle2D[] m_PumpkinFields =
|
||||
{
|
||||
new Rectangle2D( 4557, 1471, 20, 10 ),
|
||||
new Rectangle2D( 796, 2152, 36, 24 ),
|
||||
new Rectangle2D( 816, 2251, 16, 8 ),
|
||||
new Rectangle2D( 816, 2261, 16, 8 ),
|
||||
new Rectangle2D( 816, 2271, 16, 8 ),
|
||||
new Rectangle2D( 816, 2281, 16, 8 ),
|
||||
new Rectangle2D( 835, 2344, 16, 16 ),
|
||||
new Rectangle2D( 816, 2344, 16, 24 )
|
||||
};
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
if( DateTime.UtcNow >= HolidaySettings.StartHalloween && DateTime.UtcNow <= HolidaySettings.FinishHalloween )
|
||||
{
|
||||
m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromMinutes( .50 ), 0, new TimerCallback( PumpkinPatchSpawnerCallback ));
|
||||
}
|
||||
}
|
||||
|
||||
protected static void PumpkinPatchSpawnerCallback()
|
||||
{
|
||||
AddPumpkin( Map.Felucca );
|
||||
AddPumpkin( Map.Trammel );
|
||||
}
|
||||
|
||||
private static void AddPumpkin( Map map )
|
||||
{
|
||||
for( int i = 0; i < m_PumpkinFields.Length; i++ )
|
||||
{
|
||||
Rectangle2D rect = m_PumpkinFields[ i ];
|
||||
|
||||
int spawncount = ( ( rect.Height * rect.Width ) / 20 );
|
||||
int pumpkins = 0;
|
||||
|
||||
foreach( Item item in map.GetItemsInBounds( rect ) )
|
||||
{
|
||||
if( item is HalloweenPumpkin )
|
||||
{
|
||||
pumpkins++;
|
||||
}
|
||||
}
|
||||
|
||||
if( spawncount > pumpkins )
|
||||
{
|
||||
Item item = new HalloweenPumpkin();
|
||||
|
||||
item.MoveToWorld( RandomPointIn( rect, map ), map );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Point3D RandomPointIn( Rectangle2D rect, Map map )
|
||||
{
|
||||
int x = Utility.Random( rect.X, rect.Width );
|
||||
int y = Utility.Random( rect.Y, rect.Height );
|
||||
int z = map.GetAverageZ( x, y );
|
||||
|
||||
return new Point3D( x, y, z );
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class CreepyCake : Food
|
||||
{
|
||||
public override string DefaultName { get { return "Creepy Cake"; } }
|
||||
|
||||
[Constructable]
|
||||
public CreepyCake()
|
||||
: base( 0x9e9 )
|
||||
{
|
||||
Hue = 0x3E4;
|
||||
}
|
||||
|
||||
public CreepyCake( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs
Normal file
42
Scripts/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class HarvestWine : BeverageBottle
|
||||
{
|
||||
public override string DefaultName { get { return "Harvest Wine"; } }
|
||||
public override double DefaultWeight { get { return 1; } }
|
||||
|
||||
[Constructable]
|
||||
public HarvestWine()
|
||||
: base( BeverageType.Wine )
|
||||
{
|
||||
Hue = 0xe0;
|
||||
}
|
||||
|
||||
public HarvestWine( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MrPlainsCookies : Food
|
||||
{
|
||||
public override string DefaultName{ get { return "Mr Plain's Cookies"; } }
|
||||
|
||||
[Constructable]
|
||||
public MrPlainsCookies( )
|
||||
: base( 0x160C )
|
||||
{
|
||||
this.Weight = 1.0;
|
||||
this.FillFactor = 4;
|
||||
Hue = 0xF4;
|
||||
}
|
||||
|
||||
public MrPlainsCookies( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs
Normal file
46
Scripts/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class MurkyMilk : Pitcher
|
||||
{
|
||||
public override string DefaultName { get { return "Murky Milk";; } }
|
||||
public override int MaxQuantity { get { return 5; } }
|
||||
public override double DefaultWeight { get { return 1; } }
|
||||
|
||||
[Constructable]
|
||||
public MurkyMilk( )
|
||||
: base( BeverageType.Milk )
|
||||
{
|
||||
Hue = 0x3e5;
|
||||
Quantity = MaxQuantity;
|
||||
ItemID = ( Utility.RandomBool() ) ? 0x09F0 : 0x09AD;
|
||||
}
|
||||
|
||||
public MurkyMilk( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class PumpkinPizza : CheesePizza
|
||||
{
|
||||
public override string DefaultName { get { return "Pumpkin Pizza"; } }
|
||||
|
||||
[Constructable]
|
||||
public PumpkinPizza( )
|
||||
: base()
|
||||
{
|
||||
Hue = 0xF3;
|
||||
}
|
||||
|
||||
public PumpkinPizza( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs
Normal file
40
Scripts/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class GrimWarning : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 1; } }
|
||||
|
||||
[Constructable]
|
||||
public GrimWarning ()
|
||||
: base( 0x42BD )
|
||||
{
|
||||
}
|
||||
|
||||
public GrimWarning( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs
Normal file
40
Scripts/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
/*
|
||||
first seen halloween 2009. subsequently in 2010,
|
||||
2011 and 2012. GM Beggar-only Semi-Rare Treats
|
||||
*/
|
||||
|
||||
public class SkullsOnPike : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 1; } }
|
||||
|
||||
[Constructable]
|
||||
public SkullsOnPike()
|
||||
: base( 0x42B5 )
|
||||
{
|
||||
}
|
||||
|
||||
public SkullsOnPike( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ChairInAGhostCostume : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 5; } }
|
||||
|
||||
[Constructable]
|
||||
public ChairInAGhostCostume()
|
||||
: base( 0x3F26 )
|
||||
{
|
||||
}
|
||||
|
||||
public ChairInAGhostCostume( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ColoredSmallWebs : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 5; } }
|
||||
|
||||
[Constructable]
|
||||
public ColoredSmallWebs()
|
||||
: base( Utility.RandomBool() ? 0x10d6 : 0x10d7 )
|
||||
{
|
||||
Hue = Utility.RandomBool() ? 0x455 : 0x4E9;
|
||||
}
|
||||
|
||||
public ColoredSmallWebs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ExcellentIronMaiden : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 5; } }
|
||||
|
||||
[Constructable]
|
||||
public ExcellentIronMaiden()
|
||||
: base( 0x3f15 )
|
||||
{
|
||||
}
|
||||
|
||||
public ExcellentIronMaiden( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HalloweenGuillotine : Item
|
||||
{
|
||||
public override double DefaultWeight { get { return 5; } }
|
||||
|
||||
[Constructable]
|
||||
public HalloweenGuillotine() : base( 0x3F27 )
|
||||
{
|
||||
}
|
||||
|
||||
public HalloweenGuillotine( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
//using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
[TypeAlias( "Server.Items.ClownMask", "Server.Items.DaemonMask", "Server.Items.PlagueMask" )]
|
||||
public class BasePaintedMask : Item
|
||||
{
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
if( m_Staffer != null )
|
||||
{
|
||||
return String.Format( "{0} hand painted by {1}", MaskName, m_Staffer );
|
||||
}
|
||||
|
||||
return MaskName;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string MaskName { get { return "A Mask"; } }
|
||||
|
||||
private string m_Staffer;
|
||||
|
||||
private static string[] m_Staffers =
|
||||
{
|
||||
"Ryan",
|
||||
"Mark",
|
||||
"Krrios",
|
||||
"Zippy",
|
||||
"Athena",
|
||||
"Eos",
|
||||
"Xavier"
|
||||
};
|
||||
|
||||
public BasePaintedMask( int itemid )
|
||||
: this( m_Staffers[ Utility.Random( m_Staffers.Length ) ], itemid )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasePaintedMask( string staffer, int itemid )
|
||||
: base( itemid + Utility.Random( 2 ) )
|
||||
{
|
||||
m_Staffer = staffer;
|
||||
|
||||
Utility.Intern( m_Staffer );
|
||||
}
|
||||
|
||||
public BasePaintedMask( Serial serial ) : base( serial )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( ( int )1 ); // version
|
||||
writer.Write( ( string )m_Staffer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 1 )
|
||||
{
|
||||
m_Staffer = Utility.Intern( reader.ReadString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Holiday Stuff/Halloween/2011/Items/ClownMask.cs
Normal file
35
Scripts/Holiday Stuff/Halloween/2011/Items/ClownMask.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
public class PaintedEvilClownMask : BasePaintedMask
|
||||
{
|
||||
public override string MaskName { get { return "Evil Clown Mask"; } }
|
||||
|
||||
[Constructable]
|
||||
public PaintedEvilClownMask( )
|
||||
: base( 0x4a90 )
|
||||
{
|
||||
}
|
||||
|
||||
public PaintedEvilClownMask( 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/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs
Normal file
36
Scripts/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
public class PaintedDaemonMask : BasePaintedMask
|
||||
{
|
||||
public override string MaskName { get { return "Daemon Mask"; } }
|
||||
|
||||
[Constructable]
|
||||
public PaintedDaemonMask()
|
||||
: base( 0x4a92 )
|
||||
{
|
||||
}
|
||||
|
||||
public PaintedDaemonMask( 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/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs
Normal file
35
Scripts/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
public class PaintedPlagueMask : BasePaintedMask
|
||||
{
|
||||
public override string MaskName { get { return "Plague Mask"; } }
|
||||
|
||||
[Constructable]
|
||||
public PaintedPlagueMask()
|
||||
: base( 0x4A8E )
|
||||
{
|
||||
}
|
||||
|
||||
public PaintedPlagueMask( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Scripts/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs
Normal file
131
Scripts/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Items.Holiday;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a killer pumpkin corpse" )]
|
||||
public class PumpkinHead : BaseCreature
|
||||
{
|
||||
public override bool AutoDispel { get { return true; } }
|
||||
public override bool BardImmune { get { return true; } }
|
||||
public override bool Unprovokable { get { return true; } }
|
||||
public override bool AreaPeaceImmune { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public PumpkinHead()
|
||||
: base( Utility.RandomBool() ? AIType.AI_Melee : AIType.AI_Mage, FightMode.Closest, 10, 1, 0.05, 0.1 )
|
||||
{
|
||||
Name = "a killer pumpkin";
|
||||
Body = 1246 + Utility.Random( 2 );
|
||||
|
||||
BaseSoundID = 268;
|
||||
|
||||
SetStr( 350 );
|
||||
SetDex( 125 );
|
||||
SetInt( 250 );
|
||||
|
||||
SetHits( 500 );
|
||||
SetMana( 1000 );
|
||||
|
||||
SetDamage( 10, 15 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55 );
|
||||
SetResistance( ResistanceType.Fire, 50 );
|
||||
SetResistance( ResistanceType.Cold, 50 );
|
||||
SetResistance( ResistanceType.Poison, 65 );
|
||||
SetResistance( ResistanceType.Energy, 80 );
|
||||
|
||||
SetSkill( SkillName.DetectHidden, 100.0 );
|
||||
SetSkill( SkillName.Meditation, 120.0 );
|
||||
SetSkill( SkillName.Necromancy, 100.0 );
|
||||
SetSkill( SkillName.SpiritSpeak, 120.0 );
|
||||
SetSkill( SkillName.Magery, 160.0 );
|
||||
SetSkill( SkillName.EvalInt, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 80.0 );
|
||||
|
||||
Fame = 5000;
|
||||
Karma = -5000;
|
||||
|
||||
VirtualArmor = 49;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
if( Utility.RandomDouble() < .05 )
|
||||
{
|
||||
//PackItem( new TwilightLantern() ); OLD Halloween
|
||||
|
||||
switch( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: PackItem( new PaintedEvilClownMask() ); break;
|
||||
case 1: PackItem( new PaintedDaemonMask() ); break;
|
||||
case 2: PackItem( new PaintedPlagueMask() ); break;
|
||||
case 3: PackItem( new PaintedEvilJesterMask() ); break;
|
||||
case 4: PackItem( new PaintedPorcelainMask() ); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
PackItem( new WrappedCandy() );
|
||||
AddLoot( LootPack.UltraRich, 2 );
|
||||
}
|
||||
|
||||
public virtual void Lifted_Callback( Mobile from )
|
||||
{
|
||||
if( from != null && !from.Deleted && from is PlayerMobile )
|
||||
{
|
||||
Combatant = from;
|
||||
|
||||
Warmode = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override Item NewHarmfulItem()
|
||||
{
|
||||
Item bad = new AcidSlime( TimeSpan.FromSeconds( 10 ), 25, 30 );
|
||||
|
||||
bad.Name = "gooey nasty pumpkin hummus";
|
||||
|
||||
bad.Hue = 144;
|
||||
|
||||
return bad;
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if( Utility.RandomBool() )
|
||||
{
|
||||
if( from != null && from.Map != null && Map != Map.Internal && Map == from.Map && from.InRange( this, 12 ) )
|
||||
{
|
||||
SpillAcid( ( willKill ) ? this : from, ( willKill ) ? 3 : 1 );
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
public PumpkinHead( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
290
Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs
Normal file
290
Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using Server.Events.Halloween;
|
||||
|
||||
namespace Server.Engines.Events
|
||||
{
|
||||
public class HalloweenHauntings
|
||||
{
|
||||
public static Dictionary<PlayerMobile, ZombieSkeleton> ReAnimated { get { return m_ReAnimated; } set { m_ReAnimated = value; } }
|
||||
|
||||
private static Timer m_Timer;
|
||||
private static Timer m_ClearTimer;
|
||||
|
||||
private static int m_TotalZombieLimit;
|
||||
private static int m_DeathQueueLimit;
|
||||
private static int m_QueueDelaySeconds;
|
||||
private static int m_QueueClearIntervalSeconds;
|
||||
|
||||
private static Dictionary<PlayerMobile, ZombieSkeleton> m_ReAnimated;
|
||||
|
||||
private static List<PlayerMobile> m_DeathQueue;
|
||||
|
||||
private static Rectangle2D[] m_Cemetaries = new Rectangle2D[]
|
||||
{
|
||||
new Rectangle2D(1272,3712,30,20), // Jhelom
|
||||
new Rectangle2D(1337,1444,48,52), // Britain
|
||||
new Rectangle2D(2424,1098,20,28), // Trinsic
|
||||
new Rectangle2D(2728,840,54,54), // Vesper
|
||||
new Rectangle2D(4528,1314,20,28), // Moonglow
|
||||
new Rectangle2D(712,1104,30,22), // Yew
|
||||
new Rectangle2D(5824,1464,22,6), // Fire Dungeon
|
||||
new Rectangle2D(5224,3655,14,5), // T2A
|
||||
|
||||
new Rectangle2D(1272,3712,20,30), // Jhelom
|
||||
new Rectangle2D(1337,1444,52,48), // Britain
|
||||
new Rectangle2D(2424,1098,28,20), // Trinsic
|
||||
new Rectangle2D(2728,840,54,54), // Vesper
|
||||
new Rectangle2D(4528,1314,28,20), // Moonglow
|
||||
new Rectangle2D(712,1104,22,30), // Yew
|
||||
new Rectangle2D(5824,1464,6,22), // Fire Dungeon
|
||||
new Rectangle2D(5224,3655,5,14), // T2A
|
||||
};
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
m_TotalZombieLimit = 200;
|
||||
m_DeathQueueLimit = 200;
|
||||
m_QueueDelaySeconds = 120;
|
||||
m_QueueClearIntervalSeconds = 1800;
|
||||
|
||||
DateTime today = DateTime.UtcNow;
|
||||
TimeSpan tick = TimeSpan.FromSeconds( m_QueueDelaySeconds );
|
||||
TimeSpan clear = TimeSpan.FromSeconds( m_QueueClearIntervalSeconds );
|
||||
|
||||
m_ReAnimated = new Dictionary<PlayerMobile, ZombieSkeleton>();
|
||||
m_DeathQueue = new List<PlayerMobile>();
|
||||
|
||||
if( today >= HolidaySettings.StartHalloween && today <= HolidaySettings.FinishHalloween )
|
||||
{
|
||||
m_Timer = Timer.DelayCall( tick, tick, new TimerCallback( Timer_Callback ) );
|
||||
|
||||
m_ClearTimer = Timer.DelayCall( clear, clear, new TimerCallback( Clear_Callback ) );
|
||||
|
||||
EventSink.PlayerDeath += new PlayerDeathEventHandler( EventSink_PlayerDeath );
|
||||
}
|
||||
}
|
||||
|
||||
public static void EventSink_PlayerDeath( PlayerDeathEventArgs e )
|
||||
{
|
||||
if( e.Mobile != null && !e.Mobile.Deleted ) /* not sure .. better safe than sorry? */
|
||||
{
|
||||
if( e.Mobile is PlayerMobile )
|
||||
{
|
||||
PlayerMobile player = e.Mobile as PlayerMobile;
|
||||
|
||||
if( m_Timer.Running && !m_DeathQueue.Contains( player ) && m_DeathQueue.Count < m_DeathQueueLimit )
|
||||
{
|
||||
m_DeathQueue.Add( player );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void Clear_Callback()
|
||||
{
|
||||
m_ReAnimated.Clear();
|
||||
|
||||
m_DeathQueue.Clear();
|
||||
|
||||
if( DateTime.UtcNow <= HolidaySettings.FinishHalloween )
|
||||
{
|
||||
m_ClearTimer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private static void Timer_Callback()
|
||||
{
|
||||
PlayerMobile player = null;
|
||||
|
||||
if( DateTime.UtcNow <= HolidaySettings.FinishHalloween )
|
||||
{
|
||||
for( int index = 0; m_DeathQueue.Count > 0 && index < m_DeathQueue.Count; index++ )
|
||||
{
|
||||
if( !m_ReAnimated.ContainsKey( m_DeathQueue[ index ] ) )
|
||||
{
|
||||
player = m_DeathQueue[ index ];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( player != null && !player.Deleted && m_ReAnimated.Count < m_TotalZombieLimit )
|
||||
{
|
||||
Map map = Utility.RandomBool() ? Map.Trammel : Map.Felucca;
|
||||
|
||||
Point3D home = ( GetRandomPointInRect( m_Cemetaries[ Utility.Random( m_Cemetaries.Length ) ], map ));
|
||||
|
||||
if( map.CanSpawnMobile( home ) )
|
||||
{
|
||||
ZombieSkeleton zombieskel = new ZombieSkeleton( player );
|
||||
|
||||
m_ReAnimated.Add( player, zombieskel );
|
||||
zombieskel.Home = home;
|
||||
zombieskel.RangeHome = 10;
|
||||
|
||||
zombieskel.MoveToWorld( home, map );
|
||||
|
||||
m_DeathQueue.Remove( player );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private static Point3D GetRandomPointInRect( Rectangle2D rect, Map map )
|
||||
{
|
||||
int x = Utility.Random( rect.X, rect.Width );
|
||||
int y = Utility.Random( rect.Y, rect.Height );
|
||||
|
||||
return new Point3D( x, y, map.GetAverageZ( x, y ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerBones : BaseContainer
|
||||
{
|
||||
[Constructable]
|
||||
public PlayerBones( String name )
|
||||
: base( Utility.RandomMinMax( 0x0ECA, 0x0ED2 ) )
|
||||
{
|
||||
Name = String.Format( "{0}'s bones", name );
|
||||
|
||||
switch( Utility.Random( 10 ) )
|
||||
{
|
||||
case 0: Hue = 0xa09; break;
|
||||
case 1: Hue = 0xa93; break;
|
||||
case 2: Hue = 0xa47; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerBones( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a rotting corpse" )]
|
||||
public class ZombieSkeleton : BaseCreature
|
||||
{
|
||||
private static readonly string m_Name = "Zombie Skeleton";
|
||||
|
||||
private PlayerMobile m_DeadPlayer;
|
||||
|
||||
public ZombieSkeleton()
|
||||
: this( null )
|
||||
{
|
||||
}
|
||||
|
||||
public ZombieSkeleton( PlayerMobile player )
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
m_DeadPlayer = player;
|
||||
|
||||
Name = ( player != null ) ? String.Format( "{0}'s {1}", player.Name, m_Name ) : m_Name;
|
||||
|
||||
Body = 0x93;
|
||||
BaseSoundID = 0x1c3;
|
||||
|
||||
SetStr( 500 );
|
||||
SetDex( 500 );
|
||||
SetInt( 500 );
|
||||
|
||||
SetHits( 2500 );
|
||||
SetMana( 500 );
|
||||
SetStam( 500 );
|
||||
|
||||
SetDamage( 8, 18 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 40 );
|
||||
SetDamageType( ResistanceType.Cold, 60 );
|
||||
|
||||
SetResistance( ResistanceType.Fire, 50 );
|
||||
SetResistance( ResistanceType.Energy, 50 );
|
||||
SetResistance( ResistanceType.Physical, 50 );
|
||||
SetResistance( ResistanceType.Cold, 50 );
|
||||
SetResistance( ResistanceType.Poison, 50 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 65.1, 80.0 );
|
||||
SetSkill( SkillName.Tactics, 95.1, 100 );
|
||||
SetSkill( SkillName.Wrestling, 85.1, 95 );
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 18;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
switch( Utility.Random( 10 ) )
|
||||
{
|
||||
case 0: PackItem( new LeftArm() ); break;
|
||||
case 1: PackItem( new RightArm() ); break;
|
||||
case 2: PackItem( new Torso() ); break;
|
||||
case 3: PackItem( new Bone() ); break;
|
||||
case 4: PackItem( new RibCage() ); break;
|
||||
case 5: if( m_DeadPlayer != null && !m_DeadPlayer.Deleted ) { PackItem( new PlayerBones( m_DeadPlayer.Name ) ); } break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool BleedImmune { get { return true; } }
|
||||
|
||||
public override Poison PoisonImmune { get { return Poison.Regular; } }
|
||||
|
||||
public ZombieSkeleton( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if( HalloweenHauntings.ReAnimated != null )
|
||||
{
|
||||
if( m_DeadPlayer != null && !m_DeadPlayer.Deleted )
|
||||
{
|
||||
if( HalloweenHauntings.ReAnimated.Count > 0 && HalloweenHauntings.ReAnimated.ContainsKey( m_DeadPlayer ) )
|
||||
{
|
||||
HalloweenHauntings.ReAnimated.Remove( m_DeadPlayer );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( ( int )0 );
|
||||
|
||||
writer.WriteMobile( m_DeadPlayer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_DeadPlayer = ( PlayerMobile )reader.ReadMobile();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs
Normal file
35
Scripts/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
public class PaintedEvilJesterMask : BasePaintedMask
|
||||
{
|
||||
public override string MaskName { get { return "Evil Jester Mask"; } }
|
||||
|
||||
[Constructable]
|
||||
public PaintedEvilJesterMask()
|
||||
: base( 0x4BA5 )
|
||||
{
|
||||
}
|
||||
|
||||
public PaintedEvilJesterMask( 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/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs
Normal file
35
Scripts/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
public class PaintedPorcelainMask : BasePaintedMask
|
||||
{
|
||||
public override string MaskName { get { return "Porcelain Mask"; } }
|
||||
|
||||
[Constructable]
|
||||
public PaintedPorcelainMask()
|
||||
: base( 0x4BA7 )
|
||||
{
|
||||
}
|
||||
|
||||
public PaintedPorcelainMask( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( ( int )1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Holiday Stuff/Halloween/HolidaySettings.cs
Normal file
40
Scripts/Holiday Stuff/Halloween/HolidaySettings.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Events.Halloween
|
||||
{
|
||||
class HolidaySettings
|
||||
{
|
||||
public static DateTime StartHalloween { get { return new DateTime( 2012, 10, 24 ); } } // YY MM DD
|
||||
public static DateTime FinishHalloween { get { return new DateTime( 2012, 11, 15 ); } }
|
||||
|
||||
public static Item RandomGMBeggerItem { get { return ( Item )Activator.CreateInstance( m_GMBeggarTreats[ Utility.Random( m_GMBeggarTreats.Length ) ] ); } }
|
||||
public static Item RandomTreat { get { return (Item)Activator.CreateInstance ( m_Treats[ Utility.Random( m_Treats.Length ) ]) ; } }
|
||||
|
||||
private static Type[] m_GMBeggarTreats =
|
||||
{
|
||||
typeof( CreepyCake ),
|
||||
typeof( PumpkinPizza ),
|
||||
typeof( GrimWarning ),
|
||||
typeof( HarvestWine ),
|
||||
typeof( MurkyMilk ),
|
||||
typeof( MrPlainsCookies ),
|
||||
typeof( SkullsOnPike ),
|
||||
typeof( ChairInAGhostCostume ),
|
||||
typeof( ExcellentIronMaiden ),
|
||||
typeof( HalloweenGuillotine ),
|
||||
typeof( ColoredSmallWebs )
|
||||
};
|
||||
|
||||
private static Type[] m_Treats =
|
||||
{
|
||||
typeof( Lollipops ),
|
||||
typeof( WrappedCandy ),
|
||||
typeof( JellyBeans ),
|
||||
typeof( Taffy ),
|
||||
typeof( NougatSwirl )
|
||||
};
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/Treats/Jellybeans.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/Treats/Jellybeans.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JellyBeans : CandyCane
|
||||
{
|
||||
public override int LabelNumber { get { return 1096932; } } /* jellybeans */
|
||||
|
||||
[Constructable]
|
||||
public JellyBeans()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public JellyBeans( int amount )
|
||||
: base( 0x468C )
|
||||
{
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public JellyBeans( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/Treats/Lollipops.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/Treats/Lollipops.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[TypeAlias( "Server.Items.Lollipop" )]
|
||||
public class Lollipops : CandyCane
|
||||
{
|
||||
[Constructable]
|
||||
public Lollipops()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Lollipops( int amount )
|
||||
: base( 0x468D + Utility.Random( 3 ))
|
||||
{
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public Lollipops( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Holiday Stuff/Halloween/Treats/NougatSwirl.cs
Normal file
42
Scripts/Holiday Stuff/Halloween/Treats/NougatSwirl.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NougatSwirl : CandyCane
|
||||
{
|
||||
public override int LabelNumber { get { return 1096936; } } /* nougat swirl */
|
||||
|
||||
[Constructable]
|
||||
public NougatSwirl() : this(1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NougatSwirl( int amount )
|
||||
: base( 0x4690 )
|
||||
{
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public NougatSwirl( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/Treats/Taffy.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/Treats/Taffy.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Taffy : CandyCane
|
||||
{
|
||||
public override int LabelNumber { get { return 1096949; } } /* taffy */
|
||||
|
||||
[Constructable]
|
||||
public Taffy()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public Taffy( int amount )
|
||||
: base( 0x469D )
|
||||
{
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public Taffy( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Holiday Stuff/Halloween/Treats/WrappedCandy.cs
Normal file
41
Scripts/Holiday Stuff/Halloween/Treats/WrappedCandy.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WrappedCandy : CandyCane
|
||||
{
|
||||
public override int LabelNumber { get { return 1096950; } } /* wrapped candy */
|
||||
|
||||
[Constructable]
|
||||
public WrappedCandy()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public WrappedCandy( int amount )
|
||||
: base( 0x469e )
|
||||
{
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public WrappedCandy( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x49CC, 0x49D0 )]
|
||||
public class AnimatedHeartShapedBox : HeartShapedBox
|
||||
{
|
||||
[Constructable]
|
||||
public AnimatedHeartShapedBox()
|
||||
{
|
||||
ItemID = 0x49CC;
|
||||
}
|
||||
|
||||
public AnimatedHeartShapedBox( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
300
Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs
Normal file
300
Scripts/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class StValentinesBear : Item
|
||||
{
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Owner != null )
|
||||
return String.Format( "{0}'s St. Valentine Bear", m_Owner );
|
||||
else
|
||||
return "St. Valentine Bear";
|
||||
}
|
||||
}
|
||||
|
||||
private string m_Owner;
|
||||
private string m_Line1;
|
||||
private string m_Line2;
|
||||
private string m_Line3;
|
||||
|
||||
private DateTime m_EditLimit;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Owner
|
||||
{
|
||||
get { return m_Owner; }
|
||||
set { m_Owner = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Line1
|
||||
{
|
||||
get { return m_Line1; }
|
||||
set { m_Line1 = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Line2
|
||||
{
|
||||
get { return m_Line2; }
|
||||
set { m_Line2 = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Line3
|
||||
{
|
||||
get { return m_Line3; }
|
||||
set { m_Line3 = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime EditLimit
|
||||
{
|
||||
get { return m_EditLimit; }
|
||||
set { m_EditLimit = value; }
|
||||
}
|
||||
|
||||
public bool IsSigned
|
||||
{
|
||||
get { return ( m_Line1 != null || m_Line2 != null || m_Line3 != null ); }
|
||||
}
|
||||
|
||||
public bool CanSign
|
||||
{
|
||||
get { return ( !IsSigned || DateTime.UtcNow <= m_EditLimit ); }
|
||||
}
|
||||
|
||||
public StValentinesBear( int itemid, string name )
|
||||
: base( itemid )
|
||||
{
|
||||
m_Owner = name;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( m_Owner != null )
|
||||
list.Add( 1150295, m_Owner ); // ~1_NAME~'s St. Valentine Bear
|
||||
else
|
||||
list.Add( 1150294 ); // St. Valentine Bear
|
||||
|
||||
AddLine( list, 1150301, m_Line1 ); // [ ~1_LINE0~ ]
|
||||
AddLine( list, 1150302, m_Line2 ); // [ ~1_LINE1~ ]
|
||||
AddLine( list, 1150303, m_Line3 ); // [ ~1_LINE2~ ]
|
||||
}
|
||||
|
||||
private static void AddLine( ObjectPropertyList list, int cliloc, string line )
|
||||
{
|
||||
if ( line != null )
|
||||
list.Add( cliloc, line );
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
ShowLine( from, 1150301, m_Line1 ); // [ ~1_LINE0~ ]
|
||||
ShowLine( from, 1150302, m_Line2 ); // [ ~1_LINE1~ ]
|
||||
ShowLine( from, 1150303, m_Line3 ); // [ ~1_LINE2~ ]
|
||||
}
|
||||
|
||||
private void ShowLine( Mobile from, int cliloc, string line )
|
||||
{
|
||||
if ( line != null )
|
||||
LabelTo( from, cliloc, line );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !CupidsArrow.CheckSeason( from ) || !CanSign )
|
||||
return;
|
||||
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendGump( new InternalGump( this ) );
|
||||
}
|
||||
|
||||
public StValentinesBear( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)0 );
|
||||
|
||||
writer.Write( m_Owner );
|
||||
writer.Write( m_Line1 );
|
||||
writer.Write( m_Line2 );
|
||||
writer.Write( m_Line3 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Owner = Utility.Intern( reader.ReadString() );
|
||||
m_Line1 = Utility.Intern( reader.ReadString() );
|
||||
m_Line2 = Utility.Intern( reader.ReadString() );
|
||||
m_Line3 = Utility.Intern( reader.ReadString() );
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private StValentinesBear m_Bear;
|
||||
|
||||
public InternalGump( StValentinesBear bear )
|
||||
: base( 50, 50 )
|
||||
{
|
||||
m_Bear = bear;
|
||||
|
||||
AddPage( 0 );
|
||||
AddBackground( 0, 0, 420, 320, 9300 );
|
||||
AddHtml( 10, 10, 400, 21, "<CENTER>St. Valentine Bear</CENTER>", false, false );
|
||||
AddHtmlLocalized( 10, 40, 400, 75, 1150293, 0, false, false ); // Enter up to three lines of personalized greeting for your St. Valentine Bear. You many enter up to 25 characters per line. Once you enter text, you will only be able to correct mistakes for 10 minutes.
|
||||
|
||||
AddHtmlLocalized( 10, 129, 400, 21, 1150296, 0, false, false ); // Line 1:
|
||||
AddBackground( 10, 150, 400, 24, 9350 );
|
||||
AddTextEntry( 15, 152, 390, 20, 0, 0, "", 25 );
|
||||
|
||||
AddHtmlLocalized( 10, 179, 400, 21, 1150297, 0, false, false ); // Line 2:
|
||||
AddBackground( 10, 200, 400, 24, 9350 );
|
||||
AddTextEntry( 15, 202, 390, 20, 0, 1, "", 25 );
|
||||
|
||||
AddHtmlLocalized( 10, 229, 400, 21, 1150298, 0, false, false ); // Line 3:
|
||||
AddBackground( 10, 250, 400, 24, 9350 );
|
||||
AddTextEntry( 15, 252, 390, 20, 0, 2, "", 25 );
|
||||
|
||||
AddButton( 15, 285, 242, 241, 0, GumpButtonType.Reply, 0 );
|
||||
AddButton( 335, 285, 247, 248, 1, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
Mobile from = sender.Mobile;
|
||||
|
||||
if ( m_Bear.Deleted || !m_Bear.IsChildOf( from.Backpack ) || !m_Bear.CanSign || info.ButtonID != 1 )
|
||||
return;
|
||||
|
||||
string line1 = GetLine( info, 0 );
|
||||
string line2 = GetLine( info, 1 );
|
||||
string line3 = GetLine( info, 2 );
|
||||
|
||||
if ( string.IsNullOrEmpty( line1 )
|
||||
|| string.IsNullOrEmpty( line2 )
|
||||
|| string.IsNullOrEmpty( line3 ) )
|
||||
{
|
||||
from.SendMessage( "Lines cannot be left blank." );
|
||||
return;
|
||||
}
|
||||
else if ( line1.Length > 25
|
||||
|| line2.Length > 25
|
||||
|| line3.Length > 25 )
|
||||
{
|
||||
from.SendMessage( "Lines may not exceed 25 characters." );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !m_Bear.IsSigned )
|
||||
m_Bear.EditLimit = DateTime.UtcNow + TimeSpan.FromMinutes( 10 );
|
||||
|
||||
m_Bear.Line1 = Utility.FixHtml( line1 );
|
||||
m_Bear.Line2 = Utility.FixHtml( line2 );
|
||||
m_Bear.Line3 = Utility.FixHtml( line3 );
|
||||
|
||||
from.SendMessage( "You add the personalized greeting to your St. Valentine Bear." );
|
||||
}
|
||||
|
||||
private static string GetLine( RelayInfo info, int idx )
|
||||
{
|
||||
TextRelay tr = info.GetTextEntry( idx );
|
||||
|
||||
return ( tr == null ) ? null : tr.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x48E0, 0x48E1 )]
|
||||
public class StValentinesPanda : StValentinesBear
|
||||
{
|
||||
[Constructable]
|
||||
public StValentinesPanda()
|
||||
: this( null )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StValentinesPanda( string name )
|
||||
: base( 0x48E0, name )
|
||||
{
|
||||
}
|
||||
|
||||
public StValentinesPanda( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x48E2, 0x48E3 )]
|
||||
public class StValentinesPolarBear : StValentinesBear
|
||||
{
|
||||
[Constructable]
|
||||
public StValentinesPolarBear()
|
||||
: this( null )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StValentinesPolarBear( string name )
|
||||
: base( 0x48E2, name )
|
||||
{
|
||||
}
|
||||
|
||||
public StValentinesPolarBear( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs
Normal file
37
Scripts/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x4F7C, 0x4F7D )]
|
||||
public class CupidStatue : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1099220; } } // cupid statue
|
||||
|
||||
[Constructable]
|
||||
public CupidStatue()
|
||||
: base( 0x4F7D )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public CupidStatue( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
135
Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs
Normal file
135
Scripts/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CupidsArrow : Item
|
||||
{
|
||||
// TODO: Check messages
|
||||
|
||||
public override int LabelNumber { get { return 1152270; } } // Cupid's Arrow 2012
|
||||
|
||||
private string m_From;
|
||||
private string m_To;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string From
|
||||
{
|
||||
get { return m_From; }
|
||||
set { m_From = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string To
|
||||
{
|
||||
get { return m_To; }
|
||||
set { m_To = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public bool IsSigned
|
||||
{
|
||||
get { return ( m_From != null && m_To != null ); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CupidsArrow()
|
||||
: base( 0x4F7F )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
|
||||
if ( IsSigned )
|
||||
list.Add( 1152273, String.Format( "{0}\t{1}", m_From, m_To ) ); // ~1_val~ is madly in love with ~2_val~
|
||||
}
|
||||
|
||||
public static bool CheckSeason( Mobile from )
|
||||
{
|
||||
if ( DateTime.UtcNow.Month == 2 )
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage( 1152318 ); // You may not use this item out of season.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( IsSigned )
|
||||
LabelTo( from, 1152273, String.Format( "{0}\t{1}", m_From, m_To ) ); // ~1_val~ is madly in love with ~2_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsSigned || !CheckSeason( from ) )
|
||||
return;
|
||||
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
from.BeginTarget( 10, false, TargetFlags.None, new TargetCallback( OnTarget ) );
|
||||
from.SendMessage( "Who do you wish to use this on?" );
|
||||
}
|
||||
|
||||
private void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( IsSigned || !IsChildOf( from.Backpack ) )
|
||||
return;
|
||||
|
||||
if ( targeted is Mobile )
|
||||
{
|
||||
Mobile m = (Mobile)targeted;
|
||||
|
||||
if ( !m.Alive )
|
||||
{
|
||||
from.SendLocalizedMessage( 1152269 ); // That target is dead and even Cupid's arrow won't make them love you.
|
||||
return;
|
||||
}
|
||||
|
||||
m_From = from.Name;
|
||||
m_To = m.Name;
|
||||
|
||||
InvalidateProperties();
|
||||
|
||||
from.SendMessage( "You inscribe the arrow." );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "That is not a person." );
|
||||
}
|
||||
}
|
||||
|
||||
public CupidsArrow( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)0 );
|
||||
|
||||
writer.Write( m_From );
|
||||
writer.Write( m_To );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_From = Utility.Intern( reader.ReadString() );
|
||||
m_To = Utility.Intern( reader.ReadString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs
Normal file
55
Scripts/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x49CA, 0x49CB )]
|
||||
public class HeartShapedBox : BaseContainer
|
||||
{
|
||||
public override int DefaultDropSound { get { return m_DropSound; } }
|
||||
|
||||
[Constructable]
|
||||
public HeartShapedBox()
|
||||
: base( 0x49CA )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto( Mobile from, Item item, Point3D p )
|
||||
{
|
||||
PrepareSound( from );
|
||||
return base.OnDragDropInto( from, item, p );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
PrepareSound( from );
|
||||
return base.OnDragDrop( from, dropped );
|
||||
}
|
||||
|
||||
private static int m_DropSound;
|
||||
|
||||
private static void PrepareSound( Mobile from )
|
||||
{
|
||||
m_DropSound = from.Female ? 0x430 : 0x320;
|
||||
}
|
||||
|
||||
public HeartShapedBox( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue