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