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