#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
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue